This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 418420 - [Decorators] ControlDecoration tooltip is shown even though decoration image is invisible
Summary: [Decorators] ControlDecoration tooltip is shown even though decoration image ...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.4 M3   Edit
Assignee: Paul Webster CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2013-10-01 09:28 EDT by Rüdiger Herrmann CLA
Modified: 2013-10-29 10:34 EDT (History)
1 user (show)

See Also:


Attachments
Decoration tooltip is visible without decoration image being shown (20.83 KB, image/png)
2013-10-01 09:29 EDT, Rüdiger Herrmann CLA
no flags Details
Proposed fix (2.77 KB, patch)
2013-10-01 15:53 EDT, Rüdiger Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2013-10-01 09:28:13 EDT
If a control decoration was created with setShowOnlyOnFocus( true ) the decoration image appears only if the decorated control has focus. 

However, if the decorated control is currently not focused but the mouse hovers over the area in which the decoration image would appear the decoration tooltip is shown. This looks odd (see screenshot). 

I would expect that if the decoration image is invisible, the tooltip isn't shown either.
Comment 1 Rüdiger Herrmann CLA 2013-10-01 09:29:51 EDT
Created attachment 236010 [details]
Decoration tooltip is visible without decoration image being shown
Comment 2 Rüdiger Herrmann CLA 2013-10-01 15:53:27 EDT
Created attachment 236021 [details]
Proposed fix
Comment 4 Dani Megert CLA 2013-10-08 04:34:43 EDT
Something is wrong, either with the fix or the test: ControlDecorationTests#testBug418420 constantly fails on Max OS X:

http://download.eclipse.org/eclipse/downloads/drops4/N20131007-2000/testresults/html/org.eclipse.ui.tests_macosx.cocoa.x86_5.0.html

==>

There should only be one shell up, the dialog expected:<22> but was:<23>

junit.framework.AssertionFailedError: There should only be one shell up, the dialog expected:<22> but was:<23>
at org.eclipse.jface.tests.fieldassist.AbstractFieldAssistTestCase.assertOneShellUp(AbstractFieldAssistTestCase.java:193)
at org.eclipse.jface.tests.fieldassist.ControlDecorationTests.testBug418420(ControlDecorationTests.java:88)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:655)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:36)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:32)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 5 Paul Webster CLA 2013-10-08 15:17:52 EDT
(In reply to Dani Megert from comment #4)
> Something is wrong, either with the fix or the test:
> ControlDecorationTests#testBug418420 constantly fails on Max OS X:
> 
> http://download.eclipse.org/eclipse/downloads/drops4/N20131007-2000/
> testresults/html/org.eclipse.ui.tests_macosx.cocoa.x86_5.0.html
> 

anotherControl.forceFocus(); returns false, it doesn't accept focus.  It seems that we can't reliably create focus based tests.

See also bug 275393 comment #22

I've disabled the test for now.  Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e4f810f5eb916b3e9dd9ef87cd6bd56c7bc0ddb7

Manual testing looks like it works (on the Git Staging view).

PW
Comment 6 Daniel Rolka CLA 2013-10-29 10:34:28 EDT
Verified in the build: I20131028-2000