private List<JComponent> buildComponents(ActionGroup group, String parentId) {
    AnAction[] actions = group.getChildren(null);

    List<JComponent> components = new ArrayList<>();
    PresentationFactory factory = new PresentationFactory();

    for (AnAction action : actions) {
      Presentation presentation = action.getTemplatePresentation().clone();
      if (!USE_ICONS) {
        presentation.setIcon(null);
      }
      if (action instanceof ActionGroup childGroup) {
        if (childGroup.isPopup()) {
          final String id = String.valueOf(++nCards);
          createCardForGroup(childGroup, id, parentId);

          components.add(new Button(new ActivateCard(id), presentation));
        }
        else {
          components.addAll(buildComponents(childGroup, parentId));
        }
      }
      else if (action instanceof AbstractActionWithPanel){
        final JPanel panel = ((AbstractActionWithPanel)action).createPanel();
        components.add(panel);
      }
      else {
        action.update(new AnActionEvent(null, DataManager.getInstance().getDataContext(this),
                                        ActionPlaces.WELCOME_SCREEN, presentation, ActionManager.getInstance(), 0));
        if (presentation.isVisible()) {
          components.add(new Button(action, presentation));
        }
      }
    }
    return components;
  }
private List<JComponent> buildComponents(ActionGroup group, String parentId)