|
|
|
Re: [Acceleo] Test for an undefined enumeration in OCL [message #870080 is a reply to message #870073] |
Sun, 06 May 2012 08:49 |
|
Hi,
have a look at the Xtext documentation:
Quote:
Please note, that Ecore does not support unset values for enums. If you define a grammar like
Element: "element" name=ID (value=SomeEnum)?;
with the input of
element Foo
the resulting value of the element Foo will hold the enum value with the internal representation of 0 (zero). When generating the EPackage from your grammar this will be the first literal you define. As a workaround you could introduce a dedicated none-value or order the enums accordingly. Note that it is not possible to define an enum literal with an empty textual representation.
You can overcome this by modifying the infered Ecore model through a model to model transformation. However, instead of post processing, an explicitly imported metamodel is recommend.
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Powered by
FUDForum. Page generated in 0.03130 seconds