Merge from master

This commit is contained in:
Raj Musuku
2019-02-21 17:56:04 -08:00
parent 5a146e34fa
commit 666ae11639
11482 changed files with 119352 additions and 255574 deletions

View File

@@ -62,7 +62,7 @@ export class TaskService implements ITaskService {
this._onTaskComplete = new Emitter<TaskNode>();
this._onAddNewTask = new Emitter<TaskNode>();
lifecycleService.onWillShutdown(event => event.veto(this.beforeShutdown()));
lifecycleService.onBeforeShutdown(event => event.veto(this.beforeShutdown()));
}
@@ -161,23 +161,23 @@ export class TaskService implements ITaskService {
return new TPromise<boolean>((resolve, reject) => {
let numOfInprogressTasks = this.getNumberOfInProgressTasks();
if (numOfInprogressTasks > 0) {
this.dialogService.show(Severity.Warning, message, options).done(choice => {
this.dialogService.show(Severity.Warning, message, options).then(choice => {
switch (choice) {
case 0:
let timeoutId: number;
let timeout: NodeJS.Timer;
let isTimeout = false;
this.cancelAllTasks().then(() => {
clearTimeout(timeoutId);
clearTimeout(timeout);
if (!isTimeout) {
resolve(false);
}
}, error => {
clearTimeout(timeoutId);
clearTimeout(timeout);
if (!isTimeout) {
resolve(false);
}
});
timeoutId = setTimeout(function () {
timeout = setTimeout(function () {
isTimeout = true;
resolve(false);
}, 2000);