Sorry John, didn't see that. So if I got it right I only invoke operations on the IDirector and he will delegate all further steps to the IEngine. Hence I should never use the IEngine directly, right?
Regards, Eugen Am 10.09.2008 um 20:19 schrieb John Arthorne: Hi Eugen, there is some background information on these concepts here: http://wiki.eclipse.org/Equinox/p2/Concepts John Hi folks, I'm trying to get familiar with p2 and had a look at the p2 tests (org.eclipse.equinox.p2.tests). Basically I'm looking for install/update/unistall operations with P2. Right now I don't get the point with IDirector and IEngine. It seems that both are able to install IUs, is that right? The IDirector has a provision(...) method while the IEngine has a perform(...) method. So which one do I have to use if I want to create a custom provisioning GUI? Is this the best way to install IUs (found in org.eclipse.equinox.p2.tests): protected IStatus install(IProfile profile, IInstallableUnit[] ius, boolean strict, IPlanner planner, IEngine engine) { ProfileChangeRequest req = new ProfileChangeRequest(profile); req.addInstallableUnits(ius); for (int i = 0; i < ius.length; i++) { req.setInstallableUnitInclusionRules(ius[i], strict ? PlannerHelper.createStrictInclusionRule(ius[i]) : PlannerHelper.createOptionalInclusionRule(ius[i])); } ProvisioningPlan plan = planner.getProvisioningPlan(req, null, null); if (plan.getStatus().getSeverity() == IStatus.ERROR || plan.getStatus().getSeverity() == IStatus.CANCEL) return plan.getStatus(); return engine.perform(profile, new DefaultPhaseSet(), plan.getOperands(), null, null); } Regards, Eugen_______________________________________________ p2-dev mailing list p2-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/p2-dev
_______________________________________________ p2-dev mailing list
|