i guess you have a basic missunderstandling of what the code gen is.
the code gen is a program that operates on the AST and not the text.
thus you might have an Item in your hand. an item has subclasses Operation and Event.
you can do instanceof checks and you can make use of dispatch functions in Xtend.
this might give you some hints on where to start.
since you do not give any context i cannot say what is better in your case
Hi grammar is a meta thing so the answer would be true in all cases.
So do you want to know if the model contains any event or if the
interface contains any event?
--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de