Merge VS Code 1.31.1 (#4283)

This commit is contained in:
Matt Irvine
2019-03-15 13:09:45 -07:00
committed by GitHub
parent 7d31575149
commit 86bac90001
1716 changed files with 53308 additions and 48375 deletions

View File

@@ -8,7 +8,6 @@ import { validateConstraint } from 'vs/base/common/types';
import { ILogService } from 'vs/platform/log/common/log';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import * as extHostTypes from 'vs/workbench/api/node/extHostTypes';
import { TPromise } from 'vs/base/common/winjs.base';
import * as azdata from 'azdata';
@@ -56,7 +55,7 @@ export class ExtHostTasks implements ExtHostTasksShape {
$executeContributedTask<T>(id: string, ...args: any[]): Thenable<T> {
let command = this._tasks.get(id);
if (!command) {
return TPromise.wrapError<T>(new Error(`Contributed task '${id}' does not exist.`));
return Promise.reject(new Error(`Contributed task '${id}' does not exist.`));
}
let { callback, thisArg, description } = command;
@@ -66,14 +65,14 @@ export class ExtHostTasks implements ExtHostTasksShape {
try {
validateConstraint(args[i], description.args[i].constraint);
} catch (err) {
return TPromise.wrapError<T>(new Error(`Running the contributed task:'${id}' failed. Illegal argument '${description.args[i].name}' - ${description.args[i].description}`));
return Promise.reject(new Error(`Running the contributed task:'${id}' failed. Illegal argument '${description.args[i].name}' - ${description.args[i].description}`));
}
}
}
try {
let result = callback.apply(thisArg, args);
return TPromise.as(result);
return Promise.resolve(result);
} catch (err) {
// console.log(err);
// try {
@@ -81,11 +80,11 @@ export class ExtHostTasks implements ExtHostTasksShape {
// } catch (err) {
// //
// }
return TPromise.wrapError<T>(new Error(`Running the contributed task:'${id}' failed.`));
return Promise.reject(new Error(`Running the contributed task:'${id}' failed.`));
}
}
$getContributedTaskHandlerDescriptions(): TPromise<{ [id: string]: any; }> {
$getContributedTaskHandlerDescriptions(): Promise<{ [id: string]: any; }> {
throw new Error('Method not implemented.');
}
}