static @NotNull Pair<@Nullable String, @Nullable Icon> getActionIdAndIcon(@NotNull DefaultMutableTreeNode node) {
    Object userObj = node.getUserObject();
    if (userObj instanceof String actionId) {
      AnAction action = ActionManager.getInstance().getAction(actionId);
      if (action != null) {
        return new Pair<>(actionId, action.getTemplatePresentation().getIcon());
      }
    }
    else if (userObj instanceof Group group) {
      return new Pair<>(group.getId(), group.getIcon());
    }
    else if (userObj instanceof Pair<?, ?> pair) {
      Object first = pair.first;
      String actionId = first instanceof Group group ? group.getId() : (String)first;
      return new Pair<>(actionId, (Icon)pair.second);
    }
    return Pair.empty();
  }
static @NotNull Pair<@Nullable String, @Nullable Icon> getActionIdAndIcon(@NotNull DefaultMutableTreeNode node)