aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory Amerson2013-10-16 13:00:23 (EDT)
committerKonstantin Komissarchik2013-10-16 13:00:23 (EDT)
commit4836235e485b43a0e146fe8aaf6c03f7d16ed61d (patch)
tree0efbf564adfb877e9256ef8d14d45e12dd79b5b0
parentf95fa1d29198415abf9eb549b4f97ba784b3dc00 (diff)
downloadorg.eclipse.sapphire-4836235e485b43a0e146fe8aaf6c03f7d16ed61d.zip
org.eclipse.sapphire-4836235e485b43a0e146fe8aaf6c03f7d16ed61d.tar.gz
org.eclipse.sapphire-4836235e485b43a0e146fe8aaf6c03f7d16ed61d.tar.bz2
Fix : ClassCastException in SapphireHotSpotsActionPresentation
An exception is thrown when an action handler factory is added to the Sapphire.EditorPage context. java.lang.ClassCastException: org.eclipse.sapphire.ui.forms.swt.MasterDetailsEditorPage$1 cannot be cast to org.eclipse.sapphire.ui.forms.swt.presentation.FormComponentPresentation at org.eclipse.sapphire.ui.forms.swt.presentation.internal.SapphireHotSpotsActionPresentation.displayActionHandlerChoice(SapphireHotSpotsActionPresentation.java:73) at org.eclipse.sapphire.ui.forms.swt.presentation.internal.SapphireToolBarActionPresentation$1.widgetSelected(SapphireToolBarActionPresentation.java:119) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) Bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=419551 Signed-off-by: Gregory Amerson <gregory.amerson@liferay.com>
-rw-r--r--plugins/org.eclipse.sapphire.ui/src/org/eclipse/sapphire/ui/forms/swt/presentation/internal/SapphireHotSpotsActionPresentation.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/org.eclipse.sapphire.ui/src/org/eclipse/sapphire/ui/forms/swt/presentation/internal/SapphireHotSpotsActionPresentation.java b/plugins/org.eclipse.sapphire.ui/src/org/eclipse/sapphire/ui/forms/swt/presentation/internal/SapphireHotSpotsActionPresentation.java
index b7fc494..5243bde 100644
--- a/plugins/org.eclipse.sapphire.ui/src/org/eclipse/sapphire/ui/forms/swt/presentation/internal/SapphireHotSpotsActionPresentation.java
+++ b/plugins/org.eclipse.sapphire.ui/src/org/eclipse/sapphire/ui/forms/swt/presentation/internal/SapphireHotSpotsActionPresentation.java
@@ -1,5 +1,5 @@
/******************************************************************************
- * Copyright (c) 2013 Oracle
+ * Copyright (c) 2013 Oracle and Liferay
* 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
@@ -7,6 +7,7 @@
*
* Contributors:
* Konstantin Komissarchik - initial implementation and ongoing maintenance
+ * Gregory Amerson - [419551] ClassCastException in SapphireHotSpotsActionPresentation
******************************************************************************/
package org.eclipse.sapphire.ui.forms.swt.presentation.internal;
@@ -16,9 +17,9 @@ import java.util.Map;
import org.eclipse.sapphire.ui.SapphireAction;
import org.eclipse.sapphire.ui.SapphireActionHandler;
-import org.eclipse.sapphire.ui.forms.swt.presentation.FormComponentPresentation;
import org.eclipse.sapphire.ui.forms.swt.presentation.SapphireActionPresentation;
import org.eclipse.sapphire.ui.forms.swt.presentation.SapphireActionPresentationManager;
+import org.eclipse.sapphire.ui.forms.swt.presentation.SwtPresentation;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
@@ -27,6 +28,7 @@ import org.eclipse.swt.widgets.Menu;
/**
* @author <a href="mailto:konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
+ * @author <a href="mailto:gregory.amerson@liferay.com">Gregory Amerson</a>
*/
public abstract class SapphireHotSpotsActionPresentation extends SapphireActionPresentation
@@ -70,8 +72,8 @@ public abstract class SapphireHotSpotsActionPresentation extends SapphireActionP
this.popupMenu = null;
}
- this.popupMenu = new Menu( ( (FormComponentPresentation) getManager().context() ).shell(), SWT.POP_UP );
+ this.popupMenu = new Menu( ( (SwtPresentation) getManager().context() ).shell(), SWT.POP_UP );
for( SapphireActionHandler handler : action.getActiveHandlers() )
{
renderMenuItem( this.popupMenu, handler );