[Acceleo] How to access list element? [message #630627] |
Mon, 04 October 2010 12:42 |
Tianfu Ma Messages: 6 Registered: October 2010 |
Junior Member |
|
|
Sorry for such a newbie question. I have spent a lot of time on Acceleo user guide, wiki and examples but still cannot figure it out.
I have created an ecore model and used it to create some sample models and validated them all. Now I want to generate some code from the model.
In the template file, when I type an element name and dot (.), the content assistant pops-up.
1) I cannot find the get/set method defined in ecore genmodel file, instead, the name of elements (EReference, EAttribute etc.) are listed, but what are their types?
2) Some element has the multiplicity. How could I get it? for example a component element contains 0..* connection element, and the EReference is named as Connections, how could I know how many connection element are there (in the diagram).
Thanks in advance.
|
|
|
Re: [Acceleo] How to access list element? [message #630636 is a reply to message #630627] |
Mon, 04 October 2010 13:04 |
|
Hi,
In order to answer your question, here is a screenshot that may help you. Don't hesitate if you have any other questions.
Stephane Begaudeau, Obeo
NB: eOperations for the operations of the given EClass, eAllOperations for the operation of the current EClass and the inherited operations.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03432 seconds