[Acceleo] How to access list element? [message #630627] |
Mon, 04 October 2010 12:42 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Tianfu Ma![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=matianfu%40gmail.com) 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 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
Hi,
In order to answer your question, here is a screenshot that may help you. Don't hesitate if you have any other questions.
![http://img716.imageshack.us/img716/4928/exampleeg.png](http://img716.imageshack.us/img716/4928/exampleeg.png)
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.03418 seconds