use of org.eclipse.jface.text.tests.util.DisplayHelper in project eclipse.platform.text by eclipse.
the class HoverTest method getHoverShell.
private Shell getHoverShell(AbstractInformationControlManager manager) {
AbstractInformationControl[] control = { null };
new DisplayHelper() {
@Override
protected boolean condition() {
control[0] = (AbstractInformationControl) new Accessor(manager, AbstractInformationControlManager.class).get("fInformationControl");
return control[0] != null;
}
}.waitForCondition(this.editor.getSite().getShell().getDisplay(), 5000);
if (control[0] == null) {
ScreenshotTest.takeScreenshot(getClass(), testName.getMethodName(), System.out);
fail();
}
Shell shell = (Shell) new Accessor(control[0], AbstractInformationControl.class).get("fShell");
new DisplayHelper() {
@Override
protected boolean condition() {
return shell.isVisible();
}
}.waitForCondition(this.editor.getSite().getShell().getDisplay(), 2000);
assertTrue(shell.isVisible());
return shell;
}
Aggregations