public interface IInvocationContext
Note: this interface is not intended to be implemented.
Modifier and Type | Method and Description |
---|---|
CompilationUnit |
getASTRoot()
Returns an AST of the compilation unit, possibly only a partial AST focused on the selection
offset (see
ASTParser.setFocalPosition(int) ). |
ICompilationUnit |
getCompilationUnit() |
ASTNode |
getCoveredNode()
If the AST contains nodes whose range is equal to the selection, returns the innermost of those nodes.
|
ASTNode |
getCoveringNode()
Returns the innermost node that fully contains the selection.
|
int |
getSelectionLength() |
int |
getSelectionOffset() |
ICompilationUnit getCompilationUnit()
int getSelectionOffset()
int getSelectionLength()
CompilationUnit getASTRoot()
ASTParser.setFocalPosition(int)
).
The returned AST is shared and therefore protected and cannot be modified.
The client must check the AST API level and do nothing if they are given an AST
they can't handle.AST.apiLevel()
ASTNode getCoveredNode()
null
if the selection is empty or too short to cover an entire nodeASTNode getCoveringNode()
If more than one node covers the selection, the returned node is the last covering node found in a preorder traversal of the AST. This implies that for a zero-length selection between two adjacent sibling nodes, the node on the right is returned.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.