XSDImporter.java cannot run headless [message #598036] |
Thu, 27 April 2006 03:24 |
Scott Hendrickson Messages: 69 Registered: July 2009 |
Member |
|
|
When converting XSD to ECore headless, I would get a
NullPointerException in XSDImporter.java when there were errors or
warnings in my schema:
Exception in thread "main" java.lang.NullPointerException at
org.eclipse.xsd.ecore.importer.XSDImporter.doComputeEPackage s(XSDImporter.java:142)
This was because it was trying to get the plugin instance, which is null
when running headless. Below is a patch to use a plugin id directly
"org.eclipse.xsd.ecore.importer". This seems to coincide with the
OK_INSTANCE and CANCEL_INSTANCE in Diagnostic.java.
Could this patch be applied?
Thanks,
-- Scott
### Eclipse Workspace Patch 1.0
#P org.eclipse.xsd.ecore.importer
Index: src/org/eclipse/xsd/ecore/importer/XSDImporter.java
============================================================ =======
RCS file:
/cvsroot/tools/org.eclipse.xsd/plugins/org.eclipse.xsd.ecore .importer/src/org/eclipse/xsd/ecore/importer/XSDImporter.jav a,v
retrieving revision 1.8
diff -u -r1.8 XSDImporter.java
--- src/org/eclipse/xsd/ecore/importer/XSDImporter.java 14 Dec 2005
08:00:01 -0000 1.8
+++ src/org/eclipse/xsd/ecore/importer/XSDImporter.java 27 Apr 2006
03:14:12 -0000
@@ -139,7 +139,7 @@
List information = (List)i.next();
diagnostic.add(new BasicDiagnostic(
"error".equals(information.get(0)) ? Diagnostic.ERROR :
"warning".equals(information.get(0)) ? Diagnostic.WARNING : Diagnostic.INFO,
- XSDImporterPlugin.getPlugin().getBundle().getSymbolicName(),
+ "org.eclipse.xsd.ecore.importer",
0,
(String)information.get(1),
null));
|
|
|
Powered by
FUDForum. Page generated in 0.03751 seconds