Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Struckmann2015-08-20 07:07:17 -0400
committerSebastian Struckmann2015-08-25 10:14:56 -0400
commit9a6ff55691b2f279ddb5fb8d7de042195f8eaf58 (patch)
treec331f8f8d4a7b6bf4ee44a6b9cd4a382090287af
parentd1020777c4bb021a99ab8cd001c82635e40256c6 (diff)
downloadorg.eclipse.jubula.core-9a6ff55691b2f279ddb5fb8d7de042195f8eaf58.tar.gz
org.eclipse.jubula.core-9a6ff55691b2f279ddb5fb8d7de042195f8eaf58.tar.xz
org.eclipse.jubula.core-9a6ff55691b2f279ddb5fb8d7de042195f8eaf58.zip
Sprint task - Support collecting of all supported parents in OMM for JavaFX, see http://eclip.se/472954
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTestImpl.java31
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/IClientTest.java10
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/StartObjectMappingModeHandler.java50
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/Messages.java1
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/messages.properties3
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/preferences/ObjectMappingPreferencePage.java54
-rw-r--r--org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/constants/Constants.java20
-rw-r--r--org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/preferences/PreferenceInitializer.java7
-rw-r--r--org.eclipse.jubula.communication/src/org/eclipse/jubula/communication/internal/message/ChangeAUTModeMessage.java84
-rw-r--r--org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServerConfiguration.java87
-rw-r--r--org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/ChangeAUTModeCommand.java14
-rw-r--r--org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/ShowDialogResultCommand.java7
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/ComponentHandler.java61
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/KeyAcceptor.java20
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/MappingListener.java70
-rw-r--r--org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/listener/AbstractAutSwingEventListener.java10
-rw-r--r--org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/listener/KeyAcceptor.java7
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/AbstractAutSwtEventListener.java10
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/KeyAcceptor.java8
19 files changed, 431 insertions, 123 deletions
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTestImpl.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTestImpl.java
index f105a9291..c311f833a 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTestImpl.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTestImpl.java
@@ -396,7 +396,8 @@ public class ClientTestImpl implements IClientTest {
* {@inheritDoc}
*/
public void startObjectMapping(AutIdentifier autId, int mod,
- int inputCode, int inputType) throws ConnectionException,
+ int inputCode, int inputType, int modWP,
+ int inputCodeWP, int inputTypeWP) throws ConnectionException,
NotConnectedException, CommunicationException {
log.info(Messages.StartingObjectMapping);
@@ -408,17 +409,31 @@ public class ClientTestImpl implements IClientTest {
ChangeAUTModeMessage message = new ChangeAUTModeMessage();
message.setMode(ChangeAUTModeMessage.OBJECT_MAPPING);
- message.setKeyModifier(mod);
+ message.setMappingKeyModifier(mod);
switch (inputType) {
case InputConstants.TYPE_MOUSE_CLICK:
- message.setMouseButton(inputCode);
- message.setKey(InputConstants.NO_INPUT);
+ message.setMappingMouseButton(inputCode);
+ message.setMappingKey(InputConstants.NO_INPUT);
break;
case InputConstants.TYPE_KEY_PRESS:
// fall through
default:
- message.setKey(inputCode);
- message.setMouseButton(InputConstants.NO_INPUT);
+ message.setMappingKey(inputCode);
+ message.setMappingMouseButton(InputConstants.NO_INPUT);
+ break;
+ }
+ message.setMappingWithParentsKeyModifier(modWP);
+ switch (inputTypeWP) {
+ case InputConstants.TYPE_MOUSE_CLICK:
+ message.setMappingWithParentsMouseButton(inputCodeWP);
+ message.setMappingWithParentsKey(InputConstants.NO_INPUT);
+ break;
+ case InputConstants.TYPE_KEY_PRESS:
+ // fall through
+ default:
+ message.setMappingWithParentsKey(inputCodeWP);
+ message.setMappingWithParentsMouseButton(
+ InputConstants.NO_INPUT);
break;
}
AUTConnection.getInstance().send(message);
@@ -445,8 +460,8 @@ public class ClientTestImpl implements IClientTest {
try {
ChangeAUTModeMessage message = new ChangeAUTModeMessage();
message.setMode(ChangeAUTModeMessage.RECORD_MODE);
- message.setKeyModifier(recordCompMod);
- message.setKey(recordCompKey);
+ message.setMappingKeyModifier(recordCompMod);
+ message.setMappingKey(recordCompKey);
message.setKey2Modifier(recordApplMod);
message.setKey2(recordApplKey);
message.setCheckModeKeyModifier(checkModeKeyMod);
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/IClientTest.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/IClientTest.java
index e61fefc30..ba1b588a3 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/IClientTest.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/IClientTest.java
@@ -82,6 +82,13 @@ public interface IClientTest {
* UI element
* @param inputType the type of input that will trigger UI collection
* (key press, mouse click, etc.)
+ * @param modWP key modifier that will collect a
+ * UI element together with its parents
+ * @param inputCodeWP the code representing the input that will collect a
+ * UI element together with its parents
+ * @param inputTypeWP the type of input that will trigger collection of
+ * a UI component together with its parents
+ * (key press, mouse click, etc.)
* @param autId The ID of the AUT for which to start the Object Mapping.
*
* @throws ConnectionException
@@ -89,7 +96,8 @@ public interface IClientTest {
* @throws CommunicationException
*/
public abstract void startObjectMapping(AutIdentifier autId, int mod,
- int inputCode, int inputType) throws ConnectionException,
+ int inputCode, int inputType, int modWP,
+ int inputCodeWP, int inputTypeWP) throws ConnectionException,
NotConnectedException, CommunicationException;
/**
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/StartObjectMappingModeHandler.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/StartObjectMappingModeHandler.java
index f3db909ae..7466a22cc 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/StartObjectMappingModeHandler.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/StartObjectMappingModeHandler.java
@@ -89,6 +89,12 @@ public class StartObjectMappingModeHandler extends AbstractRunningAutHandler {
/** the code for the key used to collect UI Elements */
private int m_key;
+ /** the code for the modifier key(s) used to collect UI Elements and their parents */
+ private int m_modifierWithParents;
+
+ /** the code for the key used to collect UI Elements and their parents */
+ private int m_keyWithParents;
+
/** the category into which collected UI Elements will be collected */
private IObjectMappingCategoryPO m_category;
@@ -98,6 +104,13 @@ public class StartObjectMappingModeHandler extends AbstractRunningAutHandler {
* @see {@link org.eclipse.jubula.tools.internal.constants.InputConstants}
*/
private int m_type;
+
+ /**
+ * the type of input action that will collect a UI Element and its parents
+ *
+ * @see {@link org.eclipse.jubula.tools.internal.constants.InputConstants}
+ */
+ private int m_typeWithParents;
/**
* Constructor
@@ -112,11 +125,18 @@ public class StartObjectMappingModeHandler extends AbstractRunningAutHandler {
* @param category The category into which collected UI Elements will
* be collected.
* @param type The type of input action that will collect a UI Element.
+ * @param modifierWP The code for the modifier key(s) used to collect
+ * UI Elements and their parents.
+ * @param keyWP The code for the key used to collect UI Elements
+ * and their parents.
+ * @param typeWP The type of input action that will collect a UI Element
+ * and its parents.
* @see {@link org.eclipse.jubula.tools.internal.constants.InputConstants}
*/
public StartObjectMappingModeJob(ObjectMappingMultiPageEditor editor,
AutIdentifier autId, int modifier, int key,
- IObjectMappingCategoryPO category, int type) {
+ IObjectMappingCategoryPO category, int type,
+ int modifierWP, int keyWP, int typeWP) {
super("Start Object Mapping Mode"); //$NON-NLS-1$
m_editor = editor;
m_autId = autId;
@@ -124,6 +144,9 @@ public class StartObjectMappingModeHandler extends AbstractRunningAutHandler {
m_key = key;
m_category = category;
m_type = type;
+ m_modifierWithParents = modifierWP;
+ m_keyWithParents = keyWP;
+ m_typeWithParents = typeWP;
}
/**
@@ -134,7 +157,9 @@ public class StartObjectMappingModeHandler extends AbstractRunningAutHandler {
try {
TestExecutionContributor.getInstance()
.getClientTest().startObjectMapping(
- m_autId, m_modifier, m_key, m_type);
+ m_autId, m_modifier, m_key, m_type,
+ m_modifierWithParents, m_keyWithParents,
+ m_typeWithParents);
DataEventDispatcher.getInstance()
.fireOMStateChanged(OMState.running);
DataEventDispatcher.getInstance()
@@ -267,20 +292,29 @@ public class StartObjectMappingModeHandler extends AbstractRunningAutHandler {
} else {
IPreferenceStore preferenceStore = Plugin.getDefault()
.getPreferenceStore();
- int mod = preferenceStore.getInt(Constants.MAPPING_MOD_KEY);
- int key = preferenceStore.getInt(Constants.MAPPING_TRIGGER_KEY);
- int type = preferenceStore
+ int mappingMod = preferenceStore.getInt(
+ Constants.MAPPING_MOD_KEY);
+ int mappingKey = preferenceStore.getInt(
+ Constants.MAPPING_TRIGGER_KEY);
+ int mappingType = preferenceStore
.getInt(Constants.MAPPING_TRIGGER_TYPE_KEY);
+ int mappingWPMod = preferenceStore.getInt(
+ Constants.MAPPING_WITH_PARENTS_MOD_KEY);
+ int mappingWPKey = preferenceStore.getInt(
+ Constants.MAPPING_WITH_PARENTS_TRIGGER_KEY);
+ int mappingWPType = preferenceStore
+ .getInt(Constants.MAPPING_WITH_PARENTS_TRIGGER_TYPE_KEY);
final String toolkit = editor.getAut().getToolkit();
if (toolkit.equals(CommandConstants.SWT_TOOLKIT)
|| toolkit.equals(CommandConstants.RCP_TOOLKIT)) {
- mod = KeyConverter.convertSwingStateMask(mod);
- key = KeyConverter.convertSwingToSwt(key);
+ mappingMod = KeyConverter.convertSwingStateMask(mappingMod);
+ mappingKey = KeyConverter.convertSwingToSwt(mappingKey);
}
Job startObjectMappingModeJob = new StartObjectMappingModeJob(
- editor, autId, mod, key, category, type);
+ editor, autId, mappingMod, mappingKey, category,
+ mappingType, mappingWPMod, mappingWPKey, mappingWPType);
startObjectMappingModeJob.setSystem(true);
JobUtils.executeJob(startObjectMappingModeJob, null);
}
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/Messages.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/Messages.java
index 0d919358c..e1c1312da 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/Messages.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/Messages.java
@@ -444,6 +444,7 @@ public class Messages extends NLS {
public static String ObjectMappingEditorSplitPaneView;
public static String ObjectMappingEditorTechnicalName;
public static String ObjectMappingPreferencePageCollectShortcut;
+ public static String ObjectMappingPreferencePageCollectWithParentsShortcut;
public static String ObjectMappingPreferencePageContextFactor;
public static String ObjectMappingPreferencePageDescription;
public static String ObjectMappingPreferencePageLock;
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/messages.properties b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/messages.properties
index 5e2820042..9f29ce0a6 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/messages.properties
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/messages.properties
@@ -426,7 +426,8 @@ ObjectMappingEditorEditor=OM /
ObjectMappingEditorLogicalName=Component Name
ObjectMappingEditorSplitPaneView=Object Mapping
ObjectMappingEditorTechnicalName=Technical Name
-ObjectMappingPreferencePageCollectShortcut=Shortcut to collect components from the AUT\:
+ObjectMappingPreferencePageCollectShortcut=Shortcut to collect the component at mouse position from any Java AUT\:
+ObjectMappingPreferencePageCollectWithParentsShortcut=Shortcut to collect the component at mouse position and all its supported parents from a JavaFX AUT\:
ObjectMappingPreferencePageContextFactor=&Context Weight
ObjectMappingPreferencePageDescription=Here you can configure everything concerning Object Mapping.
ObjectMappingPreferencePageLock=lock
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/preferences/ObjectMappingPreferencePage.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/preferences/ObjectMappingPreferencePage.java
index edd77c804..247e361a4 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/preferences/ObjectMappingPreferencePage.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/preferences/ObjectMappingPreferencePage.java
@@ -58,7 +58,13 @@ public class ObjectMappingPreferencePage extends PreferencePage
private Combo m_mappingModifier = null;
/** combo for mapping keyboard shortcut */
+ private Combo m_mappingWithParentsModifier = null;
+
+ /** combo for mapping keyboard shortcut */
private DirectCombo<UserInput> m_mappingKey = null;
+
+ /** combo for mapping keyboard shortcut */
+ private DirectCombo<UserInput> m_mappingWithParentsKey = null;
/**
* Default Constructor
@@ -167,6 +173,21 @@ public class ObjectMappingPreferencePage extends PreferencePage
label.setText(" + "); //$NON-NLS-1$
m_mappingKey = InputComboUtil.createInputCombo(
composite, SWT.DROP_DOWN | SWT.READ_ONLY);
+
+ label = new Label(composite, SWT.NONE);
+ label.setText(Messages
+ .ObjectMappingPreferencePageCollectWithParentsShortcut);
+ label.setFont(LayoutUtil.BOLD_TAHOMA);
+ label.setLayoutData(data2);
+
+ label = new Label(composite, SWT.NONE);
+ m_mappingWithParentsModifier = new Combo(composite,
+ SWT.DROP_DOWN | SWT.READ_ONLY);
+ m_mappingWithParentsModifier.setItems(keys.getModifierString());
+ label = new Label(composite, SWT.NONE);
+ label.setText(" + "); //$NON-NLS-1$
+ m_mappingWithParentsKey = InputComboUtil.createInputCombo(
+ composite, SWT.DROP_DOWN | SWT.READ_ONLY);
}
/**
@@ -189,9 +210,17 @@ public class ObjectMappingPreferencePage extends PreferencePage
m_mappingModifier.select(InputCodeHelper.getInstance()
.getIndexOfModifier(
getDefaultPrefsInt(Constants.MAPPING_MOD_KEY)));
+ m_mappingWithParentsModifier.select(InputCodeHelper.getInstance()
+ .getIndexOfModifier(
+ getDefaultPrefsInt(
+ Constants.MAPPING_WITH_PARENTS_MOD_KEY)));
InputComboUtil.setSelectedInput(m_mappingKey,
getDefaultPrefsInt(Constants.MAPPING_TRIGGER_KEY),
getDefaultPrefsInt(Constants.MAPPING_TRIGGER_TYPE_KEY));
+ InputComboUtil.setSelectedInput(m_mappingWithParentsKey,
+ getDefaultPrefsInt(Constants.MAPPING_WITH_PARENTS_TRIGGER_KEY),
+ getDefaultPrefsInt(Constants.
+ MAPPING_WITH_PARENTS_TRIGGER_TYPE_KEY));
}
/**
@@ -205,9 +234,18 @@ public class ObjectMappingPreferencePage extends PreferencePage
m_mappingModifier.select(
InputCodeHelper.getInstance().getIndexOfModifier(
getPreferenceStore().getInt(Constants.MAPPING_MOD_KEY)));
+ m_mappingWithParentsModifier.select(
+ InputCodeHelper.getInstance().getIndexOfModifier(
+ getPreferenceStore().getInt(
+ Constants.MAPPING_WITH_PARENTS_MOD_KEY)));
InputComboUtil.setSelectedInput(m_mappingKey,
getPreferenceStore().getInt(Constants.MAPPING_TRIGGER_KEY),
getPreferenceStore().getInt(Constants.MAPPING_TRIGGER_TYPE_KEY));
+ InputComboUtil.setSelectedInput(m_mappingWithParentsKey,
+ getPreferenceStore().getInt(
+ Constants.MAPPING_WITH_PARENTS_TRIGGER_KEY),
+ getPreferenceStore().getInt(
+ Constants.MAPPING_WITH_PARENTS_TRIGGER_TYPE_KEY));
}
@@ -241,12 +279,24 @@ public class ObjectMappingPreferencePage extends PreferencePage
getPreferenceStore().setValue(Constants.SHOWCHILDCOUNT_KEY, showCount);
getPreferenceStore().setValue(
Constants.MAPPING_MOD_KEY,
- InputCodeHelper.getInstance().getModifier()[m_mappingModifier
- .getSelectionIndex()]);
+ InputCodeHelper.getInstance().getModifier()[
+ m_mappingModifier.getSelectionIndex()]);
+ getPreferenceStore().setValue(
+ Constants.MAPPING_WITH_PARENTS_MOD_KEY,
+ InputCodeHelper.getInstance().getModifier()[
+ m_mappingWithParentsModifier.getSelectionIndex()]);
+
InputComboUtil.setPrefCode(m_mappingKey, getPreferenceStore(),
Constants.MAPPING_TRIGGER_KEY);
InputComboUtil.setPrefType(m_mappingKey, getPreferenceStore(),
Constants.MAPPING_TRIGGER_TYPE_KEY);
+
+ InputComboUtil.setPrefCode(m_mappingWithParentsKey,
+ getPreferenceStore(),
+ Constants.MAPPING_WITH_PARENTS_TRIGGER_KEY);
+ InputComboUtil.setPrefType(m_mappingWithParentsKey,
+ getPreferenceStore(),
+ Constants.MAPPING_WITH_PARENTS_TRIGGER_TYPE_KEY);
return super.performOk();
}
}
diff --git a/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/constants/Constants.java b/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/constants/Constants.java
index dc9a64534..ef490e817 100644
--- a/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/constants/Constants.java
+++ b/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/constants/Constants.java
@@ -205,6 +205,15 @@ public interface Constants {
public static final String MAPPING_TRIGGER_TYPE_KEY = "MAPPINGMOD2_TYPE_PREF_KEY"; //$NON-NLS-1$
/** Key for m_text value to be stored as a resource property */
+ public static final String MAPPING_WITH_PARENTS_MOD_KEY = "MAPPING_WITH_PARENTS_MOD1_PREF_KEY"; //$NON-NLS-1$
+
+ /** Key for m_text value to be stored as a resource property */
+ public static final String MAPPING_WITH_PARENTS_TRIGGER_KEY = "MAPPING_WITH_PARENTS_MOD2_PREF_KEY"; //$NON-NLS-1$
+
+ /** Key for m_text value to be stored as a resource property */
+ public static final String MAPPING_WITH_PARENTS_TRIGGER_TYPE_KEY = "MAPPING_WITH_PARENTS_MOD2_TYPE_PREF_KEY"; //$NON-NLS-1$
+
+ /** Key for m_text value to be stored as a resource property */
public static final String RECORDMOD_COMP_MODS_KEY = "RECORDMOD1_PREF_KEY"; //$NON-NLS-1$
/** Key for m_text value to be stored as a resource property */
@@ -364,12 +373,23 @@ public interface Constants {
InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK;
/** Key for int value to be stored as a resource property */
+ public static final int MAPPING_WP_MOD1_KEY_DEFAULT =
+ InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK;
+
+ /** Key for int value to be stored as a resource property */
public static final int MAPPING_TRIGGER_DEFAULT = KeyEvent.VK_Q;
+
+ /** Key for int value to be stored as a resource property */
+ public static final int MAPPING_WP_TRIGGER_DEFAULT = KeyEvent.VK_A;
/** Default value for Object Mapping trigger type */
public static final int MAPPING_TRIGGER_TYPE_DEFAULT =
InputConstants.TYPE_KEY_PRESS;
+ /** Default value for Object Mapping trigger type */
+ public static final int MAPPING_WP_TRIGGER_TYPE_DEFAULT =
+ InputConstants.TYPE_KEY_PRESS;
+
/** Default value for modifier key(s) for "Refresh" action in Object Mapping Mode */
public static final int REFRESH_MOD_DEFAULT =
InputEvent.SHIFT_DOWN_MASK | InputEvent.CTRL_DOWN_MASK;
diff --git a/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/preferences/PreferenceInitializer.java b/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/preferences/PreferenceInitializer.java
index 26918f397..29999735f 100644
--- a/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/preferences/PreferenceInitializer.java
+++ b/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/preferences/PreferenceInitializer.java
@@ -134,6 +134,13 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
Constants.MAPPING_TRIGGER_DEFAULT);
prefStore.setDefault(Constants.MAPPING_TRIGGER_TYPE_KEY,
Constants.MAPPING_TRIGGER_TYPE_DEFAULT);
+
+ prefStore.setDefault(Constants.MAPPING_WITH_PARENTS_MOD_KEY,
+ Constants.MAPPING_WP_MOD1_KEY_DEFAULT);
+ prefStore.setDefault(Constants.MAPPING_WITH_PARENTS_TRIGGER_KEY,
+ Constants.MAPPING_WP_TRIGGER_DEFAULT);
+ prefStore.setDefault(Constants.MAPPING_WITH_PARENTS_TRIGGER_TYPE_KEY,
+ Constants.MAPPING_WP_TRIGGER_TYPE_DEFAULT);
}
/**
diff --git a/org.eclipse.jubula.communication/src/org/eclipse/jubula/communication/internal/message/ChangeAUTModeMessage.java b/org.eclipse.jubula.communication/src/org/eclipse/jubula/communication/internal/message/ChangeAUTModeMessage.java
index 61a1fa7fd..3018a288f 100644
--- a/org.eclipse.jubula.communication/src/org/eclipse/jubula/communication/internal/message/ChangeAUTModeMessage.java
+++ b/org.eclipse.jubula.communication/src/org/eclipse/jubula/communication/internal/message/ChangeAUTModeMessage.java
@@ -48,13 +48,22 @@ public class ChangeAUTModeMessage extends Message {
private int m_mode;
/** modifier to map an item/record */
- private int m_keyModifier = 0;
+ private int m_mappingKeyModifier = 0;
+
+ /** modifier to map an item/record together with its parents */
+ private int m_mappingWithParentsKeyModifier = 0;
/** key to map an item/record */
- private int m_key = 0;
+ private int m_mappingKey = 0;
+
+ /** key to map an item/record together with its parents */
+ private int m_mappingWithParentsKey = 0;
+
+ /** mouse button to map an item/record */
+ private int m_mappingMouseButton = 0;
/** mouse button to map an item/record */
- private int m_mouseButton = 0;
+ private int m_mappingWithParentsMouseButton = 0;
/** modifier to record Application */
private int m_key2Modifier = 0;
@@ -113,46 +122,91 @@ public class ChangeAUTModeMessage extends Message {
/**
* @return Returns the key to map an item/record.
*/
- public int getKey() {
- return m_key;
+ public int getMappingKey() {
+ return m_mappingKey;
+ }
+
+ /**
+ * @param key
+ * The key to set.
+ */
+ public void setMappingKey(int key) {
+ m_mappingKey = key;
+ }
+
+ /**
+ * @return Returns the key to map an item/record.
+ */
+ public int getMappingWithParentsKey() {
+ return m_mappingWithParentsKey;
}
/**
* @param key
* The key to set.
*/
- public void setKey(int key) {
- m_key = key;
+ public void setMappingWithParentsKey(int key) {
+ m_mappingWithParentsKey = key;
+ }
+
+ /**
+ * @return the mouse button used for object mapping
+ */
+ public int getMappingMouseButton() {
+ return m_mappingMouseButton;
+ }
+
+ /**
+ * @param mouseButton
+ * the mouse button to use for object mapping
+ */
+ public void setMappingWithParentsMouseButton(int mouseButton) {
+ m_mappingWithParentsMouseButton = mouseButton;
}
/**
* @return the mouse button used for object mapping
*/
- public int getMouseButton() {
- return m_mouseButton;
+ public int getMappingWithParentsMouseButton() {
+ return m_mappingWithParentsMouseButton;
}
/**
* @param mouseButton
* the mouse button to use for object mapping
*/
- public void setMouseButton(int mouseButton) {
- m_mouseButton = mouseButton;
+ public void setMappingMouseButton(int mouseButton) {
+ m_mappingMouseButton = mouseButton;
+ }
+
+ /**
+ * @return Returns the keyModifier.
+ */
+ public int getMappingKeyModifier() {
+ return m_mappingKeyModifier;
+ }
+
+ /**
+ * @param keyModifier
+ * The keyModifier to set.
+ */
+ public void setMappingKeyModifier(int keyModifier) {
+ m_mappingKeyModifier = keyModifier;
}
/**
* @return Returns the keyModifier.
*/
- public int getKeyModifier() {
- return m_keyModifier;
+ public int getMappingWithParentsKeyModifier() {
+ return m_mappingWithParentsKeyModifier;
}
/**
* @param keyModifier
* The keyModifier to set.
*/
- public void setKeyModifier(int keyModifier) {
- m_keyModifier = keyModifier;
+ public void setMappingWithParentsKeyModifier(int keyModifier) {
+ m_mappingWithParentsKeyModifier = keyModifier;
}
/**
diff --git a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServerConfiguration.java b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServerConfiguration.java
index e67e26b69..f8438e929 100644
--- a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServerConfiguration.java
+++ b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServerConfiguration.java
@@ -75,17 +75,32 @@ public class AUTServerConfiguration {
/**
* keyboard shortcut for starting Mapping/Records Mode Modifier
*/
- private int m_keyMod;
+ private int m_mappingKeyMod;
/**
+ * keyboard shortcut for mapping of components together with their parents
+ */
+ private int m_mappingWithParentsKeyMod;
+
+ /**
* keyboard shortcut for starting Mapping/Record Mode
*/
- private int m_key;
+ private int m_mappingKey;
+
+ /**
+ * keyboard shortcut for mapping of components together with their parents
+ */
+ private int m_mappingWithParentsKey;
/**
* mouse button for collecting a UI element in Mapping Mode
*/
- private int m_mouseButton;
+ private int m_mappingMouseButton;
+
+ /**
+ * mouse button for collecting a UI element together with its parents in Mapping Mode
+ */
+ private int m_mappingWithParentsMouseButton;
/**
* keyboard shortcut for starting Mapping/Records Mode Modifier
@@ -496,42 +511,80 @@ public class AUTServerConfiguration {
m_profile = p;
}
/**
- * @return Returns the key.
+ * @return Returns the key for mapping components .
*/
- public int getKey() {
- return m_key;
+ public int getMappingKey() {
+ return m_mappingKey;
}
/**
- * @param key The key to set.
+ * @param key The key for mapping components to set.
*/
- public void setKey(int key) {
- m_key = key;
+ public void setMappingKey(int key) {
+ m_mappingKey = key;
+ }
+ /**
+ * @return Returns the key for mapping components .
+ */
+ public int getMappingWithParentsKey() {
+ return m_mappingWithParentsKey;
+ }
+ /**
+ * @param key The key for mapping components to set.
+ */
+ public void setMappingWithParentsKey(int key) {
+ m_mappingWithParentsKey = key;
}
/**
* @param mouseButton the mouseButton to set
*/
- public void setMouseButton(int mouseButton) {
- m_mouseButton = mouseButton;
+ public void setMappingMouseButton(int mouseButton) {
+ m_mappingMouseButton = mouseButton;
}
/**
* @return the mouseButton
*/
- public int getMouseButton() {
- return m_mouseButton;
+ public int getMappingMouseButton() {
+ return m_mappingMouseButton;
+ }
+ /**
+ * @param mouseButton the mouseButton to set
+ */
+ public void setMappingWithParentsMouseButton(int mouseButton) {
+ m_mappingWithParentsMouseButton = mouseButton;
+ }
+
+ /**
+ * @return the mouseButton
+ */
+ public int getMappingWithParentsMouseButton() {
+ return m_mappingWithParentsMouseButton;
+ }
+
+ /**
+ * @return Returns the keyMod.
+ */
+ public int getMappingKeyMod() {
+ return m_mappingKeyMod;
+ }
+ /**
+ * @param keyMod The keyMod to set.
+ */
+ public void setMappingKeyMod(int keyMod) {
+ m_mappingKeyMod = keyMod;
}
/**
* @return Returns the keyMod.
*/
- public int getKeyMod() {
- return m_keyMod;
+ public int getMappingWithParentsKeyMod() {
+ return m_mappingWithParentsKeyMod;
}
/**
* @param keyMod The keyMod to set.
*/
- public void setKeyMod(int keyMod) {
- m_keyMod = keyMod;
+ public void setMappingWithParentsKeyMod(int keyMod) {
+ m_mappingWithParentsKeyMod = keyMod;
}
/**
diff --git a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/ChangeAUTModeCommand.java b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/ChangeAUTModeCommand.java
index f796d38a0..ab4f51f5c 100644
--- a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/ChangeAUTModeCommand.java
+++ b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/ChangeAUTModeCommand.java
@@ -60,9 +60,17 @@ public class ChangeAUTModeCommand implements ICommand {
case ChangeAUTModeMessage.CHECK_MODE :
case ChangeAUTModeMessage.RECORD_MODE :
case ChangeAUTModeMessage.OBJECT_MAPPING :
- autServerConfig.setKeyMod(m_message.getKeyModifier());
- autServerConfig.setKey(m_message.getKey());
- autServerConfig.setMouseButton(m_message.getMouseButton());
+ autServerConfig.setMappingKeyMod(m_message
+ .getMappingKeyModifier());
+ autServerConfig.setMappingWithParentsKeyMod(m_message
+ .getMappingWithParentsKeyModifier());
+ autServerConfig.setMappingKey(m_message.getMappingKey());
+ autServerConfig.setMappingWithParentsKey(m_message
+ .getMappingWithParentsKey());
+ autServerConfig.setMappingMouseButton(m_message
+ .getMappingMouseButton());
+ autServerConfig.setMappingWithParentsMouseButton(m_message
+ .getMappingWithParentsMouseButton());
autServerConfig.setKey2Mod(m_message.getKey2Modifier());
autServerConfig.setKey2(m_message.getKey2());
autServerConfig.setCheckModeKeyMod(m_message
diff --git a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/ShowDialogResultCommand.java b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/ShowDialogResultCommand.java
index 7f7997441..cb3431e2c 100644
--- a/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/ShowDialogResultCommand.java
+++ b/org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/ShowDialogResultCommand.java
@@ -80,8 +80,11 @@ public class ShowDialogResultCommand implements ICommand {
ChangeAUTModeMessage msg = new ChangeAUTModeMessage();
msg.setMode(mode);
AUTServerConfiguration config = AUTServerConfiguration.getInstance();
- msg.setKey(config.getKey());
- msg.setKeyModifier(config.getKeyMod());
+ msg.setMappingKey(config.getMappingKey());
+ msg.setMappingWithParentsKey(config.getMappingWithParentsKey());
+ msg.setMappingKeyModifier(config.getMappingKeyMod());
+ msg.setMappingWithParentsKeyModifier(
+ config.getMappingWithParentsKeyMod());
msg.setKey2(config.getKey2());
msg.setKey2Modifier(config.getKey2Mod());
msg.setCheckModeKey(config.getCheckModeKey());
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/ComponentHandler.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/ComponentHandler.java
index 6d4a1cb9d..aca1767bc 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/ComponentHandler.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/ComponentHandler.java
@@ -203,32 +203,7 @@ public class ComponentHandler implements ListChangeListener<Stage>,
}
List<Node> result = new ArrayList<Node>();
for (Node n : matches) {
- if (n.getScene() == null || !isSupported(n.getClass())
- || !n.isVisible()) {
- continue;
- }
- boolean add = true;
- Parent parent = n.getParent();
- while (parent != null) {
- if (parent instanceof Skinnable || isContainer(parent)) {
- if (isContentNode(n, parent)) {
- break;
- }
- Skin<?> skin = ((Skinnable) parent).getSkin();
- if (skin instanceof SkinBase) {
- // We don't want skin nodes
- if (isSkinNode(n, (SkinBase<?>) skin)) {
- add = false;
- break;
- }
- } else {
- parent = parent.getParent();
- }
- } else {
- parent = parent.getParent();
- }
- }
- if (add) {
+ if (isMappable(n)) {
result.add(n);
}
}
@@ -243,6 +218,40 @@ public class ComponentHandler implements ListChangeListener<Stage>,
}
/**
+ * Determines whether a node is mappable or not
+ * @param n the node
+ * @return the result
+ */
+ public static boolean isMappable(Node n) {
+ boolean mappable = true;
+ if (n.getScene() == null || !isSupported(n.getClass())
+ || !n.isVisible()) {
+ return false;
+ }
+ Parent parent = n.getParent();
+ while (parent != null) {
+ if (parent instanceof Skinnable || isContainer(parent)) {
+ if (isContentNode(n, parent)) {
+ break;
+ }
+ Skin<?> skin = ((Skinnable) parent).getSkin();
+ if (skin instanceof SkinBase) {
+ // We don't want skin nodes
+ if (isSkinNode(n, (SkinBase<?>) skin)) {
+ mappable = false;
+ break;
+ }
+ } else {
+ parent = parent.getParent();
+ }
+ } else {
+ parent = parent.getParent();
+ }
+ }
+ return mappable;
+ }
+
+ /**
* Checks if the given node is a container.
* @param n the possible container
* @return true if the node is a container false otherwise
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/KeyAcceptor.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/KeyAcceptor.java
index 46289b509..d5971ee94 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/KeyAcceptor.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/KeyAcceptor.java
@@ -42,6 +42,11 @@ public class KeyAcceptor {
* <code>CHECKCOMP_KEY_COMB</code>
*/
public static final int CHECKCOMP_KEY_COMB = 3;
+
+ /**
+ * <code>MAPPING_KEY_COMB</code>
+ */
+ public static final int MAPPING_WITH_PARENTS_KEY_COMB = 4;
/**
* private Constructor
@@ -95,10 +100,11 @@ public class KeyAcceptor {
break;
}
}
- if (inputCode == AUTServerConfiguration.getInstance().getKey()
+ if (inputCode == AUTServerConfiguration.getInstance().getMappingKey()
|| inputCode == AUTServerConfiguration.getInstance()
- .getMouseButton()
- && keyMod == AUTServerConfiguration.getInstance().getKeyMod()) {
+ .getMappingMouseButton()
+ && keyMod == AUTServerConfiguration.getInstance()
+ .getMappingKeyMod()) {
return MAPPING_KEY_COMB;
}
if (inputCode == AUTServerConfiguration.getInstance().getCheckModeKey()
@@ -111,6 +117,14 @@ public class KeyAcceptor {
.getCheckCompKeyMod()) {
return CHECKCOMP_KEY_COMB;
}
+ if (inputCode == AUTServerConfiguration.getInstance()
+ .getMappingWithParentsKey()
+ || inputCode == AUTServerConfiguration.getInstance()
+ .getMappingWithParentsMouseButton()
+ && keyMod == AUTServerConfiguration.getInstance()
+ .getMappingWithParentsKeyMod()) {
+ return MAPPING_WITH_PARENTS_KEY_COMB;
+ }
return 0;
}
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/MappingListener.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/MappingListener.java
index 3ce5add05..8e84a4643 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/MappingListener.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/listener/MappingListener.java
@@ -16,6 +16,7 @@ import javafx.concurrent.WorkerStateEvent;
import javafx.event.EventHandler;
import javafx.geometry.Point2D;
import javafx.scene.Node;
+import javafx.scene.Parent;
import javafx.scene.input.InputEvent;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.MouseEvent;
@@ -109,35 +110,54 @@ public class MappingListener extends AbstractFXAUTEventHandler {
@Override
public void handle(InputEvent event) {
Node currNode = getCurrentNode();
- if (currNode != null
- && KeyAcceptor.accept(event) == KeyAcceptor.
- MAPPING_KEY_COMB) {
- IComponentIdentifier id;
- try {
- id = ComponentHandler.getIdentifier(currNode);
- if (log.isInfoEnabled()) {
- log.info("send a message with identifier for the component '" //$NON-NLS-1$
- + id + "'"); //$NON-NLS-1$
+ int acceptCode = KeyAcceptor.accept(event);
+ boolean doMapping =
+ acceptCode == KeyAcceptor.MAPPING_KEY_COMB;
+ boolean doMappingWithParents =
+ acceptCode == KeyAcceptor.MAPPING_WITH_PARENTS_KEY_COMB;
+ if (currNode != null && (doMapping || doMappingWithParents)) {
+ sendIdentifier(currNode);
+ if (doMappingWithParents) {
+ Parent p = currNode.getParent();
+ while (p != null) {
+ if (ComponentHandler.isMappable(p)) {
+ sendIdentifier(p);
+ }
+ p = p.getParent();
}
-
- Map<String, String> componentProperties = PropertyUtil
- .getMapOfComponentProperties(currNode);
- id.setComponentPropertiesMap(componentProperties);
- // send a message with the identifier of the selected
- // component
- ObjectMappedMessage message = new ObjectMappedMessage();
- message.setComponentIdentifier(id);
- AUTServer.getInstance().getCommunicator().send(message);
- } catch (NoIdentifierForComponentException nifce) {
- // no identifier for the component, log this as an error
- log.error("no identifier for '" + currNode); //$NON-NLS-1$
- } catch (CommunicationException ce) {
- log.error(ce);
- // do nothing here: a closed connection is handled by the
- // AUTServer
}
}
}
+ /**
+ * @param node the node for which to send identifier
+ */
+ private void sendIdentifier(Node node) {
+ IComponentIdentifier id;
+ try {
+ id = ComponentHandler.getIdentifier(node);
+ if (log.isInfoEnabled()) {
+ log.info("send a message with identifier for the component '" //$NON-NLS-1$
+ + id + "'"); //$NON-NLS-1$
+ }
+
+ Map<String, String> componentProperties = PropertyUtil
+ .getMapOfComponentProperties(node);
+ id.setComponentPropertiesMap(componentProperties);
+ // send a message with the identifier of the selected
+ // component
+ ObjectMappedMessage message = new ObjectMappedMessage();
+ message.setComponentIdentifier(id);
+ AUTServer.getInstance().getCommunicator().send(message);
+ } catch (NoIdentifierForComponentException nifce) {
+ // no identifier for the component, log this as an error
+ log.error("no identifier for '" + node); //$NON-NLS-1$
+ } catch (CommunicationException ce) {
+ log.error(ce);
+ // do nothing here: a closed connection is handled by the
+ // AUTServer
+ }
+ }
+
}
}
diff --git a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/listener/AbstractAutSwingEventListener.java b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/listener/AbstractAutSwingEventListener.java
index e8a00c6e9..bb8490747 100644
--- a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/listener/AbstractAutSwingEventListener.java
+++ b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/listener/AbstractAutSwingEventListener.java
@@ -159,9 +159,13 @@ public abstract class AbstractAutSwingEventListener
protected void changeCheckModeState(int mode) {
ChangeAUTModeMessage msg = new ChangeAUTModeMessage();
msg.setMode(mode);
- msg.setKey(AUTServerConfiguration.getInstance().getKey());
- msg.setKeyModifier(
- AUTServerConfiguration.getInstance().getKeyMod());
+ msg.setMappingKey(AUTServerConfiguration.getInstance().getMappingKey());
+ msg.setMappingWithParentsKey(AUTServerConfiguration
+ .getInstance().getMappingWithParentsKey());
+ msg.setMappingKeyModifier(AUTServerConfiguration
+ .getInstance().getMappingKeyMod());
+ msg.setMappingWithParentsKeyModifier(AUTServerConfiguration
+ .getInstance().getMappingWithParentsKeyMod());
msg.setKey2(AUTServerConfiguration.getInstance().getKey2());
msg.setKey2Modifier(
AUTServerConfiguration.getInstance().getKey2Mod());
diff --git a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/listener/KeyAcceptor.java b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/listener/KeyAcceptor.java
index 93d98da20..6921b63fc 100644
--- a/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/listener/KeyAcceptor.java
+++ b/org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/listener/KeyAcceptor.java
@@ -90,11 +90,12 @@ public class KeyAcceptor {
}
}
if ((inputCode
- == AUTServerConfiguration.getInstance().getKey()
+ == AUTServerConfiguration.getInstance().getMappingKey()
|| inputCode
- == AUTServerConfiguration.getInstance().getMouseButton())
+ == AUTServerConfiguration.getInstance()
+ .getMappingMouseButton())
&& keyMod
- == AUTServerConfiguration.getInstance().getKeyMod()) {
+ == AUTServerConfiguration.getInstance().getMappingKeyMod()) {
return MAPPING_KEY_COMB;
}
if (inputCode
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/AbstractAutSwtEventListener.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/AbstractAutSwtEventListener.java
index e4033d7fb..54cd1f158 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/AbstractAutSwtEventListener.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/AbstractAutSwtEventListener.java
@@ -230,9 +230,13 @@ public abstract class AbstractAutSwtEventListener extends BaseSwtEventListener
protected void changeCheckModeState(int mode) {
ChangeAUTModeMessage msg = new ChangeAUTModeMessage();
msg.setMode(mode);
- msg.setKey(AUTServerConfiguration.getInstance().getKey());
- msg.setKeyModifier(
- AUTServerConfiguration.getInstance().getKeyMod());
+ msg.setMappingKey(AUTServerConfiguration.getInstance().getMappingKey());
+ msg.setMappingWithParentsKey(AUTServerConfiguration
+ .getInstance().getMappingWithParentsKey());
+ msg.setMappingKeyModifier(AUTServerConfiguration
+ .getInstance().getMappingKeyMod());
+ msg.setMappingWithParentsKeyModifier(AUTServerConfiguration
+ .getInstance().getMappingWithParentsKeyMod());
msg.setKey2(AUTServerConfiguration.getInstance().getKey2());
msg.setKey2Modifier(
AUTServerConfiguration.getInstance().getKey2Mod());
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 b09cbda2c..d3d60f624 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
@@ -87,10 +87,12 @@ public class KeyAcceptor {
if (eventCode >= 97 && eventCode <= 122) {
eventCode = eventCode - 32;
}
- if ((eventCode == AUTServerConfiguration.getInstance().getKey()
+ if ((eventCode == AUTServerConfiguration.getInstance().getMappingKey()
|| eventCode
- == AUTServerConfiguration.getInstance().getMouseButton())
- && keyMod == AUTServerConfiguration.getInstance().getKeyMod()) {
+ == AUTServerConfiguration.getInstance()
+ .getMappingMouseButton())
+ && keyMod == AUTServerConfiguration.getInstance()
+ .getMappingKeyMod()) {
return MAPPING_KEY_COMB;
}

Back to the top