boolean (@Nullable ClientState state, @NotNull Collection<? extends DocumentReference> refs, boolean isUndo) { if (state == null) return false; if (isUndo && state.myMerger.isUndoAvailable(refs)) return true; UndoRedoStacksHolder stackHolder = getStackHolder(state, isUndo); return stackHolder.canBeUndoneOrRedone(refs); }