From ecd71f589977e7fc88f63384e9bbdaec41ced428 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Wed, 10 Oct 2007 19:59:04 +0000 Subject: [PATCH] [197860] drag and drop consistency - no text transfer --- .../view/scratchpad/SystemScratchpadView.java | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java index 8ed86363f43..39e5bf92f8e 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadView.java @@ -19,6 +19,7 @@ * Kevin Doyle (IBM) - [189423] Scratchpad not completely updated after Delete. * Kevin Doyle (IBM) - [193151] Scratchpad not updated on Move * 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; @@ -102,7 +103,6 @@ import org.eclipse.rse.ui.view.SystemAdapterHelpers; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.FileTransfer; -import org.eclipse.swt.dnd.TextTransfer; import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; @@ -283,15 +283,28 @@ public class SystemScratchpadView + /** + * Initialize drag and drop support for this view. + * + */ + protected void initDragAndDrop() + { + int ops = DND.DROP_COPY | DND.DROP_MOVE; + Transfer[] dragtransfers = new Transfer[] + { PluginTransfer.getInstance(), + EditorInputTransfer.getInstance() + }; + + Transfer[] droptransfers = new Transfer[] + { PluginTransfer.getInstance(), + FileTransfer.getInstance(), + EditorInputTransfer.getInstance() + }; + + addDragSupport(ops | DND.DROP_DEFAULT, dragtransfers, new SystemViewDataDragAdapter(this)); + addDropSupport(ops | DND.DROP_DEFAULT, droptransfers, new SystemViewDataDropAdapter(this)); + } - protected void initDragAndDrop() - { - int ops = DND.DROP_COPY | DND.DROP_MOVE; - Transfer[] transfers = new Transfer[] { PluginTransfer.getInstance(), TextTransfer.getInstance(), EditorInputTransfer.getInstance(), FileTransfer.getInstance()}; - - addDragSupport(ops, transfers, new SystemViewDataDragAdapter(this)); - addDropSupport(ops | DND.DROP_DEFAULT, transfers, new SystemViewDataDropAdapter(this)); - } /** * Used to asynchronously update the view whenever properties change.