void () { AllTodosTreeBuilder all = new AllTodosTreeBuilder(new Tree(), myProject); try { all.init(); IdeEventQueue.getInstance().flushQueue(); AbstractTreeStructure structure = all.getTodoTreeStructure(); ProjectViewTestUtil.assertStructureEqual(structure, """ Root Summary toDo xmlFile.xml Item: (12,16) package1 toDoFileCount=2,toDoItemCount=4 package2 toDoFileCount=1,toDoItemCount=2 JavaClass.java Item: (62,78) Item: (145,162) JavaClass.java Item: (52,68) Item: (134,151) package3 toDoFileCount=1,toDoItemCount=2 JavaClass.java Item: (53,69) Item: (136,153) """, myPrintInfo); checkOccurrences(all, new String[]{"Item: (12,16)", "Item: (62,78)", "Item: (145,162)", "Item: (52,68)", "Item: (134,151)", "Item: (53,69)", "Item: (136,153)"}); } finally { Disposer.dispose(all); } final DefaultTreeModel treeModel = new DefaultTreeModel(new DefaultMutableTreeNode()); final JTree currentFileTree = new Tree(treeModel); TreeTestUtil.assertTreeUI(currentFileTree); CurrentFileTodosTreeBuilder builder = new CurrentFileTodosTreeBuilder(currentFileTree, myProject); try { builder.init(); builder.setFile(getSrcDirectory().findSubdirectory("package1").findFile("JavaClass.java")); builder.updateTree(); ProjectViewTestUtil.assertStructureEqual(builder.getTodoTreeStructure(), """ JavaClass.java JavaClass.java Item: (52,68) Item: (134,151) """, myPrintInfo); } finally { Disposer.dispose(builder); } }