public class ReferenceFinder extends java.lang.Object implements IReferenceFinder
IReferenceFinder.Acceptor, IReferenceFinder.IResourceAccess| Modifier and Type | Field and Description |
|---|---|
protected static int |
MONITOR_CHUNK_SIZE |
| Modifier | Constructor and Description |
|---|---|
|
ReferenceFinder() |
protected |
ReferenceFinder(IResourceServiceProvider.Registry serviceProviderRegistry) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doFindReferencesWith(IReferenceFinder referenceFinder,
TargetURIs targetURIs,
org.eclipse.emf.common.util.URI candidate,
IReferenceFinder.IResourceAccess resourceAccess,
IResourceDescriptions descriptions,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor) |
protected boolean |
doProcess(org.eclipse.emf.ecore.EObject sourceCandidate,
com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs) |
protected boolean |
doProcess(org.eclipse.emf.ecore.EReference reference,
com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs) |
void |
findAllReferences(org.eclipse.emf.ecore.EObject scope,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
Finds all references from the given source object.
|
void |
findAllReferences(org.eclipse.emf.ecore.resource.Resource scope,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
Finds all references from the given source resource.
|
void |
findAllReferences(TargetURIs targetURIs,
IReferenceFinder.IResourceAccess resourceAccess,
IResourceDescriptions indexData,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
Finds all references to the given
targetURIs. |
protected void |
findLocalReferencesFromElement(com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs,
org.eclipse.emf.ecore.EObject sourceCandidate,
org.eclipse.emf.ecore.resource.Resource localResource,
IReferenceFinder.Acceptor acceptor) |
void |
findReferences(com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs,
org.eclipse.emf.ecore.EObject scope,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
Finds the references from the given source object to the given
targetURIs. |
void |
findReferences(com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs,
org.eclipse.emf.ecore.resource.Resource resource,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
Finds the references from the given source resource to the given
targetURIs. |
void |
findReferences(TargetURIs targetURIs,
IResourceDescription resourceDescription,
IReferenceFinder.IResourceAccess resourceAccess,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
Finds the references from the given source resource to the given
targetURIs. |
void |
findReferences(TargetURIs targetURIs,
java.util.Set<org.eclipse.emf.common.util.URI> candidates,
IReferenceFinder.IResourceAccess resourceAccess,
IResourceDescriptions descriptions,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
Finds all references from a set of source resources to the given
targetURIs. |
protected void |
findReferencesInDescription(TargetURIs targetURIs,
IResourceDescription resourceDescription,
IReferenceFinder.IResourceAccess resourceAccess,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor) |
protected IReferenceFinder |
getLanguageSpecificReferenceFinder(org.eclipse.emf.common.util.URI candidate) |
protected IResourceServiceProvider.Registry |
getServiceProviderRegistry() |
protected org.eclipse.emf.ecore.EObject |
resolveInternalProxy(org.eclipse.emf.ecore.EObject elementOrProxy,
org.eclipse.emf.ecore.resource.Resource resource) |
protected org.eclipse.emf.ecore.EObject |
toValidInstanceOrNull(org.eclipse.emf.ecore.resource.Resource resource,
com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs,
org.eclipse.emf.ecore.EObject value) |
protected static final int MONITOR_CHUNK_SIZE
@Inject public ReferenceFinder()
protected ReferenceFinder(IResourceServiceProvider.Registry serviceProviderRegistry)
protected IResourceServiceProvider.Registry getServiceProviderRegistry()
public void findReferences(TargetURIs targetURIs, java.util.Set<org.eclipse.emf.common.util.URI> candidates, IReferenceFinder.IResourceAccess resourceAccess, IResourceDescriptions descriptions, IReferenceFinder.Acceptor acceptor, org.eclipse.core.runtime.IProgressMonitor monitor)
IReferenceFindertargetURIs.findReferences in interface IReferenceFindertargetURIs - the URIs of the target elements of the references. Should be normalized.candidates - the search scope for the resources containing the sources of the references.resourceAccess - used to find local references. If null, only indexed references are returned.acceptor - accepts the matches.monitor - the progress monitor. Can be null.protected IReferenceFinder getLanguageSpecificReferenceFinder(org.eclipse.emf.common.util.URI candidate)
protected void doFindReferencesWith(IReferenceFinder referenceFinder, TargetURIs targetURIs, org.eclipse.emf.common.util.URI candidate, IReferenceFinder.IResourceAccess resourceAccess, IResourceDescriptions descriptions, IReferenceFinder.Acceptor acceptor, org.eclipse.core.runtime.IProgressMonitor monitor)
public void findAllReferences(org.eclipse.emf.ecore.resource.Resource scope,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
IReferenceFinderfindAllReferences in interface IReferenceFinderscope - the search scope for the resources containing the sources of the references.acceptor - accepts the matches.monitor - the progress monitor. Can be null.public void findReferences(com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs,
org.eclipse.emf.ecore.resource.Resource resource,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
IReferenceFindertargetURIs.findReferences in interface IReferenceFindertargetURIs - a predicate that returns true if an URI belongs to target URIs; otherwise false.resource - the search scope for the resources containing the sources of the references.acceptor - accepts the matches.monitor - the progress monitor. Can be null.public void findAllReferences(org.eclipse.emf.ecore.EObject scope,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
IReferenceFinderfindAllReferences in interface IReferenceFinderscope - the search scope for the object containing the sources of the references.acceptor - accepts the matches.monitor - the progress monitor. Can be null.public void findReferences(com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs,
org.eclipse.emf.ecore.EObject scope,
IReferenceFinder.Acceptor acceptor,
org.eclipse.core.runtime.IProgressMonitor monitor)
IReferenceFindertargetURIs.findReferences in interface IReferenceFindertargetURIs - a predicate that returns true if an URI belongs to target URIs; otherwise false.scope - the search scope for the object containing the sources of the references.acceptor - accepts the matches.monitor - the progress monitor. Can be null.public void findReferences(TargetURIs targetURIs, IResourceDescription resourceDescription, IReferenceFinder.IResourceAccess resourceAccess, IReferenceFinder.Acceptor acceptor, org.eclipse.core.runtime.IProgressMonitor monitor)
IReferenceFindertargetURIs.findReferences in interface IReferenceFindertargetURIs - the URIs of the target elements of the references. Should be normalized.resourceDescription - the search scope for the resources containing the sources of the references.resourceAccess - used to find local references. If null, only indexed references are returned.acceptor - accepts the matches.monitor - the progress monitor. Can be null.protected void findReferencesInDescription(TargetURIs targetURIs, IResourceDescription resourceDescription, IReferenceFinder.IResourceAccess resourceAccess, IReferenceFinder.Acceptor acceptor, org.eclipse.core.runtime.IProgressMonitor monitor)
public void findAllReferences(TargetURIs targetURIs, IReferenceFinder.IResourceAccess resourceAccess, IResourceDescriptions indexData, IReferenceFinder.Acceptor acceptor, org.eclipse.core.runtime.IProgressMonitor monitor)
IReferenceFindertargetURIs.findAllReferences in interface IReferenceFindertargetURIs - the URIs of the target elements of the references. Should be normalized.resourceAccess - used to find local references. If null, only indexed references are returned.acceptor - accepts the matches.monitor - the progress monitor. Can be null.protected void findLocalReferencesFromElement(com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs,
org.eclipse.emf.ecore.EObject sourceCandidate,
org.eclipse.emf.ecore.resource.Resource localResource,
IReferenceFinder.Acceptor acceptor)
protected org.eclipse.emf.ecore.EObject toValidInstanceOrNull(org.eclipse.emf.ecore.resource.Resource resource,
com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs,
org.eclipse.emf.ecore.EObject value)
protected org.eclipse.emf.ecore.EObject resolveInternalProxy(org.eclipse.emf.ecore.EObject elementOrProxy,
org.eclipse.emf.ecore.resource.Resource resource)
protected boolean doProcess(org.eclipse.emf.ecore.EObject sourceCandidate,
com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs)
protected boolean doProcess(org.eclipse.emf.ecore.EReference reference,
com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs)