Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Hover facility

> 
> Hello,
>   I wanted to implement a custom hover facility for my editor which extends
> CEditor.
>   For testing, I have overridden the following function in my source viewer
> configuration.
> 
> 	public ITextHover getTextHover(ISourceViewer sourceViewer, String
> contentType, int stateMask) 
> 	{
> 		return null;
> 	}
> 	
> 	public ITextHover getTextHover(ISourceViewer sourceViewer, String
> contentType) 
> 	{
> 		return null;
> 	}
> 	public IAnnotationHover getAnnotationHover(ISourceViewer
> sourceViewer) {
> 		return null;
> 	}
> 	
> 	public int[] getConfiguredTextHoverStateMasks(ISourceViewer
> sourceViewer, String contentType) 
> 	{
> 		return null;
> 	}
> 
>   With this I expected that there should be not be any hover. But the hover
> still comes. 
>   Appreciate if someone throws light on the problem. How the hovering
> facility is implemented in CDT.

It looks like your sourceviewer was not loaded, try with various breakpoint
to check the trace.

Note that the CEditor comes with an extension point that lets you
add hovering,  for example we have contribution from the :
- the debuger
- the documentation
- source hovering

See CDocHover or CSourceHover and the plugin.xml of the cdt.ui




Back to the top