org.eclipse.cdt.ui.tests.DOMAST
Class DOMASTNodeParent

java.lang.Object
  extended by org.eclipse.cdt.ui.tests.DOMAST.DOMASTNodeLeaf
      extended by org.eclipse.cdt.ui.tests.DOMAST.DOMASTNodeParent
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable

public class DOMASTNodeParent
extends DOMASTNodeLeaf

Author:
dsteffle

Field Summary
 
Fields inherited from class org.eclipse.cdt.ui.tests.DOMAST.DOMASTNodeLeaf
BLANK_STRING, FLAG_INCLUDE_STATEMENTS, FLAG_PREPROCESSOR, FLAG_PROBLEM
 
Constructor Summary
DOMASTNodeParent()
           
DOMASTNodeParent(org.eclipse.cdt.core.dom.ast.IASTNode node)
           
 
Method Summary
 void addChild(DOMASTNodeLeaf child)
           
 void cleanChildren()
           
 DOMASTNodeParent findTreeObject(org.eclipse.cdt.core.dom.ast.IASTNode node, boolean useOffset)
          Returns the DOMASTNodeParent that corresponds to the IASTNode.
 DOMASTNodeParent findTreeParentForMergedNode(org.eclipse.cdt.core.dom.ast.IASTNode node)
          Returns the DOMASTNodeParent whose IASTNode is the parent of the IASTNode.
 DOMASTNodeParent findTreeParentForNode(org.eclipse.cdt.core.dom.ast.IASTNode node)
          Returns the DOMASTNodeParent whose IASTNode is the parent of the IASTNode.
 DOMASTNodeLeaf[] getChildren()
           
 DOMASTNodeLeaf[] getChildren(boolean cleanupElements)
           
 int getStartSearch()
           
 boolean hasChildren()
           
 java.lang.Object[] insert(java.lang.Class c, java.lang.Object[] array, java.lang.Object obj, int pos)
          Inserts obj into the array at position pos and if this is not possible (due to a bad offset) then the obj is just appended to the end of the array.
 int relativeNodePosition(org.eclipse.cdt.core.dom.ast.IASTNode n)
           
 void removeChild(DOMASTNodeLeaf child)
           
 void setChildren(DOMASTNodeLeaf[] children)
           
 
Methods inherited from class org.eclipse.cdt.ui.tests.DOMAST.DOMASTNodeLeaf
getAdapter, getFilename, getFiltersFlag, getLength, getNode, getOffset, getParent, setFiltersFlag, setParent, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DOMASTNodeParent

public DOMASTNodeParent()

DOMASTNodeParent

public DOMASTNodeParent(org.eclipse.cdt.core.dom.ast.IASTNode node)
Method Detail

getStartSearch

public int getStartSearch()

addChild

public void addChild(DOMASTNodeLeaf child)

removeChild

public void removeChild(DOMASTNodeLeaf child)

getChildren

public DOMASTNodeLeaf[] getChildren(boolean cleanupElements)

getChildren

public DOMASTNodeLeaf[] getChildren()

insert

public java.lang.Object[] insert(java.lang.Class c,
                                 java.lang.Object[] array,
                                 java.lang.Object obj,
                                 int pos)
Inserts obj into the array at position pos and if this is not possible (due to a bad offset) then the obj is just appended to the end of the array.

Parameters:
c -
array -
obj -
pos -
Returns:

cleanChildren

public void cleanChildren()

hasChildren

public boolean hasChildren()

findTreeParentForMergedNode

public DOMASTNodeParent findTreeParentForMergedNode(org.eclipse.cdt.core.dom.ast.IASTNode node)
Returns the DOMASTNodeParent whose IASTNode is the parent of the IASTNode. This function is an optimization function used to only search merged preprocessor nodes.

Parameters:
node -
Returns:

findTreeParentForNode

public DOMASTNodeParent findTreeParentForNode(org.eclipse.cdt.core.dom.ast.IASTNode node)
Returns the DOMASTNodeParent whose IASTNode is the parent of the IASTNode.

Parameters:
node -
Returns:

relativeNodePosition

public int relativeNodePosition(org.eclipse.cdt.core.dom.ast.IASTNode n)
Overrides:
relativeNodePosition in class DOMASTNodeLeaf

findTreeObject

public DOMASTNodeParent findTreeObject(org.eclipse.cdt.core.dom.ast.IASTNode node,
                                       boolean useOffset)
Returns the DOMASTNodeParent that corresponds to the IASTNode. This is the DOMASTNodeParent that represents the IASTNode in the DOM AST View.

Parameters:
node -
Returns:

setChildren

public void setChildren(DOMASTNodeLeaf[] children)