Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Adding "Installed features" functionality(How to manage plugins on runtime?)
Adding "Installed features" functionality [message #508636] Tue, 19 January 2010 16:47 Go to next message
John M. is currently offline John M.Friend
Messages: 2
Registered: January 2010
Junior Member
Hi,

I'm trying to add to my standalone RCP application functionality similar to Eclipse Galileo platform, where you can Uninstall features/plugins on runtime. I know how to develop an RCP application and add/remove plugins during development. I need a functionality to remove plugins when application is already running.

Is there already a plugin doing that? Or is it feature that needs complex coding? Can someone give me suggestion how to start?

Thank you.
Re: Adding "Installed features" functionality [message #508702 is a reply to message #508636] Tue, 19 January 2010 17:10 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
Hi Stranger,

Yes this is one of the cornerstones of OSGi. Read this article by Neil
Bartlett as a starter
http://www.eclipsezone.com/eclipse/forums/m92131032.html You can look at the
BundleContext api which you get passed in your activators start() method to
install a bundle from a fresh location.
http://www.osgi.org/javadoc/r4v42/org/osgi/framework/BundleC ontext.html

Happy programming!

--

Best Regards,
Wim Jongman
-- All computers wait at the same speed.
(Eclipse Old Skool Quote Service)

> Hi,
>
> I'm trying to add to my standalone RCP application functionality similar to
Eclipse Galileo platform, where you can Uninstall features/plugins on
runtime. I know how to develop an RCP application and add/remove plugins
during development. I need a functionality to remove plugins when application
is already running.
>
> Is there already a plugin doing that? Or is it feature that needs complex
coding? Can someone give me suggestion how to start?
>
> Thank you.
Re: Adding "Installed features" functionality [message #508793 is a reply to message #508702] Wed, 20 January 2010 10:57 Go to previous message
John M. is currently offline John M.Friend
Messages: 2
Registered: January 2010
Junior Member
Hey, Wim, thanks.

Yes, using Bundle.uninstall() was my first try as well. I did even better, I've added a command in my application to invoke Bundle.uinstall, so I witnessed disapearing another menu item (each menu item is different plugin). Very funny!

In this approach, however, the plugin would be avaliable again after application restart. In your idea, I don't have this problem. I think the solution would be to combine this two methods:
- user chooses which features to uninstall
- config file is being created
- upon restart, in Activator, instead of hard coded values, config file is read and appropriate plugins are uninstalled.

What I would be really happy with, is permanent removal of said plugin. To achieve this, I'm afraid I need to programmaticaly do the following:
- remove the plugin file
- edit config.ini
- edit artifacts.xml

A lot of work, and I'm not sure if this are the only locations where plugin information is maintained by standalone RCP application. (I was recieving error when I fiddled with aforementioned files)

Alternatively, since 3.5 you can use p2 update service. I managed to do that using the following tutorial:
http://www.ralfebert.de/blog/eclipsercp/p2_updates_tutorial/

I hope my analysis helps other people dealing with similar task. What community thinks of my ideas?

Regards,
John
Previous Topic:How to embad hyperlink inside label in Form?
Next Topic:Tools to built tests for a RCP
Goto Forum:
  


Current Time: Thu Apr 25 01:20:17 GMT 2024

Powered by FUDForum. Page generated in 0.03187 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top