clang-tools  11.0.0
Public Attributes | Static Public Attributes | List of all members
clang::clangd::CodeAction Struct Reference

A code action represents a change that can be performed in code, e.g. More...

#include <Protocol.h>

Collaboration diagram for clang::clangd::CodeAction:
[legend]

Public Attributes

std::string title
 A short, human-readable, title for this code action. More...
 
llvm::Optional< std::string > kind
 The kind of the code action. More...
 
llvm::Optional< std::vector< Diagnostic > > diagnostics
 The diagnostics that this code action resolves. More...
 
llvm::Optional< WorkspaceEditedit
 The workspace edit this code action performs. More...
 
llvm::Optional< Command > command
 A command this code action executes. More...
 

Static Public Attributes

const static llvm::StringLiteral QUICKFIX_KIND = "quickfix"
 
const static llvm::StringLiteral REFACTOR_KIND = "refactor"
 
const static llvm::StringLiteral INFO_KIND = "info"
 

Detailed Description

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.

Definition at line 918 of file Protocol.h.

Member Data Documentation

◆ command

llvm::Optional<Command> clang::clangd::CodeAction::command

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.

Definition at line 937 of file Protocol.h.

◆ diagnostics

llvm::Optional<std::vector<Diagnostic> > clang::clangd::CodeAction::diagnostics

The diagnostics that this code action resolves.

Definition at line 930 of file Protocol.h.

◆ edit

llvm::Optional<WorkspaceEdit> clang::clangd::CodeAction::edit

The workspace edit this code action performs.

Definition at line 933 of file Protocol.h.

◆ INFO_KIND

const llvm::StringLiteral clang::clangd::CodeAction::INFO_KIND = "info"
static

Definition at line 927 of file Protocol.h.

◆ kind

llvm::Optional<std::string> clang::clangd::CodeAction::kind

The kind of the code action.

Used to filter code actions.

Definition at line 924 of file Protocol.h.

◆ QUICKFIX_KIND

const llvm::StringLiteral clang::clangd::CodeAction::QUICKFIX_KIND = "quickfix"
static

Definition at line 925 of file Protocol.h.

◆ REFACTOR_KIND

const llvm::StringLiteral clang::clangd::CodeAction::REFACTOR_KIND = "refactor"
static

Definition at line 926 of file Protocol.h.

◆ title

std::string clang::clangd::CodeAction::title

A short, human-readable, title for this code action.

Definition at line 920 of file Protocol.h.


The documentation for this struct was generated from the following files: