Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » NewXMLGenerator.createCMDocument() returns null
NewXMLGenerator.createCMDocument() returns null [message #723081] Wed, 07 September 2011 11:10 Go to next message
gegtot Missing name is currently offline gegtot Missing name
Messages: 6
Registered: September 2011
Junior Member
Hi all,

Just found out that NewXMLGenerator would be a great solution for me to create empty xml skeletons based on schemas.

However, the code snippet below returns cmDocument = null no matter what I do. Am I missing something really obvious here, or is this a bug?

schemaFileName = "file:///home/.../workspace3/xmlgeneratorplugin/myxsd.xsd";
CMDocument cmDocument = NewXMLGenerator.createCMDocument(schemaFileName, errorInfo);


The errorInfo[0] is empty, which strangely implies that all went fine.

I've tried different ways of passing the path including the IFile way...

Thanks,
Georg




Re: NewXMLGenerator.createCMDocument() returns null [message #723096 is a reply to message #723081] Wed, 07 September 2011 11:29 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26014
Registered: July 2009
Senior Member
Where does NewXMLGenerator come from?


On 07/09/2011 8:10 AM, gegtot wrote:
> Hi all,
>
> Just found out that NewXMLGenerator would be a great solution for me
> to create empty xml skeletons based on schemas.
>
> However, the code snippet below returns cmDocument = null no matter
> what I do. Am I missing something really obvious here, or is this a bug?
> schemaFileName =
> "file:///home/.../workspace3/xmlgeneratorplugin/myxsd.xsd";
> CMDocument cmDocument =
> NewXMLGenerator.createCMDocument(schemaFileName, errorInfo);
>
> The errorInfo[0] is empty, which strangely implies that all went fine.
>
> I've tried different ways of passing the path including the IFile way...
>
> Thanks,
> Georg
>
>
>
>
>
Re: NewXMLGenerator.createCMDocument() returns null [message #723415 is a reply to message #723096] Thu, 08 September 2011 09:51 Go to previous messageGo to next message
gegtot Missing name is currently offline gegtot Missing name
Messages: 6
Registered: September 2011
Junior Member
I got it from download.eclipse.org/webtools/repository/helios/ (import org.eclipse.wst.xml.ui.internal.wizards.NewXMLGenerator;)
Eclipse version info:
Eclipse SDK
Version: 3.5.2
Build id: M20100211-1343

I downloaded the source of org.eclipse.wst.xml.core.internal.contentmodel.CMDocument and started debugging it. In ContentModelManager.java the following code returns null.

	public static ContentModelManager getInstance() {
		if (instance == null) {
			instance = new ContentModelManager();
		}
		return instance;


while saying "com.sun.jdi.InvocationException occurred invoking method."
Re: NewXMLGenerator.createCMDocument() returns null [message #723467 is a reply to message #723415] Thu, 08 September 2011 11:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26014
Registered: July 2009
Senior Member
So best you ask on the webtools newsgroup/forum about this. Only if the
classes involved are org.eclipse.xsd.* can I help you with that.


On 08/09/2011 6:51 AM, gegtot wrote:
> I got it from download.eclipse.org/webtools/repository/helios/ (import
> org.eclipse.wst.xml.ui.internal.wizards.NewXMLGenerator;)
> Eclipse version info:
> Eclipse SDK
> Version: 3.5.2
> Build id: M20100211-1343
>
> I downloaded the source of
> org.eclipse.wst.xml.core.internal.contentmodel.CMDocument and started
> debugging it. In ContentModelManager.java the following code returns
> null.
>
> public static ContentModelManager getInstance() {
> if (instance == null) {
> instance = new ContentModelManager();
> }
> return instance;
>
> while saying "com.sun.jdi.InvocationException occurred invoking method."
Re: NewXMLGenerator.createCMDocument() returns null [message #723480 is a reply to message #723467] Thu, 08 September 2011 12:21 Go to previous message
gegtot Missing name is currently offline gegtot Missing name
Messages: 6
Registered: September 2011
Junior Member
ok, thanks missed that...

for those interested, see [message #723478]
Previous Topic:CVC-complex-type.5.2 error message that nobody seems to be able to understand...
Next Topic:some kind of restriction
Goto Forum:
  


Current Time: Fri Aug 29 22:30:52 EDT 2014

Powered by FUDForum. Page generated in 0.02377 seconds