[acceleo] debug java code in "Acceleo Plug-in Application" [message #756852] |
Tue, 15 November 2011 05:58  |
Eclipse User |
|
|
|
Hello,
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 ?
Regards,
Vlad Gheorghe
|
|
|
Re: [acceleo] debug java code in "Acceleo Plug-in Application" [message #757660 is a reply to message #756852] |
Mon, 21 November 2011 03:08   |
Eclipse User |
|
|
|
Vlad,
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>
Laurent Goubet
Obeo
|
|
|
|
|
|
Re: [acceleo] debug java code in "Acceleo Plug-in Application" [message #758568 is a reply to message #758495] |
Wed, 23 November 2011 12:32  |
Eclipse User |
|
|
|
Hi Stephane
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)
Regards
Ed Willink
On 23/11/2011 13:05, Stephane Begaudeau wrote:
> Hi,
>
> 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).
>
> Regards,
>
> 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.06468 seconds