move CommandRegistry out of KeybindingsRegistry

This commit is contained in:
Johannes Rieken
2016-07-07 09:53:47 +02:00
parent 739acb2b21
commit bd4e85d8a3
16 changed files with 185 additions and 76 deletions

View File

@@ -6,7 +6,9 @@
import {IThreadService} from 'vs/workbench/services/thread/common/threadService';
import {KeybindingsRegistry} from 'vs/platform/keybinding/common/keybindingsRegistry';
import {IKeybindingService, ICommandHandlerDescription} from 'vs/platform/keybinding/common/keybinding';
import {IKeybindingService} from 'vs/platform/keybinding/common/keybinding';
import {CommandsRegistry, ICommandHandlerDescription} from 'vs/platform/commands/common/commands';
import {TPromise} from 'vs/base/common/winjs.base';
import {ExtHostContext, ExtHostCommandsShape} from './extHostProtocol';
@@ -49,7 +51,7 @@ export class MainThreadCommands {
}
$getCommands(): Thenable<string[]> {
return TPromise.as(Object.keys(KeybindingsRegistry.getCommands()));
return TPromise.as(Object.keys(CommandsRegistry.getCommands()));
}
}
@@ -61,7 +63,7 @@ KeybindingsRegistry.registerCommandDesc({
return accessor.get(IThreadService).get(ExtHostContext.ExtHostCommands).$getContributedCommandHandlerDescriptions().then(result => {
// add local commands
const commands = KeybindingsRegistry.getCommands();
const commands = CommandsRegistry.getCommands();
for (let id in commands) {
let {description} = commands[id];
if (description) {