Leverage notification progress support for progress API (#45958)

* Leverage notification progress support for progress API

fixes #44090

* only allow positive total/worked values

* drop total/worked in favour of percentage

* make sure to dispose CancellationTokenSource after use

* make the cancellation button optional
This commit is contained in:
Benjamin Pasero
2018-03-21 18:06:41 +01:00
committed by GitHub
parent 5a27354d1b
commit 3d81ac21ca
10 changed files with 186 additions and 32 deletions

View File

@@ -809,6 +809,10 @@ export interface ExtHostLogServiceShape {
$setLevel(level: LogLevel);
}
export interface ExtHostProgressShape {
$acceptProgressCanceled(handle: number): void;
}
// --- proxy identifiers
export const MainContext = {
@@ -866,5 +870,6 @@ export const ExtHostContext = {
ExtHostTask: createExtId<ExtHostTaskShape>('ExtHostTask'),
ExtHostWorkspace: createExtId<ExtHostWorkspaceShape>('ExtHostWorkspace'),
ExtHostWindow: createExtId<ExtHostWindowShape>('ExtHostWindow'),
ExtHostWebviews: createExtId<ExtHostWebviewsShape>('ExtHostWebviews')
ExtHostWebviews: createExtId<ExtHostWebviewsShape>('ExtHostWebviews'),
ExtHostProgress: createMainId<ExtHostProgressShape>('ExtHostProgress')
};