Community
Participate
Working Groups
Log will be attached in next comment. Got the error by creating a new Ant target, and hitting the "Run" button on the Ant target dialog (Run->External Tools->External Tools... then Ant Build, New button, select Location and Target, hit "Run"). This would have normally brought up the Debug view. Using Linux GTK 2.1 with Sun's 1.4.1_02 SDK. Andrew.
Created attachment 4460 [details] Portion of log file from today. Here's the stack trace.
Please attach the output from (Help->About->Configuration Details). Please provide the build number in all bug reports (Help-About).
There is an attempt to initiate a second drag and drop operation, causing the reported log. A previously generated log is of interest. Thus the request for the configuration details that contains a copy of all logs in the .log file.
Version: 2.1.0 Build id: 200303272130 Full log and config details in next messages.
Created attachment 4467 [details] Configuration details
You can not create multiple drop targets for the same control. Doing so will result in the SWT error seen here. Andrew seems to have a basic Eclipse install without any additional plugins so that would imply that the JavaOutlinePage tries to create a second DropTarget for the same control. I was unable to reproduce the problem on my GTK machine. Andrew, does the problem happen every time for you with the steps you have indicated?
I haven't been able to reproduce this bug. When I got the bug, it was the first time I had created an Ant build for the workspace (I think). The workspace itself was fairly new, having been created for the released 2.1 build. I'm also fairly certain that it was the first time the debug view had come up. I also don't know why it's referencing drag and drop, since, as far as I remember, I wasn't doing any dragging of anything. Andrew.
Eclipse R2.1 (20030327) RH 8.0, GTK 2.0.6 I created a new workspace, imported the preferences as per the configuration details. I then populated the workspace via file->import->external plug-ins and fragments. I imported as source and chose the plug-in org.eclipse.ui. I then used the'Add Required Plug-ins' button to import 20 plug-ins. I changed to the Java Browsing perspective. Opened three files (SWT, EditorList and EditorWorkbook). I then created an ant build file from the plugin.xml of org.eclipse.ui.workbench. Finally I selected Run->External Tools->External Tools ...->Ant Build and then New. I set the Location to org.eclipse.ui.workbench and the Base Directory to org.eclipse.ui.workbench When I run in this configuration the debug perspective is openned and the workbench.jar file is created. In this scenario the debug perspective was openned for the first time. Subsequent runs with the debug perspective either the current perspective, closed or open but not current also were successfull. Transfering to JDT so they can investigate if JavaOutlinePage attempts to create a second DropTarget on a control.
The method initDragAndDrop is only called from 'public void createControl (Composite parent)' which is a framework method and is called from the platform. So if initDragAndDrop is called more than once this can only happen if createControl is called more than once. Asking Platfrom if there are scenarios that can cause this.
JavaOutlinePage.createControl creates a new Tree widget for the JavaOutlineViewer. That tree is used to add drop support to the viewer. So even if createControl was called more than once it would just create another tree widget to install drop support on. Do you agree, Dirk?
Dirk, please see my comment #10.
Yup, this is correct and means that the assumption that we try to init drap and drop more than once can never happen.
Veronika, I checked the code in JavaOutlinePage.createControl between "new Tree" and where the drop target is created on the tree widget. I don't see any place where a drop target would have already been created in between those two. Since this is not reproducable there's not much we can do.
Closing. Please reopen if drag and drop exception occurs again.