I am a student, and as part of the annual project, I am developing an eclipse plugin.
I ran into some strange problem and tried to fix it for 2 days already:
I added 3 new marker types in plugin.xml
.
For each marker I added annotationTypes
, and for each annotationType
I added markerAnnotationSpecification
.
My goal is colored background lines.
In each markerAnnotationSpecification
I put different icons and different colorPreferenceValue
.
The strange thing is that:
When creating markers, everything is fine and even the icons are displayed (different icons for each marker), but the background color of the lines is the same for each marker.
I noticed that the latter markerAnnotationSpecification colorPreferenceValue
is taken every time.
When I changed the order markerAnnotationSpecification
in plugin.xml
, the color changed to the last.
I do not know what to do?
I also got to the preferences page and changed the annotation type color there - after applying it, I saw that it updated the annotation type 3 color to one color.
I canβt add more than one (I donβt think so ...)
Can I manage the software markerAnnotationSpecification.colorPreferenceValue
? If so, how?
I am adding my code - perhaps you will see what I do not see:
<extension id="BatonPassing.diff_marker_b"
name="SiteBDiffMarker"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.core.resources.textmarker"/>
<persistent value="true"/>
</extension>
<extension
point="org.eclipse.ui.editors.annotationTypes">
<type
name="diffAnnotationB"
super="org.eclipse.ui.workbench.texteditor.info"
markerType="BatonPassing.diff_marker_b">
</type>
</extension>
<extension
point="org.eclipse.ui.editors.markerAnnotationSpecification">
<specification
icon = "icons/il.gif"
annotationType="diffAnnotationB"
verticalRulerPreferenceKey="highlight.rulers.vertical"
textPreferenceKey="highlight.text"
colorPreferenceKey="highlight.color"
highlightPreferenceKey="highlight.background"
textPreferenceValue="true"
textStylePreferenceValue="BOX"
overviewRulerPreferenceKey="highlight.rulers.overview"
presentationLayer="4"
highlightPreferenceValue="true"
label="DiffSiteB"
symbolicIcon="warning"
colorPreferenceValue="255,0,0"
verticalRulerPreferenceValue="true"
overviewRulerPreferenceValue="true"
textStylePreferenceKey="highlight.text.style" >
</specification >
</extension>
Each marker code matches an identifier; names are colorPreferenceValue
not.
, . !
Hadas
user62903