Class CompletionSite
- Namespace
- RDCore.SDK.Model.Symbols.Completion
- Assembly
- RDCore.SDK.dll
What is being written where a completion list is asked for: read off the text of the line before the cursor, which is what is known for sure of code that is being typed - the rest of it need not parse, and usually does not.
public sealed record CompletionSite : IEquatable<CompletionSite>
- Inheritance
-
CompletionSite
- Implements
- Inherited Members
Constructors
CompletionSite(CompletionSiteKind, string, string, bool, string)
What is being written where a completion list is asked for: read off the text of the line before the cursor, which is what is known for sure of code that is being typed - the rest of it need not parse, and usually does not.
public CompletionSite(CompletionSiteKind Kind, string Prefix = "", string Qualifier = "", bool IsStatementStart = false, string Statement = "")
Parameters
KindCompletionSiteKindWhat is offered.
PrefixstringThe part of the name that is typed already, which the list is narrowed to: what a chosen item replaces.
QualifierstringFor Member, the expression before the
., as it is written (Foo.Bar(1)); an empty string for a member access with no expression before it, which is a member of the object of the enclosingWithblock (MS-VBAL §5.4.2.21), and one that starts with a.for a member of a member of that object (.Items(1)). For a qualified type name (As VBA.Collection), the qualifier of it. Empty otherwise.IsStatementStartboolWhether the name is the first thing of a statement, where a statement keyword can be written.
StatementstringFor Name and Type, the statement the name is written in, up to the name: what decides which names and keywords can be written there (CompletionStatement). Empty where a statement starts.
Properties
Expectation
What comes next in Statement: a statement, an operand, or an operator.
public CompletionExpectation Expectation { get; }
Property Value
IsStatementStart
Whether the name is the first thing of a statement, where a statement keyword can be written.
public bool IsStatementStart { get; init; }
Property Value
Kind
What is offered.
public CompletionSiteKind Kind { get; init; }
Property Value
Prefix
The part of the name that is typed already, which the list is narrowed to: what a chosen item replaces.
public string Prefix { get; init; }
Property Value
Qualifier
For Member, the expression before the ., as it is written (Foo.Bar(1)); an empty string for a member access
with no expression before it, which is a member of the object of the enclosing With block (MS-VBAL §5.4.2.21), and one that starts
with a . for a member of a member of that object (.Items(1)). For a qualified type
name (As VBA.Collection), the qualifier of it. Empty otherwise.
public string Qualifier { get; init; }
Property Value
Statement
For Name and Type, the statement the name is written in, up to the name: what decides which names and keywords can be written there (CompletionStatement). Empty where a statement starts.
public string Statement { get; init; }
Property Value
Tokens
The tokens of Statement.
public IReadOnlyList<string> Tokens { get; }
Property Value
Methods
Read(string)
Reads what is being written at the end of text.
public static CompletionSite Read(string text)
Parameters
textstringThe text of the line, up to the cursor.