mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-06 17:23:53 -05:00
Merge from vscode 5d18ad4c5902e3bddbc9f78da82dfc2ac349e908 (#9683)
This commit is contained in:
@@ -34,12 +34,31 @@ export class DebugProgressContribution implements IWorkbenchContribution {
|
||||
});
|
||||
|
||||
this.progressService.withProgress({ location: VIEWLET_ID }, () => promise);
|
||||
const source = this.debugService.getConfigurationManager().getDebuggerLabel(session);
|
||||
this.progressService.withProgress({
|
||||
location: ProgressLocation.Notification,
|
||||
title: progressStartEvent.body.title,
|
||||
cancellable: progressStartEvent.body.cancellable,
|
||||
silent: true
|
||||
}, () => promise, () => session.cancel(progressStartEvent.body.progressId));
|
||||
silent: true,
|
||||
source,
|
||||
delay: 500
|
||||
}, progressStep => {
|
||||
let increment = 0;
|
||||
const progressUpdateListener = session.onDidProgressUpdate(e => {
|
||||
if (e.body.progressId === progressStartEvent.body.progressId) {
|
||||
if (typeof e.body.percentage === 'number') {
|
||||
increment = e.body.percentage - increment;
|
||||
}
|
||||
progressStep.report({
|
||||
message: e.body.message,
|
||||
increment: typeof e.body.percentage === 'number' ? increment : undefined,
|
||||
total: typeof e.body.percentage === 'number' ? 100 : undefined,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return promise.then(() => progressUpdateListener.dispose());
|
||||
}, () => session.cancel(progressStartEvent.body.progressId));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user