diff options
author | Simon Kaegi | 2010-02-18 15:20:32 +0000 |
---|---|---|
committer | Simon Kaegi | 2010-02-18 15:20:32 +0000 |
commit | 5d1efcad45d3db06010b87c8cbf9c9da4c7d391a (patch) | |
tree | c7b7b5f139e6927ab5a8a2219f7d0c264e291229 /bundles/org.eclipse.equinox.p2.tests | |
parent | 7a7a63a7de516663ef97ff16e65db32bdfb95e06 (diff) | |
download | rt.equinox.p2-5d1efcad45d3db06010b87c8cbf9c9da4c7d391a.tar.gz rt.equinox.p2-5d1efcad45d3db06010b87c8cbf9c9da4c7d391a.tar.xz rt.equinox.p2-5d1efcad45d3db06010b87c8cbf9c9da4c7d391a.zip |
Bug 297255 - [Engine][API] Make Operands internal
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests')
56 files changed, 396 insertions, 271 deletions
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); |