Customize "hover-support" for non-grammer EObjects [message #1196326] |
Tue, 19 November 2013 11:06 |
Till F. Messages: 58 Registered: August 2012 |
Member |
|
|
Hi,
I'm trying to customize Xtexts' "hover-support" (this yellow box showing some infos about the element under the mouse curser). It was easy to follow the instructions in these two blog posts (thanks for this):
http://ckulla.wordpress.com/2011/02/06/hover-support-in-xtext-2-0/
http://christiandietrich.wordpress.com/2011/07/16/hover-support-in-xtext-2-0-tutorial/
Now the problem: I refer to elements from another EPackage in my grammer (generated from a plain ecore model). Since the Xtext-generated editor for my language always supported "hovering" on such elements, I expected customizing corresponding yellow boxes shouldn't be any different.
Unfortunately my custom implementation of an EObjectHoverProvider is only called for EObjects of my grammer. But I can see that the base class (DefaultEObjectHoverProvider) is used for non-grammer EObjects. This means that in principle Xtexts' hovering implementation handles non-grammer elements as desired, but my custom EObjectHoverProvider is not involved. This is how it is registered in the UIModule of my grammer:
public Class<? extends IEObjectHoverProvider>
bindIEObjectHoverProvider()
{
return MyLanguageEObjectHoverProvider.class;
}
public Class<? extends IEObjectDocumentationProvider>
bindIEObjectDocumentationProviderr()
{
return MyLanguageEObjectDocumentationProvider.class;
}
Can I do something to get this working without modifying Xtext framework code? I fear that this might be a bug...
Thanks,
Till
[Updated on: Tue, 19 November 2013 13:59] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02172 seconds