Community
Participate
Working Groups
We should try to do this for 2.2.
*** Bug 23960 has been marked as a duplicate of this bug. ***
I do not understand why you created a new bug for this, and closed the older one as a duplicate. The older one had a number of people -- including myself -- on the CC list for this bug. Later bugs are normally closed as the duplicate, and not the earlier ones.
I made a mistake.
*** Bug 35071 has been marked as a duplicate of this bug. ***
NOTE: Drag & Drop is unrelated to the ability to drag views around in Eclipse. This has been implemented for 2.1.1 and 3.0. Drag & Drop refers to classes in the package org.eclipse.swt.dnd and deals with dragging and dropping data between SWT and native apps, being a drop target or drag source none of which Eclipse is doing when you drag around a view in the IDE.
Dragging Views around in eclipse is addressed by bug 28525 which has been fixed in 2.1.1 and 3.0.
I would like to mention that it would already be very helpful if the DropTarget just generated the events (as the DragSource does).
Veronika, didn't you implement this? If so, please close this PR.
The DropTarget already generates events. They are not the same events as the DragSource - they are the events relevant to a dorp target. See: http://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html Most of DND has been implemented on the Mac (and ported back to 2.1.1). The things that are still missing are: - enable DND between applications, currently disabled until interaction with Finder can be made safe - enable drag under effects for Table and Tree
It has been 6 months since the last update of this request. Are we still waiting on "interaction with Finder can be made safe"? I would really like to have the ability to drop to finder if at all possible.
Eric, feel free to pitch in, browse the code and submit a patch.
Ok...I enabled drag capabilities in the swt library and everything seems to work great. What interaction with the finder needs to be made safe?
Andre, Veronika is gone right now. Do you know of the interaction that he's talking about?
I mean "she's" of course ...
A note on drag behavior to the finder... on Panther 10.3.3 it seems that the Operating System needs to have TextTransfer supported for ANY drag to the finder. You just have to support the type and return a valid string when requested. (If you are transferring files it still needs this) on 10.2.8 this is not required and actually always chooses text transfer if you support it. This is a problem since you might be wanting to actually transfer another type, like a file. I special cased 10.3 and above to include the text transfer and every other OS and Mac version just include the Transfer type I want to transfer (files in my case). Not sure this will work in all cases but at least it provides some functionality for my users. So, I hope this helps someone. Not sure if this is an Operating System bug or not but what a pain!
Andre?
I haven't looked into Drag&Drop to Finder under Panther yet. So, I do not have any more information about this. But I'll do a quick check...
Eric, do you have any code (or patch) that I can try?
Created attachment 8993 [details] Test case for Drag to Finder This simple text case shows the variance in behavior between OS X 10.3.3 and 10.2.8. You need to modify the sample code to point to some local file for dragging. You will also need to enable the drag feature in the SWT library. Source File: org.eclipse.swt.dnd.DragSource.java Method signature: private void drag(Event);
Eric, thanks for the snippet. I enabled external drags in SWT and used it both with your snippet and with Eclipse. Here is my conclusion: - dragging items from Eclipse to other applications (with the exception of the Finder) seems to work well on Panther (our only supported Platform for 3.0). - as already found by Eric, dragging items to the Finder works only if the DragSource contains a TextTransfer (in addition to a FileTransfer). - I don't know what problems comment #9 is referring to ("disabled until interaction with Finder can be made safe"), however I couldn't find any problems. From these findings I suggest to start enabling the drag feature in the SWT library. The added functionality is useful and I see no risk involved even if interaction with the Finder does not work. But I'm not so sure in how to deal with the additional TextTransfer required for FileTransfer drags to the Finder. I don't think that application should know about this MacOS implementation detail. A consequence would be that a FileTransfer includes TextTransfer too. But I don't know whether this is possible or desirable.
Let's enable it then. Veronika can check our work when she gets back.
What's the state of DND support in Mac for SWT >= 3.0.52? Is it already possible to drag and drop items inside a SWT application from Tree to Tree and CTabItem to Tree? Regards, ben
Closing this bug as fixed in 3.0. There are two outstanding issues which are tracked in bug 68212 and bug 68213.