[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Problem Annotaion Message

Thanks Daniel,

I figured it out. Simple problem, I didn't configure the editor correctly. By default a Text Editor does not configure the annotation hover support or to be more concrete: The SourceViewConfiguration class returns null for the Method getAnnotationHover

So after adding:

public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
	return new DefaultAnnotationHover();
}

it Works. DefaultAnnotationHover supports the Marker support.

Regards
Martin

Megert wrote:
Martin Tauber wrote:
Yes, I'm talking about the TextEditor. I see the messages in the Problem View correctly. I set the messages like this:

IMarker marker = file.createMarker(IMarker.PROBLEM);
marker.setAttribute(IMarker.MESSAGE, e.getMessage());
marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);

Hm, not much that can be done wrong ...
Does it work in your editor for other well known markers? Does your marker extend the text marker? You can debug into org.eclipse.jface.text.source.DefaultAnnotationHover.getHoverInfo(ISourceViewer, int).

Dani

Daniel Megert wrote:
Martin Tauber wrote:
I have created markers, which nicely appear in the TextEditor. When I now move the cursor over the problem icon, it doesn't show the message text as in the java editor. What do I have to do, to make it show the message?
You are talking about the existing editor not your own, right? Are you sure you've correctly set the message attribute?

Dani

Thanks Martin