Acceleo [message #1829344] |
Wed, 01 July 2020 12:03  |
Eclipse User |
|
|
|
Hello all,
I am developing a M2T generator in Acceleo (in Obeo Designer).
I have created my metamodel based on *.ecore (pfe.ecore ) and then I have created an instance model in runtime (MyModels.pfe) using Sirius.
Now I am trying to generate the java code of MyModels.pfe using Accelo -the class root is InterationSpatiale. -check the attachment-
I want to generate a *.java for each of my classes in the diagram
here is my generate.mtl file
[comment encoding = UTF-8 /]
[module generate('http://www.example.org/pfe','http://www.eclipse.org/emf/2002/Ecore')/]
[template public generateElement(aEClass : InteractionSpatiale)]
[comment @main/]
[file (aEClass.name.concat('.java'), false, 'UTF-8')]
public class [aEClass.name/] {
[for (aEAttribute : ecore :: EAttribute | eEClass.getAllAttributes())]
[aEAttribute.eType.instanceClassName/] [aEAttribute.name/];
[/for]
}
[/file]
[/template]
This is the error message I got
Cannot find operation (getAllAttributes()) for the type (InteractionSpatiale)
I tried "ownedAttribute" and "eAllAttributes" instead of getAllAttributes but the same error.
Ps: the same happens when I want to get access to the references.
Any help is much appreciated.
Regards.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04089 seconds