Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343230

Summary: [patch] Show declaration in hover (with colors and links to referenced elements)
Product: [Modeling] TMF Reporter: Christoph Kulla <christophkulla>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: sebastian.zarnekow, sven.efftinge
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Patch for the declaration documentation provider.
none
Screenshot of the new hover for xtext grammars none

Description Christoph Kulla CLA 2011-04-19 02:36:11 EDT
Build Identifier: 

This patch adds support for showing the declaration of a cross referenced element in the hover. The declaration will be presented with syntax coloring and links to other cross referenced elements. This is useful in languages where you don't have javadoc like comments in front of declarations (e.g. xtext grammar).

The syntax coloring will be retrieved from the opened edtior. If the editor is not open (cross resource references) no coloring will appear.

Reproducible: Always
Comment 1 Christoph Kulla CLA 2011-04-19 02:37:09 EDT
Created attachment 193545 [details]
Patch for the declaration documentation provider.
Comment 2 Christoph Kulla CLA 2011-04-19 02:42:42 EDT
Created attachment 193546 [details]
Screenshot of the new hover for xtext grammars
Comment 3 Sven Efftinge CLA 2011-04-19 03:04:41 EDT
I don't like hovers showing the implementation details of a declared element in general. It should instead show an abstracted "outside"-view on it. Like the signature the inferred type and some documentation. 
On the other hand it might be ok if you have a very small implementations, which you can grasp quickly. In that case it's even better than documentation, but :-)

What do others think?

Btw.: The code looks like the coloring only work if the referenced element is opened in an editor. Is that true?
Comment 4 Sebastian Zarnekow CLA 2011-04-19 03:44:32 EDT
Christoph, thanks for patch. Unfortunately, I don't like this feature. 
It overloads the semantics of the hover and I'd assume this will confuse users. Having something like the declaration view in Java may be ok but the hover info should display the documentation comment that is associated with the hovered element. 

Could you try to update your patch and provide a declaration view or at least a mock-up screenshot that illustrates how such a view could look like?
Comment 5 Sven Efftinge CLA 2011-05-15 10:37:20 EDT
Christoph,

as Sebastian and me both don't like the idea too much, I'm closing this ticket.
I hope this is not too frustrating for you. 
And please reopen or add comments if this is not ok with you.

Thank you,
Sven
Comment 6 Karsten Thoms CLA 2017-09-19 17:24:08 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 7 Karsten Thoms CLA 2017-09-19 17:35:48 EDT
Closing all bugs that were set to RESOLVED before Neon.0