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 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 void
addName(IASTName name)
boolean
containsName(IASTName name)
Returns true if this completion node contains aIASTCompletionNode.CompletionNameEntry
with the given name.IASTCompletionNode.CompletionNameEntry[]
getEntries()
Returns a list of names that fir in this context, along with their parents.int
getLength()
Returns the length of the completion point.IASTName[]
getNames()
Returns 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()
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 String getPrefix()
Description copied from interface:IASTCompletionNode
If the point of completion was at the end of a potential identifier, this string contains the text of that identifier.- Specified by:
getPrefix
in interfaceIASTCompletionNode
- Returns:
- the prefix text up to the point of completion
-
getLength
public int getLength()
Description copied from interface:IASTCompletionNode
Returns the length of the completion point.- Specified by:
getLength
in interfaceIASTCompletionNode
-
containsName
public boolean containsName(IASTName name)
Description copied from interface:IASTCompletionNode
Returns true if this completion node contains aIASTCompletionNode.CompletionNameEntry
with the given name.- Specified by:
containsName
in interfaceIASTCompletionNode
-
getNames
public IASTName[] getNames()
Description copied from interface:IASTCompletionNode
Returns 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:
getNames
in interfaceIASTCompletionNode
-
getEntries
public IASTCompletionNode.CompletionNameEntry[] getEntries()
Description copied from interface:IASTCompletionNode
Returns a list of names that fir in this context, along with their parents. SeeIASTCompletionNode.CompletionNameEntry
for more details.- Specified by:
getEntries
in interfaceIASTCompletionNode
-
getTranslationUnit
public IASTTranslationUnit getTranslationUnit()
Description copied from interface:IASTCompletionNode
Returns the translation unit for this completion.- Specified by:
getTranslationUnit
in interfaceIASTCompletionNode
-
-