void () { TreeState state = TreeState.createOn(myChangesTree, (DefaultMutableTreeNode)myChangesTree.getModel().getRoot()); final List<CommittedChangeList> filteredChangeLists = myFilteringStrategy.filterChangeLists(myChangeLists); myChangesTree.setModel(buildTreeModel(filteredChangeLists)); state.applyTo(myChangesTree); TreeUtil.expandAll(myChangesTree); }