|
Eclipse CDT Pre-release 3.0 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The translation unit represents a compilable unit of source.
Nested Class Summary | |
---|---|
static interface |
IASTTranslationUnit.IDependencyTree
|
Field Summary | |
---|---|
static ASTNodeProperty |
EXPANSION_NAME
|
static ASTNodeProperty |
OWNED_DECLARATION
OWNED_DECLARATION represents the relationship between an IASTTranslationUnit and
it's nested IASTDeclaration 's. |
static ASTNodeProperty |
PREPROCESSOR_STATEMENT
PREPROCESSOR_STATEMENT represents the relationship between an IASTTranslationUnit and
it's nested IASTPreprocessorStatement . |
static ASTNodeProperty |
SCANNER_PROBLEM
SCANNER_PROBLEM represents the relationship between an IASTTranslationUnit and
it's nested IASTProblem . |
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode |
---|
EMPTY_NODE_ARRAY |
Method Summary | |
---|---|
void |
addDeclaration(IASTDeclaration declaration)
Add declaration to translation unit. |
IASTFileLocation |
flattenLocationsToFile(IASTNodeLocation[] nodeLocations)
Flatten the node locations provided into a single file location. |
IASTPreprocessorStatement[] |
getAllPreprocessorStatements()
Get all preprocessor statements. |
IASTPreprocessorMacroDefinition[] |
getBuiltinMacroDefinitions()
Get builtin macro definitions used when parsing this translation unit. |
IASTComment[] |
getComments()
In case the ast was created in a way that supports comment parsing, all comments of the translation unit are returned. |
String |
getContainingFilename(int offset)
|
IASTDeclaration[] |
getDeclarations()
A translation unit contains an ordered sequence of declarations. |
org.eclipse.cdt.core.dom.IName[] |
getDeclarations(IBinding binding)
Returns the list of declarations in this translation unit for the given binding. |
IASTName[] |
getDeclarationsInAST(IBinding binding)
Returns the list of declarations in this translation unit for the given binding. |
org.eclipse.cdt.core.dom.IName[] |
getDefinitions(IBinding binding)
Returns the array of definitions in this translation unit for the given binding. |
IASTName[] |
getDefinitionsInAST(IBinding binding)
Returns the array of definitions in this translation unit for the given binding. |
IASTTranslationUnit.IDependencyTree |
getDependencyTree()
|
String |
getFilePath()
Get the translation unit's full path. |
IASTPreprocessorIncludeStatement[] |
getIncludeDirectives()
Get the #include directives encountered in parsing this translation unit. |
org.eclipse.cdt.core.index.IIndex |
getIndex()
Return the Index associated with this translation unit. |
IASTNodeLocation[] |
getLocationInfo(int offset,
int length)
|
IASTPreprocessorMacroDefinition[] |
getMacroDefinitions()
Get the macro definitions encountered in parsing this translation unit. |
org.eclipse.cdt.core.parser.ParserLanguage |
getParserLanguage()
|
IASTProblem[] |
getPreprocessorProblems()
Get all preprocessor and scanner problems. |
IASTName[] |
getReferences(IBinding binding)
Returns the list of references in this translation unit to the given binding. |
IScope |
getScope()
This returns the global scope for the translation unit. |
String |
getUnpreprocessedSignature(IASTNodeLocation[] locations)
For a given range of locations, return a String that represents what is there underneath the range. |
IASTNode |
selectNodeForLocation(String path,
int offset,
int length)
Select the node in the treet that best fits the offset/length/file path. |
void |
setComments(IASTComment[] comments)
Set comments to translation unit. |
void |
setIndex(org.eclipse.cdt.core.index.IIndex index)
Set the Index to be used for this translation unit. |
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode |
---|
accept, contains, getContainingFilename, getFileLocation, getNodeLocations, getParent, getPropertyInParent, getRawSignature, getTranslationUnit, setParent, setPropertyInParent |
Field Detail |
public static final ASTNodeProperty OWNED_DECLARATION
OWNED_DECLARATION
represents the relationship between an IASTTranslationUnit
and
it's nested IASTDeclaration
's.
public static final ASTNodeProperty SCANNER_PROBLEM
SCANNER_PROBLEM
represents the relationship between an IASTTranslationUnit
and
it's nested IASTProblem
.
public static final ASTNodeProperty PREPROCESSOR_STATEMENT
PREPROCESSOR_STATEMENT
represents the relationship between an IASTTranslationUnit
and
it's nested IASTPreprocessorStatement
.
public static final ASTNodeProperty EXPANSION_NAME
Method Detail |
public IASTDeclaration[] getDeclarations()
public void addDeclaration(IASTDeclaration declaration)
declaration
- IASTDeclaration
public IScope getScope()
public org.eclipse.cdt.core.dom.IName[] getDeclarations(IBinding binding)
binding
-
public IASTName[] getDeclarationsInAST(IBinding binding)
binding
-
public org.eclipse.cdt.core.dom.IName[] getDefinitions(IBinding binding)
binding
-
public IASTName[] getDefinitionsInAST(IBinding binding)
binding
-
public IASTName[] getReferences(IBinding binding)
binding
-
public IASTNodeLocation[] getLocationInfo(int offset, int length)
offset
- length
-
public IASTNode selectNodeForLocation(String path, int offset, int length)
path
- - file name specified through pathoffset
- - location in the file as an offsetlength
- - length of selection
IASTNode
that best fitspublic IASTPreprocessorMacroDefinition[] getMacroDefinitions()
IASTPreprocessorMacroDefinition[]
public IASTPreprocessorMacroDefinition[] getBuiltinMacroDefinitions()
IASTPreprocessorMacroDefinition[]
public IASTPreprocessorIncludeStatement[] getIncludeDirectives()
IASTPreprocessorIncludeStatement[]
public IASTPreprocessorStatement[] getAllPreprocessorStatements()
IASTPreprocessorStatement[]
public IASTProblem[] getPreprocessorProblems()
IASTProblem[]
public String getUnpreprocessedSignature(IASTNodeLocation[] locations)
locations
- A range of node locations
public String getFilePath()
public IASTFileLocation flattenLocationsToFile(IASTNodeLocation[] nodeLocations)
nodeLocations
- IASTNodeLocation
s to flatten
public IASTTranslationUnit.IDependencyTree getDependencyTree()
public String getContainingFilename(int offset)
offset
-
public org.eclipse.cdt.core.parser.ParserLanguage getParserLanguage()
public org.eclipse.cdt.core.index.IIndex getIndex()
public void setIndex(org.eclipse.cdt.core.index.IIndex index)
index
- public void setComments(IASTComment[] comments)
public IASTComment[] getComments()
IASTComment[]
|
Eclipse CDT Pre-release 3.0 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |