Skip to content

Commit f632cf3

Browse files
committed
Revert "Log warning when menu uses bad commandId"
This reverts commit 1828d8a.
1 parent 192702f commit f632cf3

4 files changed

Lines changed: 0 additions & 20 deletions

File tree

src/vs/platform/commands/common/commandService.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,4 @@ export class CommandService implements ICommandService {
3737
}
3838
});
3939
}
40-
41-
isKnownCommand(commandId: string): boolean {
42-
const command = CommandsRegistry.getCommand(commandId);
43-
44-
if (!command) {
45-
return false;
46-
}
47-
48-
return true;
49-
}
5040
}

src/vs/platform/commands/common/commands.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export interface ICommandService {
1414
_serviceBrand: any;
1515
executeCommand<T>(commandId: string, ...args: any[]): TPromise<T>;
1616
executeCommand(commandId: string, ...args: any[]): TPromise<any>;
17-
isKnownCommand(commandId: string): boolean;
1817
}
1918

2019
export interface ICommandsMap {
@@ -100,8 +99,5 @@ export const NullCommandService: ICommandService = {
10099
_serviceBrand: undefined,
101100
executeCommand() {
102101
return TPromise.as(undefined);
103-
},
104-
isKnownCommand() {
105-
return false;
106102
}
107103
};

src/vs/workbench/electron-browser/integration.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,6 @@ export class ElectronIntegration {
172172
private resolveKeybindings(actionIds: string[]): TPromise<{ id: string; binding: number; }[]> {
173173
return this.partService.joinCreation().then(() => {
174174
return arrays.coalesce(actionIds.map((id) => {
175-
if (!this.commandService.isKnownCommand(id)) {
176-
console.warn('Menu uses unknown command: ' + id);
177-
}
178175
let bindings = this.keybindingService.lookupKeybindings(id);
179176

180177
// return the first binding that can be represented by electron

src/vs/workbench/test/node/api/extHostApiCommands.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ suite('ExtHostLanguageFeatureCommands', function() {
6464
executeCommand(id, args): any {
6565
let {handler} = CommandsRegistry.getCommands()[id];
6666
return TPromise.as(instantiationService.invokeFunction(handler, args));
67-
},
68-
isKnownCommand(id) {
69-
return true;
7067
}
7168
});
7269
services.set(IMarkerService, new MarkerService());

0 commit comments

Comments
 (0)