Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2014-12-11 15:51:55 +0000
committerMarkus Tiede2014-12-12 08:05:15 +0000
commitf12c939127d6d5f082a7e4a9ffa30d6ffb6590b3 (patch)
treeac28edc6d27b9234b6cfe750ed7ffce3a01d06b3 /org.eclipse.jubula.rc.swt
parent95b1d050c62bdd42b0214fed56028965e2059157 (diff)
downloadorg.eclipse.jubula.core-f12c939127d6d5f082a7e4a9ffa30d6ffb6590b3.tar.gz
org.eclipse.jubula.core-f12c939127d6d5f082a7e4a9ffa30d6ffb6590b3.tar.xz
org.eclipse.jubula.core-f12c939127d6d5f082a7e4a9ffa30d6ffb6590b3.zip
Non-sprint task - major refactoring: cleanup of unnecessary and unused cap test message / command indirection.
Diffstat (limited to 'org.eclipse.jubula.rc.swt')
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/SwtAUTServer.java14
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/commands/CAPTestCommand.java47
2 files changed, 12 insertions, 49 deletions
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/SwtAUTServer.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/SwtAUTServer.java
index 7f0244c1d..f6c3c4c8e 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/SwtAUTServer.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/SwtAUTServer.java
@@ -14,6 +14,7 @@ import java.lang.reflect.InvocationTargetException;
import org.eclipse.jubula.rc.common.AUTServer;
import org.eclipse.jubula.rc.common.driver.IRobot;
+import org.eclipse.jubula.rc.common.exception.ComponentNotFoundException;
import org.eclipse.jubula.rc.common.listener.BaseAUTListener;
import org.eclipse.jubula.rc.swt.driver.RobotFactoryConfig;
import org.eclipse.jubula.rc.swt.driver.RobotFactorySwtImpl;
@@ -26,6 +27,7 @@ import org.eclipse.jubula.rc.swt.listener.MappingListener;
import org.eclipse.jubula.rc.swt.listener.RecordListener;
import org.eclipse.jubula.rc.swt.listener.TableSelectionTracker;
import org.eclipse.jubula.tools.internal.constants.AUTServerExitConstants;
+import org.eclipse.jubula.tools.internal.objects.IComponentIdentifier;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Listener;
import org.slf4j.Logger;
@@ -169,7 +171,7 @@ public class SwtAUTServer extends AUTServer {
} catch (NullPointerException se) {
// no permission to remove an SWTEventListener,
// should not occur, because addSWTEventListener() should be called
- // first. But just in case, close the vm
+ // first. But just in case, close the VM
LOG.error(se.getLocalizedMessage(), se);
System.exit(AUTServerExitConstants
.EXIT_SECURITY_VIOLATION_AWT_EVENT_LISTENER);
@@ -242,5 +244,13 @@ public class SwtAUTServer extends AUTServer {
public void setDisplay(Display display) {
m_display = display;
}
-
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object findComponent(final IComponentIdentifier ci,
+ final int timeout) throws ComponentNotFoundException,
+ IllegalArgumentException {
+ return ComponentHandler.findComponent(ci, true, timeout);
+ }
} \ No newline at end of file
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/commands/CAPTestCommand.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/commands/CAPTestCommand.java
deleted file mode 100644
index 797737496..000000000
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/commands/CAPTestCommand.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 BREDEX GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BREDEX GmbH - initial API and implementation and/or initial documentation
- *******************************************************************************/
-package org.eclipse.jubula.rc.swt.commands;
-
-import org.eclipse.jubula.rc.common.commands.AbstractCapTestCommand;
-import org.eclipse.jubula.rc.common.exception.ComponentNotFoundException;
-import org.eclipse.jubula.rc.swt.listener.ComponentHandler;
-import org.eclipse.jubula.tools.internal.objects.IComponentIdentifier;
-
-
-/**
- * This class gets an message with ICommand action parameter triples. It invokes
- * the implementation class and executes the method. Then it creates a
- * <code>CAPTestResponseMessage</code> and sends it back to the client. The
- * <code>CAPTestResponseMessage</code> contains an error event only if the
- * test step fails, due to a problem prior to or during the execution of the
- * implementation class action method.
- *
- * @author BREDEX GmbH
- * @created 02.09.2004
- *
- */
-public class CAPTestCommand extends AbstractCapTestCommand {
-
- /** the found comp */
- private Object m_comp;
-
- /**
- * {@inheritDoc}
- */
- protected Object findComponent(final IComponentIdentifier ci,
- final int timeout) throws ComponentNotFoundException,
- IllegalArgumentException {
-
- m_comp = ComponentHandler.findComponent(ci, true, timeout);
- return m_comp;
- }
-
-} \ No newline at end of file

Back to the top