Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354090

Summary: bindIEObjectHover( ) doesn't override the default one
Product: [Modeling] TMF Reporter: Timotei D <kimi_anwen>
Component: CommonAssignee: Project Inbox <tmf.common-inbox>
Status: CLOSED INVALID QA Contact:
Severity: major    
Priority: P3 CC: dennis.huebner, sebastian.zarnekow
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Timotei D CLA 2011-08-07 10:18:42 EDT
Build Identifier: 20110615-0604

If in my uiModule I override the bindIEObjectHover( ) method, it doesn't work, but instead it calls the method "public Object getHoverInfo( EObject eObject, ITextViewer textViewer, IRegion hoverRegion )" from the default class: DispatchingEObjectTextHover.

Reproducible: Always

Steps to Reproduce:
1. override the bindIEObjectHover( ) in your uiModule:

  @Override
    public Class< ? extends IEObjectHover > bindIEObjectHover( )
    {
        return MyObjectHover.class;
    }
2. Put a breakpoint in the getHoverInfo method in both your MyObjectHover class and the DispatchingEObjectTextHover one
3. When hovering on a grammar object, it will call the DispathingEObjectTextHover NOT your overriden class
Comment 1 Sebastian Zarnekow CLA 2011-08-07 11:49:17 EDT
You have to bind an own implementation of IEObjectHoverProvider to hook language specific hover providers into the framework. The plain IEObjectHover is not meant to be replaced since it dispatches to the language specific implementations. 

Btw: What do you mean by 'grammar object'? Is that something that you defined in your own language?
Comment 2 Timotei D CLA 2011-08-08 02:50:07 EDT
Ah.

Didn't know that. It works now :) I thought it's a bug ;)

Thanks.