Skip to content

Commit 33f790a

Browse files
author
Akos Kitta
committed
fix: disable open keymap split editor from toolbar
The complete support for split editor is yet to be added to IDE2. For now, this commit turns off opening the keymaps in the JSON split editor. So that it cannot get the primary IDE2 layout into an inconsistent state. Closes #1850 Signed-off-by: Akos Kitta <[email protected]>
1 parent aa9b10d commit 33f790a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Diff for: arduino-ide-extension/src/browser/theia/keymaps/keymaps-frontend-contribution.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1+
import { CommandRegistry } from '@theia/core/lib/common/command';
2+
import { MenuModelRegistry } from '@theia/core/lib/common/menu/menu-model-registry';
3+
import { nls } from '@theia/core/lib/common/nls';
14
import { injectable } from '@theia/core/shared/inversify';
2-
import { MenuModelRegistry } from '@theia/core';
35
import {
4-
KeymapsFrontendContribution as TheiaKeymapsFrontendContribution,
56
KeymapsCommands,
7+
KeymapsFrontendContribution as TheiaKeymapsFrontendContribution,
68
} from '@theia/keymaps/lib/browser/keymaps-frontend-contribution';
79
import { ArduinoMenus } from '../../menu/arduino-menus';
8-
import { nls } from '@theia/core/lib/common';
910

1011
@injectable()
1112
export class KeymapsFrontendContribution extends TheiaKeymapsFrontendContribution {
13+
override registerCommands(registry: CommandRegistry): void {
14+
super.registerCommands(registry);
15+
registry.unregisterCommand(KeymapsCommands.OPEN_KEYMAPS_JSON_TOOLBAR.id);
16+
}
17+
1218
override registerMenus(menus: MenuModelRegistry): void {
1319
menus.registerMenuAction(ArduinoMenus.FILE__ADVANCED_SUBMENU, {
1420
commandId: KeymapsCommands.OPEN_KEYMAPS.id,

0 commit comments

Comments
 (0)