use of org.eclipse.xtext.ui.editor.hierarchy.XtextCallHierarchyNode in project xtext-eclipse by eclipse.
the class XtextCallHierarchyBuilder method createChild.
@Override
protected IHierarchyNode createChild(final IEObjectDescription declaration, final IHierarchyNode parent) {
final XtextCallHierarchyNode node = new XtextCallHierarchyNode();
node.setParent(parent);
node.setElement(declaration);
node.setGrammarDescription(this.getGrammarDescription(declaration));
node.setMayHaveChildren((this.isRule(declaration.getEClass()) && (!node.isRecursive())));
return node;
}
use of org.eclipse.xtext.ui.editor.hierarchy.XtextCallHierarchyNode in project xtext-eclipse by eclipse.
the class XtextCallHierarchyBuilderTest method internalToExpectation.
@Override
protected String internalToExpectation(final IHierarchyNode node, final IHierarchyBuilder builder) {
final String superExpectation = super.internalToExpectation(node, builder);
if ((node instanceof XtextCallHierarchyNode)) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("grammar: ");
IEObjectDescription _grammarDescription = ((XtextCallHierarchyNode) node).getGrammarDescription();
_builder.append(_grammarDescription);
_builder.newLineIfNotEmpty();
_builder.append(superExpectation);
_builder.newLineIfNotEmpty();
return _builder.toString();
}
return superExpectation;
}
use of org.eclipse.xtext.ui.editor.hierarchy.XtextCallHierarchyNode in project xtext-eclipse by eclipse.
the class XtextCallHierarchyBuilder method createRoot.
@Override
protected IHierarchyNode createRoot(final IEObjectDescription declaration) {
final XtextCallHierarchyNode node = new XtextCallHierarchyNode();
node.setElement(declaration);
node.setGrammarDescription(this.getGrammarDescription(declaration));
node.setMayHaveChildren(true);
return node;
}
Aggregations