Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » How to debug java extensions?
icon5.gif  How to debug java extensions? [message #511854] Wed, 03 February 2010 04:04 Go to next message
Eclipse UserFriend
Hi,

I had to add quite a lot of java code to my Xpand project to manipulate the model before output generation and to facilitate processing while output generation. My problem is the debugging does not work for a workflow, therefore not for Xpand, and not for the java extensions called.

Not even a stack trace shows useable information since it does not go below the level of Xpand declarations. So if e.g. my extension throws a NullPointerException in the third sub routine I get no information where it happened and how it got there.

Is there a way to overcome this shortcoming?

Best regards,
Marco
Re: How to debug java extensions? [message #511889 is a reply to message #511854] Wed, 03 February 2010 05:31 Go to previous messageGo to next message
Eclipse UserFriend
There's a 'java debug' flag in the workflow launch configuration, which
you need to enable.

Sven


arco schrieb:
> Hi,
>
> I had to add quite a lot of java code to my Xpand project to manipulate
> the model before output generation and to facilitate processing while
> output generation. My problem is the debugging does not work for a
> workflow, therefore not for Xpand, and not for the java extensions called.
>
> Not even a stack trace shows useable information since it does not go
> below the level of Xpand declarations. So if e.g. my extension throws a
> NullPointerException in the third sub routine I get no information where
> it happened and how it got there.
>
> Is there a way to overcome this shortcoming?
>
> Best regards,
> Marco


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: How to debug java extensions? [message #512075 is a reply to message #511889] Wed, 03 February 2010 14:48 Go to previous messageGo to next message
Eclipse UserFriend
Sven, thanks for the advice. Now my code can be traced in the debugger.

But still there is no hint where an exception was thrown. The top line of the stack trace just names the extension without information what happened below.

How can I best track down such problems?

br
m
Re: How to debug java extensions? [message #512219 is a reply to message #512075] Thu, 04 February 2010 07:40 Go to previous message
Eclipse UserFriend
I consider it a bug, that exceptions thrown in Java extensions are not
logged properly (please file a bugzilla).

Is that what you're are missing?

Sven

Marco schrieb:
> Sven, thanks for the advice. Now my code can be traced in the debugger.
>
> But still there is no hint where an exception was thrown. The top line
> of the stack trace just names the extension without information what
> happened below.
>
> How can I best track down such problems?
>
> br
> m


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: How to debug java extensions? [message #512260 is a reply to message #512219] Thu, 04 February 2010 04:26 Go to previous message
Eclipse UserFriend
You'll have to call it by its qualified name.
<<EXPAND my::path::TemplateFile::plop FOR this.onePlop>>

Sven

Sven Efftinge schrieb:
> I consider it a bug, that exceptions thrown in Java extensions are not
> logged properly (please file a bugzilla).
>
> Is that what you're are missing?
>
> Sven
>
> Marco schrieb:
>> Sven, thanks for the advice. Now my code can be traced in the debugger.
>>
>> But still there is no hint where an exception was thrown. The top line
>> of the stack trace just names the extension without information what
>> happened below.
>>
>> How can I best track down such problems?
>>
>> br
>> m
>
>


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: How to debug java extensions? [message #512262 is a reply to message #512260] Thu, 04 February 2010 04:26 Go to previous message
Eclipse UserFriend
Sorry wrong thread :-)

Sven Efftinge schrieb:
> You'll have to call it by its qualified name.
> <<EXPAND my::path::TemplateFile::plop FOR this.onePlop>>
>
> Sven
>
> Sven Efftinge schrieb:
>> I consider it a bug, that exceptions thrown in Java extensions are not
>> logged properly (please file a bugzilla).
>>
>> Is that what you're are missing?
>>
>> Sven
>>
>> Marco schrieb:
>>> Sven, thanks for the advice. Now my code can be traced in the debugger.
>>>
>>> But still there is no hint where an exception was thrown. The top
>>> line of the stack trace just names the extension without information
>>> what happened below.
>>>
>>> How can I best track down such problems?
>>>
>>> br
>>> m
>>
>>
>
>


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Previous Topic:Neebee question: XMLBeautifier
Next Topic:[Xpand] Advices not applied
Goto Forum:
  


Current Time: Sun Jul 06 13:58:09 EDT 2025

Powered by FUDForum. Page generated in 0.03815 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top