// hover region: the beginning of the concerned line to place the control right over the line
IDocument document= fSourceViewer.getDocument();
int offset= document.getLineOffset(line);
String contentType= TextUtilities.getContentType(document, fSourceViewerConfiguration.getConfiguredDocumentPartitioning(fSourceViewer), offset, true);
IInformationControlCreator controlCreator= null;
if (annotationHover instanceof IInformationProviderExtension2) // this is undocumented, but left here for backwards compatibility
controlCreator= ((IInformationProviderExtension2) annotationHover).getInformationPresenterControlCreator();
else if (annotationHover instanceof IAnnotationHoverExtension)
controlCreator= ((IAnnotationHoverExtension) annotationHover).getHoverControlCreator();