mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-06 01:25:38 -05:00
Merge from master
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user