1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-14 12:35:22 +02:00

[197860] drag and drop consistency - no text transfer

This commit is contained in:
David McKnight 2007-10-10 19:59:04 +00:00
parent a1e82a5b1a
commit ecd71f5899

View file

@ -19,6 +19,7 @@
* Kevin Doyle (IBM) - [189423] Scratchpad not completely updated after Delete. * Kevin Doyle (IBM) - [189423] Scratchpad not completely updated after Delete.
* Kevin Doyle (IBM) - [193151] Scratchpad not updated on Move * Kevin Doyle (IBM) - [193151] Scratchpad not updated on Move
* Kevin Doyle (IBM) - [189421] Scratchpad not updated after Rename * Kevin Doyle (IBM) - [189421] Scratchpad not updated after Rename
* David McKnight (IBM) - [197860] drag and drop consistency - no text transfer
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view.scratchpad; package org.eclipse.rse.internal.ui.view.scratchpad;
@ -102,7 +103,6 @@ import org.eclipse.rse.ui.view.SystemAdapterHelpers;
import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer; import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseEvent;
@ -283,16 +283,29 @@ public class SystemScratchpadView
/**
* Initialize drag and drop support for this view.
*
*/
protected void initDragAndDrop() protected void initDragAndDrop()
{ {
int ops = DND.DROP_COPY | DND.DROP_MOVE; int ops = DND.DROP_COPY | DND.DROP_MOVE;
Transfer[] transfers = new Transfer[] { PluginTransfer.getInstance(), TextTransfer.getInstance(), EditorInputTransfer.getInstance(), FileTransfer.getInstance()}; Transfer[] dragtransfers = new Transfer[]
{ PluginTransfer.getInstance(),
EditorInputTransfer.getInstance()
};
addDragSupport(ops, transfers, new SystemViewDataDragAdapter(this)); Transfer[] droptransfers = new Transfer[]
addDropSupport(ops | DND.DROP_DEFAULT, transfers, new SystemViewDataDropAdapter(this)); { PluginTransfer.getInstance(),
FileTransfer.getInstance(),
EditorInputTransfer.getInstance()
};
addDragSupport(ops | DND.DROP_DEFAULT, dragtransfers, new SystemViewDataDragAdapter(this));
addDropSupport(ops | DND.DROP_DEFAULT, droptransfers, new SystemViewDataDropAdapter(this));
} }
/** /**
* Used to asynchronously update the view whenever properties change. * Used to asynchronously update the view whenever properties change.
*/ */