use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-hibernate by jbosstools.
the class KnownConfigurationsView method deleteConsoleConfiguration.
/**
* Deletes hibernate console configuration
* @param console hibernate console configuration name
*/
public void deleteConsoleConfiguration(String console) {
new DefaultTreeItem(new DefaultTree(this), console).select();
new ContextMenuItem("Delete Configuration").select();
Shell deleteShell = new DefaultShell("Delete console configuration");
new OkButton(deleteShell).click();
new WaitWhile(new ShellIsAvailable(deleteShell));
new WaitWhile(new JobIsRunning());
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-hibernate by jbosstools.
the class HibernateToolsFactory method setHibernateVersion.
/**
* Sets hibernate version to given console
* @param consoleName console name
* @param hibernateVersion hibernate version
*/
public static void setHibernateVersion(String consoleName, String hbVersion) {
KnownConfigurationsView v = new KnownConfigurationsView();
v.open();
v.openConsoleConfiguration(consoleName);
new LabeledCombo("Hibernate Version:").setSelection(hbVersion);
new OkButton().click();
}
use of org.eclipse.reddeer.swt.impl.button.OkButton 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