Class ResourceDependencyProvider
java.lang.Object
org.eclipse.emf.compare.ide.ui.internal.logical.resolver.ResourceDependencyProvider
- All Implemented Interfaces:
IResourceDependencyProvider
The default implementation of the
IResourceDependencyProvider
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDependenciesOf
(org.eclipse.core.resources.IFile file) Provides the dependencies of the given file.getDependenciesOf
(org.eclipse.core.resources.IFile file, Set<URI> bounds) Provides the dependencies of the given file.boolean
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 Details
-
ResourceDependencyProvider
Constructor.- Parameters:
context
- The resolution context, must not be null.
-
-
Method Details
-
getDependenciesOf
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
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
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.
-