Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 236021 Details for
Bug 418420
[Decorators] ControlDecoration tooltip is shown even though decoration image is invisible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed fix
0001-Bug-418420-Decorators-ControlDecoration-tooltip-is-s.patch (text/plain), 2.77 KB, created by
Rüdiger Herrmann
on 2013-10-01 15:53:27 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Rüdiger Herrmann
Created:
2013-10-01 15:53:27 EDT
Size:
2.77 KB
patch
obsolete
>From 897868b6c147bc249c2595dc05be959cfa40aff3 Mon Sep 17 00:00:00 2001 >From: Ruediger Herrmann <ruediger.herrmann@gmx.de> >Date: Tue, 1 Oct 2013 21:46:06 +0200 >Subject: [PATCH 1/1] Bug 418420 - [Decorators] ControlDecoration tooltip is > shown even though decoration image is invisible > >--- > .../jface/fieldassist/ControlDecoration.java | 7 +++++++ > .../tests/fieldassist/ControlDecorationTests.java | 13 +++++++++++++ > 2 files changed, 20 insertions(+), 0 deletions(-) > >diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java >index 02d5a15..87a0309 100644 >--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java >+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Rüdiger Herrmann - fix for bug 418420 > *******************************************************************************/ > package org.eclipse.jface.fieldassist; > >@@ -1075,6 +1076,12 @@ public class ControlDecoration { > if (!visible) { > return; > } >+ >+ // If the decoration is hidden, don't show the hover. >+ if (showOnlyOnFocus && !control.isFocusControl()) { >+ return; >+ } >+ > // If there is no text, any existing hover should be hidden, and > // there is nothing more to do. > if (text == null || text.length() == 0) { >diff --git a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/fieldassist/ControlDecorationTests.java b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/fieldassist/ControlDecorationTests.java >index 655112b..1d86471 100644 >--- a/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/fieldassist/ControlDecorationTests.java >+++ b/tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/fieldassist/ControlDecorationTests.java >@@ -75,6 +75,19 @@ public class ControlDecorationTests extends AbstractFieldAssistTestCase { > assertTwoShellsUp(); > } > >+ public void testBug418420() { >+ AbstractFieldAssistWindow window = getFieldAssistWindow(); >+ window.open(); >+ ControlDecoration decoration = new ControlDecoration(window.getFieldAssistControl(), SWT.RIGHT); >+ decoration.setImage(FieldDecorationRegistry.getDefault() >+ .getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION).getImage()); >+ decoration.setDescriptionText("foo"); >+ decoration.setShowOnlyOnFocus(true); >+ anotherControl.forceFocus(); >+ decoration.showHoverText("Show me"); >+ assertOneShellUp(); >+ } >+ > /* (non-Javadoc) > * @see org.eclipse.jface.tests.fieldassist.AbstractFieldAssistTestCase#createFieldAssistWindow() > */ >-- >1.7.5.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 418420
:
236010
| 236021