Eclipse CDT
Pre-release 3.0

org.eclipse.cdt.core.dom.ast
Interface IASTNodeSelector


public interface IASTNodeSelector

Interface for searching nodes in a translation unit. An instance of this interface, responsible for one file contained in a translation-unit, can be obtained using IASTTranslationUnit.getNodeSelector(String).

Since:
5.0

Method Summary
 IASTPreprocessorMacroExpansion findEnclosingMacroExpansion(int offset, int length)
          Returns a macro expansion enclosing the given range, or null.
 IASTName findEnclosingName(int offset, int length)
          Returns the smallest name enclosing the given range, or null if there is no such node.
 IASTNode findEnclosingNode(int offset, int length)
          Returns the smallest node enclosing the given range, or null if there is no such node.
 IASTName findFirstContainedName(int offset, int length)
          Returns the first name contained in the given range, or null if there is no such node.
 IASTNode findFirstContainedNode(int offset, int length)
          Returns the first node contained in the given range, or null if there is no such node.
 IASTName findName(int offset, int length)
          Returns the name for the exact given range, or null if there is no such node.
 IASTNode findNode(int offset, int length)
          Returns the node for the exact given range, or null if there is no such node.
 

Method Detail

findName

IASTName findName(int offset,
                  int length)
Returns the name for the exact given range, or null if there is no such node.


findEnclosingName

IASTName findEnclosingName(int offset,
                           int length)
Returns the smallest name enclosing the given range, or null if there is no such node.


findFirstContainedName

IASTName findFirstContainedName(int offset,
                                int length)
Returns the first name contained in the given range, or null if there is no such node.


findNode

IASTNode findNode(int offset,
                  int length)
Returns the node for the exact given range, or null if there is no such node.

For nodes with the same location, macro-expansions (IASTPreprocessorMacroExpansion) are preferred over c/c++-nodes and children are preferred over their parents.


findEnclosingNode

IASTNode findEnclosingNode(int offset,
                           int length)
Returns the smallest node enclosing the given range, or null if there is no such node.

For nodes with the same location, macro-expansions (IASTPreprocessorMacroExpansion) are preferred over c/c++-nodes nodes and children are preferred over their parents. Prefers children over parents.


findFirstContainedNode

IASTNode findFirstContainedNode(int offset,
                                int length)
Returns the first node contained in the given range, or null if there is no such node.

For nodes with the same location, macro-expansions (IASTPreprocessorMacroExpansion) are preferred over c/c++-nodes nodes and children are preferred over their parents.


findEnclosingMacroExpansion

IASTPreprocessorMacroExpansion findEnclosingMacroExpansion(int offset,
                                                           int length)
Returns a macro expansion enclosing the given range, or null.


Eclipse CDT
Pre-release 3.0

Copyright (c) IBM Corp. and others 2004. All Rights Reserved.