Search in sources :

Example 1 with DeferredHierarchyBuilder

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

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

the class OpenCallHierarchyHandler method createHierarchyBuilder.

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

Example 3 with DeferredHierarchyBuilder

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

the class AbstractHierarchyViewPart method getBuilder.

protected <T extends IHierarchyBuilder> T getBuilder(final Class<T> clazz) {
    boolean _isInstance = clazz.isInstance(this.builder);
    if (_isInstance) {
        return ((T) this.builder);
    }
    if ((this.builder instanceof DeferredHierarchyBuilder)) {
        final IHierarchyBuilder wrappedBuilder = ((DeferredHierarchyBuilder) this.builder).getHierarchyBuilder();
        boolean _isInstance_1 = clazz.isInstance(wrappedBuilder);
        if (_isInstance_1) {
            return ((T) wrappedBuilder);
        }
    }
    return null;
}
Also used : IHierarchyBuilder(org.eclipse.xtext.ide.editor.hierarchy.IHierarchyBuilder) DeferredHierarchyBuilder(org.eclipse.xtext.ui.editor.hierarchy.DeferredHierarchyBuilder)

Example 4 with DeferredHierarchyBuilder

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

the class OpenAssociationHierarchyHandler method createHierarchyBuilder.

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

Aggregations

DeferredHierarchyBuilder (org.eclipse.xtext.ui.editor.hierarchy.DeferredHierarchyBuilder)4 IResourceDescriptions (org.eclipse.xtext.resource.IResourceDescriptions)3 IHierarchyBuilder (org.eclipse.xtext.ide.editor.hierarchy.IHierarchyBuilder)1 XtextCallHierarchyBuilder (org.eclipse.xtext.ui.editor.hierarchy.XtextCallHierarchyBuilder)1