Class ReferenceFinder

    • Method Detail

      • findReferences

        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)
        Description copied from interface: IReferenceFinder
        Finds all references from a set 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.
        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.
      • getLanguageSpecificReferenceFinder

        protected IReferenceFinder getLanguageSpecificReferenceFinder​(org.eclipse.emf.common.util.URI candidate)
      • findAllReferences

        public void findAllReferences​(org.eclipse.emf.ecore.resource.Resource scope,
                                      IReferenceFinder.Acceptor acceptor,
                                      org.eclipse.core.runtime.IProgressMonitor monitor)
        Description copied from interface: IReferenceFinder
        Finds all references from the given source resource.
        Specified by:
        findAllReferences in interface IReferenceFinder
        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

        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)
        Description copied from interface: IReferenceFinder
        Finds the references from the given source resource to the given targetURIs.
        Specified by:
        findReferences in interface IReferenceFinder
        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

        public void findAllReferences​(org.eclipse.emf.ecore.EObject scope,
                                      IReferenceFinder.Acceptor acceptor,
                                      org.eclipse.core.runtime.IProgressMonitor monitor)
        Description copied from interface: IReferenceFinder
        Finds all references from the given source object.
        Specified by:
        findAllReferences in interface IReferenceFinder
        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.
      • findReferences

        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)
        Description copied from interface: IReferenceFinder
        Finds the references from the given source object to the given targetURIs.
        Specified by:
        findReferences in interface IReferenceFinder
        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.
      • findReferences

        public void findReferences​(TargetURIs targetURIs,
                                   IResourceDescription resourceDescription,
                                   IReferenceFinder.IResourceAccess resourceAccess,
                                   IReferenceFinder.Acceptor acceptor,
                                   org.eclipse.core.runtime.IProgressMonitor monitor)
        Description copied from interface: IReferenceFinder
        Finds the references from the given source resource to the given targetURIs.
        Specified by:
        findReferences in interface IReferenceFinder
        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.
      • findLocalReferencesFromElement

        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)
      • toValidInstanceOrNull

        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)
      • resolveInternalProxy

        protected org.eclipse.emf.ecore.EObject resolveInternalProxy​(org.eclipse.emf.ecore.EObject elementOrProxy,
                                                                     org.eclipse.emf.ecore.resource.Resource resource)
      • doProcess

        protected boolean doProcess​(org.eclipse.emf.ecore.EObject sourceCandidate,
                                    com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs)
      • doProcess

        protected boolean doProcess​(org.eclipse.emf.ecore.EReference reference,
                                    com.google.common.base.Predicate<org.eclipse.emf.common.util.URI> targetURIs)