This is not an easy problem, so please bear with me .
I add Annotations to the left hand-side Vertical Ruler (IVerticalRuler) of an AbstractTextEditor (I use the default Java Editor here). The annotation is displayed and rendered nicely with a vertical bar, just like I want it. I also set a ToolTipText by Overriding Annotation's getText() method. This works fine. However, the tool tip is only displayed when I hover over the first line of the annotation. My annotations can stretch many lines. The tooltip should of course also be displayed in all lines, not just in the first line.
See attached picture for how the tool tip is shown when on the first line of the finding. Not shown when below the first line, though
I de-bugged into this and found that in the Annotation class the getText method for the display of the tool tip isn't called when the mouse cursor hovers over succeeding lines. This is because in class DefaultAnnotationHover (in package org.eclipse.jface.text.source) the method isRulerLine returns false when line and the line calculated from position don't match. So I basically needed to reimplement/override isRulerLine, but I have no idea how to do so. Remember, I am using the default Java Editor.