@Override
    public void customizeCellRenderer(@NotNull JTree tree,
                                      Object value,
                                      boolean selected,
                                      boolean expanded,
                                      boolean leaf,
                                      int row,
                                      boolean hasFocus) {
      myRow = row;
      myHaveLink = false;
      myIsSeparator = false;

      @Nullable @Nls String text;
      boolean changed;

      Icon icon = null;
      @NonNls String actionId = null;
      @NonNls String boundId = null;
      @Nls String tooltipText = null;

      DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
      Object userObject = node.getUserObject();
      if (userObject instanceof Group group) {
        actionId = group.getId();
        text = group.getName();
        changed = myKeymap != null && areGroupShortcutsCustomized(group, myKeymap);
        icon = ObjectUtils.chooseNotNull(group.getIcon(), AllIcons.Nodes.Folder);
      }
      else if (userObject instanceof String) {
        actionId = (String)userObject;
        boundId = ((KeymapImpl)myKeymap).hasShortcutDefined(actionId) ? null : ActionManagerEx.getInstanceEx().getActionBinding(actionId);
        Presentation presentation = ActionsTreeUtil.getTemplatePresentation(actionId, null);
        if (presentation == null) {
          text = actionId;
        }
        else {
          text = StringUtil.notNullize(presentation.getText(), actionId);
          icon = presentation.getIcon();
          tooltipText = presentation.getDescription();
        }
        changed = myKeymap != null && isShortcutCustomized(actionId, myKeymap);
      }
      else if (userObject instanceof QuickList list) {
        text = list.getName();
        changed = myKeymap != null && isShortcutCustomized(list.getActionId(), myKeymap);
      }
      else if (userObject instanceof Separator) {
        myIsSeparator = true;
        text = null;
        changed = false;
      }
      else if (userObject instanceof Hyperlink link) {
        // see also XDebuggerTreeRenderer
        myHaveLink = true;
        text = null;
        changed = false;
        icon = link.getIcon();

        myLink.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
        myLink.append(link.getLinkText(), link.getTextAttributes(), link);

        getIpad().right = 0;
        myLink.getIpad().left = 0;

        Rectangle treeVisibleRect = tree.getVisibleRect();
        int rowX = TreeUtil.getNodeRowX(tree, row);
        setupLinkDimensions(treeVisibleRect, rowX);
      }
      else {
        throw new IllegalArgumentException("unknown userObject: " + userObject);
      }

      if (UISettings.getInstance().getShowIconsInMenus()) {
        setIcon(getEvenIcon(icon));
      }

      Color foreground;
      if (selected) {
        foreground = UIUtil.getTreeForeground(true, hasFocus);
      }
      else {
        if (changed) {
          foreground = JBColor.namedColor("Tree.modifiedItemForeground", PlatformColors.BLUE);
        }
        else {
          foreground = UIUtil.getTreeForeground();
        }
      }
      Color background = UIUtil.getTreeBackground(selected, true);

      SearchUtil.appendFragments(myFilter, text, SimpleTextAttributes.STYLE_PLAIN, foreground, background, this);

      if (boundId != null) {
        AnAction boundAction = ActionManager.getInstance().getActionOrStub(boundId);
        if (boundAction != null) {
          append(" ");
          append(IdeBundle.message("uses.shortcut.of"), SimpleTextAttributes.GRAY_ATTRIBUTES);
          append(" ");

          Presentation boundPresentation = ActionsTreeUtil.getTemplatePresentation(boundId, actionId);
          String boundText = StringUtil.notNullize(boundPresentation == null ? null : boundPresentation.getText(), boundId);
          append(boundText, GRAY_LINK, new SelectActionRunnable(boundId));
        }
      }

      if (actionId != null && UISettings.getInstance().getShowInplaceCommentsInternal()) {
        @NlsSafe String pluginName = myPluginNames.get(actionId);
        if (pluginName != null) {
          Group parentGroup = (Group)((DefaultMutableTreeNode)node.getParent()).getUserObject();
          if (pluginName.equals(parentGroup.getName())) pluginName = null;
        }
        append("   ");
        append(pluginName != null ? actionId + " (" + pluginName + ")" : actionId, SimpleTextAttributes.GRAYED_SMALL_ATTRIBUTES);
      }

      setToolTipText(tooltipText);
      putClientProperty(ExpandableItemsHandler.RENDERER_DISABLED, myHaveLink);
    }
@Override
    public void customizeCellRenderer(@NotNull JTree tree,
                                      Object value,
                                      boolean selected,
                                      boolean expanded,
                                      boolean leaf,
                                      int row,
                                      boolean hasFocus)