Description
Describe the request
Every non-separator and non-group menu item in Theia is backed by a command. The menu item's enablement is defined by the handler of the command associated with the menu item. (See here). But, in Theia, there is no dynamic menu in the electron app (See here), so no matter if isEnabled
false
, the menu item will always be enabled. (See here)
The placeholder menu items were created only for IDE2 to allow adding additional "label" menus. Such as the followings:
The placeholder menu items are permanently disabled, as they're not backed by a command.
IDE2 started to misuse the placeholder label for disabled menu items. It's incorrect. To prove, make sure one of the following menu items are disabled and note that the keybinding is missing from the menu item:
Instead of using the placeholder solution and manually rebuilding the entire menu on disablement changes, IDE2 should customize the electron main menu factory, must not set the menu item enablement to true
, rely on the isEnabled
function of the handler, and update the electron menu with the MenuManager
.
Describe the current behavior
See the description. The expected bahevior is that the associated keybinding is visible for the menu even if the menu item itself is disabled
Arduino IDE version
Operating system
macOS
Operating system version
12.5.1
Additional context
No response
Issue checklist
- I searched for previous requests in the issue tracker
- I verified the feature was still missing when using the latest nightly build
- My request contains all necessary details