use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-hibernate by jbosstools.
the class ReverseEngineeringEditor method selectAllTables.
/**
* Select all tables within Add Tables & Columns tab
*/
public void selectAllTables(String databaseName) {
activateTableAndColumnsTab();
new PushButton(this, "Add...").click();
Shell s = new DefaultShell("Add Tables & Columns");
DefaultTree dbTree = new DefaultTree(s);
new WaitUntil(new TreeHasChildren(dbTree));
new WaitUntil(new TreeContainsItem(dbTree, databaseName));
new DefaultTreeItem(dbTree, databaseName).select();
new PushButton(s, "Select all children").click();
new PushButton(s, "OK").click();
new WaitWhile(new ShellIsAvailable(s));
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-hibernate by jbosstools.
the class JpaFacetInstallPage method setConnectionProfile.
/**
* Sets connection profile for JPA
* @param profileName given connection profile
*/
public void setConnectionProfile(String profileName) {
DefaultGroup group = new DefaultGroup(referencedComposite, "Connection");
new WaitUntil(new ControlIsEnabled(new DefaultCombo(group)));
new DefaultCombo(group).setSelection(profileName);
PushButton apply = new PushButton(referencedComposite, "Apply");
apply.click();
new WaitWhile(new JobIsRunning());
new WaitWhile(new ShellIsAvailable("Progress Information"), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.button.PushButton in project jbosstools-hibernate by jbosstools.
the class ProjectConfigurationFactory method convertProjectToFacetsForm.
/**
* Convert project to facet form
* @param prj given project name
*/
public static void convertProjectToFacetsForm(String prj) {
ProjectExplorer pe = new ProjectExplorer();
pe.open();
PropertyDialog pd = pe.getProject(prj).openProperties();
pd.select("Project Facets");
// convert to faceted form
new DefaultTreeItem("Project Facets").select();
new DefaultLink("Convert to faceted form...").click();
new WaitWhile(new JobIsRunning());
new WaitUntil(new WidgetIsFound(Button.class, new WithStyleMatcher(SWT.PUSH), new WithMnemonicTextMatcher("Apply")), TimePeriod.LONG);
PushButton apply = new PushButton("Apply");
new WaitUntil(new ControlIsEnabled(apply));
apply.click();
pd.ok();
}
use of org.eclipse.reddeer.swt.impl.button.PushButton 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