[Acceleo] [Luna] Launching acceleo problem [message #1699167] |
Mon, 22 June 2015 05:24  |
Eclipse User |
|
|
|
Hi to all,
I've used Acceleo since the Galileo Eclipse and it worked fine in all previous versions. Now in Luna it is strange.
If I try to run it as Java application (the default now) on the model from the example mentioned in the Acceleo tutorial - it works fine but when I try to transform my model drawn in Obeo UML designer (1.0, 2.0 or 3.0 version - doesn't matter) or IBM Software Architect - always get an error:
"Exception in thread "main" org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'event' not found."
and nothing is generated.
So I've tried to run it as a plug-in. Well, I'm warned: "Due to changes in the Eclipse platform in Luna, the Acceleo Plug-in Application strategy may not work." but I've found in Bugzilla that when I add './bin' directory to the classpath - it will work OK. It does, but it seems to be a workaround only and I'm afraid that something will go wrong.
The metamodel is, of course, http://www.eclipse.org/uml2/5.0.0/UML (but also tried with 4.0.0 and 3.0.0).
best regards
Tomek
|
|
|
Re: [Acceleo] [Luna] Launching acceleo problem [message #1699595 is a reply to message #1699167] |
Thu, 25 June 2015 05:48   |
Eclipse User |
|
|
|
Hi,
Quote:So I've tried to run it as a plug-in. Well, I'm warned: "Due to changes in the Eclipse platform in Luna, the Acceleo Plug-in Application strategy may not work." but I've found in Bugzilla that when I add './bin' directory to the classpath - it will work OK. It does, but it seems to be a workaround only and I'm afraid that something will go wrong.
It is indeed only a workaround. Long story short, we were using your current Eclipse platform to run the plugin in your workspace but while in your workspace your compiled code is in a folder named, most of the time, "bin", in the runtime you want to be able to load code named "com.company.folder.MyClass" and not "bin.com.company.folder.MyClass". So before we used to modify the classpath of our bundles after deployment but this feature has been removed from the core of Equinox. The Plugin Development Environment can let you run code in debug by launching another complete Eclipse instance which is too heavy for our use case. As a result, you can adapt the classpath of your generator by adding your output folders to you classpath (which is not a good idea) or you can improve your generator to make it work in stand alone.
In order to work with UML, make sure that the UML metamodel is registered along with its resource factory in the Java launcher. You may need to call UMLResourcesUtil.init(resourceSet) in the method registerPackages of your Java launcher to prepare everything to load properly an UML model.
Regards,
Stéphane Bégaudeau, Obeo
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04443 seconds