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

Bug 418420

Summary: [Decorators] ControlDecoration tooltip is shown even though decoration image is invisible
Product: [Eclipse Project] Platform Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: UIAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact: Paul Webster <pwebster>
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 4.3Keywords: helpwanted
Target Milestone: 4.4 M3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Decoration tooltip is visible without decoration image being shown
none
Proposed fix none

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