Class ResourceDependencyProvider

java.lang.Object
org.eclipse.emf.compare.ide.ui.internal.logical.resolver.ResourceDependencyProvider
All Implemented Interfaces:
IResourceDependencyProvider

public class ResourceDependencyProvider extends Object implements IResourceDependencyProvider
The default implementation of the IResourceDependencyProvider.
  • Constructor Details

    • ResourceDependencyProvider

      public ResourceDependencyProvider(IResolutionContext context)
      Constructor.
      Parameters:
      context - The resolution context, must not be null.
  • Method Details

    • getDependenciesOf

      public Iterable<URI> getDependenciesOf(org.eclipse.core.resources.IFile file)
      Description copied from interface: IResourceDependencyProvider
      Provides the dependencies of the given file.
      Specified by:
      getDependenciesOf in interface IResourceDependencyProvider
      Parameters:
      file - The file
      Returns:
      The file's dependencies, as a never null Iterable over the dependencies URIs.
    • hasChild

      public boolean hasChild(URI parent, URI candidate)
      Description copied from interface: IResourceDependencyProvider
      Indicates whether the given parent has the given URI as child according to the graph of dependencies.
      Specified by:
      hasChild in interface IResourceDependencyProvider
      Parameters:
      parent - The parent URI
      candidate - The candidate child
      Returns:
      true if and only if the candidate URI is known as a child of the parent URI in the graph of dependencies.
    • getDependenciesOf

      public Iterable<URI> getDependenciesOf(org.eclipse.core.resources.IFile file, Set<URI> bounds)
      Description copied from interface: IResourceDependencyProvider
      Provides the dependencies of the given file.
      Specified by:
      getDependenciesOf in interface IResourceDependencyProvider
      Parameters:
      file - The file
      bounds - The bounds to exclude from the research, in cas the compared resources are part of the same logical model.
      Returns:
      The file's dependencies, as a never null Iterable over the dependencies URIs.
    • isInContainer

      protected com.google.common.base.Predicate<URI> isInContainer(org.eclipse.core.resources.IResource container)
      This predicate can be used to check wether a given URI points to a workspace resource contained in the given container.
      Parameters:
      container - The container in which we need the resources to be contained.
      Returns:
      A ready to use predicate.