public static boolean isActive(@NotNull TreeAction action, @NotNull TreeActionsOwner actionsOwner) {
    if (shouldRevert(action)) {
      return !actionsOwner.isActionActive(action.getName());
    }
    return action instanceof Sorter && !((Sorter)action).isVisible() || actionsOwner.isActionActive(action.getName());
  }
public static boolean isActive(@NotNull TreeAction action, @NotNull TreeActionsOwner actionsOwner)