@Override
    public void restoreState(@NotNull ChangesTree tree, TreeState state, boolean scrollToSelection) {
      if (state != null) {
        state.setScrollToSelection(scrollToSelection);
        state.applyTo(tree);
      }
    }
@Override
    public void restoreState(@NotNull ChangesTree tree, TreeState state, boolean scrollToSelection)