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

Bug 463515

Summary: [Hover] Code projection tooltips are quirky
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: ClientAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon, Michael_Rennie
Version: 8.0   
Target Milestone: 9.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 464825    
Attachments:
Description Flags
screenshot none

Description Curtis Windatt CLA 2015-03-30 16:00:49 EDT
We render certain annotations using the code projection model which creates a styled text view.

The projection rendering we do in tooltip.js is very quirky, relying on checking the computed width of the parent tooltip div (minus padding).

It also requires special css classes because it uses of mix of colours and styles from both the editor and the tooltip.

1) We should stop using code projection for marked occurrences.  The alternate tooltip that shows up when there are multiple annotations on the same line as the occurrences has all the same information plus a nice looking highlighter icon.

2) Consider adding metrics to the hovers to see what type of information is being rendered.  If projection models are barely ever used (comment folding is likely the most common currently), we could remove it from tooltips entirely.

3) Find a better way to use the projection model view inside the tooltip.
Comment 1 Michael Rennie CLA 2015-04-01 14:20:10 EDT
Created attachment 252093 [details]
screenshot

(In reply to Curtis Windatt from comment #0)

> The projection rendering we do in tooltip.js is very quirky, relying on
> checking the computed width of the parent tooltip div (minus padding).
> 
> It also requires special css classes because it uses of mix of colours and
> styles from both the editor and the tooltip.
> 
> 1) We should stop using code projection for marked occurrences.  The
> alternate tooltip that shows up when there are multiple annotations on the
> same line as the occurrences has all the same information plus a nice
> looking highlighter icon.
> 

+100 for this. It clutters useful tooltips and provides less than zero useful information. Even more odd, if you have an occurrence with no other annotations in the same spot, the projection tooltip is not shown. It only shows up to clutter up useful tooltips.
Comment 2 Mark Macdonald CLA 2015-04-01 15:38:36 EDT
I would also like to see this cleaned up. I never realized that the extra annotation was a side effect of Mark Occurrences -- I couldn't figure out what the hell it was doing there.
Comment 3 Curtis Windatt CLA 2015-04-16 14:21:15 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=2530331d636da880f93c912df87da426e6415384

Fixed in master.  We will only show code projection for folding comments.  In addition, if an annotation has no title (will display the source code of the line), we don't show a tooltip at all if hovering in the editor.  Showing the code right below the code the user is hovering on doesn't make sense.

Opened 464865 to make the tooltips for common annotations more useful, or at least consistent.