Package org.eclipse.tycho.p2maven
Class InstallableUnitSlicer
java.lang.Object
org.eclipse.tycho.p2maven.InstallableUnitSlicer
A strategy that computes a slice from a set of all units.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.equinox.p2.query.IQueryResult<org.eclipse.equinox.p2.metadata.IInstallableUnit> computeDependencies(Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> rootIus, org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IInstallableUnit> avaiableIUs, SlicingOptions options) Computes a "slice" of a given set ofIInstallableUnits that include as much of the requirements of the root units that are fulfilled by the available units.Map<org.eclipse.equinox.p2.metadata.IRequirement, Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit>> computeDirectDependencies(Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> rootIus, org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IInstallableUnit> avaiableIUs) Computes a "slice" that is the direct dependencies of the givenIInstallableUnits in a way that the result contains any unit that satisfies a requirement in for rootIus
-
Constructor Details
-
InstallableUnitSlicer
public InstallableUnitSlicer()
-
-
Method Details
-
computeDependencies
public org.eclipse.equinox.p2.query.IQueryResult<org.eclipse.equinox.p2.metadata.IInstallableUnit> computeDependencies(Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> rootIus, org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IInstallableUnit> avaiableIUs, SlicingOptions options) throws org.eclipse.core.runtime.CoreException Computes a "slice" of a given set ofIInstallableUnits that include as much of the requirements of the root units that are fulfilled by the available units. The slice is greedy, that means that as much as possible is included.- Parameters:
rootIus- the root units that are inspected for the sliceavaiableIUs- theIQueryableof all units that could be used for the sliceoptions- the options used for the slicing- Returns:
- the result of the slicing
- Throws:
org.eclipse.core.runtime.CoreException- if there is any error
-
computeDirectDependencies
public Map<org.eclipse.equinox.p2.metadata.IRequirement,Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit>> computeDirectDependencies(Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> rootIus, org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IInstallableUnit> avaiableIUs) throws org.eclipse.core.runtime.CoreException Computes a "slice" that is the direct dependencies of the givenIInstallableUnits in a way that the result contains any unit that satisfies a requirement in for rootIus- Parameters:
rootIus- the rootInstallableUnits to take into accountavaiableIUs- theIQueryableof all units that could be used for fulfilling a requirementcontextIUs- context IUs that represent the the profile properties to consider during resolution, can be empty in which case a filter is always considered a match- Returns:
- the result of the slicing, be aware that no maximum/minimum constraints or filters are applied as part of this computation
- Throws:
org.eclipse.core.runtime.CoreException- if there is any error
-