public class CodeAction
extends java.lang.Object
Constructor and Description |
---|
CodeAction() |
CodeAction(java.lang.String title) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Command |
getCommand()
A command this code action executes.
|
java.lang.Object |
getData()
A data entry field that is preserved on a code action between
a `textDocument/codeAction` and a `codeAction/resolve` request.
|
java.util.List<Diagnostic> |
getDiagnostics()
The diagnostics that this code action resolves.
|
CodeActionDisabled |
getDisabled()
Marks that the code action cannot currently be applied.
|
WorkspaceEdit |
getEdit()
The workspace edit this code action performs.
|
java.lang.Boolean |
getIsPreferred()
Marks this as a preferred action.
|
java.lang.String |
getKind()
The kind of the code action.
|
java.lang.String |
getTitle()
A short, human-readable, title for this code action.
|
int |
hashCode() |
void |
setCommand(Command command)
A command this code action executes.
|
void |
setData(java.lang.Object data)
A data entry field that is preserved on a code action between
a `textDocument/codeAction` and a `codeAction/resolve` request.
|
void |
setDiagnostics(java.util.List<Diagnostic> diagnostics)
The diagnostics that this code action resolves.
|
void |
setDisabled(CodeActionDisabled disabled)
Marks that the code action cannot currently be applied.
|
void |
setEdit(WorkspaceEdit edit)
The workspace edit this code action performs.
|
void |
setIsPreferred(java.lang.Boolean isPreferred)
Marks this as a preferred action.
|
void |
setKind(java.lang.String kind)
The kind of the code action.
|
void |
setTitle(java.lang.String title)
A short, human-readable, title for this code action.
|
java.lang.String |
toString() |
public CodeAction()
public CodeAction(java.lang.String title)
@Pure public java.lang.String getTitle()
public void setTitle(java.lang.String title)
@Pure public java.lang.String getKind()
Used to filter code actions.
See CodeActionKind
for some predefined code action kinds.
public void setKind(java.lang.String kind)
Used to filter code actions.
See CodeActionKind
for some predefined code action kinds.
@Pure public java.util.List<Diagnostic> getDiagnostics()
public void setDiagnostics(java.util.List<Diagnostic> diagnostics)
@Pure public java.lang.Boolean getIsPreferred()
A quick fix should be marked preferred if it properly addresses the underlying error. A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
Since 3.15.0
public void setIsPreferred(java.lang.Boolean isPreferred)
A quick fix should be marked preferred if it properly addresses the underlying error. A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
Since 3.15.0
@Pure public CodeActionDisabled getDisabled()
Clients should follow the following guidelines regarding disabled code actions:
CodeActionDisabled.reason
in the editor.
Since 3.16.0
public void setDisabled(CodeActionDisabled disabled)
Clients should follow the following guidelines regarding disabled code actions:
CodeActionDisabled.reason
in the editor.
Since 3.16.0
@Pure public WorkspaceEdit getEdit()
public void setEdit(WorkspaceEdit edit)
@Pure public Command getCommand()
public void setCommand(Command command)
@Pure public java.lang.Object getData()
Since 3.16.0
public void setData(java.lang.Object data)
Since 3.16.0
@Pure public java.lang.String toString()
toString
in class java.lang.Object
@Pure public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
@Pure public int hashCode()
hashCode
in class java.lang.Object