Java 类com.intellij.openapi.util.objectTree.ObjectTree 实例源码

项目:tools-idea    文件:TopAnomaliesAction.java   
@Override
public void actionPerformed(AnActionEvent e) {
  old = new TreeSet<Pair<Object, Integer>>(top);
  top.clear();
  ObjectTree<Disposable> tree = Disposer.getTree();
  Set<Disposable> roots = tree.getRootObjects();
  for (Disposable root : roots) {
    checkDisposables(tree, root, top, LIMIT);
  }
  System.out.println("Top " + LIMIT + " disposables");
  for (Pair<Object, Integer> pair : top) {
    System.out.println(pair.first.getClass().getName() + " (" + pair.second + " related)" + getChange(old, pair.first, pair.second));
  }
}
项目:tools-idea    文件:TopAnomaliesAction.java   
private void checkDisposables(ObjectTree tree, Object key, Set<Pair<Object, Integer>> top, int limit) {
  ObjectNode node = tree.getNode(key);
  if (node == null) {
    return;
  }
  Collection children = node.getChildren();
  top.add(Pair.create(key, children.size()));
  trimToLimit(top, limit);
  for (Object child : children) {
    checkDisposables(tree, child, top, limit);
  }
}
项目:intellij-ce-playground    文件:Disposer.java   
@NotNull
public static ObjectTree<Disposable> getTree() {
  return ourTree;
}
项目:tools-idea    文件:Disposer.java   
@NotNull
public static ObjectTree<Disposable> getTree() {
  return ourTree;
}
项目:jediterm    文件:Disposer.java   
@NotNull
public static ObjectTree<Disposable> getTree() {
  return ourTree;
}
项目:consulo    文件:Disposer.java   
@Nonnull
public static ObjectTree<Disposable> getTree() {
  return ourTree;
}