mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-16 21:59:28 +00:00
@@ -1,6 +1,7 @@
|
||||
import { injectable } from 'inversify';
|
||||
import { CommandRegistry } from '@theia/core/lib/common/command';
|
||||
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
||||
import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
|
||||
import { WorkspaceCommands, FileMenuContribution } from '@theia/workspace/lib/browser/workspace-commands';
|
||||
import { WorkspaceFrontendContribution as TheiaWorkspaceFrontendContribution } from '@theia/workspace/lib/browser/workspace-frontend-contribution';
|
||||
|
||||
@@ -26,6 +27,15 @@ export class WorkspaceFrontendContribution extends TheiaWorkspaceFrontendContrib
|
||||
registerMenus(_: MenuModelRegistry): void {
|
||||
}
|
||||
|
||||
registerKeybindings(registry: KeybindingRegistry): void {
|
||||
super.registerKeybindings(registry);
|
||||
[
|
||||
WorkspaceCommands.NEW_FILE,
|
||||
WorkspaceCommands.FILE_RENAME,
|
||||
WorkspaceCommands.FILE_DELETE
|
||||
].map(({ id }) => id).forEach(registry.unregisterKeybinding.bind(registry));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@injectable()
|
||||
|
||||
Reference in New Issue
Block a user