Self-updating an RCP application [message #663114] |
Sun, 03 April 2011 18:19 |
Zooks Messages: 11 Registered: April 2011 |
Junior Member |
|
|
I am very new to RCP and would really appreciate some help. I am using Helios.
I have a plugin "x" that is being updated via an "x.feature" feature.
I have an RCP app "Y" that has a product definition that requires "x.feature".
I want to deliver both the plugin and the RCP app to different users, but I want both to be updated automatically when new versions get released.
Questions
1. Is the RCP app a plugin itself? I assume yes, I know it is a plugin project.
2. When we say that the RCP app is capable of self-updating, can it actually update the RCP functionality (i.e., the app can change title, add a new About Dialog, a new menu item, etc)?
3: If I want the RCP app "Y" to be self-updated, do I need to create a new feature project "Y.feature" and add 'x.feature' as an included feature?
4: If the answer to 3 is yes, do I need to set up 2 different update sites, the one just updating x.feature and the other updating Y.feature which includes x.feature? Will that force x.feature to be updated?
To summarize, do I need two different feature projects and two update sites/p2 repos?
Thank you very much.
|
|
|
|
|
Re: Self-updating an RCP application [message #663418 is a reply to message #663114] |
Mon, 04 April 2011 23:15 |
Richard Adams Messages: 77 Registered: July 2009 Location: Edinburgh |
Member |
|
|
Yes, you can update the functionality - but UI changes might not take effect until you restart the application after updating. One exception is if the feature you're updating contains a bundled JRE, the update fails on Windows as it tries to delete a running instance of the JRE.
The Eclipse MacAffer RCP book ( at least the old edition) had an example application structure which we've followed in our RCP app which works quite well.
E.g.,
essentialPluginA in
essentialFeatureA
- containing your core functionality.
productPluginA in
productFeatureA
-containing application specific classes such as WindowAdvisor, Application, + core menus.
productPlugin also contains a feature based .product file which lists the above features + Eclipse features (p2, rcp etc).
So, because the product plugin is wrapped in a feature, you can update the things you mentioned and keep your functionality in a product-agnostic plugin.
We have the same issue- a plugin which is key to our app and included in the product build, but which is independent of the product, so we'd like to make available to other RCP apps - despite much wresting with p2 we've concluded we need two update sites, one for the app and one for 'just' the feature - but possibly someone with more p2 expertise may have a solution for this.
Best wishes
Richard
Dr Richard Adams, University of Edinburgh
http://richardadams606blog.blogspot.com/
http://csbe.bio.ed.ac.uk/adams.php
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04194 seconds