Search in sources :

Example 1 with SmartTreeStructure

use of com.intellij.ide.util.treeView.smartTree.SmartTreeStructure in project intellij-community by JetBrains.

the class StructureTreeBuilder method addRootToUpdate.

final void addRootToUpdate() {
    final AbstractTreeStructure structure = getTreeStructure();
    structure.asyncCommit().doWhenDone(() -> {
        ((SmartTreeStructure) structure).rebuildTree();
        if (!isDisposed()) {
            getUpdater().addSubtreeToUpdate(getRootNode());
        }
    });
}
Also used : SmartTreeStructure(com.intellij.ide.util.treeView.smartTree.SmartTreeStructure) AbstractTreeStructure(com.intellij.ide.util.treeView.AbstractTreeStructure)

Example 2 with SmartTreeStructure

use of com.intellij.ide.util.treeView.smartTree.SmartTreeStructure in project intellij-plugins by JetBrains.

the class CfmlStructureViewTest method getTopLevelItems.

private Object[] getTopLevelItems() {
    StructureView structureView = createStructureViewModel();
    final StructureViewModel structureViewModel = structureView.getTreeModel();
    AbstractTreeStructure jsTreeStructure = new SmartTreeStructure(getProject(), structureViewModel);
    Object[] items = jsTreeStructure.getChildElements(jsTreeStructure.getRootElement());
    structureViewModel.dispose();
    Disposer.dispose(structureView);
    return items;
}
Also used : StructureView(com.intellij.ide.structureView.StructureView) StructureViewModel(com.intellij.ide.structureView.StructureViewModel) SmartTreeStructure(com.intellij.ide.util.treeView.smartTree.SmartTreeStructure) AbstractTreeStructure(com.intellij.ide.util.treeView.AbstractTreeStructure)

Aggregations

AbstractTreeStructure (com.intellij.ide.util.treeView.AbstractTreeStructure)2 SmartTreeStructure (com.intellij.ide.util.treeView.smartTree.SmartTreeStructure)2 StructureView (com.intellij.ide.structureView.StructureView)1 StructureViewModel (com.intellij.ide.structureView.StructureViewModel)1