Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » The mark not appear...
The mark not appear... [message #150452] Wed, 24 March 2004 17:48 Go to next message
Eclipse UserFriend
Originally posted by: esalbuquerque.superig.com.br

I have included a mark already. But it not appear in the editor.
What can I must do ?

The code:

public void markerCreate(IResource rec, int charstart, int charend,
int linenumber) throws CoreException {

IMarker mark =
rec.createMarker("br.eb.ime.eduardo.codeReview.crMarker");
mark.setAttribute(IMarker.SEVERITY, 0);
mark.setAttribute(IMarker.CHAR_START, charstart);
mark.setAttribute(IMarker.CHAR_END, charend);
mark.setAttribute(IMarker.LOCATION, linenumber);
mark.setAttribute(IMarker.MESSAGE, "XXXXXXXXXX");
mark.setAttribute(IMarker.LINE_NUMBER, linenumber);
}
...
try {
IFile file = (IFile) StringCompareAP.unit.getResource();
if (file == null)
System.out.println("file null");
else markerCreate(file, node.getStartPosition(),
(node.getStartPosition()+node.getLength()),
CodeReviewPlugin.getLine(StringCompareAP.source,
node.getStartPosition()));
} catch (CoreException ce) {
System.out.println(ce);
}
...
Re: The mark not appear... [message #151753 is a reply to message #150452] Wed, 31 March 2004 09:38 Go to previous message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Eduardo Soares Albuquerque wrote:

>I have included a mark already. But it not appear in the editor.
>What can I must do ?
>
use MarkerUtilities.crearteMarker(...)

Dani

>The code:
>
>public void markerCreate(IResource rec, int charstart, int charend,
> int linenumber) throws CoreException {
>
> IMarker mark =
> rec.createMarker("br.eb.ime.eduardo.codeReview.crMarker");
> mark.setAttribute(IMarker.SEVERITY, 0);
> mark.setAttribute(IMarker.CHAR_START, charstart);
> mark.setAttribute(IMarker.CHAR_END, charend);
> mark.setAttribute(IMarker.LOCATION, linenumber);
> mark.setAttribute(IMarker.MESSAGE, "XXXXXXXXXX");
> mark.setAttribute(IMarker.LINE_NUMBER, linenumber);
>}
>..
>try {
> IFile file = (IFile) StringCompareAP.unit.getResource();
> if (file == null)
> System.out.println("file null");
> else markerCreate(file, node.getStartPosition(),
> (node.getStartPosition()+node.getLength()),
> CodeReviewPlugin.getLine(StringCompareAP.source,
> node.getStartPosition()));
>} catch (CoreException ce) {
> System.out.println(ce);
>}
>..
>
>
>
>
Previous Topic:Creating Jars with some external class files using Eclipse2.1
Next Topic:M8: lost "Content Assist" key
Goto Forum:
  


Current Time: Sat Nov 09 05:52:27 GMT 2024

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

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

Back to the top