Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312317 - DND is unusable
Summary: DND is unusable
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-10 14:18 EDT by Remy Suen CLA
Modified: 2010-05-10 15:52 EDT (History)
0 users

See Also:


Attachments
Patch to allow parts to be removed from stacks (3.53 KB, patch)
2010-05-10 15:42 EDT, Eric Moffatt CLA
no flags Details | Diff
Patch to 'unrender' an emty part before removing it (1.38 KB, application/octet-stream)
2010-05-10 15:50 EDT, Eric Moffatt CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2010-05-10 14:18:57 EDT
Moving views in the same stack causes the following NPE. Dragging the 'Problems' view "below" the 'Package Explorer' to move the view into a new stack spawns another 'Problems' view (now you have two) with the same NPE.

java.lang.NullPointerException
	at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.findItemForPart(StackRenderer.java:331)
	at org.eclipse.e4.workbench.ui.renderers.swt.StackRenderer.hideChild(StackRenderer.java:353)
	at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$2.handleEvent(PartRenderingEngine.java:158)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:41)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:188)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:198)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:139)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:76)
	at org.eclipse.e4.workbench.ui.internal.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
	at org.eclipse.emf.common.notify.impl.NotificationImpl.dispatch(NotificationImpl.java:1033)
	at org.eclipse.emf.common.notify.impl.NotificationImpl.dispatch(NotificationImpl.java:1038)
	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.remove(NotifyingListImpl.java:724)
	at org.eclipse.emf.common.util.AbstractEList.remove(AbstractEList.java:466)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.StackDropAgent.drop(StackDropAgent.java:56)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.startDrag(DnDManager.java:191)
	at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager$3.handleEvent(DnDManager.java:112)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1253)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1051)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine$4.run(PartRenderingEngine.java:525)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.workbench.swt.internal.PartRenderingEngine.run(PartRenderingEngine.java:464)
	at org.eclipse.e4.workbench.ui.internal.E4Workbench.createAndRunUI(E4Workbench.java:99)
Comment 1 Eric Moffatt CLA 2010-05-10 15:42:20 EDT
Created attachment 167797 [details]
Patch to allow parts to be removed from stacks


We now pass in the stack for which to find an item (since a part that's been moved has no parent).
Comment 2 Eric Moffatt CLA 2010-05-10 15:44:13 EDT
Committed in >20100510. Applied the patch.

There are still issues when the last element of a stack is removed. I'm getting IAE's from the SashForm when trying to reset its weights (and it leaves the stack there but in a bad state).
Comment 3 Eric Moffatt CLA 2010-05-10 15:50:44 EDT
Created attachment 167801 [details]
Patch to 'unrender' an emty part before removing it


Now empty view (non 'EditorStack') stacks to go away when empty.
Comment 4 Eric Moffatt CLA 2010-05-10 15:52:28 EDT
Committed in >20100510. Applied the patch.

Remy, I'm going to mark this particular one as fixed.