Package org.eclipse.cdt.core.dom.ast
Class ASTCompletionNode
- java.lang.Object
-
- org.eclipse.cdt.core.dom.ast.ASTCompletionNode
-
- All Implemented Interfaces:
IASTCompletionNode
public class ASTCompletionNode extends java.lang.Object implements IASTCompletionNode
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.cdt.core.dom.ast.IASTCompletionNode
IASTCompletionNode.CompletionNameEntry
-
-
Constructor Summary
Constructors Constructor Description ASTCompletionNode(IToken completionToken, IASTTranslationUnit translationUnit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddName(IASTName name)booleancontainsName(IASTName name)Returns true if this completion node contains aIASTCompletionNode.CompletionNameEntrywith the given name.IASTCompletionNode.CompletionNameEntry[]getEntries()Returns a list of names that fir in this context, along with their parents.intgetLength()Returns the length of the completion point.IASTName[]getNames()Returns a list of names that fit in this context.java.lang.StringgetPrefix()If the point of completion was at the end of a potential identifier, this string contains the text of that identifier.IASTTranslationUnitgetTranslationUnit()Returns the translation unit for this completion.
-
-
-
Constructor Detail
-
ASTCompletionNode
public ASTCompletionNode(IToken completionToken, IASTTranslationUnit translationUnit)
-
-
Method Detail
-
addName
public void addName(IASTName name)
-
getPrefix
public java.lang.String getPrefix()
Description copied from interface:IASTCompletionNodeIf the point of completion was at the end of a potential identifier, this string contains the text of that identifier.- Specified by:
getPrefixin interfaceIASTCompletionNode- Returns:
- the prefix text up to the point of completion
-
getLength
public int getLength()
Description copied from interface:IASTCompletionNodeReturns the length of the completion point.- Specified by:
getLengthin interfaceIASTCompletionNode
-
containsName
public boolean containsName(IASTName name)
Description copied from interface:IASTCompletionNodeReturns true if this completion node contains aIASTCompletionNode.CompletionNameEntrywith the given name.- Specified by:
containsNamein interfaceIASTCompletionNode
-
getNames
public IASTName[] getNames()
Description copied from interface:IASTCompletionNodeReturns a list of names that fit in this context. If doing computations based on the name's parent, prefer calling getEntries() instead and obtaining the parent from there.- Specified by:
getNamesin interfaceIASTCompletionNode
-
getEntries
public IASTCompletionNode.CompletionNameEntry[] getEntries()
Description copied from interface:IASTCompletionNodeReturns a list of names that fir in this context, along with their parents. SeeIASTCompletionNode.CompletionNameEntryfor more details.- Specified by:
getEntriesin interfaceIASTCompletionNode
-
getTranslationUnit
public IASTTranslationUnit getTranslationUnit()
Description copied from interface:IASTCompletionNodeReturns the translation unit for this completion.- Specified by:
getTranslationUnitin interfaceIASTCompletionNode
-
-