generate property from referenced object [message #1293652] |
Sat, 12 April 2014 17:08  |
Eclipse User |
|
|
|
Hi,
my first adventures in xtext were very positive. The plugin was working in an instant and its a pleasure to use ones own language using an inteligent editor.
But now i got stuck using referenced rules. Taking the 15 minutes example i would like to do something like:
Entity :
'entity' name = ID
;
Entity2 :
'entity2' name = [Entity]
;
The rule Entity2 doesnt work as expected. I think its because [Entity] returns the referenced object but not a string.
The Objects of entity2 should have the same name as the referenced Entity object. In other languages i'd use a statement like
Entity2 :
'entity2' name = [Entity].name
;
But, of course, this doesnt work too.
I hope i have made my point clear. Does XText allow to do something like this in grammar only? Or do I have to change some java internals of the editor?
Thanks in advance for your help,
chris
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03886 seconds