Project: JDT
Bug 29258 Drag and Drop SWT error when not performing drag and drop [dnd]
Reported: 2003-01-09 18:08:42 | Status: resolved fixed

Build 20030107 Linux-GTK I was debugging a target Eclipse. A breakpoint was encountered, but while trying to activate the editor, my host workbench froze up for a little while and then a dialog popped up saying that an SWT error had occurred. The dialog asked if I wanted to exit the workbench. Clicking the No button didn't work, but I could dismiss the dialog by clicking the close button ('X'). After some flakiness - the error happened twice and the editor stopped scrolling text correctly while I was at the breakpoint - I resumed my target Eclipse and the host seems to have recovered. The following exception was in the log. Note that I was not doing any drag and drop. In fact, I'm not sure the host Eclipse window even had focus when the problem started. !SESSION Jan 09, 2003 17:26:57.401 --------------------------------------------- java.fullversion=J2RE 1.3.1 IBM build cxia32131-20020410 (JIT enabled: jitc) BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Command-line arguments: -os linux -ws gtk -arch x86 -debug -dev bin -data /home/jburns/target -install file:/home/jburns/host/eclipse/ !ENTRY org.eclipse.ui 4 4 Jan 09, 2003 17:26:57.402 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Jan 09, 2003 17:26:57.409 !MESSAGE Can not initialize Drop !STACK 0 org.eclipse.swt.SWTError: Can not initialize Drop at org.eclipse.swt.dnd.DND.error(DND.java:216) at org.eclipse.swt.dnd.DND.error(DND.java:177) at org.eclipse.swt.dnd.DropTarget.<init>(DropTarget.java:126) at org.eclipse.jface.viewers.StructuredViewer.addDropSupport(StructuredViewer.java:148) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage.initDragAndDrop(JavaOutlinePage.java:1103) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage.createControl(JavaOutlinePage.java:943) at org.eclipse.ui.views.contentoutline.ContentOutline.doCreatePage(ContentOutline.java:104) at org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:268) at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:509) at org.eclipse.ui.views.contentoutline.ContentOutline.partBroughtToTop(ContentOutline.java:170) at org.eclipse.ui.internal.PartListenerList$2.run(PartListenerList.java:63) at org.eclipse.core.runtime.Platform.run(Platform.java(Compiled Code)) at org.eclipse.core.runtime.Platform.run(Platform.java(Compiled Code)) at org.eclipse.ui.internal.PartListenerList.firePartBroughtToTop(PartListenerList.java:61) at org.eclipse.ui.internal.WorkbenchPage.firePartBroughtToTop(WorkbenchPage.java:1099) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:1873) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:1733) at org.eclipse.debug.internal.ui.views.launch.LaunchView$3.run(LaunchView.java:684) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:65) at org.eclipse.debug.internal.ui.views.launch.LaunchView.openEditor(LaunchView.java:693) at org.eclipse.debug.internal.ui.views.launch.LaunchView.openEditor(LaunchView.java:655) at org.eclipse.debug.internal.ui.views.launch.LaunchView.openEditorForStackFrame(LaunchView.java:531) at org.eclipse.debug.internal.ui.views.launch.LaunchViewEventHandler.updateForSuspendEvent(LaunchViewEventHandler.java:265) at org.eclipse.debug.internal.ui.views.launch.LaunchViewEventHandler.updateForDebugEvents(LaunchViewEventHandler.java:239) at org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler$1.run(AbstractDebugEventHandler.java:67) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java(Compiled Code)) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java(Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1450) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPart.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java