try {
// compute the hover information
Object hoverInfo;
if (annotationHover instanceof IAnnotationHoverExtension) {
IAnnotationHoverExtension extension= (IAnnotationHoverExtension) annotationHover;
ILineRange hoverLineRange= extension.getHoverLineRange(fSourceViewer, line);
if (hoverLineRange == null)
return false;
final int maxVisibleLines= Integer.MAX_VALUE; // allow any number of lines being displayed, as we support scrolling
hoverInfo= extension.getHoverInfo(fSourceViewer, hoverLineRange, maxVisibleLines);
} else {
hoverInfo= annotationHover.getHoverInfo(fSourceViewer, line);
}
// hover region: the beginning of the concerned line to place the control right over the line