提交 90185b88 编写于 作者: J Johannes Rieken

hide activation message after 5 seconds, #61846

上级 4bd295b6
......@@ -8,6 +8,8 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten
import { IProgressService2, ProgressLocation } from 'vs/platform/progress/common/progress';
import { localize } from 'vs/nls';
import { IDisposable } from 'vs/base/common/lifecycle';
import { timeout } from 'vs/base/common/async';
import { ILogService } from 'vs/platform/log/common/log';
export class ExtensionActivationProgress implements IWorkbenchContribution {
......@@ -16,6 +18,7 @@ export class ExtensionActivationProgress implements IWorkbenchContribution {
constructor(
@IExtensionService extensionService: IExtensionService,
@IProgressService2 progressService: IProgressService2,
@ILogService logService: ILogService,
) {
const options = {
......@@ -24,7 +27,8 @@ export class ExtensionActivationProgress implements IWorkbenchContribution {
};
this._listener = extensionService.onWillActivateByEvent(e => {
progressService.withProgress(options, _ => e.activation);
logService.trace('onWillActivateByEvent: ', e.event);
progressService.withProgress(options, _ => Promise.race([e.activation, timeout(5000)]));
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册