Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2015-01-05 15:54:10 +0000
committerMarkus Tiede2015-01-05 15:54:20 +0000
commit0a28af8344247923a20f8ce698df28763a2925a7 (patch)
treeb1ba7a238495b38ba17b746fdebb017dbfeb0773 /org.eclipse.jubula.rc.swt
parent84bc9737f04485c2ac30d6c0e4a65814a8c436c0 (diff)
downloadorg.eclipse.jubula.core-0a28af8344247923a20f8ce698df28763a2925a7.tar.gz
org.eclipse.jubula.core-0a28af8344247923a20f8ce698df28763a2925a7.tar.xz
org.eclipse.jubula.core-0a28af8344247923a20f8ce698df28763a2925a7.zip
Non-sprint task - minor cleanup
Diffstat (limited to 'org.eclipse.jubula.rc.swt')
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/DefaultSwtEventMatcher.java2
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/KeySwtEventMatcher.java4
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/WindowSwtEventMatcher.java98
-rw-r--r--org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/adapter/ComboAdapter.java2
4 files changed, 4 insertions, 102 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 8130cf6a9..6f323df12 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
@@ -18,7 +18,7 @@ import org.eclipse.swt.widgets.Event;
/**
- * This matcher checks wether the SWT event has a given event ID.
+ * This matcher checks whether the SWT event has a given event ID.
*
* @author BREDEX GmbH
* @created 25.07.2006
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/KeySwtEventMatcher.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/KeySwtEventMatcher.java
index ea49b26c1..1f08e7c4d 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/KeySwtEventMatcher.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/KeySwtEventMatcher.java
@@ -44,8 +44,8 @@ public class KeySwtEventMatcher extends DefaultSwtEventMatcher {
Object graphicsComponent) {
try {
- // checks if the component is visible (= in hierarchy conatiner)
- // and if the key-released event occured
+ // checks if the component is visible (= in hierarchy container)
+ // and if the key-released event occurred
if (graphicsComponent instanceof Combo) {
// FIXME zeb Need some way of confirming keypresses on Combo Box with opened list
return true;
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/WindowSwtEventMatcher.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/WindowSwtEventMatcher.java
deleted file mode 100644
index 784bd31df..000000000
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/driver/WindowSwtEventMatcher.java
+++ /dev/null
@@ -1,98 +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.driver;
-
-import java.util.List;
-
-import org.eclipse.jubula.rc.common.driver.IEventMatcher;
-import org.eclipse.jubula.rc.common.driver.IEventThreadQueuer;
-import org.eclipse.jubula.rc.common.driver.IRunnable;
-import org.eclipse.jubula.rc.common.util.MatchUtil;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author BREDEX GmbH
- * @created 20.03.2007
- */
-public class WindowSwtEventMatcher implements IEventMatcher {
-
- /** the event matcher */
- private DefaultSwtEventMatcher m_eventMatcher;
- /** the title */
- private final String m_title;
- /** the matches operation */
- private final String m_operator;
- /** how to react on disposed widgets */
- private final boolean m_valForDisposed;
-
- /**
- * constructor
- * @param title the title
- * @param operator the matches operation
- * @param eventCode The SWT event code to match
- * @param valForDisposed Value that is to be returned if the component is
- * already disposed
- */
- public WindowSwtEventMatcher(String title, String operator, int eventCode,
- boolean valForDisposed) {
- m_title = title;
- m_operator = operator;
- m_eventMatcher = new DefaultSwtEventMatcher(eventCode);
- m_valForDisposed = valForDisposed;
- }
-
- /**
- * {@inheritDoc}
- */
- public int getEventId() {
- return m_eventMatcher.getEventId();
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isFallBackEventMatching(List eventObjects,
- Object graphicsComponent) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isMatching(Object eventObject) {
- if (m_eventMatcher.isMatching(eventObject)) {
- final Event event = (Event)eventObject;
-
- IEventThreadQueuer evThreadQueuer = new EventThreadQueuerSwtImpl();
- Boolean matched = (Boolean)evThreadQueuer.invokeAndWait(
- "matchWindow", //$NON-NLS-1$
- new IRunnable() {
- public Object run() {
- if (event.widget instanceof Shell) {
- Shell frame = (Shell)event.widget;
- if (frame.isDisposed()) {
- return Boolean.valueOf(m_valForDisposed);
- }
- return Boolean.valueOf(MatchUtil.getInstance()
- .match(frame.getText(), m_title, m_operator));
-
- }
- return Boolean.FALSE;
- }
- });
- return matched.booleanValue();
-
- }
- return false;
- }
-}
diff --git a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/adapter/ComboAdapter.java b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/adapter/ComboAdapter.java
index 9bc7fce54..982c0d67c 100644
--- a/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/adapter/ComboAdapter.java
+++ b/org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/tester/adapter/ComboAdapter.java
@@ -48,7 +48,7 @@ public class ComboAdapter extends AbstractComboBoxAdapter {
public void selectAll() {
click(new Integer(1));
- // fix for https://bxapps.bredex.de/bugzilla/show_bug.cgi?id=201
+ // fix for https://bugzilla.bredex.de/201
// The keystroke "command + a" sometimes causes an "a" to be entered
// into the text field instead of selecting all text (or having no
// effect).

Back to the top