Search in sources :

Example 1 with TodoTreeStructure

use of com.intellij.ide.todo.TodoTreeStructure in project intellij-community by JetBrains.

the class ToDoTreeStructureTest method testToDo1.

public void testToDo1() throws Exception {
    AllTodosTreeBuilder all = new AllTodosTreeBuilder(new Tree(), new DefaultTreeModel(new DefaultMutableTreeNode()), myProject);
    all.init();
    AbstractTreeStructure structure = all.getTreeStructure();
    ((TodoTreeStructure) structure).setFlattenPackages(true);
    ProjectViewTestUtil.assertStructureEqual(structure, "Root\n" + " Summary\n" + "  package2 toDoFileCount=1,toDoItemCount=2\n" + "   JavaClass.java\n" + "    Item: (62,78)\n" + "    Item: (145,162)\n", myPrintInfo);
    checkOccurrences(all, new String[] { "Item: (62,78)", "Item: (145,162)" });
    Disposer.dispose(all);
}
Also used : DefaultMutableTreeNode(javax.swing.tree.DefaultMutableTreeNode) TodoTreeStructure(com.intellij.ide.todo.TodoTreeStructure) AllTodosTreeBuilder(com.intellij.ide.todo.AllTodosTreeBuilder) Tree(com.intellij.ui.treeStructure.Tree) DefaultTreeModel(javax.swing.tree.DefaultTreeModel) AbstractTreeStructure(com.intellij.ide.util.treeView.AbstractTreeStructure)

Aggregations

AllTodosTreeBuilder (com.intellij.ide.todo.AllTodosTreeBuilder)1 TodoTreeStructure (com.intellij.ide.todo.TodoTreeStructure)1 AbstractTreeStructure (com.intellij.ide.util.treeView.AbstractTreeStructure)1 Tree (com.intellij.ui.treeStructure.Tree)1 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)1 DefaultTreeModel (javax.swing.tree.DefaultTreeModel)1