[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] p2 UI API

I've finished the javadoc for the API coming out of the p2 UI.
It is released to the R3_6_api_cleanup branch.

The relevant bundles are

org.eclipse.equinox.p2.common (which may or may not continue to live as a separate bundle)

I'm reasonably happy with the shape of the API, but I've been working with it for a few weeks straight so I've lost all objectivity.
What's interesting to me about the shape is:

- the SDK UI is now a "good citizen" as far as using only API. I wasn't sure we could get there.
- it is still expected that clients will have to use internals if they want to reuse more fine-grained pieces of the UI (ie, the admin UI, PDE reusing some composites, etc.)
- the examples have been able to survive some significant class movement in core. For the most part, examples only need to know now about metadata and core. This is really good news.
- simple stuff is now simple. For example, checking for updates to the currently running profile is done like this:

UpdateOperation op = new UpdateOperation(provisioningSession);
IStatus result = op.resolveModal(monitor);
if (result.isOK()) {

Contrast that to the code here [1].

I invite anyone interested to review the code in the branch and open a bug with comments (or correct any errors you see...thanks John for spotting some already).


[1] http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java?root=RT_Project&view=markup