Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[Acceleo 3.1.0] Module file (.mtl) is not built into a .java file
https://www.eclipse.org/forums/index.php/mv/msg/217488/691676/#msg_691676
The option Project->Build Automatically has been activated all the time since installation. I changed the execution environment from J2SE-1.5 to JavaSE-1.6 in the "Properties for JRE System Library" dialog box and in the MANIFEST.MF file until no warning concerning to the incompatibility between J2SE-1.5 and JavaSE-1.6 appeard. But the .mtl file is still not built and the message "Selection does not contain a main type (@main annotation is missing in your main template)" keeps appearing when trying to run the template.
Does any of you have any suggestion to fix this problem?
Also, are Papyrus and Acceleo compatible? I am a newcomer and plan to use them both in my project.
Thanks a lot in advance. Kindest regards.
]]>Tomas Balderas2011-07-02T02:43:28-00:00Re: [Acceleo 3.1.0] Module file (.mtl) is not built into a .java file
https://www.eclipse.org/forums/index.php/mv/msg/217488/692238/#msg_692238
http://www.eclipse.org/uml2/3.0.0/UML". Once the project is generated I se that the .java file associated to my .mtl file has been built. However, after making any change to the .mtl file the corresponded .java file indicates the following errors:
org.eclipse.uml2 cannot be resolved to a type
org.eclipse.uml2.uml.UMLPackage cannot be resolved to a type
The method isInWorkspace(Class<? extends EPackage>) in the type AbstractAcceleoGenerator is not applicable for the arguments (Class<UMLPackage>)
Did I miss installing anything? How can I fix my problem?
Thanks a lot. Kindest regards.]]>Tomas Balderas2011-07-04T02:32:20-00:00Re: [Acceleo 3.1.0] Module file (.mtl) is not built into a .java file
https://www.eclipse.org/forums/index.php/mv/msg/217488/692332/#msg_692332
In Acceleo 3, the Java launcher is created to launch any templates with the following comment [comment @main/]. If you don't have this comment, the Java launcher will not be created. You need to ask to create a main module in the Acceleo wizard to have it in your template (by using the Acceleo Main Module Wizard or by checking the box "main" in the regular Acceleo wizard). If you remove this comment, the Java file will not deleted but it will not de synchronized anymore with the main module. Don't forget to export the package containing the main template too in the MANIFEST.MF (tab runtime). For more information, you can have a look at the Acceleo user guide and at the Best practices guide on the Obeo Network.
Regards,
Stephane Begaudeau, Obeo
--
Twitter: @sbegaudeau
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo]]>Stephane Begaudeau2011-07-04T08:46:46-00:00Re: [Acceleo 3.1.0] Module file (.mtl) is not built into a .java file
https://www.eclipse.org/forums/index.php/mv/msg/217488/692547/#msg_692547
Thank you for your kind reply Stephane. I am basically following this tutorial http://wiki.eclipse.org/Acceleo/Getting_Started with what seems to be a recent Acceleo release (3.1.0 and Eclipse Indigo for x86-64 in Windows 7). I failed the first time because the .java file asociated with the file generate.mtl was not generated automatically. The second time, I generated the project by checking the boxes labeled "Generate file" and "Main template" and then I got the following error messages in the file Generate.java:
org.eclipse.uml2 cannot be resolved to a type
org.eclipse.uml2.uml.UMLPackage cannot be resolved to a type
The method isInWorkspace(Class<? extends EPackage>) in the type AbstractAcceleoGenerator is not applicable for the arguments (Class<UMLPackage>)
In my third attempt I made sure to check "Generate file" and "Main template". This time I checked the file META-INF/MANIFEST.MF and noticed that the package containing the file generate.mtl (org.eclipse.acceleo.module.sample.main) had already been exported. However the file Generate.java still has the issues above.
I want to point out that in Acceleo 3.0.2 running in Eclipse Helios for Mac OS X (PowerPC and Leopard) I have not had any problem.
]]>Tomas Balderas2011-07-04T17:49:08-00:00Re: [Acceleo 3.1.0] Module file (.mtl) is not built into a .java file
https://www.eclipse.org/forums/index.php/mv/msg/217488/692819/#msg_692819
Do you have a dependency with the uml project? Have a look at your MANIFEST.MF file and in the 'dependencies' tab, you should have "org.eclipse.uml2.uml" has a dependency. This is the Eclipse bundle that contains the UML metamodel and it is required to generate.
I included a dependency on "org.eclipse.uml2.uml" in the file MANIFEST.MF and that fixed my problem. I think I will not have any problem like this anymore.