|
Re: self-updating RCP product: changelog [message #1582197 is a reply to message #1571710] |
Sat, 24 January 2015 13:19 |
Dinko Ivanov Messages: 27 Registered: July 2009 |
Junior Member |
|
|
To follow up on the topic - I was able to achieve the result using the feature description field. I maintain a changelog as part of the feature description. It's in the information page of the feature.xml editor. (design-time)
Then on runtime I create an UpdateOperation, and then get the additions from the provisioning plan.
UpdateOperation operation = new UpdateOperation(session);
IStatus status = operation.resolveModal(new SubProgressMonitor(monitor, 1));
IProvisioningPlan provisioningPlan = operation.getProvisioningPlan();
IQueryable<IInstallableUnit> additions = provisioningPlan.getAdditions();
After that I query the additions for the feature I need and get the feature descriptor like that:
IQueryResult<IInstallableUnit> queryRes = additions.query(...);
if (!queryRes.isEmpty()) {
IInstallableUnit feature = queryRes.iterator().next();
String featureDescription = feature.getProperty("org.eclipse.equinox.p2.description");
...
}
In this way I'm able to show a changelog to the user when he gets new update.
Best Regards,
Dinko
[Updated on: Sat, 24 January 2015 13:20] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02728 seconds