CodeAction
Object Hierarchy:
Description:
public class CodeAction :
Action
A code action represents a change that can be performed in code, e.g. to fix a problem or to refactor code.
A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is
executed.
Content:
Properties:
- public Command? command { get; set; }
A command this code action executes. If a code action provides an edit
and a command, first the edit is executed and then the command.
- public Variant? data { get; set; }
A data entry field that is preserved on a code action between a
`textDocument/codeAction` and a `codeAction/resolve` request.
- public Diagnostic[]? diagnostics { get; set; }
- public string? disabled_reason { get; set; }
Human readable description of why the code action is currently
disabled, if it is disabled.
- public WorkspaceEdit? edit { get; set; }
The workspace edit this code action performs.
- public CodeActionKind kind { get; set; }
The kind of the code action.
- public bool preferred { get; set; }
Marks this as a preferred action. Preferred actions are used by the
`auto fix` command and can be targeted by keybindings.
Creation methods:
Methods:
Inherited Members:
All known members inherited from class Lsp.Action