protected void updateTreeModel(@NotNull DefaultTreeModel model,
                                 @SuppressWarnings("rawtypes") @NotNull TreeStateStrategy treeStateStrategy) {
    ThreadingAssertions.assertEventDispatchThread();

    myModelUpdateInProgress = true;
    try {
      Object state = treeStateStrategy.saveState(this);

      setModel(model);
      myIsModelFlat = isCurrentModelFlat();
      setShowsRootHandles(!myGroupingSupport.isNone() || !myIsModelFlat);

      //noinspection unchecked
      treeStateStrategy.restoreState(this, state, myScrollToSelection);
    }
    finally {
      myModelUpdateInProgress = false;
    }
  }
protected void updateTreeModel(@NotNull DefaultTreeModel model,
                                 @SuppressWarnings("rawtypes") @NotNull TreeStateStrategy treeStateStrategy)