void (@NotNull ActionCallback callback, @NotNull PlaybackContext context) { ActionManager actionManager = ActionManager.getInstance(); Component focusedComponent = IdeFocusManager.findInstance().getFocusOwner(); // real focused component (editor/project view/..) DataContext dataContext = DataManager.getInstance().getDataContext(focusedComponent); ActionGroup mainMenu = (ActionGroup)actionManager.getAction(getGroupId()); TraceUtil.runWithSpanThrows(PerformanceTestSpan.TRACER, getSpanName(), totalSpan -> { JBTreeTraverser.<AnAction>from(action -> { totalSpan.addEvent(action.getClass().getSimpleName()); if (!(action instanceof ActionGroup group)) return JBIterable.empty(); String groupSpanName = ObjectUtils.coalesce(actionManager.getId(group), group.getTemplateText(), group.getClass().getName()); Span groupSpan = PerformanceTestSpan.TRACER.spanBuilder(groupSpanName).startSpan(); List<AnAction> actions = Utils.expandActionGroup(group, new PresentationFactory(), dataContext, getPlace()); groupSpan.end(); return actions; }).withRoots(mainMenu.getChildren(null)).traverse().size(); }); callback.setDone(); }