2

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?

Michel Keijzers
  • 15,025
  • 28
  • 93
  • 119

1 Answers1

1

I found a solution (to help others):

Use the eIsSet command, like:

if (colorItem.eIsSet(DmxLightShowPackage.Literals.LONG_DMX_COLOR__WHITE))
Michel Keijzers
  • 15,025
  • 28
  • 93
  • 119