|
|
Re: trouble with cross references [message #659140 is a reply to message #659105] |
Fri, 11 March 2011 09:07 |
Jan Koehnlein Messages: 760 Registered: July 2009 Location: Hamburg |
Senior Member |
|
|
The error says, you are trying to assign a value to a feature of an
imported EClass, and this feature doesn't exist. This results in the
following checklist:
- Does the feature really exist? Is it spelled correctly? Does it have
the correct properties, especially multiplicity (upperBound must be
aligned with the assignment operator in the grammar), and containment
(square brackets in the grammar for cross-references).
- Do you import your all needed Ecore models in the correct way? What
URIs are you using? Do they conform to the way the Ecore models are
stored (e.g. import nsURIs for installed metamodels only)
- You say you have multiple Ecore models. With what kind of URIs do
these refer to each other?
If you need more help, a more concrete example would be nice. How about
stripping your Ecore models down to the hierarchy of the erroneous
element and write a minimal grammar showing the issue?
BTW, I hope the "feature" does not have a inheritance hierarchy but its
class does. Overriding features in Ecore is a bad idea.
Am 11.03.11 04:47, schrieb Tony Lenihan:
> Hello All,
>
> I have been looking around the forums for an answer and haven't been
> able to find one. There seems to be much advice on scoping where there
> is no feature named 'name' tied to this issue but the error I see is
> both in the grammar editor and if I try to generate. Another post is
> quite similar to my problem
> http://www.eclipse.org/forums/index.php?t=msg&th=167224& amp;S=e5c57f5b09f330aa620b35a8870fe6db#msg_530227
> but the author was able to generate inspite of the grammar warning. I
> get the same 'Cannot find compatible feature (feature) in sealed EClass
> (eclass) from imported package (package)
>
> I am attempting to create a DSL based on a few existing ecore models
> that reference one another. The initial project wizard didn't create all
> the parser rules required but I've been able to manually create them. It
> seems like there were issues when multiple inheritance was involved.
>
> Anyway, I followed the default convention of the DSL and it is almost
> all in place but I get the above described error on a feature of an
> eclass. The feature in question has a relatively deep inheritance
> structure that spans more than one physical file. Also, each ecore model
> has several sub-packages (some of them nested 3 or 4 deep) so I don't
> know if I can do it justice with a simplified example such as the one
> above from the other post.
>
> Are there any known issues with this type of dsl creation? I will post
> the question now and I will work on a more concrete example, but the
> scenario I'm looking at is quite large and complex (at least for me).
>
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
---
Get professional support from the Xtext committers at www.typefox.io
|
|
|
Powered by
FUDForum. Page generated in 0.04719 seconds