예제 #1
0
파일: TreeState.java 프로젝트: jexp/idea2
 private void _applyExpanded(TreeFacade tree, Object root) {
   if (!(root instanceof DefaultMutableTreeNode)) {
     return;
   }
   final DefaultMutableTreeNode nodeRoot = (DefaultMutableTreeNode) root;
   final TreeNode[] nodePath = nodeRoot.getPath();
   if (nodePath.length > 0) {
     for (final List<PathElement> path : myExpandedPaths) {
       applyTo(nodePath.length - 1, path, root, tree);
     }
   }
 }
 private void restoreState() {
   myTreeState.applyTo(this, (ChangesBrowserNode) getModel().getRoot());
 }
 public final void restoreExpandedPaths() {
   TreeState treeState = myReadTreeState.get(getSubId());
   if (treeState != null) {
     treeState.applyTo(myTree);
   }
 }