|Simple SuperType Problem in Grammar - Cannot find compatible feature [message #1847866]
||Wed, 10 November 2021 19:50
| Brandon Lewis
Registered: May 2012
I have two ecore models:|
ModelA.ecore and ModelB.ecore
I'm trying to create a xtext grammar that handles both models.
ModelA's plugins all work perfectly. No issues.
ModelA has a Class called LibraryElement. That LibraryElement has attributes: vendor, library, name, version.
ModelB has a Class called YpxComponent -> LibraryElement. i.e. LibraryElement is a SuperType of YpxComponent.
All ecore stuff works in ModelB. I can generate the emf models no problem and without issue. All types and supertypes look exactly like I expect. All hyperlinking in editors take me to the correct Types in the correct probjects.
Harmony acheived! ... until I try to make a grammar.
My grammar has all the correct imports. i.e. all the modelA::stuff is appropriately referenced (in the xtext file and workflow) - xtext has already figured out the Class hierarchy from me telling it what packages to use and selecting an entry point.
My YpxComponent has the following grammar:
YpxComponent returns YpxComponent:
The vendor, library, name, version are all provided by the LibraryElement, but every single one of them is reporting an error like this:
Cannot find compatible feature vendor in sealed EClass YpxComponent from imported package http://my_company/ypx_1685_2014: The type 'YpxComponent' does not have a feature 'vendor'.
YpxComponent _clearly_ has this feature (it's inherited from the SuperType) so I suspect Xtext is telling me thing else, but I've spent the entire day not understanding how to get past this.
I'm tried all the import "platform/resource" substitutions I've seen from Google searches and nothing works.
This is basic inheritance stuff, EMF isn't having any issues.
Powered by FUDForum
. Page generated in 0.02585 seconds