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

@@ -2,7 +2,6 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation';
@@ -26,6 +25,36 @@ export interface IProgressService {
showWhile(promise: Thenable<any>, delay?: number): Thenable<void>;
}
export const enum ProgressLocation {
Explorer = 1,
Scm = 3,
Extensions = 5,
Window = 10,
Notification = 15
}
export interface IProgressOptions {
location: ProgressLocation | string;
title?: string;
source?: string;
total?: number;
cancellable?: boolean;
}
export interface IProgressStep {
message?: string;
increment?: number;
}
export const IProgressService2 = createDecorator<IProgressService2>('progressService2');
export interface IProgressService2 {
_serviceBrand: any;
withProgress<P extends Thenable<R>, R=any>(options: IProgressOptions, task: (progress: IProgress<IProgressStep>) => P, onDidCancel?: () => void): P;
}
export interface IProgressRunner {
total(value: number): void;
worked(value: number): void;
@@ -78,7 +107,7 @@ export class LongRunningOperation {
private currentOperationId = 0;
private currentOperationDisposables: IDisposable[] = [];
private currentProgressRunner: IProgressRunner;
private currentProgressTimeout: number;
private currentProgressTimeout: any;
constructor(
private progressService: IProgressService