Class ResourceDependencyProvider

    • Constructor Detail

      • ResourceDependencyProvider

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

      • 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.