Community
Participate
Working Groups
Build ID: N20081206-2000 Steps To Reproduce: 1.Navigate to Menu:Window->Customize Perspective... 2.Try selecting/deselecting an item on ToolBar or Menu Visibility tab The tooltip appears almost immediately, its position is right under the mouse pointer, and does not hide until the mouse is moved . This makes it very difficult to change the selections of the checkboxes. The tooltip must be offset a little or perhaps show up after a certain delay.
The current offset of the tooltip is necessary to allow users to click on links within it - if the cursor is not directly overtop, when it is moved the tooltip is hidden before the cursor reaches it. It seems we'll either have to delay the tooltip, or cause it not to appear over the check box (or if the cursor's over the check box, delaying slightly).
> The current offset of the tooltip is necessary to allow users to click on links > within it - if the cursor is not directly overtop, when it is moved the tooltip > is hidden before the cursor reaches it. Sounds like a severe limitation of the JFace ToolTip. Please file a bug to make sure this gets fixed in the framework. For M4, you could get away with a solution that just does not show the tooltip over the checkbox area. But in the final solution, the mouse cursor should not cover the tool tip initially (no matter how long the delay is).
Bug 257986 created with patch. If it goes through, the fix for the CPD is just to invoke the new method once instead of shifting the tooltip: currently in the ItemDetailToolTip constructor on line 853, replace this.setShift(new Point(-5, -5)); with this.setAllowCursorToEnter(true); This would fix the current problem and the problem I described in Comment #1.
Created attachment 119954 [details] Fix It turns out that the bug I posted in my last comment is unneeded, there is already functionality built into ToolTip to do what we need - namely the constant ToolTip#NO_RECREATE. This patch has the proposed fix - it uses ToolTip#NO_RECREATE so the tooltip does not need to be over the cursor for the cursor to enter it to manipulate widgets. In fact, we've moved the tooltip farther down and right to prevent obscuring the tree item at all. Previously, the shift has been (-5, -5) which caused the tooltip to appear under the cursor, now it's (10, 10) to give plenty of clearance.
It turns out the fix I describe above is insufficient - when the user moves the cursor, the tooltip does not go away. I'm readding Bug 257986 as blocking this bug and am working with Tom Schindl to get this fixed. Note that the patch above is no longer valid.
While we work on supplementing the tooltip, I recommend this intermediate fix: In the CustomizePerspectiveDialog in the constructor of ItemDetailToolTip, line 853, change the amount we offset the dialog: Change this.setShift(new Point(-5, -5)); to this.setShift(new Point(0, 0)); This doesn't fix the overall problem of the tooltip blocking the user from clicking, but the user only need move his cursor one pixel up or to the left to click the checkbox, which is better than the current 6 pixels.
Committed in >20081209. Changed the offset to (-1,-1) to leave more 'open' room to click the check box. I'd occasionally lose the TTip when I had it set to (0,0), I'd 'jitter' the mouse a pixel up when i started moving to the right...
Created attachment 120027 [details] Fix2 Why don't you use NO_RECREATE and override ToolTip#getToolTipArea(Event) to ensure the tooltip goes away when the cursor leaves the hovered item? This works fine in ColumnViewerToolTipSupport, and it would also allow to place the tooltip a few pixels to the right of the cursor (to avoid click-interference and overlapping the checkbox).
(In reply to comment #7) > Committed in >20081209. Just a note that this change is going into the M4 candidate milestone build.
Created attachment 120078 [details] Avoid tooltip recreate while in cell and position tooltip at the bottom of the cell
Committed in >20081210. Applied Tom's patch. I'll mark this one as fixed, Tom is going to take a look to see if the Tooltip can make this simpler post-M4.
Verified in I20081210-1800.