public class MoveResourceChange extends ResourceChange
Change that moves a resource.SAVE_IF_DIRTY, VALIDATE_DEFAULT, VALIDATE_NOT_DIRTY, VALIDATE_NOT_READ_ONLY| Modifier | Constructor and Description |
|---|---|
|
MoveResourceChange(IResource source,
IContainer target)
Creates the change.
|
protected |
MoveResourceChange(IResource source,
IContainer target,
long stampToRestore,
Change restoreSourceChange)
Creates the change.
|
| Modifier and Type | Method and Description |
|---|---|
ChangeDescriptor |
getDescriptor()
Returns a descriptor of this change.
|
protected IResource |
getModifiedResource()
Returns the resource of this change.
|
String |
getName()
Returns the human readable name of this change.
|
Change |
perform(IProgressMonitor monitor)
Performs this change.
|
void |
setDescriptor(ChangeDescriptor descriptor)
Sets the change descriptor to be returned by
Change.getDescriptor(). |
checkIfModifiable, getModifiedElement, initializeValidationData, isValid, setValidationMethod, toStringdispose, getAdapter, getAffectedObjects, getParent, isEnabled, setEnabled, setEnabledShallowpublic MoveResourceChange(IResource source, IContainer target)
source - the resource to movetarget - the container the resource is moved to. An existing resource at the destination will be
replaced.protected MoveResourceChange(IResource source, IContainer target, long stampToRestore, Change restoreSourceChange)
source - the resource to movetarget - the container the resource is moved to. An existing resource at the destination will be
replaced.stampToRestore - the stamp to restore on the moved resourcerestoreSourceChange - the change to restore a resource at the source or null if no resource
needs to be resourced.public ChangeDescriptor getDescriptor()
Change
Subclasses of changes created by
Refactoring.createChange(IProgressMonitor) should override this
method to return a RefactoringChangeDescriptor. A change tree
created by a particular refactoring is supposed to contain at most one
change which returns a refactoring descriptor. Refactorings usually
return an instance of CompositeChange in their
Refactoring.createChange(IProgressMonitor) method which
implements this method. The refactoring framework searches the change
tree top-down until a refactoring descriptor is found.
getDescriptor in class Changenull if this
change does not provide a change descriptor.public void setDescriptor(ChangeDescriptor descriptor)
Change.getDescriptor().descriptor - the change descriptorpublic final Change perform(IProgressMonitor monitor) throws CoreException, OperationCanceledException
ChangeIProgressMonitor.isCanceled() since canceling a change tree in the
middle of its execution leaves the workspace in a half changed state.perform in class Changemonitor - a progress monitornull if no
undo is providedCoreException - if an error occurred during change executionOperationCanceledExceptionprotected IResource getModifiedResource()
ResourceChangegetModifiedResource in class ResourceChange
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.