Possible Marker Bug [message #200733] |
Tue, 12 April 2005 17:38  |
Eclipse User |
|
|
|
Originally posted by: rspitler.colby.edu
I'm sorry if this is in the wrong forum, but I am in desperate need of
help - my honors thesis is due in a week.
I have created a scanner that produces markers on java files. To do
this I use the following code:
HashMap attributes = new HashMap();
attributes.put(IMarker.SEVERITY,
isError ?
new Integer(IMarker.SEVERITY_ERROR):
new Integer(IMarker.SEVERITY_WARNING));
MarkerUtilities.setMessage(attributes, msg);
MarkerUtilities.setLineNumber(attributes, loc.getLineNumber());
MarkerUtilities.setCharEnd(attributes, loc.getCharEnd());
MarkerUtilities.setCharStart(attributes, loc.getCharStart());
IMarker marker = loc.getFile().createMarker(MARKER_ID);
marker.setAttributes(attributes);
The marker I am using is one of my own and is declared as follows:
<extension
id="edu.colby.JSS.securitymarker"
name="Security Marker"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.core.resources.problemmarker"/>
<super type="org.eclipse.core.resources.textmarker"/>
<persistent value="true"/>
<attribute name="violation"/>
</extension>
The problem that I am having is that the markers do not show up in the
Problems view. I have checked to see if they are being filtered out,
and this is NOT the case. Also these markers do not show up if the
source file they are associated with does not have an open editor when
the scan takes place. I do not now if this is related or not. What is
truly frustrating is that if I create a marker of type IMarker.PROBLEM
then both of these issues are solved. I have implemented both a
markerAnnotationSpecification and an annotationTypes for this marker.
Does anyone have any idea as to what I may be doing wrong? Is there
something else I need to implment/do when I create these markers? Any
help would be greatly appreciated - even if it is a suggestion as to a
better place to ask this question.
Thanks in advance
Russ
|
|
|
|
|
Re: Possible Marker Bug [message #200799 is a reply to message #200786] |
Wed, 13 April 2005 13:09  |
Eclipse User |
|
|
|
Originally posted by: rspitler.colby.edu
Thank you very much. I really appreciate your help, this is something
that I never would have caught.
russ
On 2005-04-13 12:36:08 -0400, Sam Mesh <SamMesh@gmail.com> said:
> Hope, replacing
> id="edu.colby.JSS.securitymarker"
> with
> id="securitymarker"
> helps. :)
|
|
|
Powered by
FUDForum. Page generated in 0.03830 seconds