| [news.eclipse.modeling.tmf] Re: How to assign attributes inside rules? |
Hi Michael,
FooIntAttr1 returns ecore::EInt: 'x'; FooIntAttr2 returns ecore::EInt: 'y';
and use
That should do the trick.
Regards, Sebastian -- Need professional support for Eclipse Modeling? Go visit: http://xtext.itemis.com
Hi,
is there a way to assign attributes to constant values inside a rule?
class Foo { attr int alternative; }
Foo returns my::Foo: 'x' Alternative1 | 'y' Alternative2;
I want to set an attribute in my::Foo depending on which alternative has been used (e.g. I want to assign to the attribute 'alternative' 1 if Alternative1 was used and 2 if Alternative2 was used)
Michael