use of org.eclipse.tycho.p2.target.FinalTargetPlatformImpl in project tycho by eclipse.
the class PublishProductToolTest method initPublisher.
private PublishProductTool initPublisher(IInstallableUnit... tpUnits) {
LinkedHashSet<IInstallableUnit> contextUnits = new LinkedHashSet<>();
contextUnits.addAll(Arrays.asList(tpUnits));
P2TargetPlatform targetPlatform = new FinalTargetPlatformImpl(contextUnits, null, null, null, null, null);
PublisherActionRunner publisherRunner = new PublisherActionRunner(targetPlatform.getInstallableUnitsAsMetadataRepository(), ENVIRONMENTS, logVerifier.getLogger());
return new PublishProductToolImpl(publisherRunner, outputRepository, targetPlatform, QUALIFIER, interpolatorMock, logVerifier.getLogger());
}
use of org.eclipse.tycho.p2.target.FinalTargetPlatformImpl in project tycho by eclipse.
the class TargetPlatformFactoryImpl method createTargetPlatformWithUpdatedReactorUnits.
P2TargetPlatform createTargetPlatformWithUpdatedReactorUnits(PreliminaryTargetPlatformImpl preliminaryTP, Map<IInstallableUnit, ReactorProjectIdentities> reactorUnitsMap, List<IRawArtifactFileProvider> reactorArtifacts) {
LinkedHashSet<IInstallableUnit> allUnits = preliminaryTP.getExternalUnits();
// external units are already filtered, only reactor units need to be filtered again
if (reactorUnitsMap != null) {
Collection<IInstallableUnit> reactorUnits = new LinkedList<>(reactorUnitsMap.keySet());
TargetPlatformFilterEvaluator configuredFilters = preliminaryTP.getFilter();
if (configuredFilters != null) {
configuredFilters.filterUnits(reactorUnits);
}
allUnits.addAll(reactorUnits);
}
IRawArtifactFileProvider jointArtifacts = createJointArtifactProvider(reactorArtifacts, preliminaryTP.getExternalArtifacts());
return new FinalTargetPlatformImpl(allUnits, preliminaryTP.getEEResolutionHints(), jointArtifacts, localArtifactRepository, preliminaryTP.getOriginalMavenArtifactMap(), reactorUnitsMap);
}
Aggregations