mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 01:05:38 +02:00
support for filter references as target of move/copy actions. Defect 142309
This commit is contained in:
parent
7f99932481
commit
d8c46828d7
1 changed files with 17 additions and 0 deletions
|
@ -25,8 +25,11 @@ import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
import org.eclipse.rse.core.SystemBasePlugin;
|
import org.eclipse.rse.core.SystemBasePlugin;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
|
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
||||||
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
|
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
|
||||||
import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager;
|
import org.eclipse.rse.files.ui.resources.SystemRemoteEditManager;
|
||||||
|
import org.eclipse.rse.filters.ISystemFilterReference;
|
||||||
|
import org.eclipse.rse.filters.SystemFilterReference;
|
||||||
import org.eclipse.rse.model.IHost;
|
import org.eclipse.rse.model.IHost;
|
||||||
import org.eclipse.rse.model.ISystemRemoteChangeEvents;
|
import org.eclipse.rse.model.ISystemRemoteChangeEvents;
|
||||||
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
||||||
|
@ -133,6 +136,9 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
|
||||||
String newName = oldName;
|
String newName = oldName;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
targetFolder = (IRemoteFile)targetContainer;
|
targetFolder = (IRemoteFile)targetContainer;
|
||||||
ss = targetFolder.getParentRemoteFileSubSystem();
|
ss = targetFolder.getParentRemoteFileSubSystem();
|
||||||
targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName);
|
targetFileOrFolder = ss.getRemoteFileObject(targetFolder, oldName);
|
||||||
|
@ -368,7 +374,18 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
|
||||||
SystemRemoteFolderDialog cpyDlg = (SystemRemoteFolderDialog)dlg;
|
SystemRemoteFolderDialog cpyDlg = (SystemRemoteFolderDialog)dlg;
|
||||||
Object targetContainer = null;
|
Object targetContainer = null;
|
||||||
if (!cpyDlg.wasCancelled())
|
if (!cpyDlg.wasCancelled())
|
||||||
|
{
|
||||||
targetContainer = cpyDlg.getSelectedObject();
|
targetContainer = cpyDlg.getSelectedObject();
|
||||||
|
if (targetContainer instanceof ISystemFilterReference)
|
||||||
|
{
|
||||||
|
ISubSystem targetSubSystem = ((ISystemFilterReference)targetContainer).getSubSystem();
|
||||||
|
ISubSystemConfiguration factory = targetSubSystem.getSubSystemConfiguration();
|
||||||
|
if (factory.supportsDropInFilters())
|
||||||
|
{
|
||||||
|
targetContainer = targetSubSystem.getTargetForFilter((ISystemFilterReference)targetContainer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return targetContainer;
|
return targetContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue