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.boolean
hasChild(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:IResourceDependencyProvider
Provides the dependencies of the given file.- Specified by:
getDependenciesOf
in interfaceIResourceDependencyProvider
- Parameters:
file
- The file- Returns:
- The file's dependencies, as a never null Iterable over the dependencies
URI
s.
-
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 interfaceIResourceDependencyProvider
- Parameters:
parent
- The parent URIcandidate
- 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 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
URI
s.
-
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.
-
-