| Summary: | [xtext][model inference] cannot extend grammar with generated model | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Knut Wannheden <knut.wannheden> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | kavitha.ks83, schauer, sebastian.zarnekow, sven.efftinge |
| Version: | 2.2.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Knut Wannheden
The references in MyDsl2 to MyDsl1 need to be absolute platform:/resource / uris. Is that the case? No, as in the description MyDsl2 only references the MyDsl1 grammar directly (by its qualified name), not the EPackage. Adding an import for the generated EPackage using a platform:/resource URI is not possible: import "platform:/resource/org.xtext.example.mydsl1/src-gen/org/xtext/example/mydsl/MyDsl1.ecore" It results in the following error: "Metamodels that have been generated by a super grammar must be referenced by nsURI: http://www.xtext.org/example/mydsl/MyDsl1". Importing the MyDsl1 EPackage by its nsURI doesn't make any difference. I.e. the same error as originally reported remains. I can imagine that the proxies MyDsl2.ecore resolve to the generated *.ecore file before the super grammar inferred the ecore model that should be the actual resolve target. Nasty :-( |