提交 3d7c53c8 编写于 作者: J Johannes Rieken

rename to withWindowProgress

上级 0caa5655
......@@ -56,11 +56,11 @@ export class Progress<T> implements IProgress<T> {
export const IProgressService2 = createDecorator<IProgressService2>('progressService2');
export interface IProgressService2 {
_serviceBrand: any;
withStatusBarProgress(task: (progress: IProgress<string>) => TPromise<any>): void;
withWindowProgress(task: (progress: IProgress<string>) => TPromise<any>): void;
// withViewletProgress(viewletId:string, task)
}
......@@ -16,7 +16,7 @@ declare module 'vscode' {
export namespace window {
export function withStatusBarProgress<R>(task: (progress: Progress<string>, token: CancellationToken) => Thenable<R>): Thenable<R>;
export function withWindowProgress<R>(task: (progress: Progress<string>, token: CancellationToken) => Thenable<R>): Thenable<R>;
// export function withApplicationProgress<R>(task: (progress: Progress<number>) => Thenable<R>): Thenable<R>;
......
......@@ -279,8 +279,8 @@ export function createApiFactory(initData: IInitData, threadService: IThreadServ
setStatusBarMessage(text: string, timeoutOrThenable?: number | Thenable<any>): vscode.Disposable {
return extHostStatusBar.setStatusBarMessage(text, timeoutOrThenable);
},
withStatusBarProgress: proposedApiFunction(extension, <R>(task: (progress: vscode.Progress<string>, token: vscode.CancellationToken) => Thenable<R>): Thenable<R> => {
return extHostProgress.withStatusBarProgress(task);
withWindowProgress: proposedApiFunction(extension, <R>(task: (progress: vscode.Progress<string>, token: vscode.CancellationToken) => Thenable<R>): Thenable<R> => {
return extHostProgress.withWindowProgress(task);
}),
createOutputChannel(name: string): vscode.OutputChannel {
return extHostOutputService.createOutputChannel(name);
......
......@@ -16,7 +16,7 @@ export class ExtHostProgress {
this._proxy = proxy;
}
withStatusBarProgress<R>(task: (progress: Progress<string>, token: CancellationToken) => Thenable<R>): Thenable<R> {
withWindowProgress<R>(task: (progress: Progress<string>, token: CancellationToken) => Thenable<R>): Thenable<R> {
const handle = this._handles++;
this._proxy.$progressStart(handle);
......
......@@ -22,7 +22,7 @@ export class MainThreadProgress extends MainThreadProgressShape {
$progressStart(handle: number): void {
this._progressService.withStatusBarProgress(progress => {
this._progressService.withWindowProgress(progress => {
return new TPromise<any>((resolve, reject) => {
this.progress.set(handle, { resolve, reject, progress });
});
......
......@@ -54,7 +54,7 @@ export class ProgressService2 implements IProgressService2 {
private _stack: Progress<string>[] = [];
withStatusBarProgress(task: (progress: IProgress<string>) => TPromise<any>): void {
withWindowProgress(task: (progress: IProgress<string>) => TPromise<any>): void {
const progress = new Progress<string>(() => this._updateProgress());
this._stack.unshift(progress);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册