Package org.eclipse.cdt.core.dom.ast
Interface IASTCompletionNode
- All Known Implementing Classes:
ASTCompletionNode
public interface IASTCompletionNode
This represents the node that would occur at the point of a context
completion.
This node may contain the prefix text of an identifier 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.
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Represents a name that fits in this context, and its parent. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsName
(IASTName name) Returns true if this completion node contains aIASTCompletionNode.CompletionNameEntry
with the given name.Returns a list of names that fir in this context, along with their parents.int
Returns the length of the completion point.IASTName[]
getNames()
Returns a list of names that fit in this context.If the point of completion was at the end of a potential identifier, this string contains the text of that identifier.Returns the translation unit for this completion.
-
Method Details
-
getPrefix
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
int getLength()Returns the length of the completion point. -
containsName
Returns true if this completion node contains aIASTCompletionNode.CompletionNameEntry
with the given name.- Since:
- 6.4
-
getNames
IASTName[] getNames()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. -
getEntries
IASTCompletionNode.CompletionNameEntry[] getEntries()Returns a list of names that fir in this context, along with their parents. SeeIASTCompletionNode.CompletionNameEntry
for more details.- Since:
- 6.4
-
getTranslationUnit
IASTTranslationUnit getTranslationUnit()Returns the translation unit for this completion.
-