| org.eclipse.ui.ide.undo.AbstractWorkspaceOperation org.eclipse.ui.ide.undo.AbstractResourcesOperation org.eclipse.ui.ide.undo.AbstractCopyOrMoveResourcesOperation org.eclipse.ui.ide.undo.MoveResourcesOperation
MoveResourcesOperation | public class MoveResourcesOperation extends AbstractCopyOrMoveResourcesOperation (Code) | | A MoveResourcesOperation represents an undoable operation for moving 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
move 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 move 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 | MoveResourcesOperation(IResource[] resources, IPath destinationPath, String label) Create a MoveResourcesOperation that moves all of the specified resources
to the same target location, using their existing names. | public | MoveResourcesOperation(IResource resource, IPath newPath, String label) Create a MoveResourcesOperation that moves a single resource to a new
location. |
Method Summary | |
public IStatus | computeUndoableStatus(IProgressMonitor monitor) | protected void | doExecute(IProgressMonitor monitor, IAdaptable uiInfo) | protected void | doUndo(IProgressMonitor monitor, IAdaptable uiInfo) | protected void | move(IProgressMonitor monitor, IAdaptable uiInfo) Move any known resources according to the destination parameters known by
this operation. | protected boolean | updateResourceChangeDescriptionFactory(IResourceChangeDescriptionFactory factory, int operation) |
originalDestination | IPath originalDestination(Code) | | |
originalDestinationPaths | IPath[] originalDestinationPaths(Code) | | |
originalResources | IResource[] originalResources(Code) | | |
MoveResourcesOperation | public MoveResourcesOperation(IResource[] resources, IPath destinationPath, String label)(Code) | | Create a MoveResourcesOperation that moves all of the specified resources
to the same target location, using their existing names.
Parameters: resources - the resources to be moved Parameters: destinationPath - the destination path for the resources, not including the nameof the moved resource. Parameters: label - the label of the operation |
MoveResourcesOperation | public MoveResourcesOperation(IResource resource, IPath newPath, String label)(Code) | | Create a MoveResourcesOperation that moves a single resource to a new
location. The new location includes the name of the resource, so this may
be used for a move/rename operation or a simple move.
Parameters: resource - the resource to be moved Parameters: newPath - the new path for the resource, including its desired name. Parameters: label - the label of the operation |
computeUndoableStatus | public IStatus computeUndoableStatus(IProgressMonitor monitor)(Code) | | |
doExecute | protected void doExecute(IProgressMonitor monitor, IAdaptable uiInfo) throws CoreException(Code) | | |
doUndo | protected void doUndo(IProgressMonitor monitor, IAdaptable uiInfo) throws CoreException(Code) | | |
move | protected void move(IProgressMonitor monitor, IAdaptable uiInfo) throws CoreException(Code) | | Move 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 |
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)
|
|
|