Move new CodeAction Api from proposed to vscode.d.ts

Moves the `provideCodeActions2` api from proposed to the offical VS Code api. This allows code action providers to return  `CodeAction` objects
This commit is contained in:
Matt Bierner
2018-01-02 15:22:32 -08:00
parent 385e7f7341
commit d1fc73226a
5 changed files with 48 additions and 81 deletions

View File

@@ -42,17 +42,7 @@ export default class TypeScriptQuickFixProvider implements vscode.CodeActionProv
commandManager.register(new ApplyCodeActionCommand(client));
}
public provideCodeActions(
_document: vscode.TextDocument,
_range: vscode.Range,
_context: vscode.CodeActionContext,
_token: vscode.CancellationToken
) {
// Uses provideCodeActions2 instead
return [];
}
public async provideCodeActions2(
public async provideCodeActions(
document: vscode.TextDocument,
range: vscode.Range,
context: vscode.CodeActionContext,

View File

@@ -106,12 +106,7 @@ export default class TypeScriptRefactorProvider implements vscode.CodeActionProv
commandManager.register(new SelectRefactorCommand(doRefactoringCommand));
}
public async provideCodeActions() {
// Uses provideCodeActions2 instead
return [];
}
public async provideCodeActions2(
public async provideCodeActions(
document: vscode.TextDocument,
_range: vscode.Range,
_context: vscode.CodeActionContext,