StructMemberSub:
needsProcessing?='Never Use This From The Source'
;
The rule StructMemberSub is introduced to:
- get the flag needsProcessing in the ecore model
- disallow the generated implementation to set the flag or generate the
proposal for it through content assist.
I want the flag needsProcessing in the ecore model so that in the
generator, I can calculate it's value in the first pass and act on it in
a later pass.
It works, but is seems to me there should be a better way to achieve
adding an attribute to a class in the ecore model from the xtext grammar
file.
I have been succesful with adding types like EBoolean and EString to the
metamodel using the postprocessing step. But I am less successful when I
want to add a reference to a type defined in the grammar.
I would be helped with an example of how to add a reference to an EClass
where the reference type is defined in the grammar.
Luigi Messages: 10 Registered: November 2009 Location: Italy
Junior Member
On 3-2-2013 15:18, Christian Dietrich wrote:
> Hi don't get your point. Create a new reference and set the etype.
> Therefore traverse the model and search your type
>
Yes, it's that simple. I just didn't realize that the model was passed
in as a argument to the post process function.