Search in sources :

Example 6 with ShellIsAvailable

use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.

the class RunDockerImageLaunchConfiguration method editLink.

public void editLink(String oldContainer, String newContainer, String newAlias) {
    selectTab(LINKS_TAB_LABEL);
    if (selectItemInTable(oldContainer)) {
        new PushButton("Edit...").click();
        new WaitWhile(new ShellIsAvailable("Container Linking"));
        new LabeledText("Container:").setText(newContainer);
        new LabeledText("Value:").setText(newAlias);
        new OkButton().click();
    } else {
        throw new EclipseLayerException("There is no " + oldContainer + " in table on tab " + LINKS_TAB_LABEL);
    }
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) EclipseLayerException(org.eclipse.reddeer.eclipse.exception.EclipseLayerException) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 7 with ShellIsAvailable

use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.

the class RunDockerImageLaunchConfiguration method addValueInTable.

private void addValueInTable(String tabName, String shellName, String newValueName, String newValue) {
    selectTab(tabName);
    new PushButton("Add...").click();
    new WaitUntil(new ShellIsAvailable(shellName));
    new LabeledText("Name:").setText(newValueName);
    new LabeledText("Value:").setText(newValue);
    new OkButton().click();
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) OkButton(org.eclipse.reddeer.swt.impl.button.OkButton) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 8 with ShellIsAvailable

use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project linuxtools by eclipse.

the class DockerContainer method remove.

public void remove() {
    select();
    boolean removeEnabled = new ContextMenu().getItem("Remove").isEnabled();
    if (!removeEnabled) {
        new ContextMenu().getItem("Stop").select();
        new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
        item.select();
    }
    new ContextMenu().getItem("Remove").select();
    new WaitUntil(new ShellIsAvailable("Confirm Remove Container"), TimePeriod.DEFAULT);
    new PushButton("OK").click();
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) ContextMenu(org.eclipse.reddeer.swt.impl.menu.ContextMenu) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Example 9 with ShellIsAvailable

use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project jbosstools-hibernate by jbosstools.

the class LaunchConfigurationsDialog method run.

/**
 * Executes configuration
 */
public void run() {
    new PushButton(this, "Run").click();
    new WaitWhile(new ShellIsAvailable(this));
    new WaitUntil(new JobIsRunning());
    new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 10 with ShellIsAvailable

use of org.eclipse.reddeer.swt.condition.ShellIsAvailable in project jbosstools-hibernate by jbosstools.

the class LaunchConfigurationsDialog method close.

/**
 * Presses Close button on the Dialog.
 */
public void close() {
    new PushButton(this, "Close").click();
    new WaitWhile(new ShellIsAvailable(this));
    new WaitWhile(new JobIsRunning());
}
Also used : ShellIsAvailable(org.eclipse.reddeer.swt.condition.ShellIsAvailable) WaitWhile(org.eclipse.reddeer.common.wait.WaitWhile) JobIsRunning(org.eclipse.reddeer.workbench.core.condition.JobIsRunning) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton)

Aggregations

ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)128 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)97 DefaultShell (org.eclipse.reddeer.swt.impl.shell.DefaultShell)84 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)73 JobIsRunning (org.eclipse.reddeer.workbench.core.condition.JobIsRunning)52 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)47 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)44 ContextMenuItem (org.eclipse.reddeer.swt.impl.menu.ContextMenuItem)33 FinishButton (org.eclipse.reddeer.swt.impl.button.FinishButton)32 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)30 ControlIsEnabled (org.eclipse.reddeer.swt.condition.ControlIsEnabled)25 Test (org.junit.Test)21 CancelButton (org.eclipse.reddeer.swt.impl.button.CancelButton)19 WaitTimeoutExpiredException (org.eclipse.reddeer.common.exception.WaitTimeoutExpiredException)18 DefaultTable (org.eclipse.reddeer.swt.impl.table.DefaultTable)18 Shell (org.eclipse.reddeer.swt.api.Shell)17 YesButton (org.eclipse.reddeer.swt.impl.button.YesButton)14 DefaultTreeItem (org.eclipse.reddeer.swt.impl.tree.DefaultTreeItem)13 OpenShiftExplorerView (org.jboss.tools.openshift.reddeer.view.OpenShiftExplorerView)13 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)10