Search in sources :

Example 1 with DefaultHierarchyRoot

use of org.eclipse.xtext.ide.editor.hierarchy.DefaultHierarchyRoot in project xtext-eclipse by eclipse.

the class AbstractHierarchyViewPart method createRoot.

protected IHierarchyRoot createRoot(IProgressMonitor monitor) {
    if (builder == null || rootURI == null)
        return IHierarchyRoot.EMPTY;
    Collection<IHierarchyNode> roots = builder.buildRoots(rootURI, monitor);
    if (roots.isEmpty()) {
        return IHierarchyRoot.EMPTY;
    }
    DefaultHierarchyRoot root = new DefaultHierarchyRoot();
    root.getRoots().addAll(roots);
    return root;
}
Also used : DefaultHierarchyRoot(org.eclipse.xtext.ide.editor.hierarchy.DefaultHierarchyRoot) IHierarchyNode(org.eclipse.xtext.ide.editor.hierarchy.IHierarchyNode)

Aggregations

DefaultHierarchyRoot (org.eclipse.xtext.ide.editor.hierarchy.DefaultHierarchyRoot)1 IHierarchyNode (org.eclipse.xtext.ide.editor.hierarchy.IHierarchyNode)1