Class CodeActionInfo
Represents the information about a code action.
public abstract class CodeActionInfo : ActionInfo
- Inheritance
-
CodeActionInfo
- Derived
- Inherited Members
Properties
Arguments
These are the parameters passed to the command when it is executed.
public Dictionary<string, object> Arguments { get; init; }
Property Value
CommandIdentifier
The command is the identifier or name of the action to execute when the user selects it.
public string CommandIdentifier { get; init; }
Property Value
CommandTitle
This is the text that describes the command to execute, which can be shown to the user.
public string CommandTitle { get; init; }
Property Value
DiagnosticIdentifier
Identifies the Diagnostic that this Action fixes
public string DiagnosticIdentifier { get; init; }
Property Value
Diagnostics
This array holds diagnostics for which this action is relevant. If no diagnostics are set, the action may apply generally.
public string[] Diagnostics { get; init; }
Property Value
- string[]
IsPreferred
A value of true
indicates that the code action is preferred; otherwise, false
or null
if there's no preference.
public bool IsPreferred { get; init; }
Property Value
Kind
Kind of the code action. Possible values:
- "quickfix"
- "refactor"
- "refactor.extract"
- "refactor.inline"
- "refactor.rewrite"
- "source"
- "source.organizeImports"
public string Kind { get; init; }
Property Value
Title
The title is typically displayed in the UI to describe the action.
public string Title { get; init; }
Property Value
Methods
CreateWorkspaceEdit(ExecuteCommandArguments)
Creates the workspace edit calculated for the given arguments
public abstract WorkspaceEdit CreateWorkspaceEdit(ExecuteCommandArguments arguments)
Parameters
arguments
ExecuteCommandArgumentsthe arguments for which to calculate the workspace edit
Returns
- WorkspaceEdit
The workspace edit