org.eclipse.xtext.ui.editor.findrefs
Class DefaultReferenceFinder
java.lang.Object
org.eclipse.xtext.ui.editor.findrefs.DefaultReferenceFinder
- All Implemented Interfaces:
- IReferenceFinder
public class DefaultReferenceFinder
- extends java.lang.Object
- implements IReferenceFinder
- Since:
- 2.3
- Author:
- Jan Koehnlein - Initial contribution and API
Method Summary |
protected java.util.Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.common.util.URI> |
createExportedElementsMap(org.eclipse.emf.ecore.resource.Resource resource)
|
protected void |
findAllIndexedReferences(IAcceptor<IReferenceDescription> referenceAcceptor,
org.eclipse.core.runtime.SubMonitor subMonitor,
java.util.Set<org.eclipse.emf.common.util.URI> targetURIsAsSet)
|
void |
findAllReferences(java.lang.Iterable<org.eclipse.emf.common.util.URI> targetURIs,
IReferenceFinder.ILocalResourceAccess localResourceAccess,
IAcceptor<IReferenceDescription> referenceAcceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
Finds all references to the given targetURIs . |
protected org.eclipse.emf.common.util.URI |
findClosestExportedContainerURI(org.eclipse.emf.ecore.EObject element,
java.util.Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.common.util.URI> exportedElementsMap)
|
protected void |
findIndexedReferences(java.util.Set<org.eclipse.emf.common.util.URI> targetURIs,
IResourceDescription resourceDescription,
IAcceptor<IReferenceDescription> acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
protected void |
findLocalReferences(java.lang.Iterable<org.eclipse.emf.common.util.URI> localTargets,
IReferenceFinder.ILocalResourceAccess localResourceAccess,
IAcceptor<IReferenceDescription> acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
protected void |
findLocalReferencesInResource(java.lang.Iterable<org.eclipse.emf.common.util.URI> targetURIs,
org.eclipse.emf.ecore.resource.Resource resource,
IAcceptor<IReferenceDescription> acceptor)
|
void |
findReferences(java.lang.Iterable<org.eclipse.emf.common.util.URI> targetURIs,
java.lang.Iterable<org.eclipse.emf.common.util.URI> sourceResourceURIs,
IReferenceFinder.ILocalResourceAccess localResourceAccess,
IAcceptor<IReferenceDescription> referenceAcceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
Finds all references from an iterable of source resources to the given targetURIs . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultReferenceFinder
@Inject
public DefaultReferenceFinder(IResourceDescriptions indexData,
IResourceServiceProvider.Registry serviceProviderRegistry)
findReferences
public void findReferences(java.lang.Iterable<org.eclipse.emf.common.util.URI> targetURIs,
java.lang.Iterable<org.eclipse.emf.common.util.URI> sourceResourceURIs,
IReferenceFinder.ILocalResourceAccess localResourceAccess,
IAcceptor<IReferenceDescription> referenceAcceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
- Description copied from interface:
IReferenceFinder
- Finds all references from an iterable of source resources to the given
targetURIs
.
- Specified by:
findReferences
in interface IReferenceFinder
- Parameters:
targetURIs
- the URIs of the target elements of the references. Should be normalized.sourceResourceURIs
- the search scope for the resources containing the sources of the references.localResourceAccess
- used to find local references. If null, only indexed references are returned.referenceAcceptor
- accepts the matches.monitor
- the progress monitor. Can be null.
findAllReferences
public void findAllReferences(java.lang.Iterable<org.eclipse.emf.common.util.URI> targetURIs,
IReferenceFinder.ILocalResourceAccess localResourceAccess,
IAcceptor<IReferenceDescription> referenceAcceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
- Description copied from interface:
IReferenceFinder
- Finds all references to the given
targetURIs
.
- Specified by:
findAllReferences
in interface IReferenceFinder
- Parameters:
targetURIs
- the URIs of the target elements of the references. Should be normalized.localResourceAccess
- used to find local references. If null, only indexed references are returned.referenceAcceptor
- accepts the matches.monitor
- the progress monitor. Can be null.
findAllIndexedReferences
protected void findAllIndexedReferences(IAcceptor<IReferenceDescription> referenceAcceptor,
org.eclipse.core.runtime.SubMonitor subMonitor,
java.util.Set<org.eclipse.emf.common.util.URI> targetURIsAsSet)
findLocalReferences
protected void findLocalReferences(java.lang.Iterable<org.eclipse.emf.common.util.URI> localTargets,
IReferenceFinder.ILocalResourceAccess localResourceAccess,
IAcceptor<IReferenceDescription> acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
findLocalReferencesInResource
protected void findLocalReferencesInResource(java.lang.Iterable<org.eclipse.emf.common.util.URI> targetURIs,
org.eclipse.emf.ecore.resource.Resource resource,
IAcceptor<IReferenceDescription> acceptor)
createExportedElementsMap
protected java.util.Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.common.util.URI> createExportedElementsMap(org.eclipse.emf.ecore.resource.Resource resource)
findClosestExportedContainerURI
protected org.eclipse.emf.common.util.URI findClosestExportedContainerURI(org.eclipse.emf.ecore.EObject element,
java.util.Map<org.eclipse.emf.ecore.EObject,org.eclipse.emf.common.util.URI> exportedElementsMap)
findIndexedReferences
protected void findIndexedReferences(java.util.Set<org.eclipse.emf.common.util.URI> targetURIs,
IResourceDescription resourceDescription,
IAcceptor<IReferenceDescription> acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)