Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354567

Summary: [modeling] CCE when selecting new class in diagram
Product: z_Archived Reporter: Benjamin Muskalla <b.muskalla>
Component: MylynAssignee: Miles Parker <milesparker>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: milesparker
Version: unspecified   
Target Milestone: 0.9   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 354787    

Description Benjamin Muskalla CLA 2011-08-11 19:51:28 EDT
* existing ecore file
* create ecore diagram out of it
* create a new class in the diagram
* select it


!ENTRY org.eclipse.ui.workbench 4 0 2011-08-12 01:50:15.604
!MESSAGE org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl$1 cannot be cast to org.eclipse.emf.ecore.EObject
!STACK 0
java.lang.ClassCastException: org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl$1 cannot be cast to org.eclipse.emf.ecore.EObject
	at org.eclipse.mylyn.modeling.context.EMFStructureBridge.getParentHandle(EMFStructureBridge.java:85)
	at org.eclipse.mylyn.context.core.AbstractContextStructureBridge.getParentHandle(AbstractContextStructureBridge.java:51)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.propegateInterestToParents(InteractionContextManager.java:1300)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.internalProcessInteractionEvent(InteractionContextManager.java:727)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.internalProcessInteractionEvent(InteractionContextManager.java:697)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.processInteractionEvent(InteractionContextManager.java:1174)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.processInteractionEvent(InteractionContextManager.java:1167)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.processInteractionEvent(InteractionContextManager.java:1163)
	at org.eclipse.mylyn.monitor.ui.AbstractUserInteractionMonitor.handleElementSelection(AbstractUserInteractionMonitor.java:157)
	at org.eclipse.mylyn.monitor.ui.AbstractUserInteractionMonitor.handleElementSelection(AbstractUserInteractionMonitor.java:84)
	at org.eclipse.mylyn.modeling.ui.DiagramUIEditingMonitor.handleWorkbenchPartSelection(DiagramUIEditingMonitor.java:44)
	at org.eclipse.mylyn.monitor.ui.AbstractUserInteractionMonitor.selectionChanged(AbstractUserInteractionMonitor.java:72)
	at org.eclipse.ui.internal.AbstractSelectionService.firePostSelection(AbstractSelectionService.java:179)
	at org.eclipse.ui.internal.AbstractSelectionService$2.selectionChanged(AbstractSelectionService.java:71)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer.flushSelectionEvents(DiagramGraphicalViewer.java:256)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer$1.run(DiagramGraphicalViewer.java:234)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Comment 1 Benjamin Muskalla CLA 2011-08-11 20:02:24 EDT
This happens for almost all elements (eg. new package, new reference).
Another problem: creating new things in an ecore diagram doesn't add it to the context. If this is the cause, good. If not, please open another bug for that.
Comment 2 Miles Parker CLA 2011-08-15 23:31:41 EDT
Handled resource case, which should be null.