| org.eclipse.ui.ide.undo.AbstractWorkspaceOperation org.eclipse.ui.ide.undo.AbstractResourcesOperation
All known Subclasses: org.eclipse.ui.ide.undo.AbstractCopyOrMoveResourcesOperation, org.eclipse.ui.ide.undo.DeleteResourcesOperation, org.eclipse.ui.ide.undo.AbstractCreateResourcesOperation,
AbstractResourcesOperation | abstract class AbstractResourcesOperation extends AbstractWorkspaceOperation (Code) | | An AbstractResourcesOperation represents an undoable operation that
manipulates resources. It provides implementations for resource rename,
delete, creation, and modification. It also assigns the workspace undo
context as the undo context for operations of this type. Clients may call the
public API from a background thread.
This class is not intended to be subclassed by clients.
since: 3.3 |
Method Summary | |
protected void | appendDescriptiveText(StringBuffer text) | IStatus | checkReadOnlyResources(IResource[] resourcesToCheck) Check the specified resources for read only state, and return a
status indicating whether the resources can be deleted. | protected ISchedulingRule | computeCreateSchedulingRule() Compute a scheduling rule for creating resources. | protected IStatus | computeCreateStatus(boolean allowOverwrite) Compute the status for creating resources from the descriptions. | protected ISchedulingRule | computeDeleteSchedulingRule() Compute a scheduling rule for deleting resources. | protected IStatus | computeDeleteStatus() Compute the status for deleting resources. | protected void | delete(IProgressMonitor monitor, IAdaptable uiInfo, boolean deleteContent) Delete any resources known by this operation. | protected void | recreate(IProgressMonitor monitor, IAdaptable uiInfo) Recreate any resources known by this operation. | protected void | setResourceDescriptions(ResourceDescription[] descriptions) Set the array of resource descriptions describing resources to be
restored when undoing or redoing this operation. | protected void | setTargetResources(IResource[] targetResources) |
AbstractResourcesOperation | AbstractResourcesOperation(IResource[] resources, String label)(Code) | | Create an Abstract Resources Operation
Parameters: resources - the resources to be modified Parameters: label - the label of the operation |
AbstractResourcesOperation | AbstractResourcesOperation(ResourceDescription[] resourceDescriptions, String label)(Code) | | Create an Abstract Resources Operation
Parameters: resourceDescriptions - the resourceDescriptions describing resources to be created Parameters: label - the label of the operation |
checkReadOnlyResources | IStatus checkReadOnlyResources(IResource[] resourcesToCheck)(Code) | | Check the specified resources for read only state, and return a
status indicating whether the resources can be deleted.
|
computeCreateSchedulingRule | protected ISchedulingRule computeCreateSchedulingRule()(Code) | | Compute a scheduling rule for creating resources.
a scheduling rule appropriate for creating the resourcesspecified in the resource descriptions |
computeCreateStatus | protected IStatus computeCreateStatus(boolean allowOverwrite)(Code) | | Compute the status for creating resources from the descriptions. A status
severity of OK indicates that the create is likely to be
successful. A status severity of ERROR indicates that the
operation is no longer valid. Other status severities are open to
interpretation by the caller.
Note this method may be called on initial creation of a resource, or when
a create or delete operation is being undone or redone. Therefore, this
method should check conditions that can change over the life of the
operation, such as the existence of the information needed to carry out
the operation. One-time static checks should typically be done by the
caller (such as the action that creates the operation) so that the user
is not continually prompted or warned about conditions that were
acceptable at the time of original execution.
Parameters: allowOverwrite - a boolean that specifies whether resource creation should beallowed to overwrite an existent resource. |
computeDeleteSchedulingRule | protected ISchedulingRule computeDeleteSchedulingRule()(Code) | | Compute a scheduling rule for deleting resources.
a scheduling rule appropriate for deleting the resourcesspecified in the receiver. |
computeDeleteStatus | protected IStatus computeDeleteStatus()(Code) | | Compute the status for deleting resources. A status severity of
OK indicates that the delete is likely to be successful. A
status severity of ERROR indicates that the operation is
no longer valid. Other status severities are open to interpretation by
the caller.
Note this method may be called on initial deletion of a resource, or when
a create or delete operation is being undone or redone. Therefore, this
method should check conditions that can change over the life of the
operation, such as the existence of the resources to be deleted. One-time
static checks should typically be done by the caller (such as the action
that creates the operation) so that the user is not continually prompted
or warned about conditions that were acceptable at the time of original
execution.
|
delete | protected void delete(IProgressMonitor monitor, IAdaptable uiInfo, boolean deleteContent) throws CoreException(Code) | | Delete any resources known by this operation. Store enough information to
undo and redo the operation.
Parameters: monitor - the progress monitor to use for the operation Parameters: uiInfo - the IAdaptable (or null ) provided by thecaller in order to supply UI information for prompting theuser if necessary. When this parameter is notnull , it contains an adapter for theorg.eclipse.swt.widgets.Shell.class Parameters: deleteContent - true if the content of any known projectsshould be deleted along with the project. false if project content should not be deleted. throws: CoreException - propagates any CoreExceptions thrown from the resources API |
recreate | protected void recreate(IProgressMonitor monitor, IAdaptable uiInfo) throws CoreException(Code) | | Recreate any resources known by this operation. Store enough information
to undo and redo the operation.
Parameters: monitor - the progress monitor to use for the operation Parameters: uiInfo - the IAdaptable (or null ) provided by thecaller in order to supply UI information for prompting theuser if necessary. When this parameter is notnull , it contains an adapter for theorg.eclipse.swt.widgets.Shell.class throws: CoreException - propagates any CoreExceptions thrown from the resources API |
setResourceDescriptions | protected void setResourceDescriptions(ResourceDescription[] descriptions)(Code) | | Set the array of resource descriptions describing resources to be
restored when undoing or redoing this operation.
Parameters: descriptions - the array of resource descriptions |
setTargetResources | protected void setTargetResources(IResource[] targetResources)(Code) | | |
|
|