Community
Participate
Working Groups
1. Click and drag the 'Problems' view. 2. Drop it on its own tab. 3. An IAE is thrown. java.lang.IllegalArgumentException: Index out of bounds at org.eclipse.swt.SWT.error(SWT.java:4258) at org.eclipse.swt.SWT.error(SWT.java:4192) at org.eclipse.swt.SWT.error(SWT.java:4163) at org.eclipse.e4.ui.widgets.CTabFolder.getItem(CTabFolder.java:821) at org.eclipse.e4.ui.workbench.addons.dndaddon.StackDropAgent.dock(StackDropAgent.java:227) at org.eclipse.e4.ui.workbench.addons.dndaddon.StackDropAgent.drop(StackDropAgent.java:292) at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.finishDrag(DnDManager.java:257) at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager.startDrag(DnDManager.java:233) at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDManager$3.handleEvent(DnDManager.java:110) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4163) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
Created attachment 197166 [details] Prevent the 'dropIndex' from ever going below zero This is a 'point fix', I'll revisit the logic post-4.1.
Remy, not the best solution but it works, take a look please.
Created attachment 197172 [details] StackDropAgent patch v2 The conditional change looks good to me but it doesn't seem like the getDropIndex(DnDInfo) change is necessary so I think we should leave that method as-is.
(In reply to comment #3) > Created attachment 197172 [details] > StackDropAgent patch v2 Eric, please look at this and commit if you're fine with it.
Remy's patch is better...I'm going to commit this just to avoid the IAE but won't mark this defect as fixed yet because there's still odd behavior when dropping an item onto itself (if it's to the left side of the item then the tab item moves left when it should not...). Committed in >20110601. Applied Remy's version...
Removing outdated target milestone.
This issue has been fixed for some time, including the bad drop behavior...