Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Struckmann2014-09-26 12:53:21 +0000
committerSebastian Struckmann2014-09-26 12:53:21 +0000
commit46f02668526f4cdc1dde89d8ab4b983fae360e29 (patch)
tree0472745c7eb1304840a6981618f7b9c74f287ffc /org.eclipse.jubula.rc.swt
parent0da224b21c8784de2a85ca07865cc5a2e46a73b8 (diff)
downloadorg.eclipse.jubula.core-46f02668526f4cdc1dde89d8ab4b983fae360e29.tar.gz
org.eclipse.jubula.core-46f02668526f4cdc1dde89d8ab4b983fae360e29.tar.xz
org.eclipse.jubula.core-46f02668526f4cdc1dde89d8ab4b983fae360e29.zip
Sprint task - Java API - Completed use of value set enums, deleted CompSystemConstants
Diffstat (limited to 'org.eclipse.jubula.rc.swt')
-rw-r--r--org.eclipse.jubula.rc.swt/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/KeyCodeConverter.java16
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/RobotSwtImpl.java8
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/WindowActivationMethod.java25
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TableTester.java16
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TreeTester.java26
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/adapter/WidgetAdapter.java14
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/utils/SwtKeyCodeConverter.java7
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/utils/SwtUtils.java12
9 files changed, 65 insertions, 60 deletions
diff --git a/org.eclipse.jubula.rc.swt/META-INF/MANIFEST.MF b/org.eclipse.jubula.rc.swt/META-INF/MANIFEST.MF
index 833b498bb..10c296e0a 100644
--- a/org.eclipse.jubula.rc.swt/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.rc.swt/META-INF/MANIFEST.MF
@@ -10,6 +10,7 @@ Require-Bundle: org.apache.commons.beanutils;bundle-version="[1.7.0,2.0.0)",
org.slf4j.api;bundle-version="[1.7.2,2.0.0)",
ch.qos.logback.classic;bundle-version="[1.0.0,2.0.0)",
ch.qos.logback.core;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.tools;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.communication;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.rc.common;bundle-version="[2.4.0,2.5.0)",
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/KeyCodeConverter.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/KeyCodeConverter.java
index a4ba98c14..995b58dfe 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/KeyCodeConverter.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/KeyCodeConverter.java
@@ -13,8 +13,8 @@ package org.eclipse.jubula.rc.swt.driver;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.jubula.rc.common.CompSystemConstants;
import org.eclipse.jubula.rc.common.exception.RobotException;
+import org.eclipse.jubula.toolkit.enums.ValueSets;
import org.eclipse.jubula.tools.internal.objects.event.EventFactory;
import org.eclipse.swt.SWT;
@@ -34,19 +34,19 @@ public class KeyCodeConverter {
static {
converterTable = new HashMap<String, Integer>();
- converterTable.put(CompSystemConstants.MODIFIER_NONE,
+ converterTable.put(ValueSets.Modifier.none.rcValue(),
new Integer(-1));
- converterTable.put(CompSystemConstants.MODIFIER_SHIFT,
+ converterTable.put(ValueSets.Modifier.shift.rcValue(),
new Integer(SWT.SHIFT));
- converterTable.put(CompSystemConstants.MODIFIER_CONTROL,
+ converterTable.put(ValueSets.Modifier.control.rcValue(),
new Integer(SWT.CONTROL));
- converterTable.put(CompSystemConstants.MODIFIER_ALT,
+ converterTable.put(ValueSets.Modifier.alt.rcValue(),
new Integer(SWT.ALT));
- converterTable.put(CompSystemConstants.MODIFIER_META,
+ converterTable.put(ValueSets.Modifier.meta.rcValue(),
new Integer(SWT.COMMAND));
- converterTable.put(CompSystemConstants.MODIFIER_CMD,
+ converterTable.put(ValueSets.Modifier.cmd.rcValue(),
new Integer(SWT.COMMAND));
- converterTable.put(CompSystemConstants.MODIFIER_MOD,
+ converterTable.put(ValueSets.Modifier.mod.rcValue(),
new Integer(SWT.MOD1));
}
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 d3a66b434..84385d1aa 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
@@ -27,7 +27,6 @@ import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.Validate;
import org.eclipse.jubula.rc.common.AUTServer;
-import org.eclipse.jubula.rc.common.CompSystemConstants;
import org.eclipse.jubula.rc.common.driver.ClickOptions;
import org.eclipse.jubula.rc.common.driver.ClickOptions.ClickModifier;
import org.eclipse.jubula.rc.common.driver.IEventMatcher;
@@ -51,6 +50,7 @@ import org.eclipse.jubula.rc.swt.tester.SwtApplicationTester;
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.tools.internal.constants.StringConstants;
import org.eclipse.jubula.tools.internal.i18n.I18n;
@@ -1429,11 +1429,11 @@ public class RobotSwtImpl implements IRobot {
* {@inheritDoc}
*/
public String getSystemModifierSpec() {
- String keyStrokeSpec = CompSystemConstants.MODIFIER_CONTROL;
+ String keyStrokeSpec = ValueSets.Modifier.control.rcValue();
if (SWT.MOD1 == SWT.COMMAND) {
- keyStrokeSpec = CompSystemConstants.MODIFIER_META;
+ keyStrokeSpec = ValueSets.Modifier.meta.rcValue();
} else if (SWT.MOD1 == SWT.ALT) {
- keyStrokeSpec = CompSystemConstants.MODIFIER_ALT;
+ keyStrokeSpec = ValueSets.Modifier.alt.rcValue();
}
return keyStrokeSpec;
}
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/WindowActivationMethod.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/WindowActivationMethod.java
index 32632ade0..da375337d 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/WindowActivationMethod.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/WindowActivationMethod.java
@@ -11,13 +11,13 @@
package org.eclipse.jubula.rc.swt.driver;
-import org.eclipse.jubula.rc.common.CompSystemConstants;
import org.eclipse.jubula.rc.common.driver.IEventThreadQueuer;
import org.eclipse.jubula.rc.common.driver.IRunnable;
import org.eclipse.jubula.rc.common.driver.RobotConfiguration;
import org.eclipse.jubula.rc.common.driver.RobotTiming;
import org.eclipse.jubula.rc.common.exception.StepExecutionException;
import org.eclipse.jubula.rc.swt.utils.SwtUtils;
+import org.eclipse.jubula.toolkit.enums.ValueSets;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
@@ -229,23 +229,30 @@ public abstract class WindowActivationMethod {
public static WindowActivationMethod createWindowActivationMethod(
String method, SwtRobot robot, IEventThreadQueuer queuer) {
- if (CompSystemConstants.AAM_AUT_DEFAULT.equals(method)) {
+ if (ValueSets.AUTActivationMethod.autDefault.rcValue().equals(method)) {
return createWindowActivationMethod(
RobotConfiguration.getInstance().getDefaultActivationMethod(),
robot, queuer);
- } else if (CompSystemConstants.AAM_NONE.equals(method)) {
+ } else if (ValueSets.AUTActivationMethod.none.rcValue()
+ .equals(method)) {
return new NoneMethod(robot, queuer);
- } else if (CompSystemConstants.AAM_TITLE.equals(method)) {
+ } else if (ValueSets.AUTActivationMethod.titlebar.rcValue()
+ .equals(method)) {
return new TitleMethod(robot, queuer);
- } else if (CompSystemConstants.AAM_NORTHWEST.equals(method)) {
+ } else if (ValueSets.AUTActivationMethod.northwest.rcValue()
+ .equals(method)) {
return new NorthWestMethod(robot, queuer);
- } else if (CompSystemConstants.AAM_NORTHEAST.equals(method)) {
+ } else if (ValueSets.AUTActivationMethod.northeast.rcValue()
+ .equals(method)) {
return new NorthEastMethod(robot, queuer);
- } else if (CompSystemConstants.AAM_SOUTHWEST.equals(method)) {
+ } else if (ValueSets.AUTActivationMethod.southwest.rcValue()
+ .equals(method)) {
return new SouthWestMethod(robot, queuer);
- } else if (CompSystemConstants.AAM_SOUTHEAST.equals(method)) {
+ } else if (ValueSets.AUTActivationMethod.southeast.rcValue()
+ .equals(method)) {
return new SouthEastMethod(robot, queuer);
- } else if (CompSystemConstants.AAM_CENTER.equals(method)) {
+ } else if (ValueSets.AUTActivationMethod.center.rcValue()
+ .equals(method)) {
return new CenterMethod(robot, queuer);
} else {
return new NoneMethod(robot, queuer);
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 9dc0dd418..f054691f4 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
@@ -13,7 +13,6 @@ package org.eclipse.jubula.rc.swt.tester;
import java.awt.Point;
import java.awt.Rectangle;
-import org.eclipse.jubula.rc.common.CompSystemConstants;
import org.eclipse.jubula.rc.common.driver.ClickOptions;
import org.eclipse.jubula.rc.common.driver.IEventThreadQueuer;
import org.eclipse.jubula.rc.common.driver.IRobot;
@@ -29,6 +28,7 @@ import org.eclipse.jubula.rc.swt.tester.adapter.StyledTextAdapter;
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.tools.internal.constants.SwtAUTHierarchyConstants;
import org.eclipse.jubula.tools.internal.objects.event.EventFactory;
@@ -389,7 +389,7 @@ public class TableTester extends AbstractTableTester {
})).intValue();
- if (CompSystemConstants.POS_UNIT_PIXEL.equalsIgnoreCase(units)) {
+ if (ValueSets.Unit.pixel.rcValue().equalsIgnoreCase(units)) {
// Pixel units
correctedPos += headerHeight;
} else {
@@ -451,7 +451,7 @@ public class TableTester extends AbstractTableTester {
rcSelectCell(row, rowOperator, col, colOperator, 0, xPos,
xUnits, yPos, yUnits,
- CompSystemConstants.EXTEND_SELECTION_NO, 1);
+ ValueSets.BinaryChoice.no.rcValue(), 1);
}
/**
@@ -496,7 +496,7 @@ public class TableTester extends AbstractTableTester {
// drop
rcSelectCell(row, rowOperator, col, colOperator, 0, xPos,
xUnits, yPos, yUnits,
- CompSystemConstants.EXTEND_SELECTION_NO, 1);
+ ValueSets.BinaryChoice.no.rcValue(), 1);
return null;
}
});
@@ -533,7 +533,7 @@ public class TableTester extends AbstractTableTester {
dndHelper.setDragComponent(null);
rcSelectRowByValue(col, colOperator, value, regexOp, 1,
- CompSystemConstants.EXTEND_SELECTION_NO,
+ ValueSets.BinaryChoice.no.rcValue(),
searchType, 1);
}
@@ -571,7 +571,7 @@ public class TableTester extends AbstractTableTester {
// drop
selectRowByValue(col, colOperator, value, regexOp,
- CompSystemConstants.EXTEND_SELECTION_NO,
+ ValueSets.BinaryChoice.no.rcValue(),
searchType,
ClickOptions.create().setClickCount(0));
return null;
@@ -609,7 +609,7 @@ public class TableTester extends AbstractTableTester {
dndHelper.setModifier(modifier);
dndHelper.setDragComponent(null);
selectCellByColValue(row, rowOperator, value, regex,
- CompSystemConstants.EXTEND_SELECTION_NO,
+ ValueSets.BinaryChoice.no.rcValue(),
searchType, ClickOptions.create().setClickCount(0));
}
@@ -647,7 +647,7 @@ public class TableTester extends AbstractTableTester {
// drop
selectCellByColValue(row, rowOperator, value, regex,
- CompSystemConstants.EXTEND_SELECTION_NO,
+ ValueSets.BinaryChoice.no.rcValue(),
searchType,
ClickOptions.create().setClickCount(0));
return null;
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TreeTester.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TreeTester.java
index e83dc2861..35e0e58bf 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TreeTester.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/TreeTester.java
@@ -13,7 +13,6 @@ package org.eclipse.jubula.rc.swt.tester;
import java.util.StringTokenizer;
import org.apache.commons.lang.Validate;
-import org.eclipse.jubula.rc.common.CompSystemConstants;
import org.eclipse.jubula.rc.common.driver.ClickOptions;
import org.eclipse.jubula.rc.common.driver.IRobot;
import org.eclipse.jubula.rc.common.driver.IRunnable;
@@ -44,6 +43,7 @@ import org.eclipse.jubula.rc.swt.tester.tree.ToggleCheckboxOperation;
import org.eclipse.jubula.rc.swt.tester.tree.TreeOperationContext;
import org.eclipse.jubula.rc.swt.tester.tree.VerifyCheckboxOperation;
import org.eclipse.jubula.rc.swt.utils.SwtUtils;
+import org.eclipse.jubula.toolkit.enums.ValueSets;
import org.eclipse.jubula.tools.internal.objects.event.EventFactory;
import org.eclipse.jubula.tools.internal.objects.event.TestErrorEvent;
import org.eclipse.swt.SWT;
@@ -177,7 +177,7 @@ public class TreeTester extends AbstractTreeTester {
SwtUtils.waitForDisplayIdle(getTree().getDisplay());
rcSelect(pathType, preAscend, treePath, operator, 0, 1,
- CompSystemConstants.EXTEND_SELECTION_NO);
+ ValueSets.BinaryChoice.no.rcValue());
SwtUtils.waitForDisplayIdle(getTree().getDisplay());
}
@@ -220,7 +220,7 @@ public class TreeTester extends AbstractTreeTester {
// drop
rcSelect(pathType, preAscend, treePath, operator, 0, 1,
- CompSystemConstants.EXTEND_SELECTION_NO);
+ ValueSets.BinaryChoice.no.rcValue());
SwtUtils.waitForDisplayIdle(getTree().getDisplay());
waitBeforeDrop(delayBeforeDrop);
@@ -249,7 +249,7 @@ public class TreeTester extends AbstractTreeTester {
SwtUtils.waitForDisplayIdle(getTree().getDisplay());
rcSelectByIndices(pathType, preAscend, indexPath, 0, 1,
- CompSystemConstants.EXTEND_SELECTION_NO);
+ ValueSets.BinaryChoice.no.rcValue());
SwtUtils.waitForDisplayIdle(getTree().getDisplay());
}
@@ -291,7 +291,7 @@ public class TreeTester extends AbstractTreeTester {
// drop
rcSelectByIndices(pathType, preAscend, indexPath, 0, 1,
- CompSystemConstants.EXTEND_SELECTION_NO);
+ ValueSets.BinaryChoice.no.rcValue());
SwtUtils.waitForDisplayIdle(getTree().getDisplay());
waitBeforeDrop(delayBeforeDrop);
@@ -433,13 +433,13 @@ public class TreeTester extends AbstractTreeTester {
TreeNodeOperationConstraint constraint =
new TreeNodeOperationConstraint();
- if (CompSystemConstants
- .TREE_MOVE_UP.equalsIgnoreCase(direction)) {
+ if (ValueSets.TreeDirection.up.rcValue()
+ .equalsIgnoreCase(direction)) {
AbstractTreeNodeTraverser traverser =
new ParentTraverser(context, distance, constraint);
traverser.traversePath(selectOp, selectedNode);
- } else if (CompSystemConstants
- .TREE_MOVE_DOWN.equalsIgnoreCase(direction)) {
+ } else if (ValueSets.TreeDirection.down.rcValue()
+ .equalsIgnoreCase(direction)) {
TreeNodeOperation expandOp =
new ExpandCollapseTreeNodeOperation(false);
AbstractTreeNodeTraverser expandTraverser =
@@ -450,15 +450,15 @@ public class TreeTester extends AbstractTreeTester {
new ChildTraverser(context, distance, constraint);
selectTraverser.traversePath(selectOp, selectedNode);
- } else if (CompSystemConstants
- .TREE_MOVE_NEXT.equalsIgnoreCase(direction)) {
+ } else if (ValueSets.TreeDirection.next.rcValue()
+ .equalsIgnoreCase(direction)) {
// Look through siblings
AbstractTreeNodeTraverser traverser =
new SiblingTraverser(context, distance, true, constraint);
traverser.traversePath(selectOp, selectedNode);
- } else if (CompSystemConstants
- .TREE_MOVE_PREVIOUS.equalsIgnoreCase(direction)) {
+ } else if (ValueSets.TreeDirection.previous.rcValue()
+ .equalsIgnoreCase(direction)) {
// Look through siblings
AbstractTreeNodeTraverser traverser =
new SiblingTraverser(context, distance, false, constraint);
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/adapter/WidgetAdapter.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/adapter/WidgetAdapter.java
index 9a8e318b6..67f9db788 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/adapter/WidgetAdapter.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/adapter/WidgetAdapter.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.jubula.rc.swt.tester.adapter;
-import org.eclipse.jubula.rc.common.CompSystemConstants;
import org.eclipse.jubula.rc.common.driver.ClickOptions;
import org.eclipse.jubula.rc.common.driver.IEventThreadQueuer;
import org.eclipse.jubula.rc.common.driver.IRobot;
@@ -28,6 +27,7 @@ import org.eclipse.jubula.rc.swt.tester.adapter.ControlAdapter.PopupShownConditi
import org.eclipse.jubula.rc.swt.tester.util.EventListener;
import org.eclipse.jubula.rc.swt.tester.util.SimulatedTooltip;
import org.eclipse.jubula.rc.swt.utils.SwtUtils;
+import org.eclipse.jubula.toolkit.enums.ValueSets;
import org.eclipse.jubula.tools.internal.constants.TimeoutConstants;
import org.eclipse.jubula.tools.internal.objects.event.EventFactory;
import org.eclipse.jubula.tools.internal.objects.event.TestErrorEvent;
@@ -128,9 +128,9 @@ public class WidgetAdapter extends AbstractComponentAdapter {
null,
ClickOptions.create().setClickCount(count).setMouseButton(
button), xPos, xUnits.equalsIgnoreCase(
- CompSystemConstants.POS_UNIT_PIXEL),
+ ValueSets.Unit.pixel.rcValue()),
yPos, yUnits.equalsIgnoreCase(
- CompSystemConstants.POS_UNIT_PIXEL));
+ ValueSets.Unit.pixel.rcValue()));
}
@@ -152,8 +152,8 @@ public class WidgetAdapter extends AbstractComponentAdapter {
}
});
}
- return showPopup(50, CompSystemConstants.POS_UNIT_PERCENT, 50,
- CompSystemConstants.POS_UNIT_PERCENT, button);
+ return showPopup(50, ValueSets.Unit.percent.rcValue(), 50,
+ ValueSets.Unit.percent.rcValue(), button);
}
/**
@@ -176,10 +176,10 @@ public class WidgetAdapter extends AbstractComponentAdapter {
public void run() {
RobotTiming.sleepPreShowPopupDelay();
boolean isAbsoluteUnitsX =
- CompSystemConstants.POS_UNIT_PIXEL.equalsIgnoreCase(
+ ValueSets.Unit.pixel.rcValue().equalsIgnoreCase(
xUnits);
boolean isAbsoluteUnitsY =
- CompSystemConstants.POS_UNIT_PIXEL.equalsIgnoreCase(
+ ValueSets.Unit.pixel.rcValue().equalsIgnoreCase(
yUnits);
getRobot().click(component, null,
ClickOptions.create().setClickCount(1)
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/utils/SwtKeyCodeConverter.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/utils/SwtKeyCodeConverter.java
index c56a2b4ee..14a96b89b 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/utils/SwtKeyCodeConverter.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/utils/SwtKeyCodeConverter.java
@@ -13,7 +13,6 @@ package org.eclipse.jubula.rc.swt.utils;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.jubula.rc.common.CompSystemConstants;
import org.eclipse.jubula.rc.common.exception.StepExecutionException;
import org.eclipse.jubula.rc.common.logger.AutServerLogger;
import org.eclipse.swt.SWT;
@@ -73,8 +72,7 @@ public class SwtKeyCodeConverter {
KEY_MAP.put("HOME", new Integer(SWT.HOME)); //$NON-NLS-1$
KEY_MAP.put("END", new Integer(SWT.END)); //$NON-NLS-1$
KEY_MAP.put("INSERT", new Integer(SWT.INSERT)); //$NON-NLS-1$
- KEY_MAP.put(CompSystemConstants.KEY_STROKE_DELETE,
- new Integer(SWT.DEL));
+ KEY_MAP.put("DELETE", new Integer(SWT.DEL)); //$NON-NLS-1$
KEY_MAP.put("PAGE_UP", new Integer(SWT.PAGE_UP)); //$NON-NLS-1$
KEY_MAP.put("PAGE_DOWN", new Integer(SWT.PAGE_DOWN)); //$NON-NLS-1$
KEY_MAP.put("DOWN", new Integer(SWT.ARROW_DOWN)); //$NON-NLS-1$
@@ -126,8 +124,7 @@ public class SwtKeyCodeConverter {
KEYCODE_MAP.put(new Integer(SWT.END), new String("END")); //$NON-NLS-1$
KEYCODE_MAP.put(new Integer(SWT.HOME), new String("HOME")); //$NON-NLS-1$
KEYCODE_MAP.put(new Integer(SWT.INSERT), new String("INSERT")); //$NON-NLS-1$
- KEYCODE_MAP.put(new Integer(SWT.DEL), new String(
- CompSystemConstants.KEY_STROKE_DELETE));
+ KEYCODE_MAP.put(new Integer(SWT.DEL), new String("DELETE")); //$NON-NLS-1$
KEYCODE_MAP.put(new Integer(SWT.ARROW_UP), new String("UP")); //$NON-NLS-1$
KEYCODE_MAP.put(new Integer(SWT.ARROW_DOWN), new String("DOWN")); //$NON-NLS-1$
KEYCODE_MAP.put(new Integer(SWT.ARROW_LEFT), new String("LEFT")); //$NON-NLS-1$
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/utils/SwtUtils.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/utils/SwtUtils.java
index a13ca8b70..09f0486c0 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/utils/SwtUtils.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/utils/SwtUtils.java
@@ -18,13 +18,13 @@ import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.eclipse.jubula.rc.common.AUTServer;
-import org.eclipse.jubula.rc.common.CompSystemConstants;
import org.eclipse.jubula.rc.common.driver.IEventThreadQueuer;
import org.eclipse.jubula.rc.common.driver.IRunnable;
import org.eclipse.jubula.rc.common.exception.StepExecutionException;
import org.eclipse.jubula.rc.swt.SwtAUTServer;
import org.eclipse.jubula.rc.swt.driver.EventThreadQueuerSwtImpl;
import org.eclipse.jubula.rc.swt.driver.KeyCodeConverter;
+import org.eclipse.jubula.toolkit.enums.ValueSets;
import org.eclipse.jubula.tools.internal.utils.EnvironmentUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
@@ -1306,24 +1306,24 @@ public class SwtUtils {
public static int getSystemDefaultModifier() {
if (EnvironmentUtils.isMacOS()) {
return KeyCodeConverter
- .getKeyCode(CompSystemConstants.MODIFIER_CMD);
+ .getKeyCode(ValueSets.Modifier.cmd.rcValue());
}
return KeyCodeConverter
- .getKeyCode(CompSystemConstants.MODIFIER_CONTROL);
+ .getKeyCode(ValueSets.Modifier.control.rcValue());
}
/**
* @return the second system modifier
*/
public static int getSystemModifier2() {
- return KeyCodeConverter.getKeyCode(CompSystemConstants.MODIFIER_SHIFT);
+ return KeyCodeConverter.getKeyCode(ValueSets.Modifier.shift.rcValue());
}
/**
* @return the third system modifier
*/
public static int getSystemModifier3() {
- return KeyCodeConverter.getKeyCode(CompSystemConstants.MODIFIER_ALT);
+ return KeyCodeConverter.getKeyCode(ValueSets.Modifier.alt.rcValue());
}
/**
@@ -1331,7 +1331,7 @@ public class SwtUtils {
*/
public static int getSystemModifier4() {
return KeyCodeConverter
- .getKeyCode(CompSystemConstants.MODIFIER_CONTROL);
+ .getKeyCode(ValueSets.Modifier.control.rcValue());
}
/**

Back to the top