[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.jdt] Re: [APT] Messages showing up in Error Log rather than Problems View

"Gunnar Morling" <morling.eclipsebugzilla@xxxxxxxxxxxxxx> wrote in message 
news:614df27010385d0202b4a31f3b52ffdf$1@xxxxxxxxxxxxxxxxxx
> Hi,
>
> I'm implementing a Java 6 (JSR 269) compatible annotation processor. 
> Within the processor I'm using the messager API to create a message like 
> that:
>
> processingEnv.getMessager().printMessage(Kind.ERROR, "Message");
>
> Unfortunately this message shows up only in the Error Log (at INFO level), 
> rather than in the Problems view. Is there any way to change this 
> behaviour?

Specify the element that you're reporting the message against.  If you take 
a look at the API, you'll notice that there's a varargs parameter at the end 
of that printMessage() method - you need to give it an Element so it knows 
what to associate the message with.  Most likely that will be the type that 
you're processing at the time.

If that doesn't resolve it, please enter a bug, including a processor that 
reproduces the problem.  Thanks!