Bug 279553 [FieldAssist] ControlDecoration strange behavior when description text is empty string
Build ID: 3.5RC3 With the following simple code, when I hover over the control decoration, a huge yellow box quickly flashes on the screen and then disappears. I also tried on 3.4.2 and observed the same behavior. Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout(1, false)); Text t = new Text(shell, SWT.BORDER); t.setText("hover on decoration ->"); ControlDecoration decoration = new ControlDecoration(t, SWT.RIGHT); decoration.setImage(FieldDecorationRegistry.getDefault() .getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION).getImage()); decoration.setDescriptionText(""); shell.pack(); shell.open(); while (!isInterrupted() && !shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose();
bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java
* any kind of control.
 * <p>
 * Decoration images always appear on the left or right side of the field, never
 * above or below it. Decorations can be positioned at the top, center, or
 * bottom of either side of the control. Future implementations may provide
 * additional positioning options for decorations.
 * <p>
 * ControlDecoration renders the image adjacent to the specified (already
 * created) control, with no guarantee that it won't be clipped or otherwise
 * obscured or overlapped by adjacent controls, including another
 * ControlDecoration placed in the same location. Clients should ensure that
 * there is adequate space adjacent to the control to show the decoration
 * properly.
 * <p>
 * Clients using ControlDecoration should typically ensure that enough margin
 * space is reserved for a decoration by altering the layout data margins,
 * although this is not assumed or required by the ControlDecoration
 * implementation.
 * <p>
 * This class is intended to be instantiated and used by clients. It is not
 * intended to be subclassed by clients.
 * 
 * @since 3.3
 * 
 * @see FieldDecoration
 * @see FieldDecorationRegistry
 * 
 * @noextend This class is not intended to be subclassed by clients.
 */
public class ControlDecoration {