Bug with EcoreGeneratorFragment in xtext 2.4M5? [message #1015560] |
Fri, 01 March 2013 09:04 |
Victor Noël Messages: 112 Registered: June 2010 |
Senior Member |
|
|
Hi,
I'm trying to work on a language based on xbase and another metamodel I wrote, which refers to JavaVMTypes.
My language refers to things from Xtypes and JavaVMTypes.
When the EcoreGeneratorFragment is executed I get this error:
java.lang.NullPointerException
at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.hasExtendedMetaData(GenPackageImpl.java:4417)
at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.initialize(GenPackageImpl.java:2807)
at org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl.initialize(GenModelImpl.java:2317)
at org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment.getSaveAndReconcileGenModel(EcoreGeneratorFragment.java:666)
at org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment.generate(EcoreGeneratorFragment.java:220)
at org.eclipse.xtext.generator.CompositeGeneratorFragment.generate(CompositeGeneratorFragment.java:92)
at org.eclipse.xtext.generator.LanguageConfig.generate(LanguageConfig.java:113)
at org.eclipse.xtext.generator.Generator.generate(Generator.java:361)
at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:128)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
I did a bit of debug, and the problem is that on line 4437 of GenPackageImpl, when looking for the ePackage of the references, at one point the eCrossReference is, I don't know why, a proxy to a EClass of JavaVMTypes and not a direct reference as with the other references.
And this proxy seems to return null for getEPackage(), which results on the NPE happening later.
Maybe something is wrong in my code, so I'm going to check again, but I'm not sure that behaviour is wanted when such a situation happens :)
Thanks!
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03996 seconds