[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] public API now internal?

Then the methods such as IProvisioningPlan#getAdditions and #getRemovals should give you the equivalent information I think.  For example, the added installable units can be obtained by:

IInstallableUnit added = plan.getAdditions().query(QueryUtil.ALL_UNITS).toArray(IInstallableUnit.class);

Not very user friendly, but it should get you the result you're looking for. However, I noticed there is no way to find out the profile properties and IU profile properties that the plan contains. I have entered bug 305225 for this.

John

On Tue, Mar 9, 2010 at 2:30 PM, Thomas M Houser <tmhouser@xxxxxxxxxx> wrote:

We don't construct operands.  We call the planner and inspect the resulting operands (via IProvisioningPlan.getOperands() which is now deleted) for pertinent information.   This is a show stopper for us.




From: John Arthorne <arthorne.eclipse@xxxxxxxxx>
To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
Date: 03/09/2010 11:17 AM
Subject: Re: [p2-dev] public API now internal?
Sent by: p2-dev-bounces@xxxxxxxxxxx





On Tue, Mar 9, 2010 at 1:45 PM, Thomas M Houser <tmhouser@xxxxxxxxxx> wrote:

Ok, now I just switched to "eclipse-SDK-I20100305-1011-win32.zip" as my target.  The following APIs that were formerly provisional API (in 3.5) and were later public API (in 3.6M5, and as recent as "eclipse-SDK-I20100217-1031-win32.zip") have been made internal:


import
org.eclipse.equinox.p2.engine.InstallableUnitOperand;
import
org.eclipse.equinox.p2.engine.Operand;

The operands are no longer part of the p2 engine API. Instead of constructing instances of Operand and passing them to IEngine#perform, you now construct a plan and pass that to the engine instead. The main goal here was to avoid leaking internal implementation details of the engine. For example, the replacement for InstallableUnitOperand looks something like this (install a single IU into a profile):

IEngine engine = ...;
IProvisioningPlan plan = engine.createPlan(profile, context);
plan.addInstallableUnit(someIU);
engine.perform(plan, phases, monitor);
 


This one seems to have disappeared altogether (though it was public API in earlier 3.6 builds ):


import
org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;


There are now factory methods for this rather than concrete classes. See QueryUtil#createIUQuery.


John
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev



_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev