Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » XSDImporter.java cannot run headless
XSDImporter.java cannot run headless [message #598036] Thu, 27 April 2006 03:24
Scott Hendrickson is currently offline Scott HendricksonFriend
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));
Previous Topic:Inheritance Problem
Next Topic:XSDImporter.java cannot run headless
Goto Forum:
  


Current Time: Thu Apr 25 00:52:44 GMT 2024

Powered by FUDForum. Page generated in 0.02844 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top