Author: rob.stryker(a)jboss.com
Date: 2007-05-22 12:58:47 -0400 (Tue, 22 May 2007)
New Revision: 2064
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/ArchivesCorePlugin.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java
Log:
moved xb's initialization into the binding itself
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/ArchivesCorePlugin.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/ArchivesCorePlugin.java 2007-05-22
16:50:00 UTC (rev 2063)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/eclipse/org/jboss/ide/eclipse/archives/core/ArchivesCorePlugin.java 2007-05-22
16:58:47 UTC (rev 2064)
@@ -54,9 +54,6 @@
// Load the workspace version of ArchivesCore
ArchivesCore core = new WorkspaceArchivesCore();
-
- // force JBossXB initialization
- XMLBinding.init();
}
/*
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-05-22
16:50:00 UTC (rev 2063)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java 2007-05-22
16:58:47 UTC (rev 2064)
@@ -49,6 +49,8 @@
private static URL log4jxml =
ArchivesCore.getInstance().getVariables().getBindingLog4j();
private static SchemaBinding binding;
+ private static boolean initialized = false;
+
static {
System.setProperty("log4j.configuration", log4jxml.toString());
}
@@ -60,6 +62,7 @@
binding = XsdBinder.bind(stream, "UTF-8", null);
stream.close();
+ initialized = true;
} catch (IOException e) {
Trace.trace(XMLBinding.class, e);
}
@@ -78,6 +81,7 @@
public static XbPackages unmarshal (final InputStream in, final IProgressMonitor
monitor)
{
+ if( !initialized) init();
element = null;
binderSandbox(new Runnable() {
@@ -103,6 +107,7 @@
public static void marshal (final XbPackages element, final Writer writer, final
IProgressMonitor monitor)
{
+ if( !initialized) init();
binderSandbox(new Runnable() {
public void run () {
try {
Show replies by date