Implements
IResource.move(IPath,int,IProgressMonitor)
where the receiver is a project. Returns
true
to accept responsibility for implementing this operation as per the API contract.
On entry to this hook method, the following is guaranteed about the workspace resource tree: the source folder exists; the destination folder does not exist; the container of the destination folder exists and is accessible. In broad terms, a full re-implementation should move the directory tree in the local file system and then call tree.movedFolder
to complete the updating of the workspace resource tree to reflect this fact. If unsuccessful in moving the directory or any of its descendents in the local file system, call tree.failed
to report each reason for failure. In either case, return true
to indicate that the operation was attempted. The FORCE
update flag needs to be honored: unless FORCE
is specified, the implementation must use tree.isSynchronized
to determine whether the folder subtree is in sync before attempting to move it. The KEEP_HISTORY
update flag needs to be honored as well; use tree.addToLocalHistory
to capture the contents of any files being moved.
A partial re-implementation should perform whatever pre-processing it needs to do and then call tree.standardMoveFolder
to explicitly invoke the standard folder move behavior, which move both the folder and its descendents in the local file system and updates the workspace resource tree. Return true
to indicate that the operation was attempted.
Returning false
is the easy way for the implementation to say "pass". It is equivalent to calling tree.standardDeleteFolder
and returning true
.
The implementation of this method runs "below" the resources API and is therefore very restricted in what resource API method it can call. The list of useable methods includes most resource operations that read but do not update the resource tree; resource operations that modify resources and trigger deltas must not be called from within the dynamic scope of the invocation of this method.
@param tree the workspace resource tree; this object is only valid for the duration of the invocation of this method, and must not be used after this method has completed
@param source the handle of the folder to move; the receiver of
IResource.move(IPath,int,IProgressMonitor)
@param destination the handle of where the folder will move to; the handle equivalent of the first parameter to
IResource.move(IPath,int,IProgressMonitor)
@param updateFlags bit-wise or of update flag constants as per
IResource.move(IPath,int,IProgressMonitor)
@param monitor the progress monitor, or
null
as per
IResource.move(IPath,int,IProgressMonitor)
@return
false
if this method declined to assume responsibility for this operation, and
true
if this method attempted to carry out the operation
@exception OperationCanceledException if the operation is canceled. Cancelation can occur even if no progress monitor is provided.
@see IResource#move(org.eclipse.core.runtime.IPath,int,IProgressMonitor)