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

Bug 457993

Summary: [Hover] Tooltips for annotations can show up when mouse is outside text
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: Michael_Rennie, Silenio_Quarti
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Curtis Windatt CLA 2015-01-20 16:21:44 EST
1) Have a one line CSS file containing an @import statement
2) Ensure validation options are on to mark @import statements with warnings
3) Hover the mouse in the editor, well below the annotation
Result:
The annotation tooltip opens

The problem is that textView.getOffsetAtLocation will try to find the closest valid offset to the location.  If the annotation is on the last line of the file, hovering anywhere below that line will still return the last line.  Something similar might happen for hovering above the first line, but as the text view area starts at 0, there is no where to hover within the text view but above the text.
Comment 1 Curtis Windatt CLA 2015-01-20 17:11:46 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=d9972353e54e7751e34dd6655311aca888be677a
Fixed in master

Silenio, can you take a quick look at this fix?  In case you have a better way to check if we are within the document.