Search in sources :

Example 16 with Shell

use of org.eclipse.reddeer.swt.api.Shell 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));
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultTree(org.eclipse.reddeer.swt.impl.tree.DefaultTree) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) Shell(org.eclipse.reddeer.swt.api.Shell) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) TreeHasChildren(org.eclipse.reddeer.swt.condition.TreeHasChildren) TreeContainsItem(org.eclipse.reddeer.swt.condition.TreeContainsItem) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 17 with Shell

use of org.eclipse.reddeer.swt.api.Shell 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);
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) WorkbenchShell(org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell) Shell(org.eclipse.reddeer.swt.api.Shell) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) WithMnemonicTextMatcher(org.eclipse.reddeer.core.matcher.WithMnemonicTextMatcher) WidgetIsFound(org.eclipse.reddeer.core.condition.WidgetIsFound) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Aggregations

WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)17 Shell (org.eclipse.reddeer.swt.api.Shell)17 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)17 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)17 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)7 YesButton (org.eclipse.reddeer.swt.impl.button.YesButton)7 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)7 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)6 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)5 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)5 TreeItem (org.eclipse.reddeer.swt.api.TreeItem)4 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)4 WorkbenchShell (org.eclipse.reddeer.workbench.impl.shell.WorkbenchShell)4 DataSourceExplorerView (org.eclipse.reddeer.eclipse.datatools.connectivity.ui.dse.views.DataSourceExplorerView)3 DefaultCombo (org.eclipse.reddeer.swt.impl.combo.DefaultCombo)3 DefaultToolItem (org.eclipse.reddeer.swt.impl.toolbar.DefaultToolItem)3 DefaultHyperlink (org.eclipse.reddeer.uiforms.impl.hyperlink.DefaultHyperlink)3 WidgetIsFound (org.eclipse.reddeer.core.condition.WidgetIsFound)2 WithMnemonicTextMatcher (org.eclipse.reddeer.core.matcher.WithMnemonicTextMatcher)2 PropertyDialog (org.eclipse.reddeer.eclipse.ui.dialogs.PropertyDialog)2