mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-16 21:45:22 +02:00
[189268] backing out the download on copy/drag changes
This commit is contained in:
parent
f94acbec61
commit
525d45f5f9
3 changed files with 11 additions and 14 deletions
|
@ -5485,7 +5485,6 @@ public class SystemView extends SafeTreeViewer
|
||||||
int ops = DND.DROP_COPY | DND.DROP_MOVE;
|
int ops = DND.DROP_COPY | DND.DROP_MOVE;
|
||||||
Transfer[] dragtransfers = new Transfer[]
|
Transfer[] dragtransfers = new Transfer[]
|
||||||
{ PluginTransfer.getInstance(),
|
{ PluginTransfer.getInstance(),
|
||||||
FileTransfer.getInstance(),
|
|
||||||
EditorInputTransfer.getInstance()
|
EditorInputTransfer.getInstance()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class SystemCopyToClipboardAction extends SystemBaseAction implements IV
|
||||||
{
|
{
|
||||||
private IStructuredSelection _selection;
|
private IStructuredSelection _selection;
|
||||||
private Clipboard _clipboard;
|
private Clipboard _clipboard;
|
||||||
private boolean _doResourceTransfer = true; //experiment
|
private boolean _doResourceTransfer = false; // determines whether or not to download on copy
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
@ -93,19 +93,18 @@ public class SystemCopyToClipboardAction extends SystemBaseAction implements IV
|
||||||
|
|
||||||
if (remoteAdapter != null)
|
if (remoteAdapter != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (remoteAdapter.canEdit(dragObject))
|
if (remoteAdapter.canEdit(dragObject))
|
||||||
{
|
{
|
||||||
ISystemEditableRemoteObject editable = remoteAdapter.getEditableRemoteObject(dragObject);
|
ISystemEditableRemoteObject editable = remoteAdapter.getEditableRemoteObject(dragObject);
|
||||||
// corresponds to a file
|
// corresponds to a file
|
||||||
IFile file = editable.getLocalResource();
|
IFile file = editable.getLocalResource();
|
||||||
if (!file.exists())
|
if (!file.exists())
|
||||||
{
|
{
|
||||||
LazyDownloadJob job = new LazyDownloadJob(editable);
|
LazyDownloadJob job = new LazyDownloadJob(editable);
|
||||||
job.schedule();
|
job.schedule();
|
||||||
|
}
|
||||||
|
resource = file;
|
||||||
}
|
}
|
||||||
resource = file;
|
|
||||||
}
|
|
||||||
else if (viewAdapter != null)
|
else if (viewAdapter != null)
|
||||||
{
|
{
|
||||||
if (viewAdapter.hasChildren(dragObject))
|
if (viewAdapter.hasChildren(dragObject))
|
||||||
|
|
|
@ -824,7 +824,6 @@ public class SystemTableView
|
||||||
int ops = DND.DROP_COPY | DND.DROP_MOVE;
|
int ops = DND.DROP_COPY | DND.DROP_MOVE;
|
||||||
Transfer[] dragtransfers = new Transfer[]
|
Transfer[] dragtransfers = new Transfer[]
|
||||||
{ PluginTransfer.getInstance(),
|
{ PluginTransfer.getInstance(),
|
||||||
FileTransfer.getInstance(),
|
|
||||||
EditorInputTransfer.getInstance()
|
EditorInputTransfer.getInstance()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue