Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
registerKeybindings(keybindings: KeybindingRegistry): void {
// unregister Ctrl + F pseudo command for terminal widget.
keybindings.unregisterKeybinding({
command: KeybindingRegistry.PASSTHROUGH_PSEUDO_COMMAND,
keybinding: KeyCode.createKeyCode({ key: Key.KEY_F, ctrl: true }).toString(),
context: TerminalKeybindingContexts.terminalActive
});
keybindings.registerKeybinding({
command: TerminalSearchCommands.TERMINAL_FIND_TEXT.id,
keybinding: 'ctrlcmd+f',
context: TerminalKeybindingContexts.terminalActive
});
keybindings.registerKeybinding({
command: TerminalSearchCommands.TERMINAL_FIND_TEXT_CANCEL.id,
keybinding: 'esc',
context: TerminalSearchKeybindingContext.disableSearch
});
}
}
registerKeybindings(keybindings: KeybindingRegistry): void {
// unregister Ctrl + F pseudo command for terminal widget.
keybindings.unregisterKeybinding({
command: KeybindingRegistry.PASSTHROUGH_PSEUDO_COMMAND,
keybinding: KeyCode.createKeyCode({ key: Key.KEY_F, ctrl: true }).toString(),
context: TerminalKeybindingContexts.terminalActive
});
keybindings.registerKeybinding({
command: TerminalSearchCommands.TERMINAL_FIND_TEXT.id,
keybinding: 'ctrlcmd+f',
context: TerminalKeybindingContexts.terminalActive
});
keybindings.registerKeybinding({
command: TerminalSearchCommands.TERMINAL_FIND_TEXT_CANCEL.id,
keybinding: 'esc',
context: TerminalSearchKeybindingContext.disableSearch
});
}
}
registerMenus(menus: MenuModelRegistry): void {
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_RUN.id,
order: '0'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_RUN_BUILD.id,
order: '1'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_RUN_TEST.id,
order: '2'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_RUN_LAST.id,
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_RUN_BUILD.id,
order: '1'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_RUN_TEST.id,
order: '2'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_RUN_LAST.id,
order: '3'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_ATTACH.id,
order: '4'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_RUN_TEXT.id,
order: '5'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS_INFO, {
commandId: TaskCommands.TASK_SHOW_RUNNING.id,
label: 'Show Running Tasks...',
order: '0'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS_INFO, {
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_RUN_LAST.id,
order: '3'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_ATTACH.id,
order: '4'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_RUN_TEXT.id,
order: '5'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS_INFO, {
commandId: TaskCommands.TASK_SHOW_RUNNING.id,
label: 'Show Running Tasks...',
order: '0'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS_INFO, {
commandId: TaskCommands.TASK_TERMINATE.id,
label: 'Terminate Task...',
order: '1'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS_CONFIG, {
commandId: TaskCommands.TASK_CONFIGURE.id,
order: '0'
});
}
commandId: TaskCommands.TASK_ATTACH.id,
order: '4'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS, {
commandId: TaskCommands.TASK_RUN_TEXT.id,
order: '5'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS_INFO, {
commandId: TaskCommands.TASK_SHOW_RUNNING.id,
label: 'Show Running Tasks...',
order: '0'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS_INFO, {
commandId: TaskCommands.TASK_TERMINATE.id,
label: 'Terminate Task...',
order: '1'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS_CONFIG, {
commandId: TaskCommands.TASK_CONFIGURE.id,
order: '0'
});
}
order: '5'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS_INFO, {
commandId: TaskCommands.TASK_SHOW_RUNNING.id,
label: 'Show Running Tasks...',
order: '0'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS_INFO, {
commandId: TaskCommands.TASK_TERMINATE.id,
label: 'Terminate Task...',
order: '1'
});
menus.registerMenuAction(TerminalMenus.TERMINAL_TASKS_CONFIG, {
commandId: TaskCommands.TASK_CONFIGURE.id,
order: '0'
});
}