Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZeb Ford-Reitz2011-09-19 06:36:53 +0000
committerZeb Ford-Reitz2011-09-19 06:36:53 +0000
commit1c536c71c5a927099a8af830108d2879072d7c97 (patch)
tree8fe7baeaf85529886de92d8e7c9e7d293cf816d6 /org.eclipse.jubula.client.autagent
parentd8e9cec51e0f6ee8b6d63e8381e53caeda6cc216 (diff)
downloadorg.eclipse.jubula.core-1c536c71c5a927099a8af830108d2879072d7c97.tar.gz
org.eclipse.jubula.core-1c536c71c5a927099a8af830108d2879072d7c97.tar.xz
org.eclipse.jubula.core-1c536c71c5a927099a8af830108d2879072d7c97.zip
fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=353888
Adds an error dialog when the internal AUT Agent cannot start due to the desired port already being in use.
Diffstat (limited to 'org.eclipse.jubula.client.autagent')
-rw-r--r--org.eclipse.jubula.client.autagent/src/org/eclipse/jubula/client/autagent/handlers/ConnectToEmbeddedAutAgentHandler.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/org.eclipse.jubula.client.autagent/src/org/eclipse/jubula/client/autagent/handlers/ConnectToEmbeddedAutAgentHandler.java b/org.eclipse.jubula.client.autagent/src/org/eclipse/jubula/client/autagent/handlers/ConnectToEmbeddedAutAgentHandler.java
index 6fcf08f97..54df9bf80 100644
--- a/org.eclipse.jubula.client.autagent/src/org/eclipse/jubula/client/autagent/handlers/ConnectToEmbeddedAutAgentHandler.java
+++ b/org.eclipse.jubula.client.autagent/src/org/eclipse/jubula/client/autagent/handlers/ConnectToEmbeddedAutAgentHandler.java
@@ -14,7 +14,9 @@ import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.action.IAction;
import org.eclipse.jubula.autagent.AutStarter;
import org.eclipse.jubula.autagent.AutStarter.Verbosity;
@@ -22,6 +24,8 @@ import org.eclipse.jubula.client.autagent.Activator;
import org.eclipse.jubula.client.autagent.preferences.PreferenceInitializer;
import org.eclipse.jubula.client.ui.actions.StartServerAction;
import org.eclipse.jubula.client.ui.utils.ServerManager.Server;
+import org.eclipse.jubula.tools.i18n.I18n;
+import org.eclipse.ui.statushandlers.StatusManager;
/**
* Handler for "Connect to Embedded AUT Agent" command.
@@ -58,8 +62,15 @@ public class ConnectToEmbeddedAutAgentHandler extends AbstractHandler
AutStarter.getInstance().start(
port, false, Verbosity.QUIET, false);
} catch (Exception e) {
- throw new ExecutionException(
+ ExecutionException execException = new ExecutionException(
"An error occurred while starting the embedded AUT Agent", e); //$NON-NLS-1$
+ StatusManager.getManager().handle(
+ new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+ I18n.getString("AUTAgent.StartCommErrorText", //$NON-NLS-1$
+ new String[] {String.valueOf(port)}),
+ e),
+ StatusManager.SHOW);
+ throw execException;
}
}

Back to the top