Author: rob.stryker(a)jboss.com
Date: 2007-06-22 13:44:44 -0400 (Fri, 22 Jun 2007)
New Revision: 2163
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java
Log:
fixed lack of compilation
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java 2007-06-22
16:31:35 UTC (rev 2162)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/ArchivesModel.java 2007-06-22
17:44:44 UTC (rev 2163)
@@ -257,7 +257,7 @@
}
}
- protected ArchiveNodeImpl createPackageNodeImpl (IPath project, XbPackageNode node,
IArchiveNode parent) {
+ public ArchiveNodeImpl createPackageNodeImpl (IPath project, XbPackageNode node,
IArchiveNode parent) {
if( node instanceof XbPackages ) {
ArchiveModelNode impl = (ArchiveModelNode)getRoot(project);
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java 2007-06-22
16:31:35 UTC (rev 2162)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java 2007-06-22
17:44:44 UTC (rev 2163)
@@ -29,6 +29,7 @@
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
+import java.io.StringWriter;
import java.io.Writer;
import java.net.URL;
@@ -38,6 +39,8 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.jboss.ide.eclipse.archives.core.ArchivesCore;
import org.jboss.ide.eclipse.archives.core.Trace;
+import org.jboss.ide.eclipse.archives.core.model.IArchive;
+import org.jboss.ide.eclipse.archives.core.model.internal.ArchiveImpl;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
@@ -115,7 +118,16 @@
return element;
}
- public static void marshal (final XbPackages element, final Writer writer, final
IProgressMonitor monitor)
+ public static String marshall(IArchive topLevelArchive, IProgressMonitor monitor ) {
+ if( topLevelArchive.isTopLevel() && topLevelArchive instanceof ArchiveImpl ) {
+ XbPackages packs =
(XbPackages)((ArchiveImpl)topLevelArchive).getNodeDelegate().getParent();
+ StringWriter sw = new StringWriter();
+ marshall(packs, sw, monitor);
+ return sw.toString();
+ }
+ return null;
+ }
+ public static void marshall (final XbPackages element, final Writer writer, final
IProgressMonitor monitor)
{
if( !initialized) init();
binderSandbox(new Runnable() {
@@ -150,7 +162,7 @@
try {
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
OutputStreamWriter writer = new OutputStreamWriter(bytesOut);
- XMLBinding.marshal(packages, writer, monitor);
+ XMLBinding.marshall(packages, writer, monitor);
writer.close();
ByteArrayInputStream bytesIn = new ByteArrayInputStream(bytesOut.toByteArray());
@@ -173,7 +185,7 @@
try {
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
OutputStreamWriter writer = new OutputStreamWriter(bytesOut);
- XMLBinding.marshal(packages, writer, monitor);
+ XMLBinding.marshall(packages, writer, monitor);
writer.close();
return new String(bytesOut.toByteArray());
} catch( Exception e ) {
Show replies by date