Programmatically created marker annotations not showing [message #208150] |
Tue, 28 June 2005 19:24  |
Eclipse User |
|
|
|
Originally posted by: daszelt.web.de
i'm writing a plugin to visualise slices in eclipse.
i have about 100 markers to visualise the slice levels.
i use the markers to highlight the source code in different colors.
the user can chose a basic color in the preferences menu and the color for
the following marker is just a little bit darker and so on ...
so my approach was, to create 100 markers and add a MarkerAnnotation with
the appropriate AnnotationPreferences programmatically ...
i'm creating the markers via
resource.createMarker()
the marker creation should be ok since the plugin works fine if i define
the colors in the plugin.xml file ...
nothing is showing in the javaeditor when i create the
AnnotationPreferences programmatically ... but
EditorsUI.getAnnotationPreferenceLookup()
getAnnotationPreference(
EditorsUI.getAnnotationTypeLookup()
getAnnotationType("myMarker",IMarker.SEVERITY_ERROR))
getColorPreferenceValue().toString()
returns the right color value ...
//--------------AnnotationPreferences---------
AnnotationTypeLookup atl = EditorsUI.getAnnotationTypeLookup();
AnnotationPreferenceLookup apl = EditorsUI.getAnnotationPreferenceLookup();
AnnotationPreference ap = null;
ap = apl.getAnnotationPreference(
atl.getAnnotationType("myMarker",IMarker.SEVERITY_ERROR));
ap.setColorPreferenceValue(new RGB(190,0,0,));
any help would be appreciated ...
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04907 seconds