Skip to content

Commit e684d1b

Browse files
committed
remove activation message from command service... microsoft#59645
1 parent 9cbd004 commit e684d1b

2 files changed

Lines changed: 5 additions & 26 deletions

File tree

src/vs/workbench/services/commands/common/commandService.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import { IExtensionService } from 'vs/workbench/services/extensions/common/exten
99
import { Event, Emitter } from 'vs/base/common/event';
1010
import { Disposable } from 'vs/base/common/lifecycle';
1111
import { ILogService } from 'vs/platform/log/common/log';
12-
import { IProgressService2, ProgressLocation } from 'vs/platform/progress/common/progress';
13-
import { localize } from 'vs/nls';
1412

1513
export class CommandService extends Disposable implements ICommandService {
1614

@@ -24,8 +22,7 @@ export class CommandService extends Disposable implements ICommandService {
2422
constructor(
2523
@IInstantiationService private readonly _instantiationService: IInstantiationService,
2624
@IExtensionService private readonly _extensionService: IExtensionService,
27-
@ILogService private readonly _logService: ILogService,
28-
@IProgressService2 private readonly _progressService: IProgressService2,
25+
@ILogService private readonly _logService: ILogService
2926
) {
3027
super();
3128
this._extensionService.whenInstalledExtensionsRegistered().then(value => this._extensionHostIsReady = value);
@@ -48,12 +45,6 @@ export class CommandService extends Disposable implements ICommandService {
4845
if (!commandIsRegistered) {
4946
waitFor = Promise.all([activation, this._extensionService.activateByEvent(`*`)]);
5047
}
51-
52-
this._progressService.withProgress({
53-
location: ProgressLocation.Window,
54-
title: localize('activating', "Activating extensions for command '{0}'...", id)
55-
}, () => waitFor);
56-
5748
return (waitFor as Promise<any>).then(_ => this._tryExecuteCommand(id, args));
5849
}
5950
}

src/vs/workbench/services/commands/test/common/commandService.test.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { InstantiationService } from 'vs/platform/instantiation/common/instantia
1111
import { IExtensionPoint } from 'vs/workbench/services/extensions/common/extensionsRegistry';
1212
import { Event, Emitter } from 'vs/base/common/event';
1313
import { NullLogService } from 'vs/platform/log/common/log';
14-
import { IProgressService2 } from 'vs/platform/progress/common/progress';
1514

1615
class SimpleExtensionService implements IExtensionService {
1716
_serviceBrand: any;
@@ -54,17 +53,6 @@ class SimpleExtensionService implements IExtensionService {
5453

5554
suite('CommandService', function () {
5655

57-
interface Ctor<T> {
58-
new(): T;
59-
}
60-
function mock<T>(): Ctor<T> {
61-
return function () { } as any;
62-
}
63-
64-
let progressService = new class extends mock<IProgressService2>() {
65-
withProgress() { return null; }
66-
};
67-
6856
let commandRegistration: IDisposable;
6957

7058
setup(function () {
@@ -84,7 +72,7 @@ suite('CommandService', function () {
8472
lastEvent = activationEvent;
8573
return super.activateByEvent(activationEvent);
8674
}
87-
}, new NullLogService(), progressService);
75+
}, new NullLogService());
8876

8977
return service.executeCommand('foo').then(() => {
9078
assert.ok(lastEvent, 'onCommand:foo');
@@ -104,7 +92,7 @@ suite('CommandService', function () {
10492
}
10593
};
10694

107-
let service = new CommandService(new InstantiationService(), extensionService, new NullLogService(), progressService);
95+
let service = new CommandService(new InstantiationService(), extensionService, new NullLogService());
10896

10997
await extensionService.whenInstalledExtensionsRegistered();
11098

@@ -122,7 +110,7 @@ suite('CommandService', function () {
122110
whenInstalledExtensionsRegistered() {
123111
return new Promise<boolean>(_resolve => { /*ignore*/ });
124112
}
125-
}, new NullLogService(), progressService);
113+
}, new NullLogService());
126114

127115
service.executeCommand('bar');
128116
assert.equal(callCounter, 1);
@@ -139,7 +127,7 @@ suite('CommandService', function () {
139127
whenInstalledExtensionsRegistered() {
140128
return whenInstalledExtensionsRegistered;
141129
}
142-
}, new NullLogService(), progressService);
130+
}, new NullLogService());
143131

144132
let r = service.executeCommand('bar');
145133
assert.equal(callCounter, 0);

0 commit comments

Comments
 (0)