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

Bug 471976

Summary: [ContentAssist] If no info is provided for the tooltip (ever) we end up breaking regular hover handling
Product: [ECD] Orion Reporter: Eric Moffatt <emoffatt>
Component: ClientAssignee: Eric Moffatt <emoffatt>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, libingw, Michael_Rennie
Version: unspecified   
Target Milestone: 10.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 472622    

Description Eric Moffatt CLA 2015-07-06 16:34:25 EDT
The problem is that the CA is calling 'show' on the Tooltip (which sets a flag called '_locked' indicating that normal hovers can't tear it down). CA also correctly calls 'hide' on the Tooltip whenever it goes away. This ordinarily clears the flag but if there hasn't been *any* content ever returned from the hoverInfo providers the div is still 'visibility': "hidden", causing the no-op check at the top of hide to prevent the flags from being reset (meaning that '_locked' is still true so no normal hovers will ever appear.

We need to check whether or not the tooltip has ever been shown or only really set the '_locked' parameter when the tooltip has actually shown something...
Comment 1 Eric Moffatt CLA 2015-07-07 10:03:33 EDT
I've changed the logic to explicitly track when the tooltip's 'visibility' state changes rather than relying on that state to test for visibility. This solves the issue because the 'isVisible' state only becomes true iff the tooltip actually displays results...

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=5a3b8efa60aa190d2ba60eec3170f6cf7d770814
Comment 2 Eric Moffatt CLA 2015-07-09 13:08:01 EDT
I've made a few tweaks to the code to better handle the lock condition:

1) try to clear the lock always (didn't work)

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=aff7b5303d7e37eb38ecad264c171cb1575eec2a

2) Explicitly have the code that called 'show' with the locking on to explicitly clear the lock

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=d134f150517b2f79b2d2649c812d68abfb34dd83