Search in sources :

Example 21 with DefaultTree

use of org.eclipse.reddeer.swt.impl.tree.DefaultTree 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());
}
Also used : OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) DefaultTree(org.eclipse.reddeer.swt.impl.tree.DefaultTree) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) EditConfigurationShell(org.jboss.tools.hibernate.reddeer.console.EditConfigurationShell) Shell(org.eclipse.reddeer.swt.api.Shell) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ContextMenuItem(org.eclipse.reddeer.swt.impl.menu.ContextMenuItem) DefaultShell(org.eclipse.reddeer.swt.impl.shell.DefaultShell) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning)

Example 22 with DefaultTree

use of org.eclipse.reddeer.swt.impl.tree.DefaultTree 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)

Aggregations

DefaultTree (org.eclipse.reddeer.swt.impl.tree.DefaultTree)22 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)9 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)9 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)8 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)7 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)7 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)7 TreeItem (org.eclipse.reddeer.swt.api.TreeItem)6 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)5 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)5 Test (org.junit.Test)5 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)3 CoreLayerException (org.eclipse.reddeer.core.exception.CoreLayerException)3 WithTextMatcher (org.eclipse.reddeer.core.matcher.WithTextMatcher)3 TreeHasChildren (org.eclipse.reddeer.swt.condition.TreeHasChildren)3 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)3 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)3 DefaultTabItem (org.eclipse.reddeer.swt.impl.tab.DefaultTabItem)3 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)2 Shell (org.eclipse.reddeer.swt.api.Shell)2