boolean (@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()); }