How to highlight / paint a line which has custom marker? [message #490071] |
Wed, 07 October 2009 04:07  |
Eclipse User |
|
|
|
Hi all,
In my plug-in I have created a custom marker.
Here is how I have used the required extension point in plugin.xml :
<extension
id="MyOrgMarker"
name="MyOrgMarker"
point="org.eclipse.core.resources.markers">
<super
type="org.eclipse.core.resources.marker">
</super>
</extension>
To provide custom icon to the marker I have used following extension point :
<extension
point="org.eclipse.ui.ide.markerImageProviders">
<imageprovider
id="MyOrg.imageprovider1"
icon="icons/myMarkerIcon.png"
markertype="MyPlugin.MyOrgMarker">
</imageprovider>
</extension>
And here is how I create the marker and jump to the part of file that has the marker:
IMarker marker = null;
marker = sourceIFile.createMarker("MyPlugin.MyOrgMarker");
marker.setAttribute(IMarker.LINE_NUMBER, line);
IDE.openEditor(page, marker);
The marker's icon appears on the left side column on the desired line and the entire line gets highlighted in blue.
If I click anywhere in the file the highlight goes away.
What I want is, instead of blue the line should be painted in orange or some other color and the highlight should stay even if user clicks somewhere in the editor.
How can I achieve this? Is there any extension point I'd be using for this? Or this has to be done by implementing some interface?
Please guide.
Thanks.
-[P]-
http://twitter.com/kaprasanna
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04578 seconds