Search in sources :

Example 1 with XtextCallHierarchyBuilder

use of org.eclipse.xtext.ui.editor.hierarchy.XtextCallHierarchyBuilder in project xtext-eclipse by eclipse.

the class OpenCallHierarchyHandler method createHierarchyBuilder.

@Override
protected IHierarchyBuilder createHierarchyBuilder(final EObject target) {
    final XtextCallHierarchyBuilder xtextCallHierarchyBuilder = this._iGlobalServiceProvider.<XtextCallHierarchyBuilder>findService(target, XtextCallHierarchyBuilder.class);
    xtextCallHierarchyBuilder.setResourceAccess(this.resourceAccess);
    xtextCallHierarchyBuilder.setIndexData(this._iGlobalServiceProvider.<IResourceDescriptions>findService(target, IResourceDescriptions.class));
    final DeferredHierarchyBuilder deferredHierarchyBuilder = this._iGlobalServiceProvider.<DeferredHierarchyBuilder>findService(target, DeferredHierarchyBuilder.class);
    deferredHierarchyBuilder.setHierarchyBuilder(xtextCallHierarchyBuilder);
    return deferredHierarchyBuilder;
}
Also used : IResourceDescriptions(org.eclipse.xtext.resource.IResourceDescriptions) XtextCallHierarchyBuilder(org.eclipse.xtext.ui.editor.hierarchy.XtextCallHierarchyBuilder) DeferredHierarchyBuilder(org.eclipse.xtext.ui.editor.hierarchy.DeferredHierarchyBuilder)

Example 2 with XtextCallHierarchyBuilder

use of org.eclipse.xtext.ui.editor.hierarchy.XtextCallHierarchyBuilder in project xtext-eclipse by eclipse.

the class XtextCallHierarchyBuilderTest method testBuildCalleeHierarchy.

protected void testBuildCalleeHierarchy(Procedure1<? super AbstractHierarchyBuilderTest.HierarchyBuilderTestConfiguration> configurator) {
    testBuildHierarchy((AbstractHierarchyBuilderTest.HierarchyBuilderTestConfiguration it) -> {
        it.setHierarchyBuilderProvider((ResourceSet resourceSet) -> {
            XtextCallHierarchyBuilder callHierarchyBuilder = configureBuilderWith(callHierarchyBuilderProvider.get(), resourceSet);
            callHierarchyBuilder.setHierarchyType(ICallHierarchyBuilder.CallHierarchyType.CALLEE);
            return callHierarchyBuilder;
        });
        configurator.apply(it);
    });
}
Also used : ResourceSet(org.eclipse.emf.ecore.resource.ResourceSet) XtextCallHierarchyBuilder(org.eclipse.xtext.ui.editor.hierarchy.XtextCallHierarchyBuilder)

Example 3 with XtextCallHierarchyBuilder

use of org.eclipse.xtext.ui.editor.hierarchy.XtextCallHierarchyBuilder in project xtext-eclipse by eclipse.

the class XtextCallHierarchyBuilderTest method testBuildHierarchy.

@Override
protected void testBuildHierarchy(Procedure1<? super AbstractHierarchyBuilderTest.HierarchyBuilderTestConfiguration> configurator) {
    super.testBuildHierarchy((AbstractHierarchyBuilderTest.HierarchyBuilderTestConfiguration it) -> {
        it.setHierarchyBuilderProvider((ResourceSet resourceSet) -> {
            XtextCallHierarchyBuilder callHierarchyBuilder = configureBuilderWith(callHierarchyBuilderProvider.get(), resourceSet);
            callHierarchyBuilder.setHierarchyType(ICallHierarchyBuilder.CallHierarchyType.CALLER);
            return callHierarchyBuilder;
        });
        configurator.apply(it);
    });
}
Also used : ResourceSet(org.eclipse.emf.ecore.resource.ResourceSet) XtextCallHierarchyBuilder(org.eclipse.xtext.ui.editor.hierarchy.XtextCallHierarchyBuilder)

Aggregations

XtextCallHierarchyBuilder (org.eclipse.xtext.ui.editor.hierarchy.XtextCallHierarchyBuilder)3 ResourceSet (org.eclipse.emf.ecore.resource.ResourceSet)2 IResourceDescriptions (org.eclipse.xtext.resource.IResourceDescriptions)1 DeferredHierarchyBuilder (org.eclipse.xtext.ui.editor.hierarchy.DeferredHierarchyBuilder)1