Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Hover not working when I am using reference instead of name in model
Hover not working when I am using reference instead of name in model [message #1830824] Tue, 04 August 2020 21:28 Go to next message
Diksha Jaiswal is currently offline Diksha JaiswalFriend
Messages: 1
Registered: August 2020
Junior Member
I want to add a hover on ConstantName. The grammar looks like this:

Constant:
NumberConstant | ConstantName;
NumberConstant:
constant=INT ('[' name=ID ']')?;
ConstantName:
constant=[wdel::ConstantDefinition|ALL_CAP_ID];


override String getHoverInfoAsHtml(EObject o) {
if (o instanceof ConstantName) {
val c = o as ConstantName
return '''
<p>
c is : «c.constant»
</p>
'''
}
The hover works on NumberConstant but not on ConstantName. Is it because of reference I am using?

Hope somebody can help. Thank you!
Re: Hover not working when I am using reference instead of name in model [message #1830830 is a reply to message #1830824] Wed, 05 August 2020 01:11 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

I think there's a bunch of context missing here. Did you mean this for a more specific forum?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Hover not working when I am using reference instead of name in model [message #1830839 is a reply to message #1830830] Wed, 05 August 2020 05:52 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This looks like an Xtext grammar in which case it's better to ask on the TMF forum:

https://www.eclipse.org/forums/index.php/f/27/


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Eclipse changes my Code
Next Topic:Cannot Find USB Blaster
Goto Forum:
  


Current Time: Thu Apr 25 03:48:10 GMT 2024

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

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

Back to the top