void (@NotNull ActionManager actionManager) { if (!SystemInfoRt.isLinux || ApplicationManager.getApplication().isUnitTestMode() || !isPresented()) { return; } // register toggle-swing-menu action (to be able to enable swing menu when system applet is died) actionManager .registerAction(TOGGLE_SWING_MENU_ACTION_ID, new AnAction(IdeBundle.message("action.toggle.global.menu.integration.text"), IdeBundle.message( "action.enable.disable.global.menu.integration.description"), null) { boolean enabled = false; @Override public void actionPerformed(@NotNull AnActionEvent e) { for (GlobalMenuLinux gml : instances) { gml.toggle(enabled); } enabled = !enabled; } }); }