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 theIResourceDependencyProvider.
-
-
Constructor Summary
Constructors Constructor Description ResourceDependencyProvider(IResolutionContext context)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<URI>getDependenciesOf(org.eclipse.core.resources.IFile file)Provides the dependencies of the given file.Iterable<URI>getDependenciesOf(org.eclipse.core.resources.IFile file, Set<URI> bounds)Provides the dependencies of the given file.booleanhasChild(URI parent, URI candidate)Indicates whether the given parent has the given URI as child according to the graph of dependencies.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.
-
-
-
Constructor Detail
-
ResourceDependencyProvider
public ResourceDependencyProvider(IResolutionContext context)
Constructor.- Parameters:
context- The resolution context, must not be null.
-
-
Method Detail
-
getDependenciesOf
public Iterable<URI> getDependenciesOf(org.eclipse.core.resources.IFile file)
Description copied from interface:IResourceDependencyProviderProvides the dependencies of the given file.- Specified by:
getDependenciesOfin interfaceIResourceDependencyProvider- 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:IResourceDependencyProviderIndicates whether the given parent has the given URI as child according to the graph of dependencies.- Specified by:
hasChildin interfaceIResourceDependencyProvider- Parameters:
parent- The parent URIcandidate- The candidate child- Returns:
trueif 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:IResourceDependencyProviderProvides the dependencies of the given file.- Specified by:
getDependenciesOfin interfaceIResourceDependencyProvider- Parameters:
file- The filebounds- 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.
-
-