* Eclipse class AnnotationPainter (in org.eclipse.jface.text.source; to be found in org.eclipse.jface.text_*.jar): * paints decorations (provided by an annotation model) * can be configured with drawing strategies (public interface AnnotationPainter.IDrawingStrategy) * The AnnotationPainter object is controlled by an object of class SourceViewerDecorationSupport (in org.eclipse.ui.texteditor; to be found in org.eclipse.ui.workbench.texteditor_*.jar) * has a protected method that creates a the AnnotationPainter object and provides it with various drawing strategies (createAnnotationPainter()) * there is even a reference to a feature request: "Could provide an extension point for drawing strategies, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=51498" * but: this bug entry was created in 2004 and never really modified since * But: the method createAnnotationPainter() is protected and not final. Hence, it could be overridden by a subclass. So the question is: * How to provide Eclipse with a modified SourceViewerDecorationSupport? * The class AbstractDecoratedTextEditor (in org.eclipse.ui.texteditor; to be found in org.eclipse.ui.editors_*.jar; also see type hierachy below) has protected, non-final field "fSourceViewerDecorationSupport" that is accessed by get- and configureSourceViewerDecorationSupport() (both protected and non-final) EditorPart (A) +- AbstractTextEditor (A) +- StatusTextEditor +- AbstractDecoratedTextEditor (A) +- JavaEditor (A) | |- ClassFileEditor | +- CompilationUnitEditor +- TextEditor * Possible approaches (at least the following three): * Start an Eclipse in Debug Mode to see the classes working in order to find a point to hook in. * Look for open source Eclipse plugins that make use of custom annotations and find out how they did it. * Maybe Vrapper (https://github.com/vrapper/vrapper) is a good candidate: It provides Vim-like commands for Eclipse. Example: To delete the current line in Vim (in "normal mode"), you simply type "dd". Vrapper also provides this shortcut -- and to denote the special state after the first "d" it cuts the blinking cursor in half. This does not look like a normal annotation. * Consult the community.