|[acceleo] debug java code in "Acceleo Plug-in Application" [message #756852]
||Tue, 15 November 2011 10:58
| Vlad Gheorghe
Registered: May 2011
I have some problems with package registration, and I would like to debug the java code running as "Acceleo Plug-in Application".
The problem is that the debugger does not stop on the breakpoints set in java code, but only at the ones set in mtl files.
Is there a way to debug java code in "Acceleo Plug-in Application" configuration ?
Second issue - I've tried to run as Java Application, but i get "ClassNotFound" exceptions (for com.google.common.Predicate).
I've looked at tasks/generate.xml, and indeed com.google.collect jar is not listed there. Is that an error ?
Is tasks/generate.xml used for Java App only, or also for the stand-alone app ?
|Re: [acceleo] debug java code in "Acceleo Plug-in Application" [message #757660 is a reply to message #756852]
||Mon, 21 November 2011 08:08
Sorry for the delay with this answer.
The generate.xml file is not used for the "java application" launches. This "ClassNotFound" seem like a regression to me, but I could be wrong. I'll try and launch a standalone generation to see whether com.google.* package are properly retrieved on my end.
As for debugging, debugging the java code behind the generators can only be done if you launch a new Eclipse instance in debug and launch the generation from there. i.e :
a- Select the Run > Debug configurations... menu
b- Double-click "Eclipse application" (or select an existing Eclipe application), then hit "Debug"
c- From the new Eclipse, use File > Import
d- Select "Existing Projects into Workspace" and browse to your generator project
e- With the project imported, launch the generation from there. The runtime should stop on the breakpoints set in your first Eclipse.
Alternatively, you could use an Acceleo UI application in order not to import your project in the second Eclipse :
a- Select File > New... and select "Acceleo UI Launcher project" and follow the wizard for your generator.
b- Select the Run > Debug configurations... menu
c- Double-click "Eclipse application" (or select an existing Eclipe application), then hit "Debug"
d- In the new Eclipse, create the model that will be the input of your generation
e- Right-click the input model and select Acceleo > <name of your generator>
|Re: [acceleo] debug java code in "Acceleo Plug-in Application" [message #758360 is a reply to message #757665]
||Tue, 22 November 2011 21:23
| Vlad Gheorghe
Registered: May 2011
Thank you for the answers.
I knew about the second variant you propose - run via Acceleo UI plugin in a debug target instance.
But it's still not clear to me what "Acceleo Plug-in Application" really does.
Does it run the acceleo engine in the *same* eclipse instance (the development instance) ?
(This is what I can deduce from the first variant that you describe).
If it is so, it follows that if
- I have a metamodel in the workspace
- I have an Acceleo generator plugin in the same workspace
- I run the generator as "Acceleo Plug-in Application" on a model also from the workspace
then the dynamic version of the metamodel is used during the generation.
Is that correct ?
Another question - you have told me that generate.xml is not used for "java application" launches.
What is it used for then ?
( Is it used as back-end of the Acceleo Plug-in app, or just as an alternate to Launch as "Acceleo plug-in App", using ant ?)
[Updated on: Tue, 22 November 2011 21:24]
Report message to a moderator
|Re: [acceleo] debug java code in "Acceleo Plug-in Application" [message #758568 is a reply to message #758495]
||Wed, 23 November 2011 17:32
| Ed Willink
Registered: July 2009
Thanks for the explanation; now I understand why I was confused. The use
of 'Plugin' is different to a JUnit Plugin launch in which all the
projects in the current workspace are available. I suggest using a
description that avoids this different use of 'Plugin'.
Potentially there could be 3 useful launches called:
a) Local Launch (currently called Plugin)
b) Standalone launch analuguous to JUnit launch
c) Plugin launch analoguous to JUnit Plugin launch (not currently available)
On 23/11/2011 13:05, Stephane Begaudeau wrote:
> Acceleo Plug-in Application runs the Acceleo generator in the current
> Eclipse instance while Java Application runs the Acceleo generator as
> a stand alone Java application using the dependencies available in
> Eclipse (for example we are linking the generator to the jars of EMF
> for you but otherwise it's a stand alone launch). The generate.xml
> file is used for a stand alone launch from Ant (it is a bit more
> subtle then the Java launch since the dependencies are resolved to the
> real position of the needed jars).
> Stephane Begaudeau, Obeo
> Twitter: http://twitter.com/#!/sbegaudeau
> Google+: http://www.google.com/profiles/stephane.begaudeau
> Blog: http://stephanebegaudeau.tumblr.com
> Acceleo Documentation: http://docs.obeonetwork.com/acceleo
Powered by FUDForum
. Page generated in 0.01817 seconds