Table of Contents

Class CodeActionInfo

Namespace
NMF.AnyText
Assembly
NMF.AnyText.Core.dll

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

Dictionary<string, object>

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

string

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

string

DiagnosticIdentifier

Identifies the Diagnostic that this Action fixes

public string DiagnosticIdentifier { get; init; }

Property Value

string

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

bool

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

string

Title

The title is typically displayed in the UI to describe the action.

public string Title { get; init; }

Property Value

string

Methods

CreateWorkspaceEdit(ExecuteCommandArguments)

Creates the workspace edit calculated for the given arguments

public abstract WorkspaceEdit CreateWorkspaceEdit(ExecuteCommandArguments arguments)

Parameters

arguments ExecuteCommandArguments

the arguments for which to calculate the workspace edit

Returns

WorkspaceEdit

The workspace edit