Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2015-01-06 09:47:41 +0000
committerMarkus Tiede2015-01-06 09:47:41 +0000
commit47ef540d86aa32e960c1960e364873bf379dcbc2 (patch)
tree37573b70fca05f32036e5543d2f9290b2b84b867 /org.eclipse.jubula.rc.swt
parentcfc4f499b3825e8e05f3c8254ee9103e00865b25 (diff)
downloadorg.eclipse.jubula.core-47ef540d86aa32e960c1960e364873bf379dcbc2.tar.gz
org.eclipse.jubula.core-47ef540d86aa32e960c1960e364873bf379dcbc2.tar.xz
org.eclipse.jubula.core-47ef540d86aa32e960c1960e364873bf379dcbc2.zip
Sprint task - fix for issue http://eclip.se/436663
Diffstat (limited to 'org.eclipse.jubula.rc.swt')
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/DefaultSwtEventMatcher.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/DefaultSwtEventMatcher.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/DefaultSwtEventMatcher.java
index 6f323df12..3d9ad103f 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/DefaultSwtEventMatcher.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/DefaultSwtEventMatcher.java
@@ -13,8 +13,13 @@ package org.eclipse.jubula.rc.swt.driver;
import java.util.List;
import org.eclipse.jubula.rc.common.driver.IEventMatcher;
+import org.eclipse.jubula.rc.common.driver.IRunnable;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Widget;
/**
@@ -59,6 +64,26 @@ public class DefaultSwtEventMatcher implements IEventMatcher {
* {@inheritDoc}
*/
public boolean isFallBackEventMatching(List eventObjects, Object comp) {
+ if (comp instanceof CCombo) {
+ // special handling for http://eclip.se/436663#c3
+ CCombo combo = (CCombo) comp;
+ for (Object o : eventObjects) {
+ Event e = (Event) o;
+ Widget w = e.widget;
+ if (w instanceof Control) {
+ final Control c = (Control) w;
+ Composite parent = (Composite)
+ new EventThreadQueuerSwtImpl().invokeAndWait("getParent", new IRunnable() { //$NON-NLS-1$
+ public Object run() {
+ return c.getParent();
+ }
+ });
+ if (parent == combo && isMatching(e)) {
+ return true;
+ }
+ }
+ }
+ }
return false;
}
} \ No newline at end of file

Back to the top