Community
Participate
Working Groups
I am not sure whether this is the right behavior or not. This is found when using this Project Explorer with an Editor that expects an FileTransfer (like SSE or Page Designer). A FileTransfer gets created on drag, but becuase the selection in the Project Explorer is not adapted to IResource, the constructed FileTransfer contains null . So, when Dnd an non IResource or IFile adapted item (such as Java Resources: src node) - onto the editor: 1. The Editor expects an FileTransfer. 2. When CommonDragAdapter - in dragSetData(event) code : - ResourceDragAdapterAssistant is used to match the FileTransfer - on setDragData method : IResource[] resources = getSelectedResources(aSelection); will return empty. 3. When Editor tries to retrieve the data from the FileTransfer : - SSE gets an ClassCasteException (because its expecting String[], but got an Object instead. - Page Designer gets and SWTException (from FileTransfer.nativeToJava() which calls FileTransfer.javaToNative (see that null will toss the invalid data exception) It seems that FileTransfer should not be created by the Project Explorer when Drag source is not an IResource adapted node.
Created attachment 56766 [details] Proposed fix This fix sets the DragSourceEvent.doit flag to false in case none of the drag assistants could set the drag data.
The patch looks simple enough and has been attached since Jan.2007. Could this be addressed for Eclipse 3.4?
I think this is reasonable for 3.4.
Michael, did this get fixed? Please close or mark the target milestone appropriately.
This is marked target milestone 3.4 but 3.4 is basically over and this doesn't look like a last minute fix candidate. Moving to 3.5 but Michael please pick what you think is right.
Boris, this one's ready to go, both Michael and I have looked at this patch and it's fine. I want it to go into 3.4.1. What's the procedure for checking stuff into 3.4.1? I assume I will also need to put it into HEAD as well (for 3.5). Anf I further assume there is no automated way to do both.
Released to HEAD (35M2) and to R3_4_maintenance for 3.4.1
Verified patch is applied in source to M20080827-2000, need to actually verify the steps using WST which will have to be done when there is a WST build available.
*** Bug 247444 has been marked as a duplicate of this bug. ***
Removing the iplog flag from the bug which seems to have been added in error. Adding the iplog flag on the bug itself flags every comment in the bug as a contribution. The attachment containing the fix has been marked with iplog+ flag which is correct.
(In reply to comment #10) > Removing the iplog flag from the bug which seems to have been added in error. > Adding the iplog flag on the bug itself flags every comment in the bug as a > contribution. The attachment containing the fix has been marked with iplog+ > flag which is correct. > Is there anything you are no involved in? :) Thanks!
> Is there anything you are no involved in? :) Thanks! Just doing some light reading of the Eclipse IP log - isn't that how all committers like to spend their evenings? <g>