Table of Contents

Class ToolFix

Namespace
RDCore.SDK.Assistant
Assembly
RDCore.SDK.Protocols.dll

A fix of a document, as ListFixes answers it: a code action of the language server.

public sealed record ToolFix : IEquatable<ToolFix>
Inheritance
ToolFix
Implements
Inherited Members

Properties

Diagnostic

The diagnostic it fixes; null for a refactoring, which fixes none.

public ToolDiagnostic? Diagnostic { get; init; }

Property Value

ToolDiagnostic

FixId

What names the fix to PreviewFix and ApplyFix, as long as the document is not changed: the fix itself, which the language server finds again (FixIds, RDCore.SDK), and no handle to a fix it keeps.

public required string FixId { get; init; }

Property Value

string

HasEdit

Whether the fix is an edit of the documents, which PreviewFix shows and ApplyFix applies. A fix that is not an edit is run by its editor's command (a rename to a name the user types, an import), which the tools do not run.

public bool HasEdit { get; init; }

Property Value

bool

IsPreferred

Whether it is the fix of its diagnostic that an editor applies first (LSP 3.17 CodeAction.isPreferred).

public bool IsPreferred { get; init; }

Property Value

bool

Kind

The kind of code action it is (LSP 3.17 CodeActionKind): quickfix for a fix of a diagnostic, refactor.extract and the other refactor kinds for a refactoring.

public string Kind { get; init; }

Property Value

string

Title

What the fix does, in the language of the client's user interface, as an editor's menu shows it.

public string Title { get; init; }

Property Value

string