void () { final ActionManager actionManager = ApplicationManager.getApplication().getServiceIfCreated(ActionManager.class); if (actionManager == null) { LOG.debug("service ActionManager wasn't cerated, schedule next try after 500ms"); SimpleTimer.getInstance().setUp(() -> fillRunDebugGroup(), 500); return; } AnAction runButtons = actionManager.getAction(RUN_DEBUG_GROUP_TOUCHBAR); if (runButtons == null) { LOG.debug("RunnersGroup for touchbar is unregistered"); return; } if (!(runButtons instanceof DefaultActionGroup group)) { LOG.debug("RunnersGroup for touchbar isn't a group"); return; } if (((DefaultActionGroup)runButtons).getChildrenCount() > 0) { LOG.debug("RunnersGroup for touchbar is already filled, skip fill"); return; } for (Executor executor : Executor.EXECUTOR_EXTENSION_NAME.getExtensionList()) { if (executor.getId().equals(ToolWindowId.RUN) || executor.getId().equals(ToolWindowId.DEBUG)) { group.add(actionManager.getAction(executor.getId()), actionManager); } } }