Community
Participate
Working Groups
Created attachment 211624 [details] Test program using JFace and SWT Version: 4.2.0 Build id: I20120222-2200 I noticed tooltips flicker when using ColumnLabelProviders, regardless of native or non-native tooltips. Attached is a little demo program that simply presents the file system as a tree from the roots. If you hover over long filenames, you'll notice a tooltip appears, disappears, and then reappears.
Created attachment 211625 [details] Patch to ColumnViewerToolTipSupport The cause of the flicker is that shouldCreateToolTip(Event) sets the tooltip text to an empty string before determining how it should be changed. This causes the tooltip to disappear, and then reappear. The solution is to avoid setting the tooltip until determined that it needs to be set. With this patch, I never see flicker. Tom, could you please verify?
Created attachment 212424 [details] Revised test program using JFace and SWT with different forms of per-column tooltips So my patch fixes the problem works when tooltips are all native and don't actually have any tooltip text (thereby. It doesn't fix behaviour when mixing columns with native and non-native tooltips *and* where the native tooltip column doesn't provide text. In these circumstance you will still see tooltip flashing. I've revised the demo program to include three per-column label providers, one using native tooltips but with no tooltip text, one using native tooltips but providing tooltip text, and the last using JFace tooltips with provided tooltip text. If you move between the columns on MacOS X Cocoa, you'll see some interesting behaviours. 1. Moving from the native-no-tooltip to native-with-tooltip: the native tooltip never appears, likely as the control's tooltip was set to "" and never unset. 2. Moving from the native-with-tooltip or jface-tooltip to native-no-tooltip: the native tooltip for the column appears, which is then removed and replaced with the jface tooltip JFace-handled tooltips also appear when the window doesn't have focus, whereas native tooltips do not (though I personally find this behaviour kinda handy). I think the problem is that ColumnViewerToolTipSupport#shouldCreateToolTip() should be called when the cursor enters or leaves the cell area, rather than to show the tooltip. And it should not have side-effects. But this will have to wait to M7.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.