diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java index da9d49b4d6d..97074a1ddb1 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java @@ -16,6 +16,7 @@ * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Kevin Doyle (IBM) - [198007] Moving multiple folders allows moving to themselves * Kevin Doyle (IBM) - [160769] Move Resource dialog allows user to continue on invalid destination + * Kevin Doyle (IBM) - [199324] [nls] Move dialog SystemMessages should be added/updated ********************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; @@ -45,6 +46,7 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction implements IValidatorRemoteSelection { private SystemMessage targetEqualsSrcMsg = null; + private SystemMessage targetEqualsParentSrcMsg = null; private SystemMessage targetDescendsFromSrcMsg = null; private SystemMessage invalidFilterMsg = null; protected Vector movedFiles = new Vector(); @@ -139,9 +141,9 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction if (selectedFolderPath.equals(selectedParentFile.getAbsolutePath())) { - if (targetEqualsSrcMsg == null) - targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_EQUALS_SOURCE); - return targetEqualsSrcMsg; + if (targetEqualsParentSrcMsg == null) + targetEqualsParentSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE); + return targetEqualsParentSrcMsg; } else if (selectedFolderPath.equals(selectedFile.getAbsolutePath())) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java index c036469f447..c603690a075 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java @@ -14,6 +14,7 @@ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands * API to the user actions plugin * Kevin Doyle (IBM) - [160769] Added FILEMSG_MOVE_FILTER_NOT_VALID + * Kevin Doyle (IBM) - [199324] Added FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SRC ********************************************************************************/ package org.eclipse.rse.ui; @@ -261,6 +262,7 @@ public interface ISystemMessages public static final String FILEMSG_COPY_FILE_FAILED = "RSEF1306"; //$NON-NLS-1$ public static final String FILEMSG_MOVE_FILE_FAILED = "RSEF1307"; //$NON-NLS-1$ public static final String FILEMSG_MOVE_TARGET_EQUALS_SOURCE = "RSEF1308"; //$NON-NLS-1$ + public static final String FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE = "RSEF1314"; //$NON-NLS-1$ public static final String FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE = "RSEF1312"; //$NON-NLS-1$ public static final String FILEMSG_MOVE_FILTER_NOT_VALID = "RSEF1313"; //$NON-NLS-1$ public static final String FILEMSG_DELETING = "RSEF1315"; //$NON-NLS-1$ diff --git a/rse/plugins/org.eclipse.rse.ui/systemmessages.xml b/rse/plugins/org.eclipse.rse.ui/systemmessages.xml index 3826aa761c7..8978bd90e55 100644 --- a/rse/plugins/org.eclipse.rse.ui/systemmessages.xml +++ b/rse/plugins/org.eclipse.rse.ui/systemmessages.xml @@ -974,7 +974,7 @@ Kevin Doyle (IBM) - [160769] Added message for invalid filter when moving files Target folder cannot equal source folder - Attempting to move a file or folder to the same folder as it exists in is equivalent to a rename operation. Use the rename action for this + It is impossible to move a folder to itself. Folder already exists @@ -995,6 +995,10 @@ Kevin Doyle (IBM) - [160769] Added message for invalid filter when moving files Selected filter is not a valid destination. Some filters, such as the Root or Drives filter, do not designate locations on the remote file system and cannot have files moved into them. + + + Target folder cannot equal parent of source file/folder. + A file or folder cannot be moved into the directory in which it exists. If you wish to rename the file, use the rename action. Deleting %1...