I want to print an enum enum State{A(0),B(1)}
as a comma seperated list, in the form A=0, B=1
. For this xtext/xtend provides a join operation. However, I can't find any information on how to access multiple fields of the enum. The enum has a toString
and numVal
method.
E.g. {«State::values.join(', ') [toString»=«numVal]»}
does not work. What is the correct syntax for such an operation?