Implements
IResource.delete(int,IProgressMonitor)
where the receiver is a project. Returns
true
to accept responsibility for implementing this operation as per the API contract.
In broad terms, a full re-implementation should delete the project content area in the local file system if required (the files of a closed project should be deleted only if the IResource.ALWAYS_DELETE_PROJECT_CONTENTS
update flag is specified; the files of an open project should be deleted unless the the IResource.NEVER_DELETE_PROJECT_CONTENTS
update flag is specified). It should then call tree.deletedProject
to complete the updating of the workspace resource tree to reflect this fact. If unsuccessful in deleting the project's files from the local file system, it should instead call tree.failed
to report the reason for the failure. In either case, it should return true
to indicate that the operation was attempted. The FORCE
update flag may need to be honored if the project is open: unless FORCE
is specified, the implementation must use tree.isSynchronized
to determine whether the project subtree is in sync before attempting to delete it. Note that local history is not maintained when a project is deleted, regardless of the setting of the KEEP_HISTORY
update flag.
A partial re-implementation should perform whatever pre-processing it needs to do and then call tree.standardDeleteProject
to explicitly invoke the standard project deletion behavior. It should 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.standardDeleteProject
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 project the handle of the project to delete; the receiver of
IResource.delete(int,IProgressMonitor)
@param updateFlags bit-wise or of update flag constants as per
IResource.delete(int,IProgressMonitor)
@param monitor the progress monitor, or
null
as per
IResource.delete(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#delete(int,IProgressMonitor)