Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[Acceleo] How to access list element?
https://www.eclipse.org/forums/index.php/mv/msg/197779/630627/#msg_630627
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.]]>Tianfu Ma2010-10-04T12:42:02-00:00Re: [Acceleo] How to access list element?
https://www.eclipse.org/forums/index.php/mv/msg/197779/630636/#msg_630636
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.]]>Stephane Begaudeau2010-10-04T13:04:37-00:00Re: [Acceleo] How to access list element?
https://www.eclipse.org/forums/index.php/mv/msg/197779/630660/#msg_630660
Besides, we do appreciate your great product. It's so powerful.
]]>Tianfu Ma2010-10-04T13:53:54-00:00Re: [Acceleo] How to access list element?
https://www.eclipse.org/forums/index.php/mv/msg/197779/630673/#msg_630673
In fact we are just following the OCL standard from the OMG. The dot for single elements and the arrow for collections. If you need more informations about the available operations in Acceleo, the Acceleo documentation is available in Eclipse (help -> help contents -> Acceleo Model to Text Transformation Language) or online here -> click me !