Community
Participate
Working Groups
*
* Contributors:
* IBM Corporation - initial API and implementation
* RĂ¼diger Herrmann - fix for bug 418420
*******************************************************************************/
package org.eclipse.jface.fieldassist;
if (!visible) {
return;
}
// If the decoration is hidden, don't show the hover.
if (showOnlyOnFocus && !control.isFocusControl()) {
// If there is no text, any existing hover should be hidden, and
// there is nothing more to do.
if (text == null || text.length() == 0) {
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()
*/
-