Search in sources :

Example 26 with DefaultTreeItem

use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem in project jbosstools-hibernate by jbosstools.

the class KnownConfigurationsView method selectNode.

/**
 * Select tree under hibernate console configuration tree
 * @param path given path starting with console name
 */
public void selectNode(String... path) {
    for (int i = 1; i < path.length; i++) {
        String[] partialPath = Arrays.copyOf(path, i);
        new WaitUntil(new DatabaseTreeItemIsFound(partialPath));
    }
    new DefaultTreeItem(path).select();
}
Also used : DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 27 with DefaultTreeItem

use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem 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 28 with DefaultTreeItem

use of org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem 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();
}
Also used : ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) WithStyleMatcher(org.eclipse.reddeer.core.matcher.WithStyleMatcher) DefaultLink(org.eclipse.reddeer.swt.impl.link.DefaultLink) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) PropertyDialog(org.eclipse.reddeer.eclipse.ui.dialogs.PropertyDialog) WithMnemonicTextMatcher(org.eclipse.reddeer.core.matcher.WithMnemonicTextMatcher) WidgetIsFound(org.eclipse.reddeer.core.condition.WidgetIsFound) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) Button(org.eclipse.swt.widgets.Button) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) NextButton(org.eclipse.reddeer.swt.impl.button.NextButton) ControlIsEnabled(org.eclipse.reddeer.swt.condition.ControlIsEnabled) DefaultTreeItem(org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Aggregations

DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)28 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)16 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)15 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)12 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)11 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)9 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)8 DefaultTree (org.eclipse.reddeer.swt.impl.tree.DefaultTree)8 NextButton (org.eclipse.reddeer.swt.impl.button.NextButton)7 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)6 Test (org.junit.Test)6 Shell (org.eclipse.reddeer.swt.api.Shell)5 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)5 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)5 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)5 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)5 AbstractTest (org.jboss.tools.openshift.ui.bot.test.application.v3.basic.AbstractTest)5 TreeItem (org.eclipse.reddeer.swt.api.TreeItem)4 DataSourceExplorerView (org.eclipse.reddeer.eclipse.datatools.connectivity.ui.dse.views.DataSourceExplorerView)3 CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)3