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

@@ -289,9 +289,8 @@ class CodeActionAdapter {
}
});
return asWinJsPromise(token => this._provider.provideCodeActions2
? this._provider.provideCodeActions2(doc, ran, { diagnostics: allDiagnostics }, token)
: this._provider.provideCodeActions(doc, ran, { diagnostics: allDiagnostics }, token)
return asWinJsPromise(token =>
this._provider.provideCodeActions(doc, ran, { diagnostics: allDiagnostics }, token)
).then(commandsOrActions => {
if (isFalsyOrEmpty(commandsOrActions)) {
return undefined;