Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Hover Documentation [Duplicate - https://www.eclipse.org/forums/index.php/m/1822037/#msg_18220
Xtext Hover Documentation [Duplicate - https://www.eclipse.org/forums/index.php/m/1822037/#msg_18220 [message #1822039] Wed, 26 February 2020 09:34 Go to next message
Loredana Hozan is currently offline Loredana HozanFriend
Messages: 33
Registered: January 2019
Member
Hello, i have the following grammar:
	('data-dictionary' '{'
	attributes+=(Attribute)*
	'}')?
	('entity-catalog' '{'
	entities+=Entity*
	'}')?
	'}';
Attribute:
	AttributeSimpleType | AttributeEntityType 
Entity:
	(documentation=ML_DOC_COMMENT)?  
        name=ID funcName=STRING '{'
	features+=(Feature)*
'}';
Feature:
	(documentation=ML_DOC_COMMENT)? 
	(type=FeatureAttributeType | type=FeatureEntityType)
FeatureAttributeType:
	(type=[AttributeSimpleType|ID]|type=[AttributeSimpleType|GENERAL_FQN])
FeatureEntityType:
	'entity' (attribute=[AttributeEntityType|ID]|attribute=[AttributeEntityType|GENERAL_FQN]);

I have implemented the IEObjectDocumentationProvider and DefaultEObjectHoverProvider, but when i hover over a feature instead of giving me the doc. of the feature it gives me the doc of the attribute which is contained in the data-dictionary. The object that is passed to the getDocumentation method is of type Attribute. I have debugged and noticed in the EObjectAtOffsetHelper inside the resolveCrossReferencedElement method, the type of the object passed is Feature, but there is a check for the object's representation in the model instance. Since the selected Feature is present as an Attribute the returned object is the Attribute. Is there a way to get the doc of the feature instead of the attribute without having to override that method and get rid of the check?

[Updated on: Wed, 26 February 2020 09:53]

Report message to a moderator

Re: Xtext Hover Documentation [Duplicate - https://www.eclipse.org/forums/index.php/m/1822037/#msg_1 [message #1822127 is a reply to message #1822039] Thu, 27 February 2020 16:31 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
test


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext Hover Documentation [Duplicate - https://www.eclipse.org/forums/index.php/m/1822037/#msg_1 [message #1822128 is a reply to message #1822127] Thu, 27 February 2020 16:39 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
test2

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext Hover Documentation [Duplicate - https://www.eclipse.org/forums/index.php/m/1822037/#msg_1 [message #1822129 is a reply to message #1822128] Thu, 27 February 2020 16:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Test

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext Hover Documentation [Duplicate - https://www.eclipse.org/forums/index.php/m/1822037/#msg_1 [message #1822133 is a reply to message #1822129] Thu, 27 February 2020 16:54 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Are you testing because you keeping getting a 504 after posting? That's happening to me too, though the post does actually get posted...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Xtext Hover Documentation [Duplicate - https://www.eclipse.org/forums/index.php/m/1822037/#msg_1 [message #1822135 is a reply to message #1822133] Thu, 27 February 2020 17:07 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
yes i am testing https://bugs.eclipse.org/bugs/show_bug.cgi?id=560538

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Specify the encoding of attached source files
Next Topic:Code creation for data validation
Goto Forum:
  


Current Time: Thu Mar 28 18:15:30 GMT 2024

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

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

Back to the top