| java.lang.Object org.netbeans.modules.refactoring.api.AbstractRefactoring
All known Subclasses: org.netbeans.modules.refactoring.java.api.PushDownRefactoring, org.netbeans.modules.refactoring.java.api.ChangeParametersRefactoring, org.netbeans.modules.refactoring.java.api.PullUpRefactoring, org.netbeans.modules.refactoring.java.ui.EncapsulateFieldsRefactoring, org.netbeans.modules.refactoring.api.SafeDeleteRefactoring, org.netbeans.modules.refactoring.java.api.EncapsulateFieldRefactoring, org.netbeans.modules.refactoring.api.RenameRefactoring, org.netbeans.modules.refactoring.java.api.UseSuperTypeRefactoring, org.netbeans.modules.refactoring.java.api.ExtractInterfaceRefactoring, org.netbeans.modules.refactoring.java.api.ExtractSuperclassRefactoring, org.netbeans.modules.refactoring.api.MoveRefactoring, org.netbeans.modules.refactoring.api.WhereUsedQuery, org.netbeans.modules.refactoring.api.MultipleCopyRefactoring, org.netbeans.modules.refactoring.api.SingleCopyRefactoring, org.netbeans.modules.refactoring.java.api.InnerToOuterRefactoring,
AbstractRefactoring | abstract public class AbstractRefactoring (Code) | | Abstract superclass for particular refactorings.
Methods should be typically called in following order:
- preCheck
- setParameter1(..), setParameter2(..) (this methods will typically be added by the subclass
to allow parametrization of the implemented refactoring)
- fastCheckParameters() (performs only fast check - useful for online error checking)
- checkParameters() (full check of parameters)
- prepare() (collects usages)
See Also: RefactoringSession author: Martin Matula, Jan Becicka |
INIT | final public static int INIT(Code) | | Initial state
|
PARAMETERS_CHECK | final public static int PARAMETERS_CHECK(Code) | | Parameters check state.
|
PREPARE | final public static int PREPARE(Code) | | Prepare state.
|
PRE_CHECK | final public static int PRE_CHECK(Code) | | Pre-check state.
|
refactoringSource | Lookup refactoringSource(Code) | | |
AbstractRefactoring | protected AbstractRefactoring(Lookup refactoringSource)(Code) | | |
addProgressListener | final public synchronized void addProgressListener(ProgressListener listener)(Code) | | Registers ProgressListener to receive events.
Parameters: listener - The listener to register. |
cancelRequest | final public void cancelRequest()(Code) | | Asynchronous request to cancel ongoing long-term request (such as preCheck(), checkParameters() or prepare())
|
checkParameters | final public Problem checkParameters()(Code) | | Checks if this refactoring has correctly set all parameters.
Returns instancef Problem or null |
fastCheckParameters | final public Problem fastCheckParameters()(Code) | | This method checks parameters. Its implementation is fast and allows on-line checking of errors.
If you want complete check of parameters, use #checkParameters()
Returns instance of Problem or null |
getContext | final public Context getContext()(Code) | | getter for refactoring Context
See Also: Context context in which the refactoring was invoked. |
getRefactoringSource | final public Lookup getRefactoringSource()(Code) | | Object being refactored
|
preCheck | final public Problem preCheck()(Code) | | Perform checks to ensure that the preconditions are met for the implemented
refactoring.
Chain of problems encountered or null if no problemswere found. |
prepare | final public Problem prepare(RefactoringSession session)(Code) | | Collects and returns a set of refactoring elements - objects that
will be affected by the refactoring.
Parameters: session - RefactoringSession that the operation will use to returninstances of org.netbeans.modules.refactoring.api.RefactoringElement class representing objects thatwill be affected by the refactoring. Chain of problems encountered or null in no problemswere found. |
removeProgressListener | final public synchronized void removeProgressListener(ProgressListener listener)(Code) | | Removes ProgressListener from the list of listeners.
Parameters: listener - The listener to remove. |
|
|