use of org.eclipse.xtext.ide.editor.hierarchy.IHierarchyNodeReference in project xtext-eclipse by eclipse.
the class AbstractHierarchyBuilderTest method internalToExpectation.
protected String internalToExpectation(IHierarchyNode node, IHierarchyBuilder builder) {
StringConcatenation richString = new StringConcatenation();
for (IHierarchyNodeReference location : node.getReferences()) {
richString.append(toExpectation(location));
richString.newLineIfNotEmpty();
}
if (node.mayHaveChildren()) {
for (IHierarchyNode childNode : builder.buildChildren(node, null)) {
richString.append(toExpectation(childNode, builder));
richString.newLineIfNotEmpty();
}
}
return richString.toString();
}
use of org.eclipse.xtext.ide.editor.hierarchy.IHierarchyNodeReference in project xtext-core by eclipse.
the class DefaultHierarchyNode method getNavigationElement.
@Override
public Object getNavigationElement() {
Object _elvis = null;
IHierarchyNodeReference _head = IterableExtensions.<IHierarchyNodeReference>head(this.references);
if (_head != null) {
_elvis = _head;
} else {
_elvis = this.element;
}
return _elvis;
}
Aggregations