|[Xcore] Standalone app generates EJavaObject types [message #1835598]
||Tue, 08 December 2020 07:23
| Miguel Jimenez
Registered: July 2015
Last year I created a demo application using gradle to generate the .ecore and .genmodel files from an Xcore model. You can find that app here:|
To generate those files, run "gradle xcoreExport". It will run a custom task (ExportXcoreTask.java) and generate the files in "model-gen". Since .ecore and .genmodel files are not ignored, you can find the original <generated> files in the repository.
When I run the custom task now, the types are always EJavaObject, but it worked well before (See Example.ecore).
My two questions:
1. Since I'm using specific versions of the dependencies, why is the app not generating the correct types anymore?
2. How do I fix the custom task, so that it generates the correct types? I tried many many things but none worked.
This is the base code in the task:
final Injector injector = new XcoreStandaloneSetup()
final XtextResourceSet set =
final URI uri =
final ResourceSet rset = new ResourceSetImpl();
final Resource input = rset.getResource(uri, true);
After the last line, the "input" resource has two errors:
XtextLinkingDiagnostic: null:1 Ecore cannot be resolved.
XtextLinkingDiagnostic: null:2 GenModel cannot be resolved.
[Updated on: Tue, 08 December 2020 07:36]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02080 seconds