Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 06:56 Go to next message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 53
Registered: June 2014
Member
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 12:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12229
Registered: July 2009
Senior Member
have a look at https://blogs.itemis.com/en/xtext-usability-hovers-on-keywords

Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Hover on Keyword and Token [message #1785653 is a reply to message #1785605] Wed, 18 April 2018 05:36 Go to previous messageGo to next message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 53
Registered: June 2014
Member
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 08:34 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12229
Registered: July 2009
Senior Member
i dont understand: are you taking about valiation error messages?

Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Hover on Keyword and Token [message #1785725 is a reply to message #1785675] Thu, 19 April 2018 04:11 Go to previous messageGo to next message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 53
Registered: June 2014
Member
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 05:03 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12229
Registered: July 2009
Senior Member
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.


Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Thu, 19 April 2018 05:10]

Report message to a 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: Wed Sep 19 05:38:56 GMT 2018

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

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

Back to the top