Project: JDT
Bug 159073 [dnd] AssertionFailedException: assertion failed: while doing the drag and drop opration.
Reported: 2006-09-28 02:30:52 | Status: verified fixed

Steps to reproduce the defect: 1. Start Eclipse and create a Java Project( or web project). 2. Create a simple file within the project. 3. Within the Project Explorer, make sure that the scroll bar is visible (adjust size of Project Explorer view to see the vertical scroll bar) 4. Drag the created file to the scroll bar and during this drag make sure to pass over any other element in the Project Explorer, say over a folder so that it gets highlighted as a drop target. See attachment. 5. When the mouse reaches the scroll bar, there is an assertion failed exception thrown. Stack trace is below: eclipse.buildId=I20060810-1230 java.version=1.4.2_01 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 Error Wed Sep 27 13:45:13 IST 2006 assertion failed: org.eclipse.core.runtime.AssertionFailedException: assertion failed: at org.eclipse.core.runtime.Assert.isTrue(Assert.java:109) at org.eclipse.core.runtime.Assert.isTrue(Assert.java:95) at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$FilesFoldersAndCusReorgPolicy.verifyDestination(ReorgPolicyFactory.java:1044) at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$MoveFilesFoldersAndCusPolicy.verifyDestination(ReorgPolicyFactory.java:1472) at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory$ReorgPolicy.setDestination(ReorgPolicyFactory.java:2720) at org.eclipse.jdt.internal.corext.refactoring.reorg.JavaMoveProcessor.setDestination(JavaMoveProcessor.java:293) at org.eclipse.jdt.internal.ui.navigator.JavaDropAdapterAssistant.handleValidateMove(JavaDropAdapterAssistant.java:225) at org.eclipse.jdt.internal.ui.navigator.JavaDropAdapterAssistant.validateDrop(JavaDropAdapterAssistant.java:131) at org.eclipse.ui.navigator.CommonDropAdapter.validateDrop(CommonDropAdapter.java:207) at org.eclipse.jface.viewers.ViewerDropAdapter.doDropValidation(ViewerDropAdapter.java:175) at org.eclipse.jface.viewers.ViewerDropAdapter.dragOver(ViewerDropAdapter.java:221) at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:59) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:709) at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:336) at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:236) at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:99) at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method) at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:306) at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:277) at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:164) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3377) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2997) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 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:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java