[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.rcp] Re: underline not shown with markers
|
Hi Dani,
actually it worked out of the box. I then had problems with my parser
(the tabs were different from the editors tab size) so I changed my
markers to mark a line. Now I fixed the first bug and now the underline
does not work. Here's the code, maybe this helps:
try {
file.deleteMarkers(IMarker.PROBLEM, true, 0);
for (int j = 0; j < storage.getAnnotations().size(); j++) {
try {
com.tabuso.durban.model.Annotation annotation =
storage.getAnnotations().get(j);
IMarker marker = file.createMarker(IMarker.PROBLEM);
marker.setAttribute(IMarker.MESSAGE, annotation.getMessage());
marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
MarkerUtilities.setCharStart(marker, annotation.getIndex());
MarkerUtilities.setCharEnd(marker, annotation.getIndex() +
annotation.getLength());
} catch (CoreException e) {
e.printStackTrace();
}
}
Daniel Megert wrote:
Martin Tauber wrote:
I'm creating a marker for a TextEditor, but the underline showing the
error is not shown. Do I need to configure that using the
viewerConfiguration and if yes, how do I do that?
If you are using/extending the existing TextEditor and you create your
marker with an existing/known marker type then this should work out of
the box.
Dani
Thanks
Martin