Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » [JDT_UI]Custom IMarkers visible in CompilationUnitEditor
[JDT_UI]Custom IMarkers visible in CompilationUnitEditor [message #64206] Sat, 21 June 2003 23:29 Go to next message
Eclipse UserFriend
Given:

IMarker marker =
method.getCompilationUnit().
getCorrespondingResource().
createMarker(IMarker.PROBLEM);
marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
marker.setAttribute(IMarker.MESSAGE, message);
marker.setAttribute(IMarker.CHAR_START, start);
marker.setAttribute(IMarker.CHAR_END, length);


The markers I create show up in the Tasks view but not in the
compilation unit editor. I want them to show up as squiggly underlines
in the compilation unit editor as well, but have not discovered how to
make this happen. All the code that does this inside JDT appears to be
in internal packages; is there an external API that will let me do this?


Thanks in advance,

Dave
Re: [JDT_UI]Custom IMarkers visible in CompilationUnitEditor [message #65772 is a reply to message #64206] Tue, 24 June 2003 04:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

David J. Orme wrote:

> Given:
>
> IMarker marker =
> method.getCompilationUnit().
> getCorrespondingResource().
> createMarker(IMarker.PROBLEM);
> marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
> marker.setAttribute(IMarker.MESSAGE, message);
> marker.setAttribute(IMarker.CHAR_START, start);
> marker.setAttribute(IMarker.CHAR_END, length);
>
>
> The markers I create show up in the Tasks view but not in the
> compilation unit editor. I want them to show up as squiggly
> underlines in the compilation unit editor as well, but have not
> discovered how to make this happen. All the code that does this
> inside JDT appears to be in internal packages; is there an external
> API that will let me do this?


See org.eclipse.ui.texteditor.MarkerUtilities

For more info search (http://www.eclipse.org/search/search.cgi) the news
archive for similar questions. This has been answered many times.

HTH
Dani
Re: [JDT_UI]Custom IMarkers visible in CompilationUnitEditor [message #66544 is a reply to message #65772] Tue, 24 June 2003 23:42 Go to previous message
Eclipse UserFriend
Daniel Megert wrote:
> David J. Orme wrote:
>
>> Given:
>>
>> IMarker marker =
>> method.getCompilationUnit().
>> getCorrespondingResource().
>> createMarker(IMarker.PROBLEM);
>> marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
>> marker.setAttribute(IMarker.MESSAGE, message);
>> marker.setAttribute(IMarker.CHAR_START, start);
>> marker.setAttribute(IMarker.CHAR_END, length);
>>
>>
>> The markers I create show up in the Tasks view but not in the
>> compilation unit editor. I want them to show up as squiggly
>> underlines in the compilation unit editor as well, but have not
>> discovered how to make this happen. All the code that does this
>> inside JDT appears to be in internal packages; is there an external
>> API that will let me do this?
>
>
>
> See org.eclipse.ui.texteditor.MarkerUtilities
>
> For more info search (http://www.eclipse.org/search/search.cgi) the news
> archive for similar questions. This has been answered many times.

Ooooops. You're right; I should have STFN first.


Thanks,

Dave
Previous Topic:Mutliple Source Folders
Next Topic:Using eclipse with an existing (complex) project
Goto Forum:
  


Current Time: Wed Apr 30 19:21:32 EDT 2025

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

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

Back to the top