Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331121 - [General] Class cast exception due to ViewServiceUtil.forceLoad()
Summary: [General] Class cast exception due to ViewServiceUtil.forceLoad()
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Vincent Lorenzo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-25 08:40 EST by Vincent Lorenzo CLA
Modified: 2010-11-25 08:42 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lorenzo CLA 2010-11-25 08:40:08 EST
When we switch between an Papyrus Editor and an Ecore Editor, we get the following Exception : 
java.lang.ClassCastException: org.eclipse.emf.ecore.presentation.EcoreEditor cannot be cast to org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor
at org.eclipse.papyrus.diagram.common.util.ViewServiceUtil.forceLoad(ViewServiceUtil.java:41)
at org.eclipse.papyrus.diagram.common.actions.AbstractShowHideAction.<init>(AbstractShowHideAction.java:99)
at org.eclipse.papyrus.diagram.common.actions.ShowHideContentsAction.<init>(ShowHideContentsAction.java:97)
at org.eclipse.papyrus.diagram.composite.custom.actions.ShowHideRelatedContentsAction.<init>(ShowHideRelatedContentsAction.java:39)
at org.eclipse.papyrus.diagram.composite.custom.actions.ShowHideRelatedContentsHandler.<init>(ShowHideRelatedContentsHandler.java:33)
at org.eclipse.papyrus.diagram.composite.custom.providers.ActionStateSourceProvider.testShowHideRelatedContents(ActionStateSourceProvider.java:78)
at org.eclipse.papyrus.diagram.composite.custom.providers.ActionStateSourceProvider.refreshShowHideRelatedContentsAction(ActionStateSourceProvider.java:63)
at org.eclipse.papyrus.diagram.composite.custom.providers.ActionStateSourceProvider.refreshActions(ActionStateSourceProvider.java:89)
at org.eclipse.papyrus.diagram.common.providers.AbstractActionStateSourceProvider$SelectionListener.selectionChanged(AbstractActionStateSourceProvider.java:265)
at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156)
at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged(AbstractSelectionService.java:62)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2167)
at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1190)
at org.eclipse.ui.navigator.CommonViewer.handleSelect(CommonViewer.java:478)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1220)
at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:228)
at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:222)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:389)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Vincent Lorenzo CLA 2010-11-25 08:42:32 EST
Done in R3339