Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Hover on Keyword and Token(How to differentiate between Hover on Keyword and Hover on Token)
Hover on Keyword and Token [message #1785578] Tue, 17 April 2018 02:56 Go to next message
Eclipse UserFriend
Hello,

I have customized the hover on token to display some additional information.
But same is giving problem when I hover on keyword.
How can i differentiate whether hover is on keyword or on token?

Thanks in advance.

Best regards,
Virag Purnam
Re: Hover on Keyword and Token [message #1785605 is a reply to message #1785578] Tue, 17 April 2018 08:48 Go to previous messageGo to next message
Eclipse UserFriend
have a look at https://blogs.itemis.com/en/xtext-usability-hovers-on-keywords
Re: Hover on Keyword and Token [message #1785653 is a reply to message #1785605] Wed, 18 April 2018 01:36 Go to previous messageGo to next message
Eclipse UserFriend
Hello Mr. Christian Dietrich,

Thanks for the reply.
I have gone through the link and it was useful.
There is another scenario where I got stuck.
Need your help in that regard as well.

How can I differentiate whether the hover is on keyword/Token with problems (red underline) or is on keyword/Token which is problem free ?

I need to add more information on hover for the keyword/Token with problems (red underline) . Same will not be applicable for the hover on keyword/Token which is problem free.
This is the reason I want to differentiate between both.


Thanks and regards,
Virag Purnam
Re: Hover on Keyword and Token [message #1785675 is a reply to message #1785653] Wed, 18 April 2018 04:34 Go to previous messageGo to next message
Eclipse UserFriend
i dont understand: are you taking about valiation error messages?
Re: Hover on Keyword and Token [message #1785725 is a reply to message #1785675] Thu, 19 April 2018 00:11 Go to previous messageGo to next message
Eclipse UserFriend
Not validation messages.
When we hover on tokens (in case of problem tokens), it displays validation message
when we hover on tokens (problem free tokens), it will not display any validation message.

What I want to know is how to differentiate between these two types?
Any method or class which i can refer?

Re: Hover on Keyword and Token [message #1785726 is a reply to message #1785725] Thu, 19 April 2018 01:03 Go to previous message
Eclipse UserFriend
please give an example of what you are talking about.

and what you want to achieve:
- change error messages
- show tooltips

- problem hover always beats other hover (see org.eclipse.xtext.ui.editor.hover.DefaultCompositeHover - annotation=problem hover first - htmlHover = tooltip second).

you could invert that but then you wont get the error messages.

[Updated on: Thu, 19 April 2018 01:10] by Moderator

Previous Topic:Integration with Xbase - reference to model elements and java-like methodscalls
Next Topic:Registering both relative and fully qualified name in Scope
Goto Forum:
  


Current Time: Mon Jun 23 06:30:10 EDT 2025

Powered by FUDForum. Page generated in 0.04801 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top