Search in sources :

Example 1 with EclipseLayerException

use of org.eclipse.reddeer.eclipse.exception.EclipseLayerException 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 2 with EclipseLayerException

use of org.eclipse.reddeer.eclipse.exception.EclipseLayerException in project jbosstools-openshift by jbosstools.

the class CDKTestUtils method deleteCDEServer.

public static void deleteCDEServer(String adapter) {
    // $NON-NLS-1$
    log.info("Deleting Container Development Environment server adapter: " + adapter);
    ServersView2 servers = new ServersView2();
    servers.open();
    try {
        servers.getServer(adapter).delete(true);
    } catch (EclipseLayerException exc) {
        log.error(exc.getMessage());
        exc.printStackTrace();
    }
}
Also used : EclipseLayerException(org.eclipse.reddeer.eclipse.exception.EclipseLayerException) ServersView2(org.eclipse.reddeer.eclipse.wst.server.ui.cnf.ServersView2)

Example 3 with EclipseLayerException

use of org.eclipse.reddeer.eclipse.exception.EclipseLayerException in project linuxtools by eclipse.

the class RunDockerImageLaunchConfiguration method editPort.

public void editPort(String oldContainerPort, String newContainerPort, String newHostAddress, String newHostPort) {
    selectTab(PORTS_TAB_LABEL);
    setPublishAllExposedPortsToRandomPorts(false);
    if (selectItemInTable(oldContainerPort)) {
        new PushButton("Edit...");
        new WaitUntil(new ShellIsAvailable("Exposing a Container Port"));
        new LabeledText("Container port:").setText(newContainerPort);
        new LabeledText("Host address:").setText(newHostAddress);
        new LabeledText("Host port:").setText(newHostPort);
        new OkButton().click();
    } else {
        throw new EclipseLayerException("There is no " + oldContainerPort + " in table on tab " + PORTS_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) LabeledText(org.eclipse.reddeer.swt.impl.text.LabeledText) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil)

Example 4 with EclipseLayerException

use of org.eclipse.reddeer.eclipse.exception.EclipseLayerException in project linuxtools by eclipse.

the class RunDockerImageLaunchConfiguration method editValueInTable.

private void editValueInTable(String tabName, String shellName, String oldValueName, String newValueName, String newValue) {
    selectTab(tabName);
    if (selectItemInTable(oldValueName)) {
        new PushButton("Edit...");
        new WaitWhile(new ShellIsAvailable(shellName));
        new LabeledText("Name:").setText(newValueName);
        new LabeledText("Value:").setText(newValue);
        new OkButton().click();
    } else {
        throw new EclipseLayerException("There is no " + oldValueName + " in table on tab " + tabName);
    }
}
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)

Aggregations

EclipseLayerException (org.eclipse.reddeer.eclipse.exception.EclipseLayerException)4 ShellIsAvailable (org.eclipse.reddeer.swt.condition.ShellIsAvailable)3 OkButton (org.eclipse.reddeer.swt.impl.button.OkButton)3 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)3 LabeledText (org.eclipse.reddeer.swt.impl.text.LabeledText)3 WaitWhile (org.eclipse.reddeer.common.wait.WaitWhile)2 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)1 ServersView2 (org.eclipse.reddeer.eclipse.wst.server.ui.cnf.ServersView2)1