Reputation: 15367
I have the following xtext fragments:
LongDmxColor:
intensity=DmxValue red=DmxValue green=DmxValue blue=DmxValue (white=DmxValue)?;
and
DmxValue returns INT:
value=INT;
In the generated LongDmxColor.java class, there are the following methods related to white:
INT getWhite();
void setWhite(INT value);
How can I in xtend find out whether white is selected or not?
Upvotes: 2
Views: 181
Reputation: 15367
I found a solution (to help others):
Use the eIsSet
command, like:
if (colorItem.eIsSet(DmxLightShowPackage.Literals.LONG_DMX_COLOR__WHITE))
Upvotes: 1