Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Adding Plugin to RCP application(Adding Plugin to RCP application)
Adding Plugin to RCP application [message #877930] Mon, 28 May 2012 05:10 Go to next message
Sarang Missing name is currently offline Sarang Missing nameFriend
Messages: 2
Registered: July 2010
Junior Member
Hello,

I'm designing an RCP application which can be extended by adding plugins to it. To simplify my qestion I'll take example of RCP email client template and hello world template plugin.
If I just copy "hello world" plugin (jar) in plugins folder of my RCP application (e.g. RCP email client) then I expected that RCP application will be able to bring up the hello world plugin and hence add a new menu item (contributed by this plugin) . However, this doesn't work. RCP application doesn't even load the hello world plugin.
Am I missing something? Request suggestion..

Thanks
Sarang
Re: Adding Plugin to RCP application [message #879415 is a reply to message #877930] Thu, 31 May 2012 07:22 Go to previous message
Libor Jelinek is currently offline Libor JelinekFriend
Messages: 143
Registered: January 2012
Location: Prague, Czech Rep.
Senior Member

Hello Sarang,
it never works like this. Placing some JAR'd plug-ins to plugin/
subfolder of your RCP app is not enought.

OSGi framework running under the cover will not detect them or even
start them automatically. There are a couple of approaches:

1) By default, only bundles listed in osgi.bundles property in
configuration/config.ini file are started. Have a look on your current
list and add new plug-ins as needed.

2) Employ org.eclipse.equinox.update.configurator
Update configurator gives you "auto-discovery" feature. It will install
and start everything what is found in plugins/ subfolder.

Firstly copy org.eclipse.update.configurator_3.*.jar from your Eclipse
IDE installation to your app's plugins/.

In such case, to config.ini's osgi.bundles will look like:

osgi.bundles=org.eclipse.equinox.common@2:start,\
org.eclipse.update.configurator@3:start

3) Employ org.eclipse.equinox.simpleconfigurator

To cite from
http://aniefer.blogspot.com/2009/02/installing-and-running-plugins-in.html:

"Part of p2. As the name suggests, it is quite simple: it install
everything it finds listed in its configuration file (specified by the
org.eclipse.equinox.simpleconfigurator.configUrl property, usually
bundles.info).

Editing the bundles.info file to add plug-ins to your product is not
really any easier than editing the osgi.bundles list. The difference
here is that p2 manages bundles.info for you. In fact, if your product
is p2 enabled for updating and installing plug-ins, then any changes
made manually are likely to be lost when p2 updates or installs new
software."


Cheers
Libor


On 05/28/2012 07:10 AM, Sarang Mising name wrote:
> Hello,
> I'm designing an RCP application which can be extended by adding plugins
> to it. To simplify my qestion I'll take example of RCP email client
> template and hello world template plugin. If I just copy "hello world"
> plugin (jar) in plugins folder of my RCP application (e.g. RCP email
> client) then I expected that RCP application will be able to bring up
> the hello world plugin and hence add a new menu item (contributed by
> this plugin) . However, this doesn't work. RCP application doesn't even
> load the hello world plugin. Am I missing something? Request suggestion..
>
> Thanks
> Sarang
Previous Topic:Running extern binary
Next Topic:How to enable "Close All" in right-click on view
Goto Forum:
  


Current Time: Fri Apr 19 19:52:56 GMT 2024

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

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

Back to the top