void (@NotNull ChangesTree tree, MyState state, boolean scrollToSelection) { if (state != null && !state.selectedChanges.isEmpty()) { tree.setSelectedChanges(DvcsBranchUtil.swapRevisions(state.selectedChanges)); } else { tree.resetTreeState(); } }