compositeRefactoring.refactoringComposite
Class RefactoringComposite
java.lang.Object
|
+--compositeRefactoring.refactoringComposite.RefactoringComponent
|
+--compositeRefactoring.refactoringComposite.RefactoringComposite
- All Implemented Interfaces:
- IRefactoring
- Direct Known Subclasses:
- RefactoringComposite_IteratorImpl, RefactoringComposite_ListImpl
- public abstract class RefactoringComposite
- extends RefactoringComponent
- implements IRefactoring
The RefactoringComposite class allows a client to merge single (low-level) refactorings to
a higher-level refactoring. These refactorings are from type RefactoringComponent, e.g. they can
either be a RefactoringNode (a single refactoring) or, recursively, another RefactoringComposite.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jdt.internal.corext.refactoring.base.IRefactoring |
getName |
DEFAULTNAME
public static final String DEFAULTNAME
refactor
public abstract RefactoringStatus refactor()
- Description copied from class:
RefactoringComponent
- this method performs the refactoring.
- Overrides:
refactor
in class RefactoringComponent
- See Also:
RefactoringComponent.refactor()
undo
public abstract RefactoringStatus undo()
- Description copied from class:
RefactoringComponent
- this method undos the refactoring when it was performed.
- Overrides:
undo
in class RefactoringComponent
- See Also:
RefactoringComponent.undo()
checkPreconditions
public abstract RefactoringStatus checkPreconditions(IProgressMonitor pm)
throws JavaModelException
- Description copied from interface:
IRefactoring
- Checks the proconditions of the receiving refactoring object.
If the resulting
IStatus
has severity IStatus.ERROR
,
than createChange
will not be called on the receiver.
Must not return null
.
Implementors can assume the progress monitor to be not initialized.
- Specified by:
checkPreconditions
in interface IRefactoring
- Overrides:
checkPreconditions
in class RefactoringComponent
- See Also:
RefactoringComponent.checkPreconditions(IProgressMonitor pm)
createChange
public abstract IChange createChange(IProgressMonitor pm)
throws JavaModelException
- Description copied from interface:
IRefactoring
- Creates an
IChange
object that performs the actual refactoring.
This is guaranteed not to be called before checkPreconditions
or
if checkPreconditions
returns an RefactoringStatus
object with severity RefactoringStatus.ERROR
.
Implementors can assume the progress monitor to be not initialized.
- Specified by:
createChange
in interface IRefactoring
- Overrides:
createChange
in class RefactoringComponent
- See Also:
RefactoringComponent.createChange(IProgressMonitor pm)