summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Kriese2010-10-19 02:39:50 (EDT)
committerSteffen Kriese2010-10-19 02:39:50 (EDT)
commit54e5b210521fee1d782c85b8c31e0bdbe221cd98 (patch)
treea61e65c0cddcf7528fb2be0d24f149f35c22bfb4
parentd8c18c1945d243ac89f2539f5e286194ba7ad2fd (diff)
downloadorg.eclipse.riena-54e5b210521fee1d782c85b8c31e0bdbe221cd98.zip
org.eclipse.riena-54e5b210521fee1d782c85b8c31e0bdbe221cd98.tar.gz
org.eclipse.riena-54e5b210521fee1d782c85b8c31e0bdbe221cd98.tar.bz2
Workaround for Rap bug 328043: CompletionCombo throws ClassCastException on RAP
-rw-r--r--org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/CompletionCombo.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/CompletionCombo.java b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/CompletionCombo.java
index 0c53621..e146e3f 100644
--- a/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/CompletionCombo.java
+++ b/org.eclipse.riena.ui.swt/src/org/eclipse/riena/ui/swt/CompletionCombo.java
@@ -40,6 +40,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Widget;
+import org.eclipse.riena.core.util.RAPDetector;
import org.eclipse.riena.ui.swt.facades.ClipboardFacade;
import org.eclipse.riena.ui.swt.facades.SWTFacade;
import org.eclipse.riena.ui.swt.utils.SwtUtilities;
@@ -520,7 +521,13 @@ public abstract class CompletionCombo extends Composite {
switch (event.type) {
case SWT.Dispose:
removeListener(SWT.Dispose, listener);
- notifyListeners(SWT.Dispose, event);
+
+ // FIXME: Workaround for RAP bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=328043
+ // RAP throws a ClassCastException, when notifyListeners is called
+ if (!RAPDetector.isRAPavailable()) {
+ notifyListeners(SWT.Dispose, event);
+ }
+
event.type = SWT.None;
if (popup != null && !popup.isDisposed()) {