public class CleanUpContext extends Object
Constructor and Description |
---|
CleanUpContext(ICompilationUnit unit,
CompilationUnit ast)
Creates a new clean up context.
|
Modifier and Type | Method and Description |
---|---|
CompilationUnit |
getAST()
An AST built from the compilation unit to fix.
|
ICompilationUnit |
getCompilationUnit()
The compilation unit to clean up.
|
public CleanUpContext(ICompilationUnit unit, CompilationUnit ast)
unit
- the compilation unitast
- the AST, can be null
if CleanUpRequirements.requiresAST()
returns false
. The AST is guaranteed to contain changes made by
previous clean ups only if CleanUpRequirements.requiresFreshAST()
returns
true
.public ICompilationUnit getCompilationUnit()
public CompilationUnit getAST()
Can be null
if CleanUpRequirements.requiresAST()
returns
false
. The AST is guaranteed to contain changes made by previous clean ups only
if CleanUpRequirements.requiresFreshAST()
returns true
.
Clients should check the AST API level and do nothing if they are given an AST
they can't handle (see AST.apiLevel()
).
null
if none required
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.