Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java159
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitOperand.java (renamed from bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/InstallableUnitOperand.java)2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPropertyOperand.java (renamed from bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/InstallableUnitPropertyOperand.java)2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Operand.java (renamed from bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/Operand.java)4
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PropertyOperand.java (renamed from bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PropertyOperand.java)2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java (renamed from bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningPlan.java)54
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/BeginOperationEvent.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/CommitOperationEvent.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/InstallableUnitEvent.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/RollbackOperationEvent.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/TransactionEvent.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OperationGenerationTest.java124
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java225
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseApplicabilityTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseTest.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbsolutePlanTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbstractPlannerTest.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270683.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DisabledExplanation.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationDeepConflict.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForOptionalDependencies.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForPartialInstallation.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationSeveralConflictingRoots.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUProperties.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUPropertyRemoval.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement2.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleSingleton.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NegationTesting.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ORTesting.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest12.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest2.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest6.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest9.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ProvisioningPlanQueryTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleSingleton.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddJVMArgumentActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CollectActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/JVMArgumentActionLogicTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveJVMArgumentActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkDependentPropertyActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkIndependentPropertyActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetLauncherNameActionTest.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CleanupzipActionTest.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CollectActionTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CopyActionTest.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/UnzipActionTest.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java8
90 files changed, 674 insertions, 451 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java
index 87484914e..fee06b841 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java
@@ -10,19 +10,23 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.director;
-import org.eclipse.equinox.p2.metadata.IInstallableUnitFragment;
-
import java.util.*;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IInstallableUnitFragment;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
public class OperationGenerator {
private static final IInstallableUnit NULL_IU = MetadataFactory.createResolvedInstallableUnit(MetadataFactory.createInstallableUnit(new InstallableUnitDescription()), new IInstallableUnitFragment[0]);
+ private final IProvisioningPlan plan;
- public List<InstallableUnitOperand> generateOperation(Collection<IInstallableUnit> from_, Collection<IInstallableUnit> to_) {
+ public OperationGenerator(IProvisioningPlan plan) {
+ this.plan = plan;
+ }
+
+ public void generateOperation(Collection<IInstallableUnit> from_, Collection<IInstallableUnit> to_) {
Collection<IInstallableUnit> intersection = new HashSet<IInstallableUnit>(from_);
intersection.retainAll(to_);
@@ -37,15 +41,13 @@ public class OperationGenerator {
List<IInstallableUnit> to = new ArrayList<IInstallableUnit>(tmpTo);
Collections.sort(to);
- ArrayList<InstallableUnitOperand> operations = new ArrayList<InstallableUnitOperand>();
- generateUpdates(from, to, operations);
- generateInstallUninstall(from, to, operations);
- generateConfigurationChanges(to_, intersection, operations);
- return operations;
+ generateUpdates(from, to);
+ generateInstallUninstall(from, to);
+ generateConfigurationChanges(to_, intersection);
}
//This generates operations that are causing the IUs to be reconfigured.
- private void generateConfigurationChanges(Collection<IInstallableUnit> to_, Collection<IInstallableUnit> intersection, ArrayList<InstallableUnitOperand> operations) {
+ private void generateConfigurationChanges(Collection<IInstallableUnit> to_, Collection<IInstallableUnit> intersection) {
if (intersection.size() == 0)
return;
//We retain from each set the things that are the same.
@@ -54,12 +56,12 @@ public class OperationGenerator {
TreeSet<IInstallableUnit> to = new TreeSet<IInstallableUnit>(to_);
for (IInstallableUnit fromIU : intersection) {
IInstallableUnit toIU = to.tailSet(fromIU).first();
- generateConfigurationOperation(fromIU, toIU, operations);
+ generateConfigurationOperation(fromIU, toIU);
}
}
- private void generateConfigurationOperation(IInstallableUnit fromIU, IInstallableUnit toIU, ArrayList<InstallableUnitOperand> operations) {
+ private void generateConfigurationOperation(IInstallableUnit fromIU, IInstallableUnit toIU) {
List<IInstallableUnitFragment> fromFragments = fromIU.getFragments();
List<IInstallableUnitFragment> toFragments = toIU.getFragments();
if (fromFragments == toFragments)
@@ -67,10 +69,10 @@ public class OperationGenerator {
//Check to see if the two arrays are equals independently of the order of the fragments
if (fromFragments.size() == toFragments.size() && fromFragments.containsAll(toFragments))
return;
- operations.add(new InstallableUnitOperand(fromIU, toIU));
+ plan.updateInstallableUnit(fromIU, toIU);
}
- private void generateInstallUninstall(List<IInstallableUnit> from, List<IInstallableUnit> to, ArrayList<InstallableUnitOperand> operations) {
+ private void generateInstallUninstall(List<IInstallableUnit> from, List<IInstallableUnit> to) {
int toIdx = 0;
int fromIdx = 0;
while (fromIdx != from.size() && toIdx != to.size()) {
@@ -78,30 +80,30 @@ public class OperationGenerator {
IInstallableUnit toIU = to.get(toIdx);
int comparison = toIU.compareTo(fromIU);
if (comparison < 0) {
- operations.add(createInstallOperation(toIU));
+ plan.addInstallableUnit(toIU);
toIdx++;
} else if (comparison == 0) {
toIdx++;
fromIdx++;
// System.out.println("same " + fromIU);
} else {
- operations.add(createUninstallOperation(fromIU));
+ plan.removeInstallableUnit(fromIU);
fromIdx++;
}
}
if (fromIdx != from.size()) {
for (int i = fromIdx; i < from.size(); i++) {
- operations.add(createUninstallOperation(from.get(i)));
+ plan.removeInstallableUnit(from.get(i));
}
}
if (toIdx != to.size()) {
for (int i = toIdx; i < to.size(); i++) {
- operations.add(createInstallOperation(to.get(i)));
+ plan.addInstallableUnit(to.get(i));
}
}
}
- private void generateUpdates(List<IInstallableUnit> from, List<IInstallableUnit> to, ArrayList<InstallableUnitOperand> operations) {
+ private void generateUpdates(List<IInstallableUnit> from, List<IInstallableUnit> to) {
if (to.isEmpty() || from.isEmpty())
return;
@@ -150,7 +152,7 @@ public class OperationGenerator {
removedFromTo.add(iuTo);
continue;
}
- operations.add(createUpdateOperation(iuFrom, iuTo));
+ plan.updateInstallableUnit(iuFrom, iuTo);
from.remove(iuFrom);
fromIdIndexList.remove(iuFrom);
processed.add(iuTo);
@@ -159,18 +161,6 @@ public class OperationGenerator {
to.removeAll(removedFromTo);
}
- private InstallableUnitOperand createUninstallOperation(IInstallableUnit iu) {
- return new InstallableUnitOperand(iu, null);
- }
-
- private InstallableUnitOperand createInstallOperation(IInstallableUnit iu) {
- return new InstallableUnitOperand(null, iu);
- }
-
- private InstallableUnitOperand createUpdateOperation(IInstallableUnit from, IInstallableUnit to) {
- return new InstallableUnitOperand(from, to);
- }
-
private IInstallableUnit next(List<IInstallableUnit> l, int i) {
i++;
if (i >= l.size())
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java
index 771c70f01..0a3079c4b 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java
@@ -12,6 +12,7 @@ package org.eclipse.equinox.internal.p2.director;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+import org.eclipse.equinox.p2.engine.IEngine;
import org.eclipse.equinox.p2.engine.IProfileRegistry;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
@@ -21,8 +22,9 @@ import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
public class PlannerComponent implements IAgentServiceFactory {
public Object createService(IProvisioningAgent agent) {
+ IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
IMetadataRepositoryManager repoManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- return new SimplePlanner(profileRegistry, repoManager);
+ return new SimplePlanner(engine, profileRegistry, repoManager);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
index 89658cd4c..0944f9ee4 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
@@ -7,10 +7,11 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Genuitec - bug fixes
- * Sonatype, Inc. - ongoing development
+ * Sonatype, Inc. - ongoing development
******************************************************************************/
package org.eclipse.equinox.internal.p2.director;
+import java.lang.reflect.Method;
import java.net.URI;
import java.util.*;
import java.util.Map.Entry;
@@ -49,18 +50,21 @@ public class SimplePlanner implements IPlanner {
private final IMetadataRepositoryManager repoManager;
private final IProfileRegistry profileRegistry;
+ private final IEngine engine;
- private ProvisioningPlan generateProvisioningPlan(Collection<IInstallableUnit> fromState, Collection<IInstallableUnit> toState, ProfileChangeRequest changeRequest, IProvisioningPlan installerPlan, ProvisioningContext context) {
- List<InstallableUnitOperand> iuOperands = generateOperations(fromState, toState);
- PropertyOperand[] propertyOperands = generatePropertyOperations(changeRequest);
-
- int iuOpsSize = iuOperands.size();
- Operand[] operands = new Operand[iuOpsSize + propertyOperands.length];
- for (int i = 0; i < iuOpsSize; ++i)
- operands[i] = iuOperands.get(i);
- System.arraycopy(propertyOperands, 0, operands, iuOpsSize, propertyOperands.length);
+ private IProvisioningPlan generateProvisioningPlan(Collection<IInstallableUnit> fromState, Collection<IInstallableUnit> toState, ProfileChangeRequest changeRequest, IProvisioningPlan installerPlan, ProvisioningContext context) {
+ IProvisioningPlan plan = engine.createPlan(changeRequest.getProfile(), context);
+ planIUOperations(plan, fromState, toState);
+ planPropertyOperations(plan, changeRequest);
if (DEBUG) {
+ Object[] operands = new Object[0];
+ try {
+ Method getOperands = plan.getClass().getMethod("getOperands", new Class[0]); //$NON-NLS-1$
+ operands = (Object[]) getOperands.invoke(plan, new Object[0]);
+ } catch (Throwable e) {
+ // ignore
+ }
for (int i = 0; i < operands.length; i++) {
Tracing.debug(operands[i].toString());
}
@@ -71,7 +75,9 @@ public class SimplePlanner implements IPlanner {
Map<IInstallableUnit, RequestStatus> requestSideEffects = (changes == null) ? null : changes[1];
QueryableArray plannedState = new QueryableArray(toState.toArray(new IInstallableUnit[toState.size()]));
PlannerStatus plannerStatus = new PlannerStatus(Status.OK_STATUS, null, requestChanges, requestSideEffects, plannedState);
- return new ProvisioningPlan(plannerStatus, changeRequest.getProfile(), operands, context, installerPlan);
+ plan.setStatus(plannerStatus);
+ plan.setInstallerPlan(installerPlan);
+ return plan;
}
private Map<IInstallableUnit, RequestStatus>[] buildDetailedErrors(ProfileChangeRequest changeRequest) {
@@ -146,49 +152,41 @@ public class SimplePlanner implements IPlanner {
return root;
}
- private PropertyOperand[] generatePropertyOperations(ProfileChangeRequest profileChangeRequest) {
- IProfile profile = profileChangeRequest.getProfile();
- List<PropertyOperand> operands = new ArrayList<PropertyOperand>();
- // First deal with profile properties to remove. Only generate an operand if the property was there in the first place
+ private void planPropertyOperations(IProvisioningPlan plan, ProfileChangeRequest profileChangeRequest) {
+
+ // First deal with profile properties to remove.
String[] toRemove = profileChangeRequest.getPropertiesToRemove();
- Map<String, String> existingProperties = profile.getProperties();
for (int i = 0; i < toRemove.length; i++) {
- if (existingProperties.containsKey(toRemove[i]))
- operands.add(new PropertyOperand(toRemove[i], existingProperties.get(toRemove[i]), null));
+ plan.setProfileProperty(toRemove[i], null);
}
// Now deal with profile property changes/additions
Map<String, String> propertyChanges = profileChangeRequest.getPropertiesToAdd();
for (Entry<String, String> entry : propertyChanges.entrySet()) {
- operands.add(new PropertyOperand(entry.getKey(), existingProperties.get(entry.getKey()), entry.getValue()));
+ plan.setProfileProperty(entry.getKey(), entry.getValue());
}
+
// Now deal with iu property changes/additions.
- // TODO we aren't yet checking that the IU will exist in the final profile, will the engine do this?
Map<IInstallableUnit, Map<String, String>> allIUPropertyChanges = profileChangeRequest.getInstallableUnitProfilePropertiesToAdd();
for (Entry<IInstallableUnit, Map<String, String>> entry : allIUPropertyChanges.entrySet()) {
IInstallableUnit iu = entry.getKey();
for (Entry<String, String> entry2 : entry.getValue().entrySet()) {
- Object oldValue = profile.getInstallableUnitProperty(iu, entry2.getKey());
- operands.add(new InstallableUnitPropertyOperand(iu, entry2.getKey(), oldValue, entry2.getValue()));
+ plan.setInstallableUnitProfileProperty(iu, entry2.getKey(), entry2.getValue());
}
}
// Now deal with iu property removals.
- // TODO we could optimize by not generating property removals for IU's that aren't there or won't be there.
Map<IInstallableUnit, List<String>> allIUPropertyDeletions = profileChangeRequest.getInstallableUnitProfilePropertiesToRemove();
for (Entry<IInstallableUnit, List<String>> entry : allIUPropertyDeletions.entrySet()) {
IInstallableUnit iu = entry.getKey();
- Map<String, String> existingIUProperties = profile.getInstallableUnitProperties(iu);
List<String> iuPropertyRemovals = entry.getValue();
for (String key : iuPropertyRemovals) {
- if (existingIUProperties.containsKey(key))
- operands.add(new InstallableUnitPropertyOperand(iu, key, existingIUProperties.get(key), null));
+ plan.setInstallableUnitProfileProperty(iu, key, null);
}
}
- return operands.toArray(new PropertyOperand[operands.size()]);
}
- private List<InstallableUnitOperand> generateOperations(Collection<IInstallableUnit> fromState, Collection<IInstallableUnit> toState) {
- return new OperationGenerator().generateOperation(fromState, toState);
+ private void planIUOperations(IProvisioningPlan plan, Collection<IInstallableUnit> fromState, Collection<IInstallableUnit> toState) {
+ new OperationGenerator(plan).generateOperation(fromState, toState);
}
public IProvisioningPlan getDiffPlan(IProfile currentProfile, IProfile targetProfile, IProgressMonitor monitor) {
@@ -274,9 +272,11 @@ public class SimplePlanner implements IPlanner {
return false;
}
- public SimplePlanner(IProfileRegistry profileRegistry, IMetadataRepositoryManager repoManager) {
+ public SimplePlanner(IEngine engine, IProfileRegistry profileRegistry, IMetadataRepositoryManager repoManager) {
+ Assert.isNotNull(engine);
Assert.isNotNull(profileRegistry);
Assert.isNotNull(repoManager);
+ this.engine = engine;
this.profileRegistry = profileRegistry;
this.repoManager = repoManager;
}
@@ -317,17 +317,26 @@ public class SimplePlanner implements IPlanner {
Slicer slicer = new Slicer(new QueryableArray(availableIUs), newSelectionContext, satisfyMetaRequirements(profileChangeRequest.getProfileProperties()));
IQueryable<IInstallableUnit> slice = slicer.slice(new IInstallableUnit[] {(IInstallableUnit) updatedPlan[0]}, sub.newChild(ExpandWork / 4));
- if (slice == null)
- return new ProvisioningPlan(slicer.getStatus(), profile, context, null);
+ if (slice == null) {
+ IProvisioningPlan plan = engine.createPlan(profile, context);
+ plan.setStatus(slicer.getStatus());
+ return plan;
+ }
Projector projector = new Projector(slice, newSelectionContext, satisfyMetaRequirements(profileChangeRequest.getProfileProperties()));
projector.encode((IInstallableUnit) updatedPlan[0], (IInstallableUnit[]) updatedPlan[1], profile, profileChangeRequest.getAdditions(), sub.newChild(ExpandWork / 4));
IStatus s = projector.invokeSolver(sub.newChild(ExpandWork / 4));
- if (s.getSeverity() == IStatus.CANCEL)
- return new ProvisioningPlan(s, profile, context, null);
+ if (s.getSeverity() == IStatus.CANCEL) {
+ IProvisioningPlan plan = engine.createPlan(profile, context);
+ plan.setStatus(s);
+ return plan;
+ }
if (s.getSeverity() == IStatus.ERROR) {
sub.setTaskName(Messages.Planner_NoSolution);
- if (context != null && !(context.getProperty(EXPLANATION) == null || Boolean.TRUE.toString().equalsIgnoreCase(context.getProperty(EXPLANATION))))
- return new ProvisioningPlan(s, profile, context, null);
+ if (context != null && !(context.getProperty(EXPLANATION) == null || Boolean.TRUE.toString().equalsIgnoreCase(context.getProperty(EXPLANATION)))) {
+ IProvisioningPlan plan = engine.createPlan(profile, context);
+ plan.setStatus(s);
+ return plan;
+ }
//Extract the explanation
Set<Explanation> explanation = projector.getExplanation(sub.newChild(ExpandWork / 4));
@@ -337,7 +346,10 @@ public class SimplePlanner implements IPlanner {
Map<IInstallableUnit, RequestStatus> requestChanges = (changes == null) ? null : changes[0];
Map<IInstallableUnit, RequestStatus> requestSideEffects = (changes == null) ? null : changes[1];
PlannerStatus plannerStatus = new PlannerStatus(explanationStatus, new RequestStatus(null, RequestStatus.REMOVED, IStatus.ERROR, explanation), requestChanges, requestSideEffects, null);
- return new ProvisioningPlan(plannerStatus, profile, new Operand[0], context, null);
+
+ IProvisioningPlan plan = engine.createPlan(profile, context);
+ plan.setStatus(plannerStatus);
+ return plan;
}
//The resolution succeeded. We can forget about the warnings since there is a solution.
if (Tracing.DEBUG && s.getSeverity() != IStatus.OK)
@@ -360,19 +372,21 @@ public class SimplePlanner implements IPlanner {
//Get the solution for the initial request
Object resolutionResult = getSolutionFor(pcr, context, sub.newChild(ExpandWork / 2));
if (resolutionResult instanceof IProvisioningPlan)
- return (ProvisioningPlan) resolutionResult;
+ return (IProvisioningPlan) resolutionResult;
Collection<IInstallableUnit> newState = ((Projector) resolutionResult).extractSolution();
Collection<IInstallableUnit> fullState = new ArrayList<IInstallableUnit>();
fullState.addAll(newState);
newState = AttachmentHelper.attachFragments(newState.iterator(), ((Projector) resolutionResult).getFragmentAssociation());
- ProvisioningPlan temporaryPlan = generatePlan((Projector) resolutionResult, newState, pcr, context);
+ IProvisioningPlan temporaryPlan = generatePlan((Projector) resolutionResult, newState, pcr, context);
//Create a plan for installing necessary pieces to complete the installation (e.g touchpoint actions)
return createInstallerPlan(pcr.getProfile(), pcr, fullState, newState, temporaryPlan, context, sub.newChild(ExpandWork / 2));
} catch (OperationCanceledException e) {
- return new ProvisioningPlan(Status.CANCEL_STATUS, pcr.getProfile(), context, null);
+ IProvisioningPlan plan = engine.createPlan(pcr.getProfile(), context);
+ plan.setStatus(Status.CANCEL_STATUS);
+ return plan;
} finally {
sub.done();
}
@@ -384,16 +398,18 @@ public class SimplePlanner implements IPlanner {
toState.removeAll(profileChangeRequest.getRemovals());
toState.addAll(profileChangeRequest.getAdditions());
- List<InstallableUnitOperand> iuOperands = generateOperations(fromState, toState);
- PropertyOperand[] propertyOperands = generatePropertyOperations(profileChangeRequest);
-
- int iuOpsSize = iuOperands.size();
- Operand[] operands = new Operand[iuOpsSize + propertyOperands.length];
- for (int i = 0; i < iuOpsSize; ++i)
- operands[i] = iuOperands.get(i);
- System.arraycopy(propertyOperands, 0, operands, iuOpsSize, propertyOperands.length);
+ IProvisioningPlan plan = engine.createPlan(profileChangeRequest.getProfile(), context);
+ planIUOperations(plan, fromState, toState);
+ planPropertyOperations(plan, profileChangeRequest);
if (DEBUG) {
+ Object[] operands = new Object[0];
+ try {
+ Method getOperands = plan.getClass().getMethod("getOperands", new Class[0]); //$NON-NLS-1$
+ operands = (Object[]) getOperands.invoke(plan, new Object[0]);
+ } catch (Throwable e) {
+ // ignore
+ }
for (int i = 0; i < operands.length; i++) {
Tracing.debug(operands[i].toString());
}
@@ -403,7 +419,8 @@ public class SimplePlanner implements IPlanner {
Map<IInstallableUnit, RequestStatus> requestSideEffects = (changes == null) ? null : changes[1];
QueryableArray plannedState = new QueryableArray(toState.toArray(new IInstallableUnit[toState.size()]));
PlannerStatus plannerStatus = new PlannerStatus(Status.OK_STATUS, null, requestChanges, requestSideEffects, plannedState);
- return new ProvisioningPlan(plannerStatus, profileChangeRequest.getProfile(), operands, context, null);
+ plan.setStatus(plannerStatus);
+ return plan;
}
//Verify that all the meta requirements necessary to perform the uninstallation (if necessary) and all t
@@ -430,21 +447,27 @@ public class SimplePlanner implements IPlanner {
return allMetaRequirements;
}
- private ProvisioningPlan createInstallerPlan(IProfile profile, ProfileChangeRequest initialRequest, Collection<IInstallableUnit> unattachedState, Collection<IInstallableUnit> expectedState, ProvisioningPlan initialPlan, ProvisioningContext initialContext, IProgressMonitor monitor) {
+ private IProvisioningPlan createInstallerPlan(IProfile profile, ProfileChangeRequest initialRequest, Collection<IInstallableUnit> unattachedState, Collection<IInstallableUnit> expectedState, IProvisioningPlan initialPlan, ProvisioningContext initialContext, IProgressMonitor monitor) {
SubMonitor sub = SubMonitor.convert(monitor, ExpandWork);
try {
sub.setTaskName(Messages.Director_Task_installer_plan);
- if (profileRegistry == null)
- return new ProvisioningPlan(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Planner_no_profile_registry), profile, initialContext, null);
+ if (profileRegistry == null) {
+ IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
+ plan.setStatus(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Planner_no_profile_registry));
+ return plan;
+ }
IProfile agentProfile = profileRegistry.getProfile(IProfileRegistry.SELF);
if (agentProfile == null)
return initialPlan;
if (profile.getProfileId().equals(agentProfile.getProfileId())) {
- if (profile.getTimestamp() != agentProfile.getTimestamp())
- return new ProvisioningPlan(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Planner_profile_out_of_sync, profile.getProfileId())), profile, initialContext, null);
+ if (profile.getTimestamp() != agentProfile.getTimestamp()) {
+ IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
+ plan.setStatus(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Planner_profile_out_of_sync, profile.getProfileId())));
+ return plan;
+ }
return createInstallerPlanForCohostedCase(profile, initialRequest, initialPlan, unattachedState, expectedState, initialContext, sub);
}
@@ -457,13 +480,13 @@ public class SimplePlanner implements IPlanner {
}
}
- private ProvisioningPlan createInstallerPlanForCohostedCaseFromExternalInstaller(IProfile profile, ProfileChangeRequest initialRequest, IProvisioningPlan initialPlan, Collection<IInstallableUnit> newState, ProvisioningContext initialContext, IProfile agentProfile, SubMonitor sub) {
- ProvisioningPlan planForProfile = generatePlan(null, newState, initialRequest, initialContext);
+ private IProvisioningPlan createInstallerPlanForCohostedCaseFromExternalInstaller(IProfile profile, ProfileChangeRequest initialRequest, IProvisioningPlan initialPlan, Collection<IInstallableUnit> newState, ProvisioningContext initialContext, IProfile agentProfile, SubMonitor sub) {
+ IProvisioningPlan planForProfile = generatePlan(null, newState, initialRequest, initialContext);
return createInstallerPlanForExternalInstaller(profile, initialRequest, planForProfile, newState, initialContext, agentProfile, sub);
}
//Deal with the case where the agent profile is different than the one being provisioned
- private ProvisioningPlan createInstallerPlanForExternalInstaller(IProfile targetedProfile, ProfileChangeRequest initialRequest, ProvisioningPlan initialPlan, Collection<IInstallableUnit> expectedState, ProvisioningContext initialContext, IProfile agentProfile, SubMonitor sub) {
+ private IProvisioningPlan createInstallerPlanForExternalInstaller(IProfile targetedProfile, ProfileChangeRequest initialRequest, IProvisioningPlan initialPlan, Collection<IInstallableUnit> expectedState, ProvisioningContext initialContext, IProfile agentProfile, SubMonitor sub) {
Collection<IRequirement> metaRequirements = areMetaRequirementsSatisfied(agentProfile, expectedState, initialPlan);
if (metaRequirements == null)
return initialPlan;
@@ -479,7 +502,12 @@ public class SimplePlanner implements IPlanner {
if (externalInstallerPlan instanceof IProvisioningPlan && ((IProvisioningPlan) externalInstallerPlan).getStatus().getSeverity() == IStatus.ERROR) {
MultiStatus externalInstallerStatus = new MultiStatus(DirectorActivator.PI_DIRECTOR, 0, Messages.Planner_can_not_install_preq, null);
externalInstallerStatus.add(((IProvisioningPlan) externalInstallerPlan).getStatus());
- return new ProvisioningPlan(externalInstallerStatus, initialRequest.getProfile(), initialContext, new ProvisioningPlan(externalInstallerStatus, agentProfile, initialContext, null));
+ IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
+ plan.setStatus(externalInstallerStatus);
+ IProvisioningPlan installerPlan = engine.createPlan(agentProfile, initialContext);
+ installerPlan.setStatus(externalInstallerStatus);
+ plan.setInstallerPlan(installerPlan);
+ return plan;
}
initialPlan.setInstallerPlan(generatePlan((Projector) externalInstallerPlan, null, agentRequest, initialContext));
@@ -488,7 +516,7 @@ public class SimplePlanner implements IPlanner {
//Deal with the case where the actions needs to be installed in the same profile than the one we are performing the initial request
//The expectedState represents the result of the initialRequest where the metaRequirements have been satisfied.
- private ProvisioningPlan createInstallerPlanForCohostedCase(IProfile profile, ProfileChangeRequest initialRequest, ProvisioningPlan initialPlan, Collection<IInstallableUnit> unattachedState, Collection<IInstallableUnit> expectedState, ProvisioningContext initialContext, SubMonitor monitor) {
+ private IProvisioningPlan createInstallerPlanForCohostedCase(IProfile profile, ProfileChangeRequest initialRequest, IProvisioningPlan initialPlan, Collection<IInstallableUnit> unattachedState, Collection<IInstallableUnit> expectedState, ProvisioningContext initialContext, SubMonitor monitor) {
Collection<IRequirement> metaRequirements = initialRequest.getRemovals().size() == 0 ? areMetaRequirementsSatisfied(profile, expectedState, initialPlan) : extractMetaRequirements(expectedState, initialPlan);
if (metaRequirements == null || metaRequirements.isEmpty())
return initialPlan;
@@ -524,7 +552,12 @@ public class SimplePlanner implements IPlanner {
if (agentSolution instanceof IProvisioningPlan && ((IProvisioningPlan) agentSolution).getStatus().getSeverity() == IStatus.ERROR) {
MultiStatus agentStatus = new MultiStatus(DirectorActivator.PI_DIRECTOR, 0, Messages.Planner_actions_and_software_incompatible, null);
agentStatus.add(((IProvisioningPlan) agentSolution).getStatus());
- return new ProvisioningPlan(agentStatus, initialRequest.getProfile(), initialContext, new ProvisioningPlan(agentStatus, agentRequest.getProfile(), initialContext, null));
+ IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
+ plan.setStatus(agentStatus);
+ IProvisioningPlan installerPlan = engine.createPlan(initialRequest.getProfile(), initialContext);
+ installerPlan.setStatus(agentStatus);
+ plan.setInstallerPlan(installerPlan);
+ return plan;
}
//Compute the installer plan. It is the difference between what is currently in the profile and the solution we just computed
@@ -537,7 +570,7 @@ public class SimplePlanner implements IPlanner {
Object initialSolution = getSolutionFor(new ProfileChangeRequest(new EverythingOptionalProfile(initialRequest.getProfile())), noRepoContext, new NullProgressMonitor());
if (initialSolution instanceof IProvisioningPlan) {
LogHelper.log(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, "The resolution of the previous state contained in profile " + initialRequest.getProfile().getProfileId() + " version " + initialRequest.getProfile().getTimestamp() + " failed.")); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- return (ProvisioningPlan) initialSolution;
+ return (IProvisioningPlan) initialSolution;
}
Iterator<IInstallableUnit> profileState = initialRequest.getProfile().query(InstallableUnitQuery.ANY, null).iterator();
Collection<IInstallableUnit> initialState = AttachmentHelper.attachFragments(profileState, ((Projector) initialSolution).getFragmentAssociation());
@@ -549,7 +582,7 @@ public class SimplePlanner implements IPlanner {
}
//Compute the set of operands based on the solution obtained previously
- private ProvisioningPlan generatePlan(Projector newSolution, Collection<IInstallableUnit> newState, ProfileChangeRequest request, ProvisioningContext context) {
+ private IProvisioningPlan generatePlan(Projector newSolution, Collection<IInstallableUnit> newState, ProfileChangeRequest request, ProvisioningContext context) {
//Compute the attachment of the new state if not provided
if (newState == null) {
newState = newSolution.extractSolution();
@@ -561,7 +594,7 @@ public class SimplePlanner implements IPlanner {
Object initialSolution = getSolutionFor(new ProfileChangeRequest(new EverythingOptionalProfile(request.getProfile())), noRepoContext, new NullProgressMonitor());
if (initialSolution instanceof IProvisioningPlan) {
LogHelper.log(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, "The resolution of the previous state contained in profile " + request.getProfile().getProfileId() + " version " + request.getProfile().getTimestamp() + " failed.")); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- return (ProvisioningPlan) initialSolution;
+ return (IProvisioningPlan) initialSolution;
}
Iterator<IInstallableUnit> profileState = request.getProfile().query(InstallableUnitQuery.ANY, null).iterator();
Collection<IInstallableUnit> initialState = AttachmentHelper.attachFragments(profileState, ((Projector) initialSolution).getFragmentAssociation());
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java
index c9c10ad3b..b2e50637d 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java
@@ -41,11 +41,11 @@ public class Engine implements IEngine {
}
public IStatus perform(IProvisioningPlan plan, IPhaseSet phaseSet, IProgressMonitor monitor) {
- return perform(plan.getProfile(), phaseSet, plan.getOperands(), plan.getContext(), monitor);
+ return perform(plan.getProfile(), phaseSet, ((ProvisioningPlan) plan).getOperands(), plan.getContext(), monitor);
}
public IStatus perform(IProvisioningPlan plan, IProgressMonitor monitor) {
- return perform(plan.getProfile(), new DefaultPhaseSet(), plan.getOperands(), plan.getContext(), monitor);
+ return perform(plan, new DefaultPhaseSet(), monitor);
}
public IStatus perform(IProfile iprofile, IPhaseSet phases, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
@@ -102,7 +102,7 @@ public class Engine implements IEngine {
}
}
- public IStatus validate(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
+ protected IStatus validate(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
checkArguments(iprofile, phaseSet, operands, context, monitor);
if (context == null)
@@ -123,7 +123,7 @@ public class Engine implements IEngine {
return PhaseSet.createPhaseSetIncluding(includes);
}
- public IProvisioningPlan createCustomPlan(IProfile profile, Operand[] operands, ProvisioningContext context) {
- return new ProvisioningPlan(profile, operands, context);
+ public IProvisioningPlan createPlan(IProfile profile, ProvisioningContext context) {
+ return new ProvisioningPlan(profile, null, context);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/InstallableUnitOperand.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitOperand.java
index edab40f53..25fa41b50 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/InstallableUnitOperand.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitOperand.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.p2.engine;
+package org.eclipse.equinox.internal.p2.engine;
import org.eclipse.core.runtime.Assert;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/InstallableUnitPropertyOperand.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPropertyOperand.java
index 265da8d80..39d1bb5c4 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/InstallableUnitPropertyOperand.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPropertyOperand.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.p2.engine;
+package org.eclipse.equinox.internal.p2.engine;
import org.eclipse.core.runtime.Assert;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/Operand.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Operand.java
index 7efeb9e88..818508579 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/Operand.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Operand.java
@@ -8,7 +8,9 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.p2.engine;
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.equinox.p2.engine.*;
/**
* The common base class for engine operands.
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java
index 88b3cb0d5..73a92602c 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java
@@ -195,7 +195,7 @@ public abstract class Phase {
Map<String, Object> touchpointOperandParameters = new HashMap<String, Object>(touchpointPhaseParameters);
touchpointOperandParameters.putAll(operandParameters);
- IStatus status = touchpoint.initializeOperand(profile, operand, touchpointOperandParameters);
+ IStatus status = touchpoint.initializeOperand(profile, touchpointOperandParameters);
if (status != null && status.matches(IStatus.ERROR | IStatus.CANCEL))
return status;
touchpointToTouchpointOperandParameters.put(touchpoint, touchpointOperandParameters);
@@ -303,7 +303,7 @@ public abstract class Phase {
for (Entry<Touchpoint, Map<String, Object>> entry : touchpointToTouchpointOperandParameters.entrySet()) {
Touchpoint touchpoint = entry.getKey();
Map<String, Object> touchpointParameters = entry.getValue();
- mergeStatus(status, touchpoint.completeOperand(profile, operand, touchpointParameters));
+ mergeStatus(status, touchpoint.completeOperand(profile, touchpointParameters));
}
touchpointToTouchpointOperandParameters.clear();
return status;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PropertyOperand.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PropertyOperand.java
index 3751abb39..8125ee5e2 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PropertyOperand.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PropertyOperand.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.p2.engine;
+package org.eclipse.equinox.internal.p2.engine;
import org.eclipse.core.runtime.Assert;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningPlan.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
index 20f0d67e8..379ef2664 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningPlan.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
@@ -8,11 +8,11 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.equinox.p2.engine;
+package org.eclipse.equinox.internal.p2.engine;
-import java.util.ArrayList;
-import java.util.Collection;
+import java.util.*;
import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.query.*;
@@ -20,10 +20,11 @@ import org.eclipse.equinox.p2.query.*;
* @since 2.0
*/
public class ProvisioningPlan implements IProvisioningPlan {
- final IStatus status;
+
final IProfile profile;
- final Operand[] operands;
+ final List<Operand> operands = new ArrayList<Operand>();
final ProvisioningContext context;
+ IStatus status;
private IProvisioningPlan installerPlan;
public ProvisioningPlan(IProfile profile, Operand[] operands, ProvisioningContext context) {
@@ -31,13 +32,14 @@ public class ProvisioningPlan implements IProvisioningPlan {
}
public ProvisioningPlan(IStatus status, IProfile profile, ProvisioningContext context, IProvisioningPlan installerPlan) {
- this(status, profile, new Operand[0], context, installerPlan);
+ this(status, profile, null, context, installerPlan);
}
public ProvisioningPlan(IStatus status, IProfile profile, Operand[] operands, ProvisioningContext context, IProvisioningPlan installerPlan) {
this.status = status;
this.profile = profile;
- this.operands = (operands == null) ? new Operand[0] : operands;
+ if (operands != null)
+ this.operands.addAll(Arrays.asList(operands));
this.context = (context == null) ? new ProvisioningContext() : context;
this.installerPlan = installerPlan;
}
@@ -49,6 +51,10 @@ public class ProvisioningPlan implements IProvisioningPlan {
return status;
}
+ public void setStatus(IStatus status) {
+ this.status = status;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getProfile()
*/
@@ -60,7 +66,7 @@ public class ProvisioningPlan implements IProvisioningPlan {
* @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getOperands()
*/
public Operand[] getOperands() {
- return operands;
+ return operands.toArray(new Operand[operands.size()]);
}
/* (non-Javadoc)
@@ -88,10 +94,10 @@ public class ProvisioningPlan implements IProvisioningPlan {
if (operands == null || status.getSeverity() == IStatus.ERROR)
return Collector.emptyCollector();
Collection<IInstallableUnit> list = new ArrayList<IInstallableUnit>();
- for (int i = 0; i < operands.length; i++) {
- if (!(operands[i] instanceof InstallableUnitOperand))
+ for (Operand operand : operands) {
+ if (!(operand instanceof InstallableUnitOperand))
continue;
- InstallableUnitOperand op = ((InstallableUnitOperand) operands[i]);
+ InstallableUnitOperand op = ((InstallableUnitOperand) operand);
IInstallableUnit iu = addition ? op.second() : op.first();
if (iu != null)
list.add(iu);
@@ -114,4 +120,30 @@ public class ProvisioningPlan implements IProvisioningPlan {
public void setInstallerPlan(IProvisioningPlan p) {
installerPlan = p;
}
+
+ public void addInstallableUnit(IInstallableUnit iu) {
+ operands.add(new InstallableUnitOperand(null, iu));
+ }
+
+ public void removeInstallableUnit(IInstallableUnit iu) {
+ operands.add(new InstallableUnitOperand(iu, null));
+ }
+
+ public void updateInstallableUnit(IInstallableUnit iu1, IInstallableUnit iu2) {
+ operands.add(new InstallableUnitOperand(iu1, iu2));
+ }
+
+ public void setProfileProperty(String name, String value) {
+ String currentValue = profile.getProperty(name);
+ if (value == null && currentValue == null)
+ return;
+ operands.add(new PropertyOperand(name, currentValue, value));
+ }
+
+ public void setInstallableUnitProfileProperty(IInstallableUnit iu, String name, String value) {
+ String currentValue = profile.getInstallableUnitProperty(iu, name);
+ if (value == null && currentValue == null)
+ return;
+ operands.add(new InstallableUnitPropertyOperand(iu, name, currentValue, value));
+ }
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java
index 090aba5c7..b0f7206fc 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.engine.phases;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.util.*;
import org.eclipse.core.runtime.IProgressMonitor;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java
index e3de7cccb..2709771fb 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.engine.phases;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.util.*;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -83,4 +85,13 @@ public class Collect extends InstallableUnitPhase {
parameters.put(PARM_ARTIFACT_REQUESTS, new ArrayList<IArtifactRequest[]>());
return null;
}
+
+ protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+ IStatus status = super.initializeOperand(profile, operand, parameters, monitor);
+ // defer setting the IU until after the super method to avoid triggering touchpoint initialization
+ IInstallableUnit iu = operand.second();
+ parameters.put(PARM_IU, iu);
+ return status;
+ }
+
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java
index 01dd52695..c8974fa8b 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.engine.phases;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.engine.InstallableUnitPhase;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java
index 3fa36fb1e..184ee3108 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.engine.phases;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.engine.*;
@@ -30,20 +32,19 @@ public class Install extends InstallableUnitPhase {
public IStatus execute(Map<String, Object> parameters) {
IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
String phaseId = (String) parameters.get(PARM_PHASE_ID);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
+ IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, operand, InstallableUnitEvent.INSTALL, getTouchpoint()));
+ ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
return null;
}
public IStatus undo(Map<String, Object> parameters) {
Profile profile = (Profile) parameters.get(PARM_PROFILE);
String phaseId = (String) parameters.get(PARM_PHASE_ID);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
profile.removeInstallableUnit(iu);
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, operand, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
+ ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
return null;
}
}
@@ -53,20 +54,19 @@ public class Install extends InstallableUnitPhase {
public IStatus execute(Map<String, Object> parameters) {
Profile profile = (Profile) parameters.get(PARM_PROFILE);
String phaseId = (String) parameters.get(PARM_PHASE_ID);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
profile.addInstallableUnit(iu);
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, operand, InstallableUnitEvent.INSTALL, getTouchpoint()));
+ ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
return null;
}
public IStatus undo(Map<String, Object> parameters) {
IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
String phaseId = (String) parameters.get(PARM_PHASE_ID);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
+ IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, operand, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
+ ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
return null;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java
index 95d0a828f..37abf66c0 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.engine.phases;
+import org.eclipse.equinox.internal.p2.engine.*;
+
import java.util.*;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.engine.Phase;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java
index 7fba95408..96660fde3 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.engine.phases;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.net.URI;
import java.util.*;
import org.eclipse.core.runtime.*;
@@ -135,4 +137,12 @@ public class Sizing extends InstallableUnitPhase {
parameters.put(Collect.PARM_ARTIFACT_REQUESTS, new ArrayList<IArtifactRequest[]>());
return null;
}
+
+ protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+ IStatus status = super.initializeOperand(profile, operand, parameters, monitor);
+ // defer setting the IU until after the super method to avoid triggering touchpoint initialization
+ IInstallableUnit iu = operand.second();
+ parameters.put(PARM_IU, iu);
+ return status;
+ }
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java
index 9142e300e..666a1e6d2 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.engine.phases;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.engine.InstallableUnitPhase;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java
index a58d9bbe6..45d3fffdd 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.engine.phases;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.engine.*;
@@ -28,20 +30,19 @@ public class Uninstall extends InstallableUnitPhase {
public IStatus execute(Map<String, Object> parameters) {
IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
String phaseId = (String) parameters.get(PARM_PHASE_ID);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
+ IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, operand, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
+ ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
return null;
}
public IStatus undo(Map<String, Object> parameters) {
Profile profile = (Profile) parameters.get(PARM_PROFILE);
String phaseId = (String) parameters.get(PARM_PHASE_ID);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
profile.addInstallableUnit(iu);
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, operand, InstallableUnitEvent.INSTALL, getTouchpoint()));
+ ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
return null;
}
}
@@ -50,20 +51,19 @@ public class Uninstall extends InstallableUnitPhase {
public IStatus execute(Map<String, Object> parameters) {
Profile profile = (Profile) parameters.get(PARM_PROFILE);
String phaseId = (String) parameters.get(PARM_PHASE_ID);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
profile.removeInstallableUnit(iu);
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, operand, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
+ ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
return null;
}
public IStatus undo(Map<String, Object> parameters) {
IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
String phaseId = (String) parameters.get(PARM_PHASE_ID);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
+ IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, operand, InstallableUnitEvent.INSTALL, getTouchpoint()));
+ ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
return null;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/BeginOperationEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/BeginOperationEvent.java
index 98576a326..746932ae2 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/BeginOperationEvent.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/BeginOperationEvent.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.engine;
+import org.eclipse.equinox.internal.p2.engine.Operand;
+
import org.eclipse.equinox.internal.p2.engine.PhaseSet;
/**
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/CommitOperationEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/CommitOperationEvent.java
index 5b993dc39..f999e79a6 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/CommitOperationEvent.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/CommitOperationEvent.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.engine;
+import org.eclipse.equinox.internal.p2.engine.Operand;
+
import org.eclipse.equinox.internal.p2.engine.PhaseSet;
/**
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java
index 67d0f8d28..b87f381f8 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java
@@ -35,17 +35,17 @@ public interface IEngine {
public static final String SERVICE_NAME = IEngine.class.getName();
/**
- * Creates a customized provisioning plan describing a set of changes that have already been validated.
+ * Creates a provisioning plan whose methods can be use to provide pre-validated changes.
* This is an advanced method for clients that know they are creating changes that do
* not require validation by a planner. Most clients should instead obtain a validated plan
* from a planner.
*
* @param profile The profile to operate against
- * @param operands The operands to perform
* @param context The provisioning context for the plan
* @return A provisioning plan
*/
- public IProvisioningPlan createCustomPlan(IProfile profile, Operand[] operands, ProvisioningContext context);
+
+ public IProvisioningPlan createPlan(IProfile profile, ProvisioningContext context);
/**
* Creates a phase set with a default set of phases, excluding the specified phases.
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
index a32d9016c..aa8dc61b0 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
@@ -48,12 +48,7 @@ public interface IProvisioningPlan {
*/
public abstract IProvisioningPlan getInstallerPlan();
- /**
- * The operands to pass to the engine.
- * @return the operands to be executed. This may be an empty array if the
- * plan has errors or if there is nothing to do.
- */
- public abstract Operand[] getOperands();
+ public abstract void setInstallerPlan(IProvisioningPlan installerPlan);
/**
* Returns the profile that this plan will operate on.
@@ -86,4 +81,15 @@ public interface IProvisioningPlan {
*/
public abstract IStatus getStatus();
+ public abstract void setStatus(IStatus status);
+
+ public void addInstallableUnit(IInstallableUnit iu);
+
+ public void removeInstallableUnit(IInstallableUnit iu);
+
+ public void updateInstallableUnit(IInstallableUnit iu1, IInstallableUnit iu2);
+
+ public void setProfileProperty(String name, String value);
+
+ public void setInstallableUnitProfileProperty(IInstallableUnit iu, String name, String value);
} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/InstallableUnitEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/InstallableUnitEvent.java
index 80ca32abe..2be29b507 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/InstallableUnitEvent.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/InstallableUnitEvent.java
@@ -15,6 +15,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.engine.Messages;
import org.eclipse.equinox.p2.engine.spi.Touchpoint;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
/**
* @since 2.0
@@ -28,21 +29,21 @@ public class InstallableUnitEvent extends EventObject {
private boolean prePhase;
private IProfile profile;
- private InstallableUnitOperand operand;
+ private IInstallableUnit iu;
private Touchpoint touchpoint;
private IStatus result;
private int type;
- public InstallableUnitEvent(String phaseId, boolean prePhase, IProfile profile, InstallableUnitOperand operand, int type, Touchpoint touchpoint) {
- this(phaseId, prePhase, profile, operand, type, touchpoint, null);
+ public InstallableUnitEvent(String phaseId, boolean prePhase, IProfile profile, IInstallableUnit iu, int type, Touchpoint touchpoint) {
+ this(phaseId, prePhase, profile, iu, type, touchpoint, null);
}
- public InstallableUnitEvent(String phaseId, boolean prePhase, IProfile profile, InstallableUnitOperand operand, int type, Touchpoint touchpoint, IStatus result) {
+ public InstallableUnitEvent(String phaseId, boolean prePhase, IProfile profile, IInstallableUnit iu, int type, Touchpoint touchpoint, IStatus result) {
super(profile);
this.phaseId = phaseId;
this.prePhase = prePhase;
this.profile = profile;
- this.operand = operand;
+ this.iu = iu;
if (type != UNINSTALL && type != INSTALL)
throw new IllegalArgumentException(Messages.InstallableUnitEvent_type_not_install_or_uninstall);
this.type = type;
@@ -59,8 +60,8 @@ public class InstallableUnitEvent extends EventObject {
return profile;
}
- public InstallableUnitOperand getOperand() {
- return operand;
+ public IInstallableUnit getInstallableUnit() {
+ return iu;
}
public String getPhase() {
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/RollbackOperationEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/RollbackOperationEvent.java
index e56813696..824d597d9 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/RollbackOperationEvent.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/RollbackOperationEvent.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.engine;
+import org.eclipse.equinox.internal.p2.engine.Operand;
+
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.engine.PhaseSet;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/TransactionEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/TransactionEvent.java
index 2ce52a3b7..df3af9454 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/TransactionEvent.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/TransactionEvent.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.engine;
+import org.eclipse.equinox.internal.p2.engine.Operand;
+
import java.util.EventObject;
import org.eclipse.equinox.internal.p2.engine.PhaseSet;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java
index bbcc51b60..afb0b4239 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java
@@ -14,7 +14,6 @@ import java.util.Map;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.engine.PhaseSet;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.Operand;
/**
* A touchpoint is responsible for executing a given phase for a given
@@ -36,11 +35,11 @@ public abstract class Touchpoint {
return Status.OK_STATUS;
}
- public IStatus initializeOperand(IProfile profile, Operand operand, Map<String, Object> parameters) {
+ public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
return Status.OK_STATUS;
}
- public IStatus completeOperand(IProfile profile, Operand operand, Map<String, Object> parameters) {
+ public IStatus completeOperand(IProfile profile, Map<String, Object> parameters) {
return Status.OK_STATUS;
}
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
index 425443425..d07e03da0 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
@@ -10,8 +10,6 @@
******************************************************************************/
package org.eclipse.equinox.internal.p2.reconciler.dropins;
-import org.eclipse.equinox.p2.planner.IPlanner;
-
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
@@ -21,7 +19,8 @@ import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.core.helpers.*;
import org.eclipse.equinox.internal.p2.extensionlocation.Constants;
import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
+import org.eclipse.equinox.internal.provisional.p2.director.PlannerHelper;
+import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.*;
@@ -29,6 +28,7 @@ import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.query.GroupQuery;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.p2.query.Collector;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.IRepository;
@@ -368,17 +368,17 @@ public class ProfileSynchronizer {
// get the request
List<IInstallableUnit> toAdd = new ArrayList<IInstallableUnit>(request.getAdditions());
List<IInstallableUnit> toRemove = new ArrayList<IInstallableUnit>(request.getRemovals());
- // remove from the request everything what is in the plan
- Operand[] ops = plan.getOperands();
- for (int i = 0; i < ops.length; i++) {
- if (ops[i] instanceof InstallableUnitOperand) {
- InstallableUnitOperand iuo = (InstallableUnitOperand) ops[i];
- if (iuo.first() == null && iuo.second() != null)
- toAdd.remove(iuo.second());
- if (iuo.first() != null && iuo.second() == null)
- toRemove.remove(iuo.first());
- }
+ // remove from the request everything that is in the plan
+
+ for (Iterator<IInstallableUnit> iterator = plan.getRemovals().query(InstallableUnitQuery.ANY, null).iterator(); iterator.hasNext();) {
+ IInstallableUnit iu = iterator.next();
+ toRemove.remove(iu);
+ }
+ for (Iterator<IInstallableUnit> iterator = plan.getAdditions().query(InstallableUnitQuery.ANY, null).iterator(); iterator.hasNext();) {
+ IInstallableUnit iu = iterator.next();
+ toAdd.remove(iu);
}
+
// if anything is left in the request, then something is wrong with the plan
if (toAdd.size() == 0 && toRemove.size() == 0)
Tracing.debug(PREFIX + "Plan matches the request."); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
index 77ae5878b..cbf596f07 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.net.URISyntaxException;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OperationGenerationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OperationGenerationTest.java
index ab94f1abe..07d29829a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OperationGenerationTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/OperationGenerationTest.java
@@ -12,10 +12,10 @@ package org.eclipse.equinox.p2.tests.director;
import java.util.*;
import org.eclipse.equinox.internal.p2.director.OperationGenerator;
+import org.eclipse.equinox.internal.p2.engine.*;
import org.eclipse.equinox.internal.p2.metadata.ResolvedInstallableUnit;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -35,7 +35,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
to.add(a1);
to.add(a3);
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
// 1 x install
// 1 x uninstall
assertEquals(2, operands.size());
@@ -57,7 +59,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
to.add(a3);
to.add(a2);
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
// 1 x install
assertEquals(1, operands.size());
}
@@ -78,7 +82,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
to.add(a1);
to.add(a3);
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
// 1 x uninstall
assertEquals(1, operands.size());
}
@@ -99,7 +105,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
to = new ArrayList();
to.add(MetadataFactory.createInstallableUnit(b));
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
// 1 x upgrade
assertEquals(1, operands.size());
}
@@ -122,7 +130,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
to = new ArrayList();
to.add(MetadataFactory.createInstallableUnit(b));
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
// 1 x install
// 2 x uninstall
assertEquals(3, operands.size());
@@ -152,7 +162,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
to.add(MetadataFactory.createInstallableUnit(b));
to.add(MetadataFactory.createInstallableUnit(c));
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
// 2 x update
assertEquals(2, operands.size());
}
@@ -179,7 +191,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
to.add(a2);
to.add(MetadataFactory.createInstallableUnit(b2));
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
// 1 x update
assertEquals(1, operands.size());
}
@@ -205,7 +219,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
to.add(a1);
to.add(MetadataFactory.createInstallableUnit(b2));
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
// 1 x update
// 1 x uninstall
assertEquals(2, operands.size());
@@ -229,16 +245,18 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
Collection to = new ArrayList();
to.add(MetadataFactory.createResolvedInstallableUnit(three, new IInstallableUnitFragment[0]));
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
//We are uninstalling myBundle 1.0 and 2.0. 3.0 stays unchanged.
for (int i = 0; i < operands.size(); i++) {
- assertNotSame("3.0", three, operands.get(i).first());
- assertNotSame("3.0.1", three, operands.get(i).second());
+ assertNotSame("3.0", three, ((InstallableUnitOperand) operands.get(i)).first());
+ assertNotSame("3.0.1", three, ((InstallableUnitOperand) operands.get(i)).second());
}
- assertEquals("3.1", one, operands.get(0).first());
- assertNull("3.2", operands.get(0).second());
- assertEquals("3.3", two, operands.get(1).first());
- assertNull("3.4", operands.get(1).second());
+ assertEquals("3.1", one, ((InstallableUnitOperand) operands.get(0)).first());
+ assertNull("3.2", ((InstallableUnitOperand) operands.get(0)).second());
+ assertEquals("3.3", two, ((InstallableUnitOperand) operands.get(1)).first());
+ assertNull("3.4", ((InstallableUnitOperand) operands.get(1)).second());
}
public void test248468d() {
@@ -259,16 +277,18 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
to.add(MetadataFactory.createResolvedInstallableUnit(two, new IInstallableUnitFragment[0]));
to.add(MetadataFactory.createResolvedInstallableUnit(three, new IInstallableUnitFragment[0]));
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
//Two is already in the system therefore it will not be in the operands
for (int i = 0; i < operands.size(); i++) {
- assertNotSame("2.0", two, operands.get(i).first());
- assertNotSame("2.1", two, operands.get(i).second());
+ assertNotSame("2.0", two, ((InstallableUnitOperand) operands.get(i)).first());
+ assertNotSame("2.1", two, ((InstallableUnitOperand) operands.get(i)).second());
}
//three is an update of one
assertEquals("2.2", 1, operands.size());
- assertEquals("2.4", one, operands.get(0).first());
- assertEquals("2.5", three, operands.get(0).second());
+ assertEquals("2.4", one, ((InstallableUnitOperand) operands.get(0)).first());
+ assertEquals("2.5", three, ((InstallableUnitOperand) operands.get(0)).second());
}
public void test248468c() {
@@ -290,18 +310,20 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
to.add(MetadataFactory.createResolvedInstallableUnit(two, new IInstallableUnitFragment[0]));
to.add(MetadataFactory.createResolvedInstallableUnit(three, new IInstallableUnitFragment[0]));
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
//Two is already in the system therefore it will not be in the operands
for (int i = 0; i < operands.size(); i++) {
- assertNotSame("2.0", two, operands.get(i).first());
- assertNotSame("2.1", two, operands.get(i).second());
+ assertNotSame("2.0", two, ((InstallableUnitOperand) operands.get(i)).first());
+ assertNotSame("2.1", two, ((InstallableUnitOperand) operands.get(i)).second());
}
//We install three and uninstall one
assertEquals("2.2", 2, operands.size());
- assertNull("2.3", operands.get(0).first());
- assertEquals("2.4", three, operands.get(0).second());
- assertEquals("2.5", one, operands.get(1).first());
- assertNull("2.6", operands.get(1).second());
+ assertNull("2.3", ((InstallableUnitOperand) operands.get(0)).first());
+ assertEquals("2.4", three, ((InstallableUnitOperand) operands.get(0)).second());
+ assertEquals("2.5", one, ((InstallableUnitOperand) operands.get(1)).first());
+ assertNull("2.6", ((InstallableUnitOperand) operands.get(1)).second());
}
public void test248468() {
@@ -318,10 +340,12 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
Collection to = new ArrayList();
to.add(MetadataFactory.createResolvedInstallableUnit(two, new IInstallableUnitFragment[0]));
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
assertEquals("1.0", 1, operands.size());
- assertEquals("1.1", one, operands.get(0).first());
- assertNull("1.2", operands.get(0).second());
+ assertEquals("1.1", one, ((InstallableUnitOperand) operands.get(0)).first());
+ assertNull("1.2", ((InstallableUnitOperand) operands.get(0)).second());
}
public void testConfigurationChange1() {
@@ -343,16 +367,20 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
to.add(toResolved);
to.add(MetadataFactory.createResolvedInstallableUnit(anotherIU2, new IInstallableUnitFragment[0]));
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
assertEquals("1.0", 3, operands.size());
assertContainsConfigurationChange("2.0", operands);
assertContainsInstallableUnitOperand("3.0", operands, new InstallableUnitOperand(fromResolved, toResolved));
}
- private void assertContainsInstallableUnitOperand(String message, List<InstallableUnitOperand> operands, InstallableUnitOperand operand) {
+ private void assertContainsInstallableUnitOperand(String message, List<Operand> operands, InstallableUnitOperand operand) {
for (int i = 0; i < operands.size(); i++) {
- InstallableUnitOperand cmp = operands.get(i);
+ if (!(operands.get(i) instanceof InstallableUnitOperand))
+ continue;
+ InstallableUnitOperand cmp = (InstallableUnitOperand) operands.get(i);
if (cmp.first() != null && cmp.first().equals(operand.first()) && cmp.second() != null && cmp.second().equals(operand.second()))
return;
}
@@ -373,7 +401,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
IInstallableUnit toResolved = MetadataFactory.createResolvedInstallableUnit(anIU, new IInstallableUnitFragment[] {cu2});
to.add(toResolved);
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
assertEquals("1.0", 1, operands.size());
assertContainsInstallableUnitOperand("3.0", operands, new InstallableUnitOperand(fromResolved, toResolved));
@@ -393,7 +423,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
IInstallableUnit toResolved = MetadataFactory.createResolvedInstallableUnit(anIU, new IInstallableUnitFragment[0]);
to.add(toResolved);
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
assertEquals("1.0", 1, operands.size());
assertContainsInstallableUnitOperand("3.0", operands, new InstallableUnitOperand(fromResolved, toResolved));
@@ -413,7 +445,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
IInstallableUnit toResolved = MetadataFactory.createResolvedInstallableUnit(anIU, new IInstallableUnitFragment[] {cu2});
to.add(toResolved);
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
assertEquals("1.0", 0, operands.size());
}
@@ -433,7 +467,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
IInstallableUnit toResolved = MetadataFactory.createResolvedInstallableUnit(anIU, new IInstallableUnitFragment[] {cu2, cu1});
to.add(toResolved);
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
assertEquals("1.0", 0, operands.size());
}
@@ -454,7 +490,9 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
IInstallableUnit toResolved = MetadataFactory.createResolvedInstallableUnit(anIU, new IInstallableUnitFragment[] {cu1, cu3});
to.add(toResolved);
- List<InstallableUnitOperand> operands = new OperationGenerator().generateOperation(from, to);
+ ProvisioningPlan plan = (ProvisioningPlan) getEngine().createPlan(createProfile("temp"), null);
+ new OperationGenerator(plan).generateOperation(from, to);
+ List<Operand> operands = Arrays.asList(plan.getOperands());
assertEquals("1.0", 1, operands.size());
assertContainsInstallableUnitOperand("3.0", operands, new InstallableUnitOperand(fromResolved, toResolved));
@@ -468,9 +506,11 @@ public class OperationGenerationTest extends AbstractProvisioningTest {
fail(message + "Can't find " + expected);
}
- public void assertContainsConfigurationChange(String message, List<InstallableUnitOperand> ops) {
- for (int i = 0; i < ops.size(); i++) {
- InstallableUnitOperand op = ops.get(i);
+ public void assertContainsConfigurationChange(String message, List<Operand> operands) {
+ for (int i = 0; i < operands.size(); i++) {
+ if (!(operands.get(i) instanceof InstallableUnitOperand))
+ continue;
+ InstallableUnitOperand op = (InstallableUnitOperand) operands.get(i);
if (op.first() != null && op.first().equals(op.second())) {
return;
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java
index f580d8d7c..e30acf8a3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/EngineTest.java
@@ -10,10 +10,13 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.engine;
+import org.eclipse.equinox.internal.p2.engine.Operand;
+
import java.io.File;
import java.util.*;
import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.internal.p2.engine.Phase;
+import org.eclipse.equinox.internal.p2.engine.PhaseSet;
import org.eclipse.equinox.internal.p2.engine.phases.*;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
@@ -165,9 +168,8 @@ public class EngineTest extends AbstractProvisioningTest {
public void testNullProfile() {
IProfile profile = null;
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {};
try {
- engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ engine.perform(engine.createPlan(profile, null), new NullProgressMonitor());
} catch (IllegalArgumentException expected) {
return;
}
@@ -178,9 +180,8 @@ public class EngineTest extends AbstractProvisioningTest {
IProfile profile = createProfile("test");
PhaseSet phaseSet = null;
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {};
try {
- engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ engine.perform(engine.createPlan(profile, null), phaseSet, new NullProgressMonitor());
} catch (IllegalArgumentException expected) {
return;
}
@@ -261,8 +262,7 @@ public class EngineTest extends AbstractProvisioningTest {
public void testEmptyOperands() {
IProfile profile = createProfile("test");
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ IStatus result = engine.perform(engine.createPlan(profile, null), new NullProgressMonitor());
assertTrue(result.isOK());
}
@@ -273,16 +273,18 @@ public class EngineTest extends AbstractProvisioningTest {
// empty PhaseSet
};
- InstallableUnitOperand op = new InstallableUnitOperand(createResolvedIU(createIU("name")), null);
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {op};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.removeInstallableUnit(createResolvedIU(createIU("name")));
+ IStatus result = engine.perform(plan, phaseSet, new NullProgressMonitor());
assertTrue(result.isOK());
}
- public void testPerformSingleNullOperand() {
+ public void testPerformAddSingleNullIU() {
try {
- new InstallableUnitOperand(null, null);
- fail("Should not allow null operand");
+ IProfile profile = createProfile("testPerformAddSingleNullIU");
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(null);
+ fail("Should not allow null iu");
} catch (RuntimeException e) {
//expected
}
@@ -292,21 +294,23 @@ public class EngineTest extends AbstractProvisioningTest {
IProfile profile = createProfile("testPerformPropertyInstallUninstall");
- PropertyOperand propOp = new PropertyOperand("test", null, "test");
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.setProfileProperty("test", "test");
IInstallableUnit testIU = createResolvedIU(createIU("test"));
- InstallableUnitOperand iuOp = new InstallableUnitOperand(null, testIU);
- InstallableUnitPropertyOperand iuPropOp = new InstallableUnitPropertyOperand(testIU, "test", null, "test");
+ plan.addInstallableUnit(testIU);
+ plan.setInstallableUnitProfileProperty(testIU, "test", "test");
- Operand[] operands = new Operand[] {propOp, iuOp, iuPropOp};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ IStatus result = engine.perform(plan, new NullProgressMonitor());
assertTrue(result.isOK());
assertEquals("test", profile.getProperty("test"));
assertEquals("test", profile.getInstallableUnitProperty(testIU, "test"));
- PropertyOperand uninstallPropOp = new PropertyOperand("test", "test", null);
- InstallableUnitPropertyOperand uninstallIuPropOp = new InstallableUnitPropertyOperand(testIU, "test", "test", null);
- operands = new Operand[] {uninstallPropOp, uninstallIuPropOp};
- result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ plan = engine.createPlan(profile, null);
+ plan.setProfileProperty("test", null);
+
+ plan.removeInstallableUnit(testIU);
+ plan.setInstallableUnitProfileProperty(testIU, "test", null);
+ result = engine.perform(plan, new NullProgressMonitor());
assertTrue(result.isOK());
assertNull("test", profile.getProperty("test"));
assertNull("test", profile.getInstallableUnitProperty(testIU, "test"));
@@ -319,35 +323,38 @@ public class EngineTest extends AbstractProvisioningTest {
IProfile profile = createProfile("testPerformSizing", properties);
for (Iterator it = getInstallableUnits(profile); it.hasNext();) {
+ IProvisioningPlan plan = engine.createPlan(profile, null);
IInstallableUnit doomed = (IInstallableUnit) it.next();
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(createResolvedIU(doomed), null)};
- engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ plan.removeInstallableUnit(doomed);
+ engine.perform(plan, new NullProgressMonitor());
}
final Sizing sizingPhase = new Sizing(100, "sizing");
- PhaseSet phaseSet = new PhaseSet(new Phase[] {sizingPhase}) {};
+ PhaseSet phaseSet = new PhaseSet(new Phase[] {sizingPhase});
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createOSGiIU())};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(createOSGiIU());
+ IStatus result = engine.perform(plan, phaseSet, new NullProgressMonitor());
assertTrue(result.isOK());
assertTrue(sizingPhase.getDiskSize() == 0);
assertTrue(sizingPhase.getDlSize() == 0);
}
- public void testValidateInstallOSGiFramework() {
- Map properties = new HashMap();
- properties.put(IProfile.PROP_INSTALL_FOLDER, testProvisioning.getAbsolutePath());
-
- IProfile profile = createProfile("testPerformInstallOSGiFramework", properties);
- for (Iterator it = getInstallableUnits(profile); it.hasNext();) {
- IInstallableUnit doomed = (IInstallableUnit) it.next();
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(createResolvedIU(doomed), null)};
- engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
- }
- PhaseSet phaseSet = new DefaultPhaseSet();
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createOSGiIU())};
- IStatus result = ((Engine) engine).validate(profile, phaseSet, operands, null, new NullProgressMonitor());
- assertTrue(result.isOK());
- }
+ // removing validate from engine api
+ // public void testValidateInstallOSGiFramework() {
+ // Map properties = new HashMap();
+ // properties.put(IProfile.PROP_INSTALL_FOLDER, testProvisioning.getAbsolutePath());
+ //
+ // IProfile profile = createProfile("testPerformInstallOSGiFramework", properties);
+ // for (Iterator it = getInstallableUnits(profile); it.hasNext();) {
+ // IInstallableUnit doomed = (IInstallableUnit) it.next();
+ // InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(createResolvedIU(doomed), null)};
+ // engine.perform(engine.createPlan(profile, null), new NullProgressMonitor());
+ // }
+ // PhaseSet phaseSet = new DefaultPhaseSet();
+ // InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createOSGiIU())};
+ // IStatus result = ((Engine) engine).validate(profile, phaseSet, operands, null, new NullProgressMonitor());
+ // assertTrue(result.isOK());
+ // }
public void testPerformInstallOSGiFramework() {
Map properties = new HashMap();
@@ -355,12 +362,14 @@ public class EngineTest extends AbstractProvisioningTest {
IProfile profile = createProfile("testPerformInstallOSGiFramework", properties);
for (Iterator it = getInstallableUnits(profile); it.hasNext();) {
+ IProvisioningPlan plan = engine.createPlan(profile, null);
IInstallableUnit doomed = (IInstallableUnit) it.next();
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(createResolvedIU(doomed), null)};
- engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ plan.removeInstallableUnit(doomed);
+ engine.perform(plan, new NullProgressMonitor());
}
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createOSGiIU())};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(createOSGiIU());
+ IStatus result = engine.perform(plan, new NullProgressMonitor());
assertTrue(result.isOK());
Iterator ius = getInstallableUnits(profile);
assertTrue(ius.hasNext());
@@ -374,14 +383,16 @@ public class EngineTest extends AbstractProvisioningTest {
IInstallableUnit iu33 = createOSGiIU("3.3");
IInstallableUnit iu34 = createOSGiIU("3.4");
- InstallableUnitOperand[] installOperands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, iu33)};
- IStatus result = engine.perform(engine.createCustomPlan(profile, installOperands, null), new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(iu33);
+ IStatus result = engine.perform(plan, new NullProgressMonitor());
assertTrue(result.isOK());
Iterator ius = profile.query(new InstallableUnitQuery(iu33), null).iterator();
assertTrue(ius.hasNext());
- InstallableUnitOperand[] updateOperands = new InstallableUnitOperand[] {new InstallableUnitOperand(iu33, iu34)};
- result = engine.perform(engine.createCustomPlan(profile, updateOperands, null), new NullProgressMonitor());
+ plan = engine.createPlan(profile, null);
+ plan.updateInstallableUnit(iu33, iu34);
+ result = engine.perform(plan, new NullProgressMonitor());
assertTrue(result.isOK());
ius = profile.query(new InstallableUnitQuery(iu34), null).iterator();
assertTrue(ius.hasNext());
@@ -393,8 +404,9 @@ public class EngineTest extends AbstractProvisioningTest {
properties.put(IProfile.PROP_INSTALL_FOLDER, testProvisioning.getAbsolutePath());
IProfile profile = createProfile("testPerformUninstallOSGiFramework", properties);
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(createOSGiIU(), null)};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.removeInstallableUnit(createOSGiIU());
+ IStatus result = engine.perform(plan, new NullProgressMonitor());
assertTrue(result.isOK());
assertEmptyProfile(profile);
}
@@ -408,33 +420,36 @@ public class EngineTest extends AbstractProvisioningTest {
Iterator ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createOSGiIU()), new InstallableUnitOperand(null, createBadIU())};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(createOSGiIU());
+ plan.addInstallableUnit(createBadIU());
+ IStatus result = engine.perform(plan, new NullProgressMonitor());
assertFalse(result.isOK());
ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
}
- public void testValidateMissingAction() {
-
- Map properties = new HashMap();
- properties.put(IProfile.PROP_INSTALL_FOLDER, testProvisioning.getAbsolutePath());
- IProfile profile = createProfile("testPerformRollback", properties);
- PhaseSet phaseSet = new DefaultPhaseSet();
-
- Iterator ius = getInstallableUnits(profile);
- assertFalse(ius.hasNext());
-
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createOSGiIU()), new InstallableUnitOperand(null, createMissingActionIU())};
- IStatus result = ((Engine) engine).validate(profile, phaseSet, operands, null, new NullProgressMonitor());
- assertFalse(result.isOK());
-
- Throwable t = result.getException();
- assertTrue(t instanceof MissingActionsException);
- MissingActionsException e = (MissingActionsException) t;
- assertEquals("org.eclipse.equinox.p2.touchpoint.eclipse.thisactionismissing", e.getMissingActions()[0].getActionId());
- }
+ // removing validate from engine api
+ // public void testValidateMissingAction() {
+ //
+ // Map properties = new HashMap();
+ // properties.put(IProfile.PROP_INSTALL_FOLDER, testProvisioning.getAbsolutePath());
+ // IProfile profile = createProfile("testPerformRollback", properties);
+ // PhaseSet phaseSet = new DefaultPhaseSet();
+ //
+ // Iterator ius = getInstallableUnits(profile);
+ // assertFalse(ius.hasNext());
+ //
+ // InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createOSGiIU()), new InstallableUnitOperand(null, createMissingActionIU())};
+ // IStatus result = ((Engine) engine).validate(profile, phaseSet, operands, null, new NullProgressMonitor());
+ // assertFalse(result.isOK());
+ //
+ // Throwable t = result.getException();
+ // assertTrue(t instanceof MissingActionsException);
+ // MissingActionsException e = (MissingActionsException) t;
+ // assertEquals("org.eclipse.equinox.p2.touchpoint.eclipse.thisactionismissing", e.getMissingActions()[0].getActionId());
+ // }
public void testPerformMissingAction() {
@@ -445,8 +460,10 @@ public class EngineTest extends AbstractProvisioningTest {
Iterator ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createOSGiIU()), new InstallableUnitOperand(null, createMissingActionIU())};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(createOSGiIU());
+ plan.addInstallableUnit(createMissingActionIU());
+ IStatus result = engine.perform(plan, new NullProgressMonitor());
assertFalse(result.isOK());
ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
@@ -463,8 +480,9 @@ public class EngineTest extends AbstractProvisioningTest {
Iterator ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createOSGiIU())};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(createOSGiIU());
+ IStatus result = engine.perform(plan, phaseSet, new NullProgressMonitor());
assertFalse(result.isOK());
ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
@@ -482,8 +500,9 @@ public class EngineTest extends AbstractProvisioningTest {
Iterator ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createOSGiIU())};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(createOSGiIU());
+ IStatus result = engine.perform(plan, phaseSet, new NullProgressMonitor());
assertFalse(result.isOK());
ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
@@ -500,8 +519,9 @@ public class EngineTest extends AbstractProvisioningTest {
Iterator ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createOSGiIU())};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(createOSGiIU());
+ IStatus result = engine.perform(plan, phaseSet, new NullProgressMonitor());
assertTrue(result.isOK());
ius = getInstallableUnits(profile);
assertTrue(ius.hasNext());
@@ -519,22 +539,26 @@ public class EngineTest extends AbstractProvisioningTest {
Iterator ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
IInstallableUnit badUninstallIU = createBadUninstallIUThrowsException();
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, badUninstallIU)};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ plan.addInstallableUnit(badUninstallIU);
+ IStatus result = engine.perform(plan, phaseSet, new NullProgressMonitor());
assertTrue(result.isOK());
ius = getInstallableUnits(profile);
assertTrue(ius.hasNext());
- operands = new InstallableUnitOperand[] {new InstallableUnitOperand(badUninstallIU, null)};
- result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ plan = engine.createPlan(profile, null);
+ plan.removeInstallableUnit(badUninstallIU);
+ result = engine.perform(plan, phaseSet, new NullProgressMonitor());
assertFalse(result.isOK());
ius = getInstallableUnits(profile);
assertTrue(ius.hasNext());
// this simulates a DefaultPhaseSet with forcedUninstall set
phaseSet = new TestPhaseSet(true);
- result = engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ plan = engine.createPlan(profile, null);
+ plan.removeInstallableUnit(badUninstallIU);
+ result = engine.perform(plan, phaseSet, new NullProgressMonitor());
assertTrue(result.isOK());
ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
@@ -550,22 +574,27 @@ public class EngineTest extends AbstractProvisioningTest {
Iterator ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
IInstallableUnit badUninstallIU = createBadUninstallIUReturnsError();
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, badUninstallIU)};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ plan.addInstallableUnit(badUninstallIU);
+
+ IStatus result = engine.perform(plan, new NullProgressMonitor());
assertTrue(result.isOK());
ius = getInstallableUnits(profile);
assertTrue(ius.hasNext());
- operands = new InstallableUnitOperand[] {new InstallableUnitOperand(badUninstallIU, null)};
- result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ plan = engine.createPlan(profile, null);
+ plan.removeInstallableUnit(badUninstallIU);
+ result = engine.perform(plan, new NullProgressMonitor());
assertFalse(result.isOK());
ius = getInstallableUnits(profile);
assertTrue(ius.hasNext());
// this simulates a DefaultPhaseSet with forcedUninstall set
IPhaseSet phaseSet = new TestPhaseSet(true);
- result = engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ plan = engine.createPlan(profile, null);
+ plan.removeInstallableUnit(badUninstallIU);
+ result = engine.perform(plan, phaseSet, new NullProgressMonitor());
assertTrue(result.isOK());
ius = getInstallableUnits(profile);
assertFalse(ius.hasNext());
@@ -574,13 +603,16 @@ public class EngineTest extends AbstractProvisioningTest {
public void testOrphanedIUProperty() {
IProfile profile = createProfile("testOrphanedIUProperty");
IInstallableUnit iu = createIU("someIU");
- Operand[] operands = new InstallableUnitPropertyOperand[] {new InstallableUnitPropertyOperand(iu, "key", null, "value")};
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.setInstallableUnitProfileProperty(iu, "key", "value");
+ IStatus result = engine.perform(plan, new NullProgressMonitor());
assertTrue(result.isOK());
assertFalse(profile.getInstallableUnitProperties(iu).containsKey("key"));
- operands = new Operand[] {new InstallableUnitOperand(null, iu), new InstallableUnitPropertyOperand(iu, "adifferentkey", null, "value")};
- result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(iu);
+ plan.setInstallableUnitProfileProperty(iu, "adifferentkey", "value");
+ result = engine.perform(plan, new NullProgressMonitor());
assertTrue(result.isOK());
assertTrue(profile.getInstallableUnitProperties(iu).containsKey("adifferentkey"));
assertFalse(profile.getInstallableUnitProperties(iu).containsKey("key"));
@@ -761,9 +793,8 @@ public class EngineTest extends AbstractProvisioningTest {
return new Collector<IInstallableUnit>();
}
};
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {};
try {
- engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ engine.perform(engine.createPlan(profile, null), new NullProgressMonitor());
} catch (IllegalArgumentException expected) {
return;
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseApplicabilityTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseApplicabilityTest.java
index fc0a11063..1c7c171d3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseApplicabilityTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseApplicabilityTest.java
@@ -10,8 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.engine;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import org.eclipse.equinox.internal.p2.engine.phases.*;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java
index 2faad7acf..c718ec4c9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.engine;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.engine.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseTest.java
index 518194213..21549899c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseTest.java
@@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.engine;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+import org.eclipse.equinox.internal.p2.engine.Operand;
+
import java.io.File;
import java.io.IOException;
import java.util.*;
@@ -155,8 +158,7 @@ public class PhaseTest extends AbstractProvisioningTest {
PhaseSet phaseSet = new TestPhaseSet(new TestPhase());
IProfile profile = createProfile("PhaseTest");
- final InstallableUnitOperand[] operands = new InstallableUnitOperand[0];
- engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ engine.perform(engine.createPlan(profile, null), phaseSet, new NullProgressMonitor());
}
public void testInitCompletePhase() {
@@ -182,8 +184,9 @@ public class PhaseTest extends AbstractProvisioningTest {
PhaseSet phaseSet = new TestPhaseSet(phase);
IProfile profile = createProfile("PhaseTest");
IInstallableUnit unit = createIU("unit");
- final InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, unit)};
- engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(unit);
+ engine.perform(plan, phaseSet, new NullProgressMonitor());
assertTrue(phase.initializePhase);
assertTrue(phase.completePhase);
}
@@ -212,8 +215,9 @@ public class PhaseTest extends AbstractProvisioningTest {
IProfile profile = createProfile("PhaseTest");
IInstallableUnit unit = createIU("testInitCompleteOperand");
- final InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, unit)};
- engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(unit);
+ engine.perform(plan, phaseSet, new NullProgressMonitor());
assertTrue(phase.initializeOperand);
assertTrue(phase.completeOperand);
}
@@ -248,8 +252,9 @@ public class PhaseTest extends AbstractProvisioningTest {
IProfile profile = createProfile("PhaseTest");
IInstallableUnit unit = createIU("testGetProfileDataArea");
- final InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, unit)};
- engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(unit);
+ engine.perform(plan, phaseSet, new NullProgressMonitor());
assertTrue(phase.initializePhase);
assertTrue(phase.completePhase);
}
@@ -291,8 +296,9 @@ public class PhaseTest extends AbstractProvisioningTest {
instructions.put("test2", MetadataFactory.createTouchpointInstruction("test2.test()", null));
ITouchpointData touchpointData = MetadataFactory.createTouchpointData(instructions);
IInstallableUnit unit = createIU("test", Version.create("1.0.0"), null, NO_REQUIRES, new IProvidedCapability[0], NO_PROPERTIES, ITouchpointType.NONE, touchpointData, false);
- final InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, unit)};
- IStatus status = engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(unit);
+ IStatus status = engine.perform(plan, phaseSet, new NullProgressMonitor());
if (!status.isOK()) {
fail(status.toString());
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java
index 887fdf7b2..83d140abf 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/TouchpointTest.java
@@ -39,9 +39,9 @@ public class TouchpointTest extends AbstractProvisioningTest {
testTouchpoint = this;
}
- public IStatus completeOperand(IProfile profile, Operand operand, Map parameters) {
+ public IStatus completeOperand(IProfile profile, Map parameters) {
completeOperand++;
- return super.completeOperand(profile, operand, parameters);
+ return super.completeOperand(profile, parameters);
}
public IStatus completePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map touchpointParameters) {
@@ -49,9 +49,9 @@ public class TouchpointTest extends AbstractProvisioningTest {
return super.completePhase(monitor, profile, phaseId, touchpointParameters);
}
- public IStatus initializeOperand(IProfile profile, Operand operand, Map parameters) {
+ public IStatus initializeOperand(IProfile profile, Map parameters) {
initializeOperand++;
- return super.initializeOperand(profile, operand, parameters);
+ return super.initializeOperand(profile, parameters);
}
public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map touchpointParameters) {
@@ -68,20 +68,20 @@ public class TouchpointTest extends AbstractProvisioningTest {
}
public static class OperandTestTouchpoint extends TestTouchpoint {
- public IStatus completeOperand(IProfile profile, Operand operand, Map parameters) {
+ public IStatus completeOperand(IProfile profile, Map parameters) {
assertEquals(1, initializeOperand);
assertEquals(0, completeOperand);
- super.completeOperand(profile, operand, parameters);
+ super.completeOperand(profile, parameters);
assertEquals(1, initializeOperand);
assertEquals(1, completeOperand);
return null;
}
- public IStatus initializeOperand(IProfile profile, Operand operand, Map parameters) {
+ public IStatus initializeOperand(IProfile profile, Map parameters) {
assertEquals(0, initializeOperand);
assertEquals(0, completeOperand);
assertTrue(parameters.containsKey("TestPhase.initializeOperand"));
- super.initializeOperand(profile, operand, parameters);
+ super.initializeOperand(profile, parameters);
assertEquals(1, initializeOperand);
assertEquals(0, completeOperand);
return null;
@@ -140,8 +140,9 @@ public class TouchpointTest extends AbstractProvisioningTest {
testTouchpoint.resetCounters();
PhaseSet phaseSet = new TestPhaseSet();
IProfile profile = createProfile("testProfile");
- final InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createTestIU("operandTest"))};
- engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(createTestIU("operandTest"));
+ engine.perform(plan, phaseSet, new NullProgressMonitor());
assertEquals(1, testTouchpoint.initializeOperand);
assertEquals(1, testTouchpoint.completeOperand);
}
@@ -151,8 +152,9 @@ public class TouchpointTest extends AbstractProvisioningTest {
testTouchpoint.resetCounters();
PhaseSet phaseSet = new TestPhaseSet();
IProfile profile = createProfile("testProfile");
- final InstallableUnitOperand[] operands = new InstallableUnitOperand[] {new InstallableUnitOperand(null, createTestIU("phaseTest"))};
- engine.perform(engine.createCustomPlan(profile, operands, null), phaseSet, new NullProgressMonitor());
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(createTestIU("phaseTest"));
+ engine.perform(plan, phaseSet, new NullProgressMonitor());
assertEquals(1, testTouchpoint.initializePhase);
assertEquals(1, testTouchpoint.completePhase);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbsolutePlanTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbsolutePlanTest.java
index 092cc6660..2711d092a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbsolutePlanTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbsolutePlanTest.java
@@ -1,10 +1,14 @@
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitPropertyOperand;
+import org.eclipse.equinox.internal.p2.engine.Operand;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
/*******************************************************************************
@@ -45,7 +49,7 @@ public class AbsolutePlanTest extends AbstractProvisioningTest {
pcr.setInstallableUnitProfileProperty(iuA, "key", "value");
IPlanner planner = createPlanner();
- IProvisioningPlan plan = planner.getProvisioningPlan(pcr, new ProvisioningContext(), null);
+ ProvisioningPlan plan = (ProvisioningPlan) planner.getProvisioningPlan(pcr, new ProvisioningContext(), null);
assertEquals(1, countPlanElements(plan));
createEngine().perform(plan, null);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbstractPlannerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbstractPlannerTest.java
index ab8b94291..1ca38c4fe 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbstractPlannerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AbstractPlannerTest.java
@@ -10,6 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+import org.eclipse.equinox.internal.p2.engine.Operand;
+
import java.io.File;
import java.lang.reflect.Field;
import java.util.Collection;
@@ -120,8 +125,8 @@ public abstract class AbstractPlannerTest extends AbstractProvisioningTest {
* Assert that all the IU operands in the expected plan are contained in the actual plan.
*/
protected void assertContains(String message, IProvisioningPlan expectedPlan, IProvisioningPlan actualPlan) {
- Operand[] expectedOperands = expectedPlan.getOperands();
- Operand[] actualOperands = actualPlan.getOperands();
+ Operand[] expectedOperands = ((ProvisioningPlan) expectedPlan).getOperands();
+ Operand[] actualOperands = ((ProvisioningPlan) actualPlan).getOperands();
// make sure the expected plan isn't empty
assertFalse("0.9 Plan is empty.", expectedOperands.length == 0);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270683.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270683.java
index c1a96c694..17cc145c0 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270683.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug270683.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java
index ebbd99304..ac5e4c1ec 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java
@@ -12,7 +12,7 @@ package org.eclipse.equinox.p2.tests.planner;
import junit.framework.Assert;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.internal.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.planner.IPlanner;
@@ -42,7 +42,7 @@ public class Bug302580 extends AbstractPlannerTest {
public void testInstall() {
IQueryResult<IInstallableUnit> ius = repo.query(InstallableUnitQuery.ANY, new NullProgressMonitor());
IPlanner planner = createPlanner();
- IProvisioningPlan plan = planner.getProvisioningPlan(createProfileChangeRequest(ius.toSet(), null, null), null, new NullProgressMonitor());
+ ProvisioningPlan plan = (ProvisioningPlan) planner.getProvisioningPlan(createProfileChangeRequest(ius.toSet(), null, null), null, new NullProgressMonitor());
Operand ops[] = plan.getOperands();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DisabledExplanation.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DisabledExplanation.java
index 08cf5b23b..97e68a078 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DisabledExplanation.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/DisabledExplanation.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationDeepConflict.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationDeepConflict.java
index c43f20f17..ab59ecfb0 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationDeepConflict.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationDeepConflict.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForOptionalDependencies.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForOptionalDependencies.java
index 3362810ef..1338450fd 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForOptionalDependencies.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForOptionalDependencies.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForPartialInstallation.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForPartialInstallation.java
index a42874e93..b59f6650b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForPartialInstallation.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationForPartialInstallation.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.internal.provisional.p2.director.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationSeveralConflictingRoots.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationSeveralConflictingRoots.java
index 5cfa979d1..dcd9548e9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationSeveralConflictingRoots.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ExplanationSeveralConflictingRoots.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Set;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUProperties.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUProperties.java
index c2c0af73b..8482dc581 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUProperties.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUProperties.java
@@ -8,7 +8,7 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
@@ -16,6 +16,7 @@ import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -63,7 +64,7 @@ public class IUProperties extends AbstractProvisioningTest {
ProfileChangeRequest req2 = new ProfileChangeRequest(profile);
req2.removeInstallableUnitProfileProperty(b1, "FOO");
- IProvisioningPlan pp2 = planner.getProvisioningPlan(req2, null, null);
+ ProvisioningPlan pp2 = (ProvisioningPlan) planner.getProvisioningPlan(req2, null, null);
assertEquals(0, pp2.getOperands().length);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUPropertyRemoval.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUPropertyRemoval.java
index e5987a30d..206e018e1 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUPropertyRemoval.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/IUPropertyRemoval.java
@@ -8,13 +8,14 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -54,7 +55,7 @@ public class IUPropertyRemoval extends AbstractProvisioningTest {
ProfileChangeRequest req2 = new ProfileChangeRequest(profile);
req2.removeInstallableUnitProfileProperty(b1, "FOO");
- IProvisioningPlan pp2 = planner.getProvisioningPlan(req2, null, null);
+ ProvisioningPlan pp2 = (ProvisioningPlan) planner.getProvisioningPlan(req2, null, null);
assertEquals(1, pp2.getOperands().length);
engine.perform(pp2, null);
IQueryResult res2 = getProfile(profileId).query(new IUProfilePropertyQuery("FOO", null), null);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency.java
index 6a6fc5d71..173ed9cd3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingDependency.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Set;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement.java
index 6aa3e382e..9b7ef30f8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Set;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement2.java
index 0d769caff..68cd5589b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MissingNonGreedyRequirement2.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Set;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleSingleton.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleSingleton.java
index 788aa6642..f4bf89c3c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleSingleton.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/MultipleSingleton.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Set;
@@ -19,7 +21,6 @@ import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.ProvisioningPlan;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NegationTesting.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NegationTesting.java
index a1bb25d4d..a32140deb 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NegationTesting.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/NegationTesting.java
@@ -1,5 +1,7 @@
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.*;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ORTesting.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ORTesting.java
index 60883d838..f4c0e1e6a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ORTesting.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ORTesting.java
@@ -16,7 +16,7 @@ import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.ProvisioningPlan;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.expression.*;
import org.eclipse.equinox.p2.planner.IPlanner;
@@ -48,7 +48,7 @@ public class ORTesting extends AbstractProvisioningTest {
ProfileChangeRequest changeRequest = new ProfileChangeRequest(profile);
changeRequest.add(iuA);
- ProvisioningPlan plan = (ProvisioningPlan) planner.getProvisioningPlan(changeRequest, null, null);
+ IProvisioningPlan plan = planner.getProvisioningPlan(changeRequest, null, null);
System.out.println(plan);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest12.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest12.java
index 28717fbb4..794777875 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest12.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest12.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Set;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest2.java
index 76d320dc7..1e34ddad5 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest2.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Set;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest6.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest6.java
index 9fef65397..b5158b811 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest6.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest6.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Set;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest9.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest9.java
index e8c69e159..fa9c57977 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest9.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTest9.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Set;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate.java
index 031ec3f8e..e63b67a59 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/PatchTestUpdate.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import java.util.Set;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ProvisioningPlanQueryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ProvisioningPlanQueryTest.java
index e237cedb9..f653eab69 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ProvisioningPlanQueryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ProvisioningPlanQueryTest.java
@@ -12,7 +12,7 @@ package org.eclipse.equinox.p2.tests.planner;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.internal.p2.engine.*;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleSingleton.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleSingleton.java
index 309c9cde7..524909dab 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleSingleton.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/SimpleSingleton.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
+import org.eclipse.equinox.internal.p2.engine.ProvisioningPlan;
+
import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.core.runtime.IStatus;
@@ -18,7 +20,6 @@ import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.internal.provisional.p2.director.*;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.ProvisioningPlan;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddJVMArgumentActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddJVMArgumentActionTest.java
index 6e51a033a..83a0065c9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddJVMArgumentActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddJVMArgumentActionTest.java
@@ -8,6 +8,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.util.*;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
@@ -16,7 +18,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddJVMArgument
import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class AddJVMArgumentActionTest extends AbstractProvisioningTest {
@@ -47,7 +48,7 @@ public class AddJVMArgumentActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_PROFILE_DATA_DIRECTORY, tempDir);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java
index e3d0d6465..9f31f4a1c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddProgramArgumentActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.util.*;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
@@ -18,7 +20,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstant
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddProgramArgumentAction;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -48,7 +49,7 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
@@ -92,7 +93,7 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
@@ -145,7 +146,7 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
@@ -204,7 +205,7 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
@@ -257,7 +258,7 @@ public class AddProgramArgumentActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java
index 98b36bbe5..9e0133513 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/AddSourceBundleActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.io.IOException;
import java.net.URI;
@@ -19,7 +21,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstant
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddSourceBundleAction;
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -66,7 +67,7 @@ public class AddSourceBundleActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_BUNDLE, key.toString());
parameters = Collections.unmodifiableMap(parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java
index a34899291..02a40e14d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CheckTrustActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.util.*;
import org.eclipse.equinox.internal.p2.engine.phases.CheckTrust;
@@ -18,7 +20,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.CheckTrustAction;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -66,7 +67,7 @@ public class CheckTrustActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters = Collections.unmodifiableMap(parameters);
assertFalse(((List) parameters.get(CheckTrust.PARM_ARTIFACT_FILES)).contains(osgiTarget));
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java
index e2473ff4e..0405be725 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/ChmodActionTest.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.util.*;
import org.eclipse.core.runtime.IStatus;
@@ -19,7 +21,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ChmodAction;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -132,7 +133,7 @@ public class ChmodActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_TARGET_DIR, "@artifact");
parameters.put(ActionConstants.PARM_TARGET_FILE, "plugin.xml");
@@ -210,7 +211,7 @@ public class ChmodActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_TARGET_DIR, parameters.get("artifact.location"));
parameters.put(ActionConstants.PARM_TARGET_FILE, "plugin.xml");
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CollectActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CollectActionTest.java
index 858b53db7..9b96d963d 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CollectActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/CollectActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.util.*;
import org.eclipse.equinox.internal.p2.engine.phases.Collect;
@@ -18,7 +20,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.CollectAction;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -67,8 +68,7 @@ public class CollectActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
- parameters.put(ActionConstants.PARM_OPERAND, operand);
+ touchpoint.initializeOperand(profile, parameters);
parameters = Collections.unmodifiableMap(parameters);
List<IArtifactRequest[]> requests = (List<IArtifactRequest[]>) parameters.get(Collect.PARM_ARTIFACT_REQUESTS);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
index 3a2d02c98..012500461 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/EclipseTouchpointTest.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
-import org.eclipse.equinox.p2.planner.IPlanner;
-
import java.io.File;
import java.net.*;
import java.util.*;
@@ -25,6 +23,7 @@ import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
@@ -109,11 +108,10 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest {
EclipseTouchpoint touchpoint = new EclipseTouchpoint();
Map parameters = new HashMap();
IProfile profile = createProfile("test");
- Operand operand = new InstallableUnitOperand(null, createIU("test"));
// need a partial iu test here
- touchpoint.initializeOperand(profile, operand, parameters);
- touchpoint.completeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
+ touchpoint.completeOperand(profile, parameters);
}
public void testPrepareIU() {
@@ -191,11 +189,11 @@ public class EclipseTouchpointTest extends AbstractProvisioningTest {
Iterator iterator = profile.query(new InstallableUnitQuery(iu.getId()), null).iterator();
assertFalse(iterator.hasNext());
- InstallableUnitOperand op = new InstallableUnitOperand(null, iu);
- InstallableUnitOperand[] operands = new InstallableUnitOperand[] {op};
IEngine engine = getEngine();
+ IProvisioningPlan plan = engine.createPlan(profile, null);
+ plan.addInstallableUnit(iu);
- IStatus result = engine.perform(engine.createCustomPlan(profile, operands, null), new NullProgressMonitor());
+ IStatus result = engine.perform(plan, new NullProgressMonitor());
assertTrue(result.isOK());
engine = null;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java
index 82039e1be..f5a032daa 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallBundleActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.net.URI;
import java.util.*;
@@ -20,7 +22,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleA
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -67,7 +68,7 @@ public class InstallBundleActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_BUNDLE, key.toString());
parameters = Collections.unmodifiableMap(parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java
index 9e8df53c8..0a7f2c0cf 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/InstallFeatureActionTest.java
@@ -8,6 +8,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.net.URI;
import java.util.*;
@@ -18,7 +20,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallFeatureAction;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.PublisherInfo;
@@ -70,7 +71,7 @@ public class InstallFeatureActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_FEATURE, key.toString());
parameters.put(ActionConstants.PARM_FEATURE_ID, ActionConstants.PARM_DEFAULT_VALUE);
@@ -121,7 +122,7 @@ public class InstallFeatureActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_FEATURE, key.toString());
parameters.put(ActionConstants.PARM_FEATURE_ID, ActionConstants.PARM_DEFAULT_VALUE);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/JVMArgumentActionLogicTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/JVMArgumentActionLogicTest.java
index 570d3c646..ba115cab4 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/JVMArgumentActionLogicTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/JVMArgumentActionLogicTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.util.*;
import org.eclipse.core.runtime.IStatus;
@@ -18,7 +20,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.*;
import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class JVMArgumentActionLogicTest extends AbstractProvisioningTest {
@@ -41,7 +42,7 @@ public class JVMArgumentActionLogicTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_PROFILE_DATA_DIRECTORY, tempDir);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java
index 374def60f..2835f3f33 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/LinkActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.util.*;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
@@ -17,7 +19,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.LinkAction;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -96,7 +97,7 @@ public class LinkActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_TARGET_DIR, "@artifact");
parameters.put(ActionConstants.PARM_LINK_NAME, "plugin.xml.link");
@@ -141,7 +142,7 @@ public class LinkActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_TARGET_DIR, parameters.get("artifact.location"));
parameters.put(ActionConstants.PARM_LINK_NAME, "plugin.xml.link");
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java
index 01affcd21..f323ddcbb 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/MarkStartedActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.net.URI;
import java.util.*;
@@ -20,7 +22,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.MarkStartedAct
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -67,7 +68,7 @@ public class MarkStartedActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_STARTED, Boolean.TRUE.toString());
parameters = Collections.unmodifiableMap(parameters);
@@ -113,7 +114,7 @@ public class MarkStartedActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_STARTED, Boolean.TRUE.toString());
parameters = Collections.unmodifiableMap(parameters);
@@ -162,7 +163,7 @@ public class MarkStartedActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_STARTED, Boolean.TRUE.toString());
parameters = Collections.unmodifiableMap(parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveJVMArgumentActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveJVMArgumentActionTest.java
index b4ade84a9..3a4f9d977 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveJVMArgumentActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveJVMArgumentActionTest.java
@@ -8,13 +8,14 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.util.*;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveJVMArgumentAction;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class RemoveJVMArgumentActionTest extends AbstractProvisioningTest {
@@ -37,7 +38,7 @@ public class RemoveJVMArgumentActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
String jvmArg = "-Dtest=true";
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java
index d8741c2ec..3bdbf18de 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveProgramArgumentActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.util.*;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
@@ -18,7 +20,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstant
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveProgramArgumentAction;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -48,7 +49,7 @@ public class RemoveProgramArgumentActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
@@ -94,7 +95,7 @@ public class RemoveProgramArgumentActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
@@ -150,7 +151,7 @@ public class RemoveProgramArgumentActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java
index e62dde8cb..6a926eb76 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/RemoveSourceBundleActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.io.IOException;
import java.net.URI;
@@ -19,7 +21,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstant
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveSourceBundleAction;
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -66,7 +67,7 @@ public class RemoveSourceBundleActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_BUNDLE, key.toString());
parameters = Collections.unmodifiableMap(parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkDependentPropertyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkDependentPropertyActionTest.java
index fd3f3a0ef..504913950 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkDependentPropertyActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkDependentPropertyActionTest.java
@@ -10,13 +10,14 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.util.*;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SetFrameworkDependentPropertyActionTest extends AbstractProvisioningTest {
@@ -39,7 +40,7 @@ public class SetFrameworkDependentPropertyActionTest extends AbstractProvisionin
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkIndependentPropertyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkIndependentPropertyActionTest.java
index 81def3ffa..8b918add2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkIndependentPropertyActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetFrameworkIndependentPropertyActionTest.java
@@ -10,13 +10,14 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.util.*;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstants;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SetFrameworkIndependentPropertyActionTest extends AbstractProvisioningTest {
@@ -39,7 +40,7 @@ public class SetFrameworkIndependentPropertyActionTest extends AbstractProvision
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetLauncherNameActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetLauncherNameActionTest.java
index 8e7c5622d..357a8ae0f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetLauncherNameActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetLauncherNameActionTest.java
@@ -8,6 +8,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.util.*;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
@@ -16,7 +18,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetLauncherNam
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SetLauncherNameActionTest extends AbstractProvisioningTest {
@@ -40,7 +41,7 @@ public class SetLauncherNameActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
parameters.put(ActionConstants.PARM_PROFILE, profile);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
@@ -71,7 +72,7 @@ public class SetLauncherNameActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
parameters.put(ActionConstants.PARM_PROFILE, profile);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
@@ -106,7 +107,7 @@ public class SetLauncherNameActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
parameters.put(ActionConstants.PARM_PROFILE, profile);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_LAUNCHERNAME, "foo");
parameters = Collections.unmodifiableMap(parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java
index b7b1a7112..c6bcfda8a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetProgramPropertyActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.util.*;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
@@ -18,7 +20,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstant
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -48,7 +49,7 @@ public class SetProgramPropertyActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, createIU("test"));
touchpoint.initializePhase(null, profile, "test", parameters);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
@@ -94,7 +95,7 @@ public class SetProgramPropertyActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
@@ -151,7 +152,7 @@ public class SetProgramPropertyActionTest extends AbstractProvisioningTest {
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
parameters.put("artifact", key);
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
assertNotNull(manipulator);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java
index a86555eb2..1397ae0bb 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/SetStartLevelActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.net.URI;
import java.util.*;
@@ -20,7 +22,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetStartLevelA
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -67,7 +68,7 @@ public class SetStartLevelActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_START_LEVEL, "0");
parameters = Collections.unmodifiableMap(parameters);
@@ -113,7 +114,7 @@ public class SetStartLevelActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_START_LEVEL, "0");
parameters = Collections.unmodifiableMap(parameters);
@@ -162,7 +163,7 @@ public class SetStartLevelActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_START_LEVEL, "0");
parameters = Collections.unmodifiableMap(parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java
index 14c380d54..8b6770241 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallBundleActionTest.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.net.URI;
import java.util.*;
@@ -20,7 +22,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundl
import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -67,7 +68,7 @@ public class UninstallBundleActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_BUNDLE, key.toString());
parameters = Collections.unmodifiableMap(parameters);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java
index 51a182a9f..9ce81ce32 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/eclipse/UninstallFeatureActionTest.java
@@ -8,6 +8,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.touchpoint.eclipse;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+
import java.io.File;
import java.net.URI;
import java.util.*;
@@ -18,7 +20,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstant
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallFeatureAction;
import org.eclipse.equinox.internal.p2.update.Site;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.PublisherInfo;
@@ -74,7 +75,7 @@ public class UninstallFeatureActionTest extends AbstractProvisioningTest {
touchpoint.initializePhase(null, profile, "test", parameters);
InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
+ touchpoint.initializeOperand(profile, parameters);
parameters.put(ActionConstants.PARM_FEATURE, key.toString());
parameters.put(ActionConstants.PARM_FEATURE_ID, ActionConstants.PARM_DEFAULT_VALUE);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CleanupzipActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CleanupzipActionTest.java
index 403013abb..0ee3237d8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CleanupzipActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CleanupzipActionTest.java
@@ -18,7 +18,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.*;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -63,9 +62,7 @@ public class CleanupzipActionTest extends AbstractProvisioningTest {
Map parameters = new HashMap();
parameters.put(ActionConstants.PARM_PROFILE, profile);
- InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
- parameters.put("iu", operand.second());
- parameters.put(ActionConstants.PARM_OPERAND, operand);
+ parameters.put("iu", iu);
NativeTouchpoint touchpoint = new NativeTouchpoint();
touchpoint.initializePhase(null, profile, "testExecuteUndo", parameters);
store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
@@ -110,9 +107,7 @@ public class CleanupzipActionTest extends AbstractProvisioningTest {
Map parameters = new HashMap();
parameters.put(ActionConstants.PARM_PROFILE, profile);
- InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
- parameters.put("iu", operand.second());
- parameters.put(ActionConstants.PARM_OPERAND, operand);
+ parameters.put("iu", iu);
NativeTouchpoint touchpoint = new NativeTouchpoint();
touchpoint.initializePhase(null, profile, "test", parameters);
store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CollectActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CollectActionTest.java
index 4adaf372f..341c73f24 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CollectActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CollectActionTest.java
@@ -19,7 +19,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CollectAction;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
@@ -60,10 +59,8 @@ public class CollectActionTest extends AbstractProvisioningTest {
parameters.put(Collect.PARM_ARTIFACT_REQUESTS, new ArrayList<IArtifactRequest[]>());
NativeTouchpoint touchpoint = new NativeTouchpoint();
touchpoint.initializePhase(null, profile, "test", parameters);
- InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
- parameters.put("iu", operand.second());
- touchpoint.initializeOperand(profile, operand, parameters);
- parameters.put(ActionConstants.PARM_OPERAND, operand);
+ parameters.put("iu", iu);
+ touchpoint.initializeOperand(profile, parameters);
parameters = Collections.unmodifiableMap(parameters);
List<IArtifactRequest[]> requests = (List<IArtifactRequest[]>) parameters.get(Collect.PARM_ARTIFACT_REQUESTS);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CopyActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CopyActionTest.java
index 09f20a924..016b86509 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CopyActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/CopyActionTest.java
@@ -18,7 +18,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CopyAction;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -221,9 +220,7 @@ public class CopyActionTest extends AbstractProvisioningTest {
Map parameters = new HashMap();
parameters.put(ActionConstants.PARM_PROFILE, profile);
- InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
- parameters.put("iu", operand.second());
- parameters.put(ActionConstants.PARM_OPERAND, operand);
+ parameters.put("iu", iu);
parameters.put(ActionConstants.PARM_PROFILE, profile);
NativeTouchpoint touchpoint = new NativeTouchpoint();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/UnzipActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/UnzipActionTest.java
index 4e2411e44..927d3dd07 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/UnzipActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/UnzipActionTest.java
@@ -17,7 +17,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.UnzipAction;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -62,9 +61,7 @@ public class UnzipActionTest extends AbstractProvisioningTest {
Map parameters = new HashMap();
parameters.put(ActionConstants.PARM_PROFILE, profile);
- InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
- parameters.put("iu", operand.second());
- parameters.put(ActionConstants.PARM_OPERAND, operand);
+ parameters.put("iu", iu);
parameters.put(ActionConstants.PARM_PROFILE, profile);
NativeTouchpoint touchpoint = new NativeTouchpoint();
touchpoint.initializePhase(null, profile, "test", parameters);
@@ -104,9 +101,7 @@ public class UnzipActionTest extends AbstractProvisioningTest {
Map parameters = new HashMap();
parameters.put(ActionConstants.PARM_PROFILE, profile);
- InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
- parameters.put("iu", operand.second());
- parameters.put(ActionConstants.PARM_OPERAND, operand);
+ parameters.put("iu", iu);
parameters.put(ActionConstants.PARM_PROFILE, profile);
NativeTouchpoint touchpoint = new NativeTouchpoint();
touchpoint.initializePhase(null, profile, "testExecuteUndoBackup", parameters);
@@ -165,9 +160,7 @@ public class UnzipActionTest extends AbstractProvisioningTest {
Map parameters = new HashMap();
parameters.put(ActionConstants.PARM_PROFILE, profile);
- InstallableUnitOperand operand = new InstallableUnitOperand(null, iu);
- parameters.put("iu", operand.second());
- parameters.put(ActionConstants.PARM_OPERAND, operand);
+ parameters.put("iu", iu);
parameters.put(ActionConstants.PARM_PROFILE, profile);
NativeTouchpoint touchpoint = new NativeTouchpoint();
touchpoint.initializePhase(null, profile, profileId, parameters);
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
index 69feb6a38..cfa60c064 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
@@ -22,7 +22,6 @@ import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRun
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.Operand;
import org.eclipse.equinox.p2.engine.spi.Touchpoint;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
@@ -178,7 +177,7 @@ public class EclipseTouchpoint extends Touchpoint {
return null;
}
- public IStatus initializeOperand(IProfile profile, Operand operand, Map<String, Object> parameters) {
+ public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
IArtifactKey artifactKey = (IArtifactKey) parameters.get(PARM_ARTIFACT);
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java
index 1a5c2d1d0..f0201a787 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java
@@ -19,8 +19,8 @@ public class ActionConstants {
public static final String PARM_FEATURE_ID = "featureId"; //$NON-NLS-1$
public static final String PARM_FEATURE_VERSION = "featureVersion"; //$NON-NLS-1$
public static final String PARM_IGNORE = "@ignore"; //$NON-NLS-1$
+ public static final String PARM_IU = "iu"; //$NON-NLS-1$
public static final String PARM_JVM_ARG = "jvmArg"; //$NON-NLS-1$
- public static final String PARM_OPERAND = "operand"; //$NON-NLS-1$
public static final String PARM_PREVIOUS_START_LEVEL = "previousStartLevel"; //$NON-NLS-1$
public static final String PARM_PREVIOUS_STARTED = "previousStarted"; //$NON-NLS-1$
public static final String PARM_PREVIOUS_VALUE = "previousValue"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java
index 4ac0e4109..e7e7ce43a 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java
@@ -15,7 +15,6 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.repository.artifact.*;
@@ -28,10 +27,10 @@ public class CollectAction extends ProvisioningAction {
public IStatus execute(Map<String, Object> parameters) {
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(ActionConstants.PARM_OPERAND);
+ IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
IArtifactRequest[] requests;
try {
- requests = CollectAction.collect(agent, profile, operand.second());
+ requests = CollectAction.collect(agent, profile, iu);
} catch (ProvisionException e) {
return e.getStatus();
}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
index 7e59d227e..cd8eef4a4 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
@@ -20,7 +20,6 @@ import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ActionConstants;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.Operand;
import org.eclipse.equinox.p2.engine.spi.Touchpoint;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
@@ -36,7 +35,7 @@ public class NativeTouchpoint extends Touchpoint {
private static Map<IProfile, IBackupStore> backups = new WeakHashMap<IProfile, IBackupStore>();
- public IStatus initializeOperand(IProfile profile, Operand operand, Map<String, Object> parameters) {
+ public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
IArtifactKey artifactKey = (IArtifactKey) parameters.get(PARM_ARTIFACT);
if (!parameters.containsKey(PARM_ARTIFACT_LOCATION) && artifactKey != null) {
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java
index de10738bf..a3357eb03 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java
@@ -23,7 +23,6 @@ public class ActionConstants {
public static final String PIPE = "|"; //$NON-NLS-1$
public static final String PARM_AT_ARTIFACT = "@artifact"; //$NON-NLS-1$
public static final String PARM_ARTIFACT_REQUESTS = "artifactRequests"; //$NON-NLS-1$
- public static final String PARM_OPERAND = "operand"; //$NON-NLS-1$
public static final String PARM_PROFILE = "profile"; //$NON-NLS-1$
public static final String PARM_LINK_NAME = "linkName"; //$NON-NLS-1$
public static final String PARM_LINK_TARGET = "linkTarget"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java
index 9626bb4c4..21c3cf159 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java
@@ -10,16 +10,14 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-import org.eclipse.equinox.p2.core.ProvisionException;
-
import java.util.Collection;
import java.util.Map;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
@@ -33,9 +31,9 @@ public class CollectAction extends ProvisioningAction {
public IStatus execute(Map<String, Object> parameters) {
IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(ActionConstants.PARM_OPERAND);
+ IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
try {
- IArtifactRequest[] requests = collect(agent, operand.second(), profile);
+ IArtifactRequest[] requests = collect(agent, iu, profile);
@SuppressWarnings("unchecked")
Collection<IArtifactRequest[]> artifactRequests = (Collection<IArtifactRequest[]>) parameters.get(ActionConstants.PARM_ARTIFACT_REQUESTS);
artifactRequests.add(requests);

Back to the top