Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-02-11 10:44:28 -0500
committerPascal Rapicault2010-02-11 10:44:28 -0500
commit6cea88679a7f7c0f44a98f299db25ad4059a0327 (patch)
treec2eb9e6c512424b7f6a86791c8cc2b6fdaef4571 /bundles/org.eclipse.equinox.p2.console
parentdbcb0f62a616280180e7714169fe5e86fb743d4a (diff)
downloadrt.equinox.p2-6cea88679a7f7c0f44a98f299db25ad4059a0327.tar.gz
rt.equinox.p2-6cea88679a7f7c0f44a98f299db25ad4059a0327.tar.xz
rt.equinox.p2-6cea88679a7f7c0f44a98f299db25ad4059a0327.zip
Initial release of the planner API
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.console')
-rw-r--r--bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF1
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java9
2 files changed, 7 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
index 46f109c5d..c148a0396 100644
--- a/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
@@ -16,6 +16,7 @@ Import-Package: org.eclipse.core.runtime;common=split,
org.eclipse.equinox.p2.engine,
org.eclipse.equinox.p2.metadata,
org.eclipse.equinox.p2.metadata.query,
+ org.eclipse.equinox.p2.planner,
org.eclipse.equinox.p2.query,
org.eclipse.equinox.p2.repository,
org.eclipse.equinox.p2.repository.artifact,
diff --git a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
index 6552edcea..4e52a3ed7 100644
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
+++ b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,9 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Sonatype, Inc. - ongoing development
*******************************************************************************/
package org.eclipse.equinox.internal.p2.console;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
@@ -198,7 +201,7 @@ public class ProvisioningHelper {
throw new ProvisionException("No director service found.");
ProvisioningContext context = new ProvisioningContext();
ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.addInstallableUnits(units);
+ request.addAll(units.toSet());
IProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
return PlanExecutionHelper.executePlan(result, engine, context, progress);
}
@@ -297,7 +300,7 @@ public class ProvisioningHelper {
throw new ProvisionException("No engine service found.");
ProvisioningContext context = new ProvisioningContext();
ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.removeInstallableUnits(units);
+ request.removeAll(units.toSet());
IProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
return PlanExecutionHelper.executePlan(result, engine, context, progress);
}

Back to the top