Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Mueller2014-01-16 09:23:50 +0000
committerMarvin Mueller2014-01-16 14:50:58 +0000
commite1dc41b1c678f5ef1dd6d56157ec17a4a69fe01d (patch)
tree4ea387bd77bb1a3a5c9d3c58ddec3a56f39385cf /org.eclipse.jubula.client.autagent
parente652b2d276b63dbe5258061e71be8938c50b3fbc (diff)
downloadorg.eclipse.jubula.core-e1dc41b1c678f5ef1dd6d56157ec17a4a69fe01d.tar.gz
org.eclipse.jubula.core-e1dc41b1c678f5ef1dd6d56157ec17a4a69fe01d.tar.xz
org.eclipse.jubula.core-e1dc41b1c678f5ef1dd6d56157ec17a4a69fe01d.zip
Non-sprint task - fix for http://bugs.eclipse.org/423919
Diffstat (limited to 'org.eclipse.jubula.client.autagent')
-rw-r--r--org.eclipse.jubula.client.autagent/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.jubula.client.autagent/src/org/eclipse/jubula/client/autagent/handlers/ConnectToEmbeddedAutAgentHandler.java19
2 files changed, 13 insertions, 7 deletions
diff --git a/org.eclipse.jubula.client.autagent/META-INF/MANIFEST.MF b/org.eclipse.jubula.client.autagent/META-INF/MANIFEST.MF
index 76d68d558..fb915bc3c 100644
--- a/org.eclipse.jubula.client.autagent/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.client.autagent/META-INF/MANIFEST.MF
@@ -7,6 +7,7 @@ Bundle-Activator: org.eclipse.jubula.client.autagent.Activator
Bundle-Vendor: Eclipse Jubula
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="[3.6.1,4.0.0)",
+ org.slf4j.api;bundle-version="[1.7.2,2.0.0)",
org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
org.eclipse.core.databinding;bundle-version="[1.3.1,2.0.0)",
org.eclipse.jface.databinding;bundle-version="[1.4.0,2.0.0)",
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 c08795110..e0eb7e874 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
@@ -16,7 +16,6 @@ import java.util.Map;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.commands.ParameterizedCommand;
import org.eclipse.core.runtime.IStatus;
@@ -31,6 +30,8 @@ import org.eclipse.jubula.client.ui.rcp.handlers.AUTAgentConnectHandler;
import org.eclipse.jubula.client.ui.utils.CommandHelper;
import org.eclipse.jubula.tools.i18n.I18n;
import org.eclipse.ui.statushandlers.StatusManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Handler for "Connect to Embedded AUT Agent" command.
@@ -45,13 +46,17 @@ public class ConnectToEmbeddedAutAgentHandler extends AbstractHandler
public static final String CONNECT_TO_EMBEDDED_AGENT_CMD_ID =
"org.eclipse.jubula.client.autagent.commands.ConnectToEmbeddedAutAgent"; //$NON-NLS-1$
+ /** the logger */
+ protected static final Logger LOG = LoggerFactory
+ .getLogger(ConnectToEmbeddedAutAgentHandler.class);
+
/**
* hostname to use for starting and accessing the embedded AUT Agent
*/
private static final String EMBEDDED_AGENT_HOSTNAME = "localhost"; //$NON-NLS-1$
/** {@inheritDoc} */
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ public Object execute(ExecutionEvent event) {
AutStarter autAgentInstance = AutStarter.getInstance();
if (autAgentInstance.getCommunicator() == null) {
@@ -65,15 +70,15 @@ public class ConnectToEmbeddedAutAgentHandler extends AbstractHandler
autAgentInstance.start(
port, false, Verbosity.QUIET, false);
} catch (Exception e) {
- ExecutionException execException = new ExecutionException(
- "An error occurred while starting the embedded AUT Agent", e); //$NON-NLS-1$
+ String message = I18n.getString("AUTAgent.StartCommErrorText", //$NON-NLS-1$
+ new String[] {String.valueOf(port)});
+ LOG.error(message, e);
StatusManager.getManager().handle(
new Status(IStatus.ERROR, Activator.PLUGIN_ID,
- I18n.getString("AUTAgent.StartCommErrorText", //$NON-NLS-1$
- new String[] {String.valueOf(port)}),
+ message,
e),
StatusManager.SHOW);
- throw execException;
+ return null;
}
}
String hostname = EMBEDDED_AGENT_HOSTNAME;

Back to the top