Returns the covered node. If more than one nodes are covered by the selection, the
returned node is first covered node found in a top-down traversal of the AST
ASTNode
Returns the covering node. If more than one nodes are covering the selection, the
returned node is last covering node found in a top-down traversal of the AST
ASTNode
A visitor that maps a selection to a given ASTNode. The result node is
determined as follows:
first the visitor tries to find a node with the exact start and length
if no such node exists than the node that encloses the range defined by
start and end is returned.
if the length is zero than also nodes are considered where the node's
start or end position matches start.
otherwise null is returned.
Parameters: root - the root node from which the search starts Parameters: start - the start offset Parameters: length - the length the result node since: 2.1
A visitor that maps a selection to a given ASTNode. The result node is
determined as follows:
first the visitor tries to find a node that is covered by start and
length where either start and length exactly
matches the node or where the text covered before and after the node only consists
of white spaces or comments.
if no such node exists than the node that encloses the range defined by
start and end is returned.
if the length is zero than also nodes are considered where the node's
start or end position matches start.
otherwise null is returned.
Parameters: root - the root node from which the search starts Parameters: start - the start offset Parameters: length - the length Parameters: source - the source of the compilation unit the result node throws: JavaModelException - if an error occurs in the Java model since: 3.0