use of org.eclipse.reddeer.core.condition.WidgetIsFound in project jbosstools-hibernate by jbosstools.
the class ProjectConfigurationFactory method closePreferences.
private static void closePreferences(PropertyDialog pd) {
WidgetIsFound applyAndCloseButton = new WidgetIsFound(org.eclipse.swt.widgets.Button.class, new WithMnemonicTextMatcher("Apply and Close"));
org.eclipse.reddeer.swt.api.Button btn;
if (applyAndCloseButton.test()) {
// oxygen changed button text
btn = new PushButton("Apply and Close");
} else {
btn = new OkButton();
}
btn.click();
new WaitUntil(new ShellIsAvailable("Warning"), TimePeriod.SHORT, false);
// when eclipse is build by maven some plugins are missing
while (new ShellIsAvailable("Warning").test()) {
Shell warningShell = new DefaultShell("Warning");
new PushButton(warningShell, "Yes").click();
new WaitWhile(new ShellIsAvailable(warningShell));
}
new WaitWhile(new ShellIsAvailable(pd.getShell()));
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Aggregations