Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsXcore 100 EClassifier limit?
https://www.eclipse.org/forums/index.php/mv/msg/840643/1455743/#msg_1455743
Turns out that if I get rid of 13 of those entries everything generates ok. And then if I add just one back, the files mentioned above disappear and I get compile errors all over the place.
Is this a known problem? Is there a workaround (like using multiple .xcore files or splitting into subpackages or something)?
Thanks for the help.]]>Erick Hagstrom2014-10-29T18:08:32-00:00Re: Xcore 100 EClassifier limit?
https://www.eclipse.org/forums/index.php/mv/msg/840643/1455754/#msg_1455754
Erick Hagstrom2014-10-29T18:21:17-00:00Re: Xcore 100 EClassifier limit?
https://www.eclipse.org/forums/index.php/mv/msg/840643/1455787/#msg_1455787
I just created several test .xcore files. One, with 500 class entries. All generates well. Add the 501st class and generation of Factory, Package, and .util fails. But don't add the 501st class. Stick with 500 classes and add a single attribute to any one of them. Gen fails again.
Another, with 100 class entries, each of which has 4 attributes. All generates well. Add the 101st class (an empty one) and gen fails. Leave it in and comment out one of the attributes on one of the other classes and gen works again.
So are there any suggestions on how I can proceed with my excessively large .xcore file for my doesn't-seem-so-large project?
Thanks]]>Erick Hagstrom2014-10-29T19:08:44-00:00Re: Xcore 100 EClassifier limit?
https://www.eclipse.org/forums/index.php/mv/msg/840643/1456565/#msg_1456565
Please open a bugzilla with an Xcore instance that reproduces the
problem so I can have a look. Also have a look in the Error Log; likely
there's a clue there about what's gone wrong. I suspect it's a bug
that's been fixed in the in the pre-SR2 maintenance stream, so please
first try updating from http://download.eclipse.org/modeling/emf/emf/updates/2.10.x to pick up
that fix. Alternatively, try setting "Initialize by Loading" to fast in
the properties view when you have the package declaration of the *.xcore
selected; hopefully that doesn't generate class files that have too much
byte code, but also should avoid this problem, if my theory is correct.
On 29/10/2014 8:08 PM, Erick Hagstrom wrote:
> Ok, there doesn't seem to be a 100 EClassifier limit. It's a 500
> ENamedElement limit.
>
> I just created several test .xcore files. One, with 500 class entries.
> All generates well. Add the 501st class and generation of Factory,
> Package, and .util fails. But don't add the 501st class. Stick with
> 500 classes and add a single attribute to any one of them. Gen fails
> again.
>
> Another, with 100 class entries, each of which has 4 attributes. All
> generates well. Add the 101st class (an empty one) and gen fails.
> Leave it in and comment out one of the attributes on one of the other
> classes and gen works again.
>
> So are there any suggestions on how I can proceed with my excessively
> large .xcore file for my doesn't-seem-so-large project?
>
> Thanks]]>Ed Merks2014-10-30T13:44:25-00:00Re: Xcore 100 EClassifier limit?
https://www.eclipse.org/forums/index.php/mv/msg/840643/1456648/#msg_1456648
I opened bugzilla #449370 for this.
You are correct, the update fixes the problem.
Prior to updating, Initialize by Loading -> false also fixed the problem.
The error log reveals a NPE in GenPackageGeneratorAdapter.java. More specifically,
*** Begin Error Log ***
!ENTRY org.eclipse.emf.codegen.ecore 2 0 2014-10-30 10:54:06.609
!MESSAGE
!STACK 0
java.lang.NullPointerException
at org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter$3.redirect(GenPackageGeneratorAdapter.java:483)
at org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter$3.setBaseURI(GenPackageGeneratorAdapter.java:534)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:401)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1430)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfChangedWithMemoryBuffer(ResourceImpl.java:1144)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:985)
at org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter.generatePackageSerialization(GenPackageGeneratorAdapter.java:544)
at org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter.generateModel(GenPackageGeneratorAdapter.java:213)
at org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter.doGenerate(GenBaseGeneratorAdapter.java:215)
at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.generate(AbstractGeneratorAdapter.java:317)
at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:708)
at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:619)
at org.eclipse.emf.ecore.xcore.generator.XcoreGenerator.generateGenModel(XcoreGenerator.java:279)
at org.eclipse.emf.ecore.xcore.generator.XcoreGenerator.doGenerate(XcoreGenerator.java:227)
at org.eclipse.xtext.builder.BuilderParticipant.handleChangedContents(BuilderParticipant.java:515)
at org.eclipse.emf.ecore.xcore.ui.builder.XcoreBuildParticipant.handleChangedContents(XcoreBuildParticipant.java:135)
at org.eclipse.xtext.builder.BuilderParticipant.handleChangedContents(BuilderParticipant.java:505)
at org.eclipse.xtext.builder.BuilderParticipant.doGenerate(BuilderParticipant.java:490)
at org.eclipse.xtext.builder.BuilderParticipant.doBuild(BuilderParticipant.java:259)
at org.eclipse.xtext.builder.BuilderParticipant.build(BuilderParticipant.java:217)
at org.eclipse.emf.ecore.xcore.ui.builder.XcoreBuildParticipant.build(XcoreBuildParticipant.java:48)
at org.eclipse.xtext.builder.impl.RegistryBuilderParticipant$DeferredBuilderParticipant.build(RegistryBuilderParticipant.java:158)
at org.eclipse.xtext.builder.impl.RegistryBuilderParticipant.build(RegistryBuilderParticipant.java:68)
at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:196)
at org.eclipse.xtext.builder.impl.XtextBuilder.incrementalBuild(XtextBuilder.java:171)
at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:99)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
*** End Error Log ***
Sounds like you have a good handle on this issue, so I'll consider it closed. Thanks!]]>Erick Hagstrom2014-10-30T15:25:54-00:00