Eclipse CDT
Pre-release 3.0

org.eclipse.cdt.core.dom.ast
Class ASTCompletionNode

java.lang.Object
  extended by org.eclipse.cdt.core.dom.ast.ASTCompletionNode

public class ASTCompletionNode
extends Object

This class represents the node that would occur at the point of a context completion. This node may contain the prefix text of an identifer up to the point. If there is no prefix, the completion occurred at the point where a new token would have begun. The node points to the parent node where this node, if replaced by a proper node, would reside in the tree.


Field Summary
 int count
           
 
Constructor Summary
ASTCompletionNode(org.eclipse.cdt.core.parser.IToken completionToken, IASTTranslationUnit translationUnit)
          Only constructor.
 
Method Summary
 void addName(IASTName name)
          Add a name to node.
 int getLength()
          Get the length of the completion point.
 IASTName[] getNames()
          Get a list of names that fit in this context.
 String getPrefix()
          If the point of completion was at the end of a potential identifier, this string contains the text of that identifier.
 IASTTranslationUnit getTranslationUnit()
          Get the translation unit for this completion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

public int count
Constructor Detail

ASTCompletionNode

public ASTCompletionNode(org.eclipse.cdt.core.parser.IToken completionToken,
                         IASTTranslationUnit translationUnit)
Only constructor.

Parameters:
completionToken - the completion token
translationUnit - the translation unit for this completion
Method Detail

addName

public void addName(IASTName name)
Add a name to node.

Parameters:
name -

getPrefix

public String getPrefix()
If the point of completion was at the end of a potential identifier, this string contains the text of that identifier.

Returns:
the prefix text up to the point of completion

getLength

public int getLength()
Get the length of the completion point.

Returns:
length of completion token

getNames

public IASTName[] getNames()
Get a list of names that fit in this context.

Returns:
array of IASTName's

getTranslationUnit

public IASTTranslationUnit getTranslationUnit()
Get the translation unit for this completion

Returns:
the translation unit

Eclipse CDT
Pre-release 3.0

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