Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-01-12 20:30:58 +0000
committerPascal Rapicault2010-01-12 20:30:58 +0000
commit8646836d725d1720a498c8299ce9c072d07f63a5 (patch)
tree3c7871deaf4fe1886b13d181d3abad71e29eae10
parentb1d9e5e50f6fe5eebd337ffe18753183e3d05e7a (diff)
downloadrt.equinox.p2-8646836d725d1720a498c8299ce9c072d07f63a5.tar.gz
rt.equinox.p2-8646836d725d1720a498c8299ce9c072d07f63a5.tar.xz
rt.equinox.p2-8646836d725d1720a498c8299ce9c072d07f63a5.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java2
5 files changed, 9 insertions, 13 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
index 9fa9a20b4..1dcda3e8d 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
@@ -10,8 +10,6 @@
******************************************************************************/
package org.eclipse.equinox.internal.p2.director;
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
-
import java.net.URI;
import java.util.*;
import java.util.Map.Entry;
@@ -26,8 +24,7 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.Inst
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.*;
import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.*;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.query.*;
import org.eclipse.equinox.p2.repository.IRepositoryManager;
@@ -454,7 +451,7 @@ public class SimplePlanner implements IPlanner {
IInstallableUnit previousActionsIU = getPreviousIUForMetaRequirements(agentProfile, getActionGatheringIUId(targetedProfile), sub);
ProfileChangeRequest agentRequest = new ProfileChangeRequest(agentProfile);
- agentRequest.addInstallableUnit(actionsIU);
+ agentRequest.addInstallableUnits(actionsIU);
if (previousActionsIU != null)
agentRequest.removeInstallableUnit(previousActionsIU);
Object externalInstallerPlan = getSolutionFor(agentRequest, initialContext, sub.newChild(10));
@@ -497,7 +494,7 @@ public class SimplePlanner implements IPlanner {
if (previousMetaRequirementIU != null)
agentRequest.removeInstallableUnit(previousMetaRequirementIU);
- agentRequest.addInstallableUnit(metaRequirementIU);
+ agentRequest.addInstallableUnits(metaRequirementIU);
ProvisioningContext agentCtx = new ProvisioningContext(new URI[0]);
ArrayList<IInstallableUnit> extraIUs = new ArrayList<IInstallableUnit>(unattachedState);
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java
index b2f8a9eda..69572a6d6 100644
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java
+++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.director;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
import java.util.*;
import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
@@ -19,6 +17,7 @@ import org.eclipse.equinox.internal.p2.director.*;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProfileRegistry;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryResult;
public class ProfileChangeRequest implements Cloneable {
@@ -64,7 +63,7 @@ public class ProfileChangeRequest implements Cloneable {
return result;
}
- public void addInstallableUnit(IInstallableUnit toInstall) {
+ private void addInstallableUnit(IInstallableUnit toInstall) {
if (iusToAdd == null)
iusToAdd = new ArrayList<IInstallableUnit>();
iusToAdd.add(toInstall);
@@ -80,7 +79,7 @@ public class ProfileChangeRequest implements Cloneable {
addInstallableUnit(itor.next());
}
- public void addInstallableUnits(IInstallableUnit[] toInstall) {
+ public void addInstallableUnits(IInstallableUnit... toInstall) {
for (int i = 0; i < toInstall.length; i++)
addInstallableUnit(toInstall[i]);
}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java
index 9beaeb0d4..b20f96edb 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java
@@ -93,7 +93,7 @@ public class InstallOperation extends ProfileChangeOperation {
// iu should not be updated
status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_UPDATE, toInstall[i]));
} else {
- request.addInstallableUnit(toInstall[i]);
+ request.addInstallableUnits(toInstall[i]);
request.removeInstallableUnit(installedIU);
// Add a status informing the user that the update has been inferred
status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IMPLIED_UPDATE, toInstall[i]));
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java
index 24a49b5d3..13b295bb1 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java
@@ -236,7 +236,7 @@ public class UpdateOperation extends ProfileChangeOperation {
if (!defaultUpdates.contains(update))
defaultUpdates.add(update);
}
- request.addInstallableUnit(theUpdate);
+ request.addInstallableUnits(theUpdate);
// if (rootMarkerKey != null)
request.setInstallableUnitProfileProperty(theUpdate, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
if (PatchQuery.isPatch(theUpdate)) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
index b7eef3861..439625b9a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
@@ -43,7 +43,7 @@ public class AvailableUpdateElement extends AvailableIUElement {
ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(profileID);
if (iuToBeUpdated.getId().equals(getIU().getId()))
request.removeInstallableUnit(iuToBeUpdated);
- request.addInstallableUnit(getIU());
+ request.addInstallableUnits(getIU());
return ProvUIActivator.getDefault().getSession().getPlanner().getProvisioningPlan(request, new ProvisioningContext(), monitor);
}

Back to the top