Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Mueller2014-11-06 12:54:08 +0000
committerMarvin Mueller2014-11-06 13:16:41 +0000
commitd3eb0834744e8ee9dee70b4e0f87aae533bc178b (patch)
tree7461a4f9a8ecf9fe5c8dd75b18d2966ed93f21ad /org.eclipse.jubula.rc.swt
parentcc21cd6ee23eec83c51186f8829418ea9f272375 (diff)
downloadorg.eclipse.jubula.core-d3eb0834744e8ee9dee70b4e0f87aae533bc178b.tar.gz
org.eclipse.jubula.core-d3eb0834744e8ee9dee70b4e0f87aae533bc178b.tar.xz
org.eclipse.jubula.core-d3eb0834744e8ee9dee70b4e0f87aae533bc178b.zip
Sprint task - adjust rc side to use new created enum
Diffstat (limited to 'org.eclipse.jubula.rc.swt')
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/RobotSwtImpl.java20
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/KeyAcceptor.java8
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/RecordActionsSWT.java6
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java6
4 files changed, 20 insertions, 20 deletions
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/RobotSwtImpl.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/RobotSwtImpl.java
index 84385d1aa..74f7d30b8 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/RobotSwtImpl.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/RobotSwtImpl.java
@@ -51,7 +51,7 @@ import org.eclipse.jubula.rc.swt.utils.SwtKeyCodeConverter;
import org.eclipse.jubula.rc.swt.utils.SwtPointUtil;
import org.eclipse.jubula.rc.swt.utils.SwtUtils;
import org.eclipse.jubula.toolkit.enums.ValueSets;
-import org.eclipse.jubula.tools.internal.constants.InputConstants;
+import org.eclipse.jubula.toolkit.enums.ValueSets.InteractionMode;
import org.eclipse.jubula.tools.internal.constants.StringConstants;
import org.eclipse.jubula.tools.internal.i18n.I18n;
import org.eclipse.jubula.tools.internal.messagehandling.MessageIDs;
@@ -1308,16 +1308,16 @@ public class RobotSwtImpl implements IRobot {
* @return the InputEvent button mask
*/
private int getButtonMask(int button) {
- switch (button) {
- case InputConstants.MOUSE_BUTTON_LEFT:
- return SWT.BUTTON1;
- case InputConstants.MOUSE_BUTTON_MIDDLE:
- return SWT.BUTTON2;
- case InputConstants.MOUSE_BUTTON_RIGHT:
- return SWT.BUTTON3;
- default:
- throw new RobotException("unsupported mouse button", null); //$NON-NLS-1$
+ if (button == InteractionMode.primary.rcIntValue()) {
+ return SWT.BUTTON1;
+ }
+ if (button == InteractionMode.tertiary.rcIntValue()) {
+ return SWT.BUTTON2;
+ }
+ if (button == InteractionMode.secondary.rcIntValue()) {
+ return SWT.BUTTON3;
}
+ throw new RobotException("unsupported mouse button", null); //$NON-NLS-1$
}
/**
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/KeyAcceptor.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/KeyAcceptor.java
index 276a7fbc4..b09cbda2c 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/KeyAcceptor.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/KeyAcceptor.java
@@ -15,7 +15,7 @@ import java.util.SortedSet;
import org.eclipse.jubula.rc.common.AUTServerConfiguration;
import org.eclipse.jubula.rc.swt.utils.SwtKeyCodeConverter;
-import org.eclipse.jubula.tools.internal.constants.InputConstants;
+import org.eclipse.jubula.toolkit.enums.ValueSets.InteractionMode;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Event;
@@ -59,15 +59,15 @@ public class KeyAcceptor {
int eventCode = 0;
switch (event.button) {
case 1:
- eventCode = InputConstants.MOUSE_BUTTON_LEFT;
+ eventCode = InteractionMode.primary.rcIntValue();
keyMod = keyMod & (~SWT.BUTTON1);
break;
case 2:
- eventCode = InputConstants.MOUSE_BUTTON_MIDDLE;
+ eventCode = InteractionMode.tertiary.rcIntValue();
keyMod = keyMod & (~SWT.BUTTON2);
break;
case 3:
- eventCode = InputConstants.MOUSE_BUTTON_RIGHT;
+ eventCode = InteractionMode.secondary.rcIntValue();
keyMod = keyMod & (~SWT.BUTTON3);
break;
default:
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/RecordActionsSWT.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/RecordActionsSWT.java
index 8201a19a0..7bb07545c 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/RecordActionsSWT.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/RecordActionsSWT.java
@@ -29,7 +29,7 @@ import org.eclipse.jubula.rc.common.logger.AutServerLogger;
import org.eclipse.jubula.rc.common.util.MatchUtil;
import org.eclipse.jubula.rc.swt.utils.SwtKeyCodeConverter;
import org.eclipse.jubula.rc.swt.utils.SwtUtils;
-import org.eclipse.jubula.tools.internal.constants.InputConstants;
+import org.eclipse.jubula.toolkit.enums.ValueSets.InteractionMode;
import org.eclipse.jubula.tools.internal.constants.StringConstants;
import org.eclipse.jubula.tools.internal.exception.CommunicationException;
import org.eclipse.jubula.tools.internal.objects.IComponentIdentifier;
@@ -180,7 +180,7 @@ public class RecordActionsSWT {
treValues.add(nodepath);
treValues.add(Constants.REC_OPERATOR);
treValues.add(clCount);
- treValues.add(String.valueOf(InputConstants.MOUSE_BUTTON_LEFT));
+ treValues.add(String.valueOf(InteractionMode.primary.rcIntValue()));
treValues.add(Constants.REC_EXT_SELECTION);
String logName = createLogicalName(tre, id);
@@ -216,7 +216,7 @@ public class RecordActionsSWT {
treValues.add(Constants.REC_OPERATOR);
treValues.add(clCount);
treValues.add(column);
- treValues.add(String.valueOf(InputConstants.MOUSE_BUTTON_LEFT));
+ treValues.add(String.valueOf(InteractionMode.primary.rcIntValue()));
String logName = createLogicalName(tre, id);
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java
index 15cf8ce1a..f2a377d24 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java
@@ -29,7 +29,7 @@ import org.eclipse.jubula.rc.swt.tester.adapter.TableAdapter;
import org.eclipse.jubula.rc.swt.tester.adapter.TextComponentAdapter;
import org.eclipse.jubula.rc.swt.utils.SwtUtils;
import org.eclipse.jubula.toolkit.enums.ValueSets;
-import org.eclipse.jubula.tools.internal.constants.InputConstants;
+import org.eclipse.jubula.toolkit.enums.ValueSets.InteractionMode;
import org.eclipse.jubula.tools.internal.constants.SwtToolkitConstants;
import org.eclipse.jubula.tools.internal.objects.event.EventFactory;
import org.eclipse.jubula.tools.internal.objects.event.TestErrorEvent;
@@ -84,7 +84,7 @@ public class TableTester extends AbstractTableTester {
}
if (EnvironmentUtils.isMacOS()) {
getRobot().clickAtCurrentPosition(editor, 3,
- InputConstants.MOUSE_BUTTON_LEFT);
+ InteractionMode.primary.rcIntValue());
} else {
getRobot().keyStroke(getRobot().getSystemModifierSpec() + " A"); //$NON-NLS-1$
}
@@ -97,7 +97,7 @@ public class TableTester extends AbstractTableTester {
}
} else {
getRobot().clickAtCurrentPosition(editor, 2,
- InputConstants.MOUSE_BUTTON_LEFT);
+ InteractionMode.primary.rcIntValue());
}
return editor;
}

Back to the top