Custom Markers not showing in Problems [message #1404282] |
Wed, 30 July 2014 21:17 |
Jim Klo Messages: 49 Registered: September 2012 |
Member |
|
|
Greetings,
For some reason, our custom markers stopped displaying in both in the editor gutter and the Problems view. All that has happened is that we've moved our "marker making" code into a new plugin.
This is our definition of the custom marker in the new plugin.xml
<extension
id="com.sri.sunflower.errormarker"
name="Flora Syntax Error"
point="org.eclipse.core.resources.markers">
<super
type="org.eclipse.core.resources.problemmarker">
</super>
<persistent
value="true">
</persistent>
<super
type="org.eclipse.core.resources.textmarker">
</super>
</extension>
And this is the code I use to make the markers:
public static final String FLORA_SYNTAX_ERROR_ID = "com.sri.sunflower.errormarker";
private static void createFloraErrorMarker(IResource file, int line, int startPos, int endPos,
String message) throws CoreException{
Map<String, Object> attributes = new HashMap<>();
attributes.put(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
attributes.put(IMarker.MESSAGE, message);
attributes.put(IMarker.LINE_NUMBER, line);
attributes.put(IMarker.CHAR_START, startPos);
attributes.put(IMarker.CHAR_END, endPos);
MarkerUtilities.createMarker(file, attributes, FLORA_SYNTAX_ERROR_ID);
}
If I change FLORA_SYNTAX_ERROR_ID = IMarker.PROBLEM the markers start working again. I've verified that the markers are getting created, but not displayed. My belief is that our custom marker isn't getting registered. Anyone have any thoughts on how I might fix this?
[Updated on: Wed, 30 July 2014 21:50] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03387 seconds