Compare commits

..

1 Commits
#1714 ... #1850

Author SHA1 Message Date
Akos Kitta
33f790a2db 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 arduino/arduino-ide#1850

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2024-02-23 15:36:57 +01:00
2 changed files with 10 additions and 6 deletions

View File

@@ -74,9 +74,7 @@ export class UserFields extends Contribution {
async checkUserFieldsDialog(forceOpen = false): Promise<boolean> {
const key = this.selectedFqbnAddress();
if (!key) {
// Let the upload continue without an FQBN and the CLI fail instead of disabling the upload from IDE.
// https://github.com/arduino/arduino-ide/issues/1714
return true;
return false;
}
/*
If the board requires to be configured with user fields, we want

View File

@@ -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,