diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CInformationProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CInformationProvider.java index b53fe9846d4..710767de970 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CInformationProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CInformationProvider.java @@ -19,6 +19,7 @@ import org.eclipse.jface.text.IInformationControlCreator; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.ITextViewer; import org.eclipse.jface.text.information.IInformationProvider; +import org.eclipse.jface.text.information.IInformationProviderExtension; import org.eclipse.jface.text.information.IInformationProviderExtension2; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorPart; @@ -33,7 +34,7 @@ import org.eclipse.ui.IWorkbenchWindow; * @see CTypeHover * @since 5.0 */ -public class CInformationProvider implements IInformationProvider, IInformationProviderExtension2 { +public class CInformationProvider implements IInformationProvider, IInformationProviderExtension, IInformationProviderExtension2 { /** * Default control creator. @@ -124,6 +125,9 @@ public class CInformationProvider implements IInformationProvider, IInformationP * @see IInformationProviderExtension2#getInformationPresenterControlCreator() */ public IInformationControlCreator getInformationPresenterControlCreator() { + if (fImplementation != null) { + return ((IInformationProviderExtension2) fImplementation).getInformationPresenterControlCreator(); + } if (fPresenterControlCreator == null) fPresenterControlCreator= new ControlCreator(); return fPresenterControlCreator; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CTypeHover.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CTypeHover.java index 258ab067339..647db0f5ddb 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CTypeHover.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CTypeHover.java @@ -16,7 +16,7 @@ import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.ITextHoverExtension; import org.eclipse.jface.text.ITextHoverExtension2; import org.eclipse.jface.text.ITextViewer; - +import org.eclipse.jface.text.information.IInformationProviderExtension2; import org.eclipse.ui.IEditorPart; import org.eclipse.cdt.ui.text.c.hover.ICEditorTextHover; @@ -25,7 +25,7 @@ import org.eclipse.cdt.ui.text.c.hover.ICEditorTextHover; * Aggregator of problem and doc hovers. * @since 5.0 */ -public class CTypeHover implements ICEditorTextHover, ITextHoverExtension, ITextHoverExtension2 { +public class CTypeHover implements ICEditorTextHover, ITextHoverExtension, ITextHoverExtension2, IInformationProviderExtension2 { private AbstractCEditorTextHover fProblemHover; private AbstractCEditorTextHover fCDocHover; @@ -57,7 +57,11 @@ public class CTypeHover implements ICEditorTextHover, ITextHoverExtension, IText * @see ITextHover#getHoverInfo(ITextViewer, IRegion) */ public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) { - return String.valueOf(getHoverInfo2(textViewer, hoverRegion)); + Object info= getHoverInfo2(textViewer, hoverRegion); + if (info != null) { + return String.valueOf(info); + } + return null; } /*