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

Bug 375194

Summary: Moving part cast exception
Product: [Eclipse Project] Platform Reporter: Missing name <aka9381>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt, nobody, pwebster
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Proposal which works for me
none
Patch proposal which works for me none

Description Missing name CLA 2012-03-23 11:32:02 EDT
Build Identifier: Juno M6 (Version: 4.2.0 Build id: I20120315-1300)

I got the following error when moving Part.


http://www.eclipse.org/forums/index.php/m/827428/#msg_827428

Related Bug :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=345343

--

!ENTRY org.eclipse.ui 4 0 2012-03-21 15:34:41.041
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ClassCastException: 
org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl cannot 
be cast to 
org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement
at 
org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.insert(ModelServiceImpl.java:564)
at 
org.eclipse.e4.ui.workbench.addons.dndaddon.SplitDropAgent.dock(SplitDropAgent.java:331)
at 
org.eclipse.e4.ui.workbench.addons.dndaddon.SplitDropAgent.drop(SplitDropAgent.java:161)
at 
org.eclipse.e4.ui.workbench.addons.dndaddon.DragAgent.dragFinished(DragAgent.java:159)
at 
org.eclipse.e4.ui.workbench.addons.dndaddon.PartDragAgent.dragFinished(PartDragAgent.java:105)
at 
org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.finishDrag(DnDManager.java:238)
at 
org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.startDrag(DnDManager.java:203)
at 
org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager$1.dragDetected(DnDManager.java:83)
at 
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:127)
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:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at 
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1015)
at 
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at 
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:909)
at 
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:85)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:580)
at 
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at 
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:535)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at se.highex.dmon.Application.start(Application.java:75)
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:353)
at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
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:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

Reproducible: Always

Steps to Reproduce:
1.
I created e4 Application Project. All settings are default.

2.
Added DnD Addon to Application.e4xmi and set the dependency to org.eclipse.e4.ui.workbench.addons.swt.

3.
Added two Parts (Part1, Part2) to Application.e4xmi.
PartSashContainer > PartStack > (Part1 & Part2)
Created corresponding classes for Parts.

4.
Run the Product.

Separate Parts (No Error).
Put back the Part(No Error).
Separate Parts(Got Error).
Comment 1 Nobody - feel free to take it CLA 2012-03-23 15:08:16 EDT
Created attachment 213122 [details]
Proposal which works for me
Comment 2 Nobody - feel free to take it CLA 2012-03-23 15:11:51 EDT
Created attachment 213123 [details]
Patch proposal which works for me

Have tested the patch with a lot of moving combinations and never got the exception.
Comment 3 Eric Moffatt CLA 2012-04-10 15:30:09 EDT
Sopot, I've added these changes as well but haven't committed them yet I'm working on Bug 349867 right now so I'll have to be testing these scenarios in any case...

Thanks again...I'll mark this as a DUP since your changes will be in the final commit on 349867.

*** This bug has been marked as a duplicate of bug 349867 ***
Comment 4 Nobody - feel free to take it CLA 2012-04-10 15:43:57 EDT
Thanks. If you need additional help on bug 349867 I'll be glad to help. When is m7 due?
(In reply to comment #3)
> Sopot, I've added these changes as well but haven't committed them yet I'm
> working on Bug 349867 right now so I'll have to be testing these scenarios in
> any case...
> 
> Thanks again...I'll mark this as a DUP since your changes will be in the final
> commit on 349867.
> 
> *** This bug has been marked as a duplicate of bug 349867 ***