|
Eclipse JDT Release 3.5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICleanUp
A clean up solves problems in a compilation unit.
The clean up is asked for its requirements through a call to getRequirements()
. The
clean up can request an AST and define how to build this AST. It can base its requirements on the
options passed through setOptions(CleanUpOptions)
.
A context containing the information requested by the requirements are passed to
createFix(CleanUpContext)
. A fix capable of fixing the problems is returned by this
function if checkPreConditions(IJavaProject, ICompilationUnit[], IProgressMonitor)
has
returned a non fatal error status.
At the end checkPostConditions(IProgressMonitor)
is called.
Method Summary | |
---|---|
RefactoringStatus |
checkPostConditions(IProgressMonitor monitor)
Called when done cleaning up. |
RefactoringStatus |
checkPreConditions(IJavaProject project,
ICompilationUnit[] compilationUnits,
IProgressMonitor monitor)
After call to checkPreConditions clients will start creating fixes for compilationUnits in project unless the result of checkPreConditions
contains a fatal error |
ICleanUpFix |
createFix(CleanUpContext context)
Create an ICleanUpFix which fixes all problems in context or
null if nothing to fix. |
CleanUpRequirements |
getRequirements()
The requirements of this clean up. |
String[] |
getStepDescriptions()
Human readable description for each step this clean up will execute. |
void |
setOptions(CleanUpOptions options)
Sets the options that will be used. |
Method Detail |
---|
void setOptions(CleanUpOptions options)
options
- the options to useString[] getStepDescriptions()
Note: This method must only be called after the options have been set.
null
CleanUpRequirements getRequirements()
Note: This method must only be called after the options have been set.
createFix(CleanUpContext)
to workRefactoringStatus checkPreConditions(IJavaProject project, ICompilationUnit[] compilationUnits, IProgressMonitor monitor) throws CoreException
compilationUnits
in project
unless the result of checkPreConditions
contains a fatal error
project
- the project to clean upcompilationUnits
- an array of compilation units to clean up, all member of project
monitor
- the monitor to show progress
CoreException
- if an unexpected error occurredICleanUpFix createFix(CleanUpContext context) throws CoreException
ICleanUpFix
which fixes all problems in context
or
null
if nothing to fix.
context
- a context containing all information requested by getRequirements()
null
if nothing to fix
CoreException
- if an unexpected error occurredRefactoringStatus checkPostConditions(IProgressMonitor monitor) throws CoreException
monitor
- the monitor to show progress
CoreException
- if an unexpected error occurred
|
Eclipse JDT Release 3.5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |