Search in sources :

Example 6 with IHierarchyNode

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

the class AbstractCallHierarchyViewPart method selectionChanged.

@Override
public void selectionChanged(SelectionChangedEvent event) {
    if (event.getSelectionProvider() == callHierarchyViewer) {
        IHierarchyNode callHierarchyNode = getSelectedNode(event.getSelection());
        onCallHierarchyNodeChanged(callHierarchyNode);
    }
}
Also used : IHierarchyNode(org.eclipse.xtext.ide.editor.hierarchy.IHierarchyNode)

Example 7 with IHierarchyNode

use of org.eclipse.xtext.ide.editor.hierarchy.IHierarchyNode 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

IHierarchyNode (org.eclipse.xtext.ide.editor.hierarchy.IHierarchyNode)7 StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)2 Image (org.eclipse.swt.graphics.Image)1 PendingUpdateAdapter (org.eclipse.ui.progress.PendingUpdateAdapter)1 DefaultHierarchyRoot (org.eclipse.xtext.ide.editor.hierarchy.DefaultHierarchyRoot)1 IHierarchyNodeReference (org.eclipse.xtext.ide.editor.hierarchy.IHierarchyNodeReference)1 IEObjectDescription (org.eclipse.xtext.resource.IEObjectDescription)1