org.eclipse.ui.actions
Class MoveFilesAndFoldersOperation
java.lang.Object
org.eclipse.ui.actions.CopyFilesAndFoldersOperation
org.eclipse.ui.actions.MoveFilesAndFoldersOperation
-
public class MoveFilesAndFoldersOperation
- extends
CopyFilesAndFoldersOperation
Moves files and folders.
This class may be instantiated; it is not intended to be subclassed.
-
Since:
- 2.1
-
Restriction:
- This class is not intended to be subclassed by clients.
Methods inherited from class org.eclipse.ui.actions.
CopyFilesAndFoldersOperation
|
copyFiles,
copyFiles,
copyFilesInCurrentThread,
copyFilesInCurrentThread,
copyResources,
copyResourcesInCurrentThread,
getFile,
getFiles,
getFolder,
getModelProviderIds,
homogenousResources,
setModelProviderIds,
validateImportDestination
|
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
MoveFilesAndFoldersOperation
public MoveFilesAndFoldersOperation(
Shell shell)
- Creates a new operation initialized with a shell.
-
Parameters:
-
shell
- parent shell for error dialogs
canPerformAutoRename
protected boolean canPerformAutoRename()
- Returns whether this operation is able to perform on-the-fly
auto-renaming of resources with name collisions.
-
-
Overrides:
-
canPerformAutoRename
in class
CopyFilesAndFoldersOperation
-
-
Returns:
-
true
if auto-rename is supported, and
false
otherwise
copy
protected void copy(
IResource[] resources,
IPath destination,
IProgressMonitor subMonitor)
throws
CoreException
-
Deprecated. As of 3.3, the work is performed in the undoable operation
created in
getUndoableCopyOrMoveOperation(IResource[], IPath)
- Moves the resources to the given destination. This method is called
recursively to merge folders during folder move.
-
-
Overrides:
-
copy
in class
CopyFilesAndFoldersOperation
-
-
Parameters:
-
resources
- the resources to move -
destination
- destination to which resources will be moved -
subMonitor
- a progress monitor for showing progress and for cancelation
-
Throws:
-
CoreException
getDeepCheckQuestion
protected
String getDeepCheckQuestion(
IResource source)
- Returns the message for querying deep copy/move of a linked resource.
-
-
Overrides:
-
getDeepCheckQuestion
in class
CopyFilesAndFoldersOperation
-
-
Parameters:
-
source
- resource the query is made for
-
Returns:
- the deep query message
getOperationTitle
protected
String getOperationTitle()
- Returns the task title for this operation's progress dialog.
-
-
Overrides:
-
getOperationTitle
in class
CopyFilesAndFoldersOperation
-
-
Returns:
- the task title
getProblemsMessage
protected
String getProblemsMessage()
- Returns the message for this operation's problems dialog.
-
-
Overrides:
-
getProblemsMessage
in class
CopyFilesAndFoldersOperation
-
-
Returns:
- the problems message
getProblemsTitle
protected
String getProblemsTitle()
- Returns the title for this operation's problems dialog.
-
-
Overrides:
-
getProblemsTitle
in class
CopyFilesAndFoldersOperation
-
-
Returns:
- the problems dialog title
getValidateConflictSource
protected boolean getValidateConflictSource()
- Returns whether the source file in a destination collision will be
validateEdited together with the collision itself. Returns true.
-
-
Overrides:
-
getValidateConflictSource
in class
CopyFilesAndFoldersOperation
-
-
Returns:
- boolean
true
, the source file in a destination
collision should be validateEdited.
validateDestination
public
String validateDestination(
IContainer destination,
IResource[] sourceResources)
-
Description copied from class:
CopyFilesAndFoldersOperation
- Checks whether the destination is valid for copying the source resources.
Note this method is for internal use only. It is not API.
-
-
Overrides:
-
validateDestination
in class
CopyFilesAndFoldersOperation
-
-
Parameters:
-
destination
- the destination container -
sourceResources
- the source resources
-
Returns:
- an error message, or
null
if the path is valid
isMove
protected boolean isMove()
-
Description copied from class:
CopyFilesAndFoldersOperation
- Return whether the operation is a move or a copy
-
-
Overrides:
-
isMove
in class
CopyFilesAndFoldersOperation
-
-
Returns:
- whether the operation is a move or a copy
getUndoableCopyOrMoveOperation
protected
AbstractWorkspaceOperation getUndoableCopyOrMoveOperation(
IResource[] resources,
IPath destinationPath)
- Returns an AbstractWorkspaceOperation suitable for performing the move or
copy operation that will move or copy the given resources to the given
destination path.
-
-
Overrides:
-
getUndoableCopyOrMoveOperation
in class
CopyFilesAndFoldersOperation
-
-
Parameters:
-
resources
- the resources to be moved or copied -
destinationPath
- the destination path to which the resources should be moved
-
Returns:
- the operation that should be used to perform the move or copy
-
Since:
- 3.3
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.