|
Eclipse JDT Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.ltk.core.refactoring.Refactoring
org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring
An abstract base implementation for refactorings that are split into one refactoring processor and 0..n participants.
This class should be subclassed by clients wishing to provide a special refactoring which uses a processor/participant architecture.
Constructor Summary | |
protected |
ProcessorBasedRefactoring()
Creates a new processor based refactoring. |
Method Summary | |
RefactoringStatus |
checkFinalConditions(IProgressMonitor pm)
After checkInitialConditions has been performed and the user has
provided all input necessary to perform the refactoring this method is called
to check the remaining preconditions.
The refactoring has to be considered as not being executable if the returned status
has the severity of This method can be called more than once. |
RefactoringStatus |
checkInitialConditions(IProgressMonitor pm)
Checks some initial conditions based on the element to be refactored. The method is typically called by the UI to perform an initial checks after an action has been executed.
The refactoring has to be considered as not being executable if the returned status
has the severity of This method can be called more than once. |
Change |
createChange(IProgressMonitor pm)
Creates a Change object that performs the actual workspace
transformation. |
Object |
getAdapter(Class clazz)
Adapts the refactoring to the given type. |
String |
getName()
Returns the refactoring's name. |
abstract RefactoringProcessor |
getProcessor()
Return the processor associated with this refactoring. |
boolean |
isApplicable()
Checks whether the refactoring is applicable to the elements to be refactored or not. |
String |
toString()
|
Methods inherited from class org.eclipse.ltk.core.refactoring.Refactoring |
checkAllConditions, getValidationContext, setValidationContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected ProcessorBasedRefactoring()
Method Detail |
public abstract RefactoringProcessor getProcessor()
null
.
public final boolean isApplicable() throws CoreException
This default implementation forwards the call to the refactoring processor.
true
if the refactoring is applicable to the
elements; otherwise false
is returned.
CoreException
- if the test failspublic String getName()
getName
in class Refactoring
null
public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException
The refactoring has to be considered as not being executable if the returned status
has the severity of RefactoringStatus#FATAL
.
This method can be called more than once.
checkInitialConditions
in class Refactoring
pm
- a progress monitor to report progress. Although initial checks
are supposed to execute fast, there can be certain situations where progress
reporting is necessary. For example rebuilding a corrupted index may report
progress.
RefactoringStatus#FATAL
the refactoring has to be considered as not being executable.
CoreException
- if an exception occurred during initial condition checking.
If this happens then the initial condition checking has to be interpreted as failedRefactoring.checkFinalConditions(IProgressMonitor)
,
RefactoringStatus.FATAL
public RefactoringStatus checkFinalConditions(IProgressMonitor pm) throws CoreException
checkInitialConditions
has been performed and the user has
provided all input necessary to perform the refactoring this method is called
to check the remaining preconditions.
The refactoring has to be considered as not being executable if the returned status
has the severity of RefactoringStatus#FATAL
.
This method can be called more than once.
checkFinalConditions
in class Refactoring
pm
- a progress monitor to report progress
RefactoringStatus#FATAL
the refactoring is considered as not being executable.
CoreException
- if an exception occurred during final condition checking
If this happens then the final condition checking is interpreted as failedRefactoring.checkInitialConditions(IProgressMonitor)
,
RefactoringStatus.FATAL
public Change createChange(IProgressMonitor pm) throws CoreException
Change
object that performs the actual workspace
transformation.
createChange
in class Refactoring
pm
- a progress monitor to report progress
CoreException
- if an error occurred while creating the changepublic Object getAdapter(Class clazz)
getAdapter
in interface IAdaptable
getAdapter
in class Refactoring
clazz
- the adapter class to look up
null
if no adapter
exists.public String toString()
toString
in class Refactoring
|
Eclipse JDT Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |