[SOLVED] Grammar editor does not handle well imported model with class hierarchies [message #658365] |
Tue, 08 March 2011 08:28 |
Uri Shani Messages: 18 Registered: July 2009 |
Junior Member |
|
|
I have a model where B and C extend A. A defines a name property which B and C inherit.
In the grammar, I import this model and define these rules:
A: B | C
B: 'B' name=STRING;
C: 'C' name=STRING;
Both rules for B and C are marked in error since 'name' is not defined for them in the imported model (although it is defined in their supertype).
In the manual, it says that if using generated models, these rules will generate a model that is exactly as my imported model.
So, is this a bug?
Thanks,
- Uri
Follow up:
I tried the above again and it works. I mean, I generated the model and than imported it. Need to see what is wrong with my REAL case that this did not work.
Follow up 2:
Turns out that once property type was changed to EString instead of
EChar - issues were resolved in the editor.
[Updated on: Tue, 08 March 2011 10:24] Report message to a moderator
|
|
|
Re: Grammar editor does not handle well imported model with class hierarchies [message #658388 is a reply to message #658365] |
Tue, 08 March 2011 09:27 |
Jan Koehnlein Messages: 760 Registered: July 2009 Location: Hamburg |
Senior Member |
|
|
I guess there's something wrong with the import section of your grammar.
Could you post the complete grammar?
Is 'name' an EAttribute of A with type EString with upperBound=1?
Am 08.03.11 09:28, schrieb Uri Shani:
> I have a model where B and C extend A. A defines a name property which B
> and C inherit.
> In the grammar, I import this model and define these rules:
>
> A: B | C
> B: 'B' name=STRING;
> C: 'C' name=STRING;
>
> Both rules for B and C are marked in error since 'name' is not defined
> for them in the imported model (although it is defined in their supertype).
>
> In the manual, it says that if using generated models, these rules will
> generate a model that is exactly as my imported model.
>
> So, is this a bug?
>
> Thanks,
> - Uri
--
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.91383 seconds