Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365578 - ClassCastException on Dragging MPartSashContainerElement's
Summary: ClassCastException on Dragging MPartSashContainerElement's
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 07:21 EST by Thomas Kölling CLA
Modified: 2019-11-14 03:09 EST (History)
2 users (show)

See Also:


Attachments
Stacktrace (2.54 KB, text/plain)
2011-12-05 07:22 EST, Thomas Kölling CLA
no flags Details
The Application XMI related to this Problem (7.12 KB, application/octet-stream)
2011-12-09 03:35 EST, Thomas Kölling CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Kölling CLA 2011-12-05 07:21:06 EST
Build Identifier: I20111201-2015

on evaluating eclipse rcp for our project, i've found a bug which occurs in a specific constellation of the parts inside a partsashcontainer. i've activated the swt.extensions for Drag & Drop Support for the tabs. Tab dragging and dropping works fine until they are all in one sashcontainer. after dragging one tab back to an own container, e4 drops an exception.

Reproducible: Always

Steps to Reproduce:
1.create a Perspective
2.inside this Perspective create a Horizontal PartSashContainer
3.inside this Horizontal PartSashContainer create two vertical PartSashContainer
4.in each of these two vertical PartSashContainer create 2 Parts.
5.run rcp application and drag all Parts in one PartSashContainer, so they all are "neigbours" in form of a tab.
6.drag one tab oudside this PartSashContainer in another one (which is created on the fly i think so)
7.class cast exception
Comment 1 Thomas Kölling CLA 2011-12-05 07:22:41 EST
Created attachment 207913 [details]
Stacktrace

!ENTRY org.eclipse.e4.ui.workbench 4 0 2011-12-05 13:11:27.987
!MESSAGE Internal Error
!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.DnDManager.finishDrag(DnDManager.java:220)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.startDrag(DnDManager.java:198)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager$1$1.dragDetected(DnDManager.java:109)
	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:977)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:893)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:91)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:149)
	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:352)
	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:624)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
Comment 2 Thomas Kölling CLA 2011-12-05 10:21:48 EST
(In reply to comment #0)
> Build Identifier: I20111201-2015
> 
> on evaluating eclipse rcp for our project, i've found a bug which occurs in a
> specific constellation of the parts inside a partsashcontainer. i've activated
> the swt.extensions for Drag & Drop Support for the tabs. Tab dragging and
> dropping works fine until they are all in one sashcontainer. after dragging one
> tab back to an own container, e4 drops an exception.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1.create a Perspective
> 2.inside this Perspective create a Horizontal PartSashContainer
> 3.inside this Horizontal PartSashContainer create two vertical
> PartSashContainer
> 4.in each of these two vertical PartSashContainer create 2 Parts.
> 5.run rcp application and drag all Parts in one PartSashContainer, so they all
> are "neigbours" in form of a tab.
> 6.drag one tab oudside this PartSashContainer in another one (which is created
> on the fly i think so)
> 7.class cast exception

excuse me, at Point 4, i mean: 

4.in each of these two vertical PartSashContainer create 2 PartStacks and in this PartStacks add one Part.
Comment 3 Thomas Kölling CLA 2011-12-09 03:35:05 EST
Created attachment 208140 [details]
The Application XMI related to this Problem

Here you can see the model structure. if you start an app with that, you can test this case pretty easy. drag all tabs in one partsashcontainer, after that drag one of them back to the old position...
Comment 4 Lars Vogel CLA 2019-11-14 03:09:38 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.