| org.eclipse.ui.ide.undo.AbstractWorkspaceOperation org.eclipse.ui.ide.undo.AbstractResourcesOperation org.eclipse.ui.ide.undo.AbstractCopyOrMoveResourcesOperation org.eclipse.ui.ide.undo.CopyResourcesOperation
CopyResourcesOperation | public class CopyResourcesOperation extends AbstractCopyOrMoveResourcesOperation (Code) | | A CopyResourcesOperation represents an undoable operation for copying one or
more resources in the workspace. Clients may call the public API from a
background thread.
This operation can track any overwritten resources and restore them when the
copy is undone. It is up to clients to determine whether overwrites are
allowed. If a resource should not be overwritten, it should not be included
in this operation. In addition to checking for overwrites, the target
location for the copy is assumed to have already been validated by the
client. It will not be revalidated on undo and redo.
This class is intended to be instantiated and used by clients. It is not
intended to be subclassed by clients.
since: 3.3 |
Constructor Summary | |
public | CopyResourcesOperation(IResource resource, IPath newPath, String label) Create a CopyResourcesOperation that copies a single resource to a new
location. | public | CopyResourcesOperation(IResource[] resources, IPath destinationPath, String label) Create a CopyResourcesOperation that copies all of the specified
resources to a single target location. | public | CopyResourcesOperation(IResource[] resources, IPath[] destinationPaths, String label) Create a CopyResourcesOperation that copies each of the specified
resources to its corresponding destination path in the destination path
array. |
Method Summary | |
public IStatus | computeUndoableStatus(IProgressMonitor monitor) | protected void | copy(IProgressMonitor monitor, IAdaptable uiInfo) Move or copy any known resources according to the destination parameters
known by this operation. | protected void | doExecute(IProgressMonitor monitor, IAdaptable uiInfo) | protected void | doUndo(IProgressMonitor monitor, IAdaptable uiInfo) | protected boolean | updateResourceChangeDescriptionFactory(IResourceChangeDescriptionFactory factory, int operation) |
originalResources | IResource[] originalResources(Code) | | |
CopyResourcesOperation | public CopyResourcesOperation(IResource resource, IPath newPath, String label)(Code) | | Create a CopyResourcesOperation that copies a single resource to a new
location. The new location includes the name of the copy.
Parameters: resource - the resource to be copied Parameters: newPath - the new workspace-relative path for the copy, including itsdesired name. Parameters: label - the label of the operation |
CopyResourcesOperation | public CopyResourcesOperation(IResource[] resources, IPath destinationPath, String label)(Code) | | Create a CopyResourcesOperation that copies all of the specified
resources to a single target location. The original resource name will be
used when copied to the new location.
Parameters: resources - the resources to be copied Parameters: destinationPath - the workspace-relative destination path for the copiedresource. Parameters: label - the label of the operation |
CopyResourcesOperation | public CopyResourcesOperation(IResource[] resources, IPath[] destinationPaths, String label)(Code) | | Create a CopyResourcesOperation that copies each of the specified
resources to its corresponding destination path in the destination path
array. The resource name for the target is included in the corresponding
destination path.
Parameters: resources - the resources to be copied. Must not contain null resources. Parameters: destinationPaths - a workspace-relative destination path for each copiedresource, which includes the name of the resource at the newdestination. Must be the same length as the resources array,and may not contain null paths. Parameters: label - the label of the operation |
computeUndoableStatus | public IStatus computeUndoableStatus(IProgressMonitor monitor)(Code) | | |
copy | protected void copy(IProgressMonitor monitor, IAdaptable uiInfo) throws CoreException(Code) | | Move or copy any known resources according to the destination parameters
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 |
doExecute | protected void doExecute(IProgressMonitor monitor, IAdaptable uiInfo) throws CoreException(Code) | | |
doUndo | protected void doUndo(IProgressMonitor monitor, IAdaptable uiInfo) throws CoreException(Code) | | |
updateResourceChangeDescriptionFactory | protected boolean updateResourceChangeDescriptionFactory(IResourceChangeDescriptionFactory factory, int operation)(Code) | | |
Fields inherited from org.eclipse.ui.ide.undo.AbstractCopyOrMoveResourcesOperation | protected IPath destination(Code)(Java Doc) protected IPath[] destinationPaths(Code)(Java Doc)
|
|
|