The mark not appear... [message #150452] |
Wed, 24 March 2004 17:48 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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);
>}
>..
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03829 seconds