Class CodeLensInfo<T>
Represents a CodeLens item used for a Language Server Protocol (LSP) server. CodeLens provides information or actions associated with specific locations in a text document.
public class CodeLensInfo<T> : CodeLensInfo
Type Parameters
T
The semantic type of elements for which this action is executed
- Inheritance
-
CodeLensInfo<T>
- Inherited Members
Properties
Action
The actual execution of this CodeLens
public Action<T, ExecuteCommandArguments> Action { get; init; }
Property Value
TitleFunc
A function to calculate the title from the semantic element and ParseContext
public Func<T, ParseContext, string> TitleFunc { get; init; }
Property Value
- Func<T, ParseContext, string>
Methods
GetTitleForRuleApplication(RuleApplication, ParseContext)
Calculates the title of the code lens for the given rule application
public override string GetTitleForRuleApplication(RuleApplication ruleApplication, ParseContext context)
Parameters
ruleApplication
RuleApplicationThe rule application for which the title is being determined.
context
ParseContextThe parsing context used for evaluation.
Returns
- string
The title of the code lens
Invoke(ExecuteCommandArguments)
Invokes the action with the given arguments
public override void Invoke(ExecuteCommandArguments arguments)
Parameters
arguments
ExecuteCommandArgumentsA structure containing the rule application, context and position