| Summary: | MWE2 EcoreGeneratorFragment referencedGenModels might be inferred from grammar imports | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Dietmar Stoll <btickets> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | jan, moritz.eysholdt |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Unfortunately, the genmodel could reside in a completely different location. It does not necessarily be in the same directory as the ecore file. EcoreGeneratorFragment.referencedGenModels is deprecated. Please use the StandaloneSetup.registerGenModelFile property which is a list. True, a quick fix could only use a heuristic. Maybe it is not worth the effort. This inference is already working with Xtext 2.0... however, the referenced GenModels are determined based on which EPackages are referenced from the main EPacakge (and not based on the grammar's imports). See EcoreGeneratorFragment.getReferencedEPackages(List<EPackage>) As Jan already pointed out, GenModels for referenced EPackage can be found since they are expected to have been registered with StandaloneSetup.addRegisterGenModelFile(String) Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
Build Identifier: A great enhancement would be a mechanism which infers (or suggests or warns about) the referenced genmodels in the MWE workflow fragment "ecore.EcoreGeneratorFragment" Example in the *.xtext Grammar: import "platform:/resource/myDir/MyReferencedDsl.ecore" as myRefDsl import "platform:/resource/projectname/directory/MyOtherDsl.ecore" as myOtherRefDsl If these imports are present, usually one wants to have the following referencedGenModels part in the workflow (*.mwe2 file): fragment = ecore.EcoreGeneratorFragment { referencedGenModels = "platform:/resource/myDir/MyReferencedDsl.genmodel, platform:/resource/projectname/directory/MyOtherDsl.genmodel" } The entries in the workflow file could be inferred, or a quick fix suggestion in the xtext grammar could be made. Reproducible: Always