|
org.netbeans.modules.refactoring.api 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.refactoring.api.AbstractRefactoring
public abstract class AbstractRefactoring
Abstract superclass for particular refactorings. Methods should be typically called in following order:
RefactoringSession| Field Summary | |
|---|---|
static int |
INIT
Initial state |
static int |
PARAMETERS_CHECK
Parameters check state. |
static int |
PRE_CHECK
Pre-check state. |
static int |
PREPARE
Prepare state. |
| Constructor Summary | |
|---|---|
protected |
AbstractRefactoring(Lookup refactoringSource)
|
| Method Summary | |
|---|---|
void |
addProgressListener(ProgressListener listener)
Registers ProgressListener to receive events. |
void |
cancelRequest()
Asynchronous request to cancel ongoing long-term request (such as preCheck(), checkParameters() or prepare()) |
Problem |
checkParameters()
Checks if this refactoring has correctly set all parameters. |
Problem |
fastCheckParameters()
This method checks parameters. |
Context |
getContext()
getter for refactoring Context |
Lookup |
getRefactoringSource()
Object being refactored |
Problem |
preCheck()
Perform checks to ensure that the preconditions are met for the implemented refactoring. |
Problem |
prepare(RefactoringSession session)
Collects and returns a set of refactoring elements - objects that will be affected by the refactoring. |
void |
removeProgressListener(ProgressListener listener)
Removes ProgressListener from the list of listeners. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INIT
public static final int PRE_CHECK
public static final int PARAMETERS_CHECK
public static final int PREPARE
| Constructor Detail |
|---|
protected AbstractRefactoring(Lookup refactoringSource)
| Method Detail |
|---|
public final Problem preCheck()
null if no problems
were found.public final Problem prepare(RefactoringSession session)
session - RefactoringSession that the operation will use to return
instances of RefactoringElement class representing objects that
will be affected by the refactoring.
null in no problems
were found.public final Problem checkParameters()
public final Problem fastCheckParameters()
public final void addProgressListener(ProgressListener listener)
listener - The listener to register.public final void removeProgressListener(ProgressListener listener)
listener - The listener to remove.public final Context getContext()
Contextpublic final Lookup getRefactoringSource()
public final void cancelRequest()
|
org.netbeans.modules.refactoring.api 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||