use of org.eclipse.xtext.findReferences.TargetURIs in project xtext-core by eclipse.
the class DefaultCallHierarchyBuilder method findSourceDeclarations.
protected void findSourceDeclarations(final URI targetDeclarationURI, final IProgressMonitor monitor, final Procedure2<? super IEObjectDescription, ? super IReferenceDescription> acceptor) {
final TargetURIs targetURIs = this.collectTargetURIs(targetDeclarationURI);
IResourceServiceProvider.Registry _resourceServiceProviderRegistry = this.getResourceServiceProviderRegistry();
final IAcceptor<IReferenceDescription> _function = (IReferenceDescription reference) -> {
boolean _filterReference = this.filterReference(reference);
if (_filterReference) {
IEObjectDescription _findSourceDeclaration = null;
if (reference != null) {
_findSourceDeclaration = this.findSourceDeclaration(reference);
}
final IEObjectDescription sourceDeclaration = _findSourceDeclaration;
acceptor.apply(sourceDeclaration, reference);
}
};
ReferenceAcceptor _referenceAcceptor = new ReferenceAcceptor(_resourceServiceProviderRegistry, _function);
this.getReferenceFinder().findAllReferences(targetURIs, this.getResourceAccess(), this.getIndexData(), _referenceAcceptor, monitor);
}
use of org.eclipse.xtext.findReferences.TargetURIs in project xtext-core by eclipse.
the class DocumentSymbolService method collectTargetURIs.
protected TargetURIs collectTargetURIs(final EObject targetObject) {
final TargetURIs targetURIs = this.targetURIProvider.get();
this.targetURICollector.add(targetObject, targetURIs);
return targetURIs;
}
Aggregations