Composite Refactoring
v1.0

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.


Field Summary
static String DEFAULTNAME
           
 
Fields inherited from class compositeRefactoring.refactoringComposite.RefactoringComponent
fName
 
Method Summary
abstract  RefactoringStatus checkPreconditions(IProgressMonitor pm)
          Checks the proconditions of the receiving refactoring object.
abstract  IChange createChange(IProgressMonitor pm)
          Creates an IChange object that performs the actual refactoring.
abstract  RefactoringStatus refactor()
          this method performs the refactoring.
abstract  RefactoringStatus undo()
          this method undos the refactoring when it was performed.
 
Methods inherited from class compositeRefactoring.refactoringComposite.RefactoringComponent
getName
 
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
 

Field Detail

DEFAULTNAME

public static final String DEFAULTNAME
Method Detail

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)

Composite Refactoring
v1.0