Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » trouble with cross references(getting errors in my dsl dealing with imported ecore models)
trouble with cross references [message #659105] Fri, 11 March 2011 03:47 Go to next message
Tony Lenihan is currently offline Tony LenihanFriend
Messages: 5
Registered: June 2010
Junior Member
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).
Re: trouble with cross references [message #659139 is a reply to message #659105] Fri, 11 March 2011 08:56 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Tony,

the validation of the features / eClasses is not related to the depth of
the inheritance structure. Please provide a more specific example.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

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).
>
Re: trouble with cross references [message #659140 is a reply to message #659105] Fri, 11 March 2011 09:07 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
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
Previous Topic:Working with parse tree
Next Topic:access elements of imported namespaces from a non xtext editor
Goto Forum:
  


Current Time: Sun Sep 22 00:51:56 GMT 2024

Powered by FUDForum. Page generated in 0.04719 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top