Interface IReferenceFinder

  • All Known Implementing Classes:
    ReferenceFinder

    public interface IReferenceFinder
    Finds cross-references to elements specified by their URIs. References can be from other resources or local. To be referrable from another resource, an element usually has to be indexed. By default, the index keeps track of cross resource references. See DefaultResourceDescriptionStrategy for details on the indexing process. Local references are usually not indexed, and they don't have to be as the scope provider usually takes local elements into account. This is why the reference finder needs an IReferenceFinder.IResourceAccess if such local references should be found, too.
    • Method Detail

      • findReferences

        void findReferences​(TargetURIs targetURIs,
                            java.util.Set<org.eclipse.emf.common.util.URI> candidates,
                            IReferenceFinder.IResourceAccess resourceAccess,
                            IResourceDescriptions indexData,
                            IReferenceFinder.Acceptor acceptor,
                            org.eclipse.core.runtime.IProgressMonitor monitor)
        Finds all references from a set of source resources to the given targetURIs.
        Parameters:
        targetURIs - 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.
      • findReferences

        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.
        Parameters:
        targetURIs - 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.
      • findReferences

        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.
        Parameters:
        targetURIs - 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.
      • findAllReferences

        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.
        Parameters:
        scope - the search scope for the resources containing the sources of the references.
        acceptor - accepts the matches.
        monitor - the progress monitor. Can be null.
      • findReferences

        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.
        Parameters:
        targetURIs - 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.
      • findAllReferences

        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.
        Parameters:
        scope - the search scope for the object containing the sources of the references.
        acceptor - accepts the matches.
        monitor - the progress monitor. Can be null.
      • findAllReferences

        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.
        Parameters:
        targetURIs - 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.