diff options
author | Simon Kaegi | 2010-03-05 17:06:29 +0000 |
---|---|---|
committer | Simon Kaegi | 2010-03-05 17:06:29 +0000 |
commit | 11310103f4665624bdc756b870e2abfb6e0d44a5 (patch) | |
tree | 26dd2f6e4dae497e907121a5e3ad90de15e46684 /bundles/org.eclipse.equinox.p2.operations | |
parent | f0a701f74d7b17cc84d1d23836f6db4d60ec37cf (diff) | |
download | rt.equinox.p2-11310103f4665624bdc756b870e2abfb6e0d44a5.tar.gz rt.equinox.p2-11310103f4665624bdc756b870e2abfb6e0d44a5.tar.xz rt.equinox.p2-11310103f4665624bdc756b870e2abfb6e0d44a5.zip |
Bug 304280 - [api] PhaseSet is still API
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.operations')
2 files changed, 8 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java index d41511c89..eeeb1de04 100644 --- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java +++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.equinox.p2.operations; +import org.eclipse.equinox.p2.engine.PhaseSetFactory; + import org.eclipse.core.runtime.*; import org.eclipse.equinox.p2.engine.*; @@ -23,7 +25,7 @@ public class ProfileModificationJob extends ProvisioningJob implements IProfileC IProvisioningPlan plan; String profileId; - IPhaseSet phaseSet = new DefaultPhaseSet(); + IPhaseSet phaseSet = PhaseSetFactory.createDefaultPhaseSet(); ProvisioningContext provisioningContext; int restartPolicy = ProvisioningJob.RESTART_OR_APPLY; private String taskName; diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java index f98e01563..fe15d96cc 100644 --- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java +++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java @@ -167,14 +167,14 @@ public class ProvisioningSession { long installPlanSize = 0; SubMonitor mon = SubMonitor.convert(monitor, 300); if (plan.getInstallerPlan() != null) { - SizingPhaseSet sizingPhaseSet = new SizingPhaseSet(); + ISizingPhaseSet sizingPhaseSet = PhaseSetFactory.createSizingPhaseSet(); IStatus status = getEngine().perform(plan.getInstallerPlan(), sizingPhaseSet, mon.newChild(100)); if (status.isOK()) installPlanSize = sizingPhaseSet.getDiskSize(); } else { mon.worked(100); } - SizingPhaseSet sizingPhaseSet = new SizingPhaseSet(); + ISizingPhaseSet sizingPhaseSet = PhaseSetFactory.createSizingPhaseSet(); IStatus status = getEngine().perform(plan, sizingPhaseSet, mon.newChild(200)); if (status.isOK()) return installPlanSize + sizingPhaseSet.getDiskSize(); @@ -197,7 +197,7 @@ public class ProvisioningSession { public IStatus performProvisioningPlan(IProvisioningPlan plan, IPhaseSet phaseSet, ProvisioningContext context, IProgressMonitor monitor) { IPhaseSet set; if (phaseSet == null) - set = new DefaultPhaseSet(); + set = PhaseSetFactory.createDefaultPhaseSet(); else set = phaseSet; @@ -211,7 +211,7 @@ public class ProvisioningSession { IProfile profile = plan.getProfile(); if (plan.getInstallerPlan() != null) { - if (set instanceof DefaultPhaseSet) { + if (set instanceof PhaseSetFactory) { // If the phase set calls for download and install, then we want to download everything atomically before // applying the install plan. This way, we can be sure to install the install handler only if we know // we will be able to get everything else. @@ -219,7 +219,7 @@ public class ProvisioningSession { downloadRequest.setAbsoluteMode(true); downloadRequest.addAll(QueryUtil.compoundQueryable(plan.getAdditions(), plan.getInstallerPlan().getAdditions()).query(QueryUtil.createIUAnyQuery(), null).toUnmodifiableSet()); - IPhaseSet download = DefaultPhaseSet.createIncluding(new String[] {DefaultPhaseSet.PHASE_COLLECT}); + IPhaseSet download = PhaseSetFactory.createPhaseSetIncluding(new String[] {PhaseSetFactory.PHASE_COLLECT}); IProvisioningPlan downloadPlan = getPlanner().getProvisioningPlan(downloadRequest, context, mon.newChild(100)); IStatus downloadStatus = getEngine().perform(downloadPlan, download, mon.newChild(300)); if (!downloadStatus.isOK()) { |