mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Take kind instead of edit in CodeAction ctor
Changes the `CodeAction` constructor to take a kind instead of an edit. This makes the API more consistent IMO, as now both `edit` and `command` are set the same way
This commit is contained in:
@@ -417,10 +417,10 @@ export class ExtHostApiCommands {
|
||||
} else {
|
||||
const ret = new types.CodeAction(
|
||||
codeAction.title,
|
||||
typeConverters.WorkspaceEdit.to(codeAction.edit)
|
||||
codeAction.kind ? new types.CodeActionKind(codeAction.kind) : undefined
|
||||
);
|
||||
if (codeAction.kind) {
|
||||
ret.scope = new types.CodeActionKind(codeAction.kind);
|
||||
if (codeAction.edit) {
|
||||
ret.edit = typeConverters.WorkspaceEdit.to(codeAction.edit);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user