Closed msujew closed 3 weeks ago
setTimeout(() => { menus.registerSubmenu(subSubMenuPath, 'Sample sub menu', { order: '2' }); menus.registerMenuAction(subSubMenuPath, { commandId: SampleCommand2.id, order: '3' }); const visibility = this.preferenceService.get('window.menuBarVisibility'); this.preferenceService.updateValue('window.menuBarVisibility', visibility === 'classic' ? 'visible' : 'classic') }, 5000);
@msujew Thanks for your help, I changed window.menuBarVisibility
like this and it worked for me
Bug Description:
Discussed in https://github.com/eclipse-theia/theia/discussions/13716.
Registering a menu with a delay prevents that menu from showing up in the main application menu.
The issue is that the main menu is only recreated during startup and when the menu bar visibility changes. It doesn't listen on any other events.
Steps to Reproduce:
registerMenus
method of anyMenuContribution
.window.menuBarVisibility
setting.Additional Information