|Re: QualifiedNameProvider-Question [message #1022033 is a reply to message #1021922]
||Thu, 21 March 2013 06:45
| Ed Merks
Registered: July 2009
On 21/03/2013 12:40 AM, Annika Wießgügel wrote:
> I'm just writing an own QualifiedNameProvider (extending
> DefaultDeclarativeQualifiedNameProvider) and a corresponding
> LinkingProvider (and i'm quite new to xtext). I nearly finished them
> both, when i discovered an error, telling me the method
> (org.eclipse.xtext.naming.QualifiedName.create(String singleSegment))
> is throwing IllegalArgumentExceptions when the segment to be created
> is null. We used this option for our defaultpackage (which doesn't
> have a name) but did first not notice that it doesn't work.
Yes, better to use an empty string.
> Now i'm reworking the two classes, and with lots of printouts, i
> noticed that when only the QualifiedNameProvider is registered in the
> runtime, it neighter works nor does it throw Exceptions when providing
> "null" to the create method.
Perhaps something is catching the exception and logging it or even just
> There is no feedback telling me it doesn't work.
> Only if i activate the LinkingProvider and inject the
> qualifiedNameProvider the exception is thrown.
> Did i make a mistake or is there really no error telling me i'm
> feeding the create method a null?
It's hard to say...
> PS: Is there any possibility to debug except System.out.println?
The debugger is definitely your best friend. It has handy things like
exception breakpoints (see the toolbar in the title area of the
Breakpoint view), so you can set a breaking whenever a
NullPointerException is thrown. That will help you determine what's on
the call stack and how that exception is being handled by the things on
the call stack.
> It's quite time-consuming and annoying to start an eclipse application
> every time....
The debugger supports hot replace so often you can change the code and
Powered by FUDForum
. Page generated in 0.01312 seconds