void (@NotNull ChangesTree tree, TreeState state, boolean scrollToSelection) { if (state != null && !state.isEmpty()) { state.setScrollToSelection(scrollToSelection); state.applyTo(tree); } else { tree.resetTreeState(); } }