| Summary: | Simplify marker rendering (1GI8NXV) | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Kai-Uwe Maetzel <kai-uwe_maetzel> |
| Component: | UI | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 2.0 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
PRODUCT VERSION: 125 and higher Post 2.0 As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you. |
From EC: I assume that you talk about the breakpoints view contributed by the "org.eclipse.debug.ui" plugin. The mechanisms how the vertical ruler and the breakpoints view look up icons differ. The breakpoints view has specific knowledge about markers representing breakpoints, whereas the vertical ruler does not assume a specific marker type. If you create a marker which should be rendered independently of its state, the following is recommended: You specify a particular icon for a particular marker type in your plugin.xml file, e.g.: <extension point="org.eclipse.ui.markerImageProviders"> <imageprovider id="myplugin.myMarkerProvider" markertype="myplugin.mymarker" icon="myiconlocation/mymarkericon.gif"> </imageprovider> </extension> Your definition is picked up by all editors relying on the provided default implementation. If you create a marker that should be rendered depending on its state, you have to provide an Annotation which masters the required rendering. In addition, you have to make sure that for your marker your custom annotation is created. If you deal with your own IAnnotationModel, it depends on your implementation how your annotation is created and added to the model. If you use, e.g., the ResourceAnnotationModel, you can create a subclass of MarkerAnnotation, say MyMarkerAnnotation, and subclass ResourceAnnotationModel overriding createMarkerAnnotation(IMarker) to return MyMarkerAnnotation. Thus, when building an editor, you have to configure it with document providers which return your custom ResourceAnnotationModel. As example look at JDT. They provide their own JavaMarkerAnnotation, annotation model, etc. We are looking into simplifying this for the future. NOTES: