hover = new Hover(hoverNear.getShell()); hover.setText(text, getDecorationRectangle(control.getParent()), control); hover.setVisible(true);
hover = new Hover(hoverNear.getShell()); hover.setText(text, getDecorationRectangle(control.getParent()), control); hover.setVisible(true);
/** * Something has changed, requiring redraw. Redraw the decoration and update * the hover text if appropriate. */ protected void update() { if (control == null || control.isDisposed()) { return; } Rectangle rect = getDecorationRectangle(control.getShell()); // If this update is happening due to an image reset, we need to make // sure we clear the area from the old image. // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=212501 if (previousDecorationRectangle != null) { rect = rect.union(previousDecorationRectangle); } // Redraw this rectangle in all children control.getShell() .redraw(rect.x, rect.y, rect.width, rect.height, true); control.getShell().update(); if (hover != null && getDescriptionText() != null) { hover.setText(getDescriptionText(), getDecorationRectangle(control .getParent()), control); } previousDecorationRectangle = null; }
/** * Something has changed, requiring redraw. Redraw the decoration and update * the hover text if appropriate. */ protected void update() { if (control == null || control.isDisposed()) { return; } Rectangle rect = getDecorationRectangle(control.getShell()); // If this update is happening due to an image reset, we need to make // sure we clear the area from the old image. // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=212501 if (previousDecorationRectangle != null) { rect = rect.union(previousDecorationRectangle); } // Redraw this rectangle in all children control.getShell() .redraw(rect.x, rect.y, rect.width, rect.height, true); control.getShell().update(); if (hover != null && getDescriptionText() != null) { hover.setText(getDescriptionText(), getDecorationRectangle(control .getParent()), control); } previousDecorationRectangle = null; }