Skip to content

Commit

Permalink
fix: disable open keymap split editor from toolbar
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Akos Kitta committed Feb 23, 2024
1 parent aa9b10d commit 33f790a
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import { CommandRegistry } from '@theia/core/lib/common/command';
import { MenuModelRegistry } from '@theia/core/lib/common/menu/menu-model-registry';
import { nls } from '@theia/core/lib/common/nls';
import { injectable } from '@theia/core/shared/inversify';
import { MenuModelRegistry } from '@theia/core';
import {
KeymapsFrontendContribution as TheiaKeymapsFrontendContribution,
KeymapsCommands,
KeymapsFrontendContribution as TheiaKeymapsFrontendContribution,
} from '@theia/keymaps/lib/browser/keymaps-frontend-contribution';
import { ArduinoMenus } from '../../menu/arduino-menus';
import { nls } from '@theia/core/lib/common';

@injectable()
export class KeymapsFrontendContribution extends TheiaKeymapsFrontendContribution {
override registerCommands(registry: CommandRegistry): void {
super.registerCommands(registry);
registry.unregisterCommand(KeymapsCommands.OPEN_KEYMAPS_JSON_TOOLBAR.id);
}

override registerMenus(menus: MenuModelRegistry): void {
menus.registerMenuAction(ArduinoMenus.FILE__ADVANCED_SUBMENU, {
commandId: KeymapsCommands.OPEN_KEYMAPS.id,
Expand Down

0 comments on commit 33f790a

Please sign in to comment.