Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Eclipse RCP - Install Additional Plugins (P2 Install Feature or dropins)(How can I install future plugins into an RCP application without modifying the dependencies?)
icon8.gif  Eclipse RCP - Install Additional Plugins (P2 Install Feature or dropins) [message #1469965] Wed, 12 November 2014 02:02 Go to next message
Aswin R is currently offline Aswin RFriend
Messages: 2
Registered: November 2014
Junior Member
Please help me with these issues. I have spent more than a week trying to get this working. I am stuck. I tried asking this in Stackoverflow, but did not receive any help.

Assume that there is an RCP application (call it Main application) with a menu and a part stack. I have created a plugin (say hello world) which makes a menu entry and adds a part to the stack in Main application. But Hello World plugin is not in the dependencies of Main application. So, the Main Application is not aware of the existence of Hello World. Now, I want to distribute this plugin to users of the Main Application.

1) I tried exporting a jar file of Hello World and putting it in the dropins folder and plugins folder of Main Application. I tried modifying config.ini file. This is not working in Eclipse 4 RCP. Am I doing something wrong? It works ONLY if I re-export Main Application by adding Hello World to its dependencies. But I cannot ask all the users of Main Application to do the same. Is there a way in which I can just provide the jar and let the other users use it?

2) I had asked a similar question earlier, to which Stackoverflow user @greg-449 commented that I should try p2 installation manager. The tutorials of p2 manager are about applications based on features while mine is based on plugins. I tried adding p2.core, p2.engine, operations and metadata.repository. I could not add p2.core.feature cos the application is based on plugins. I also added p2.ui, p2.ui.sdk and p2.ui.sdk.scheduler to the application. I do not see "Install New Software" menu entry under Help menu. Is there a tutorial for this in RCP 4? Can someone please tell me what else I should do to get p2 functionality working?

I just want users to download the Main Application binary once and then be able to use any plugin that I make in future. I followed the plugin installation tutorial that comes with Eclipse RCP. I want to do the same thing, but instead of running it via Eclipse IDE, I want my Main Application to run it.
Re: Eclipse RCP - Install Additional Plugins (P2 Install Feature or dropins) [message #1470716 is a reply to message #1469965] Wed, 12 November 2014 15:20 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
Is your application OSGi based?
Re: Eclipse RCP - Install Additional Plugins (P2 Install Feature or dropins) [message #1474934 is a reply to message #1470716] Sat, 15 November 2014 21:51 Go to previous message
Aswin R is currently offline Aswin RFriend
Messages: 2
Registered: November 2014
Junior Member
Thank you for your response.

I tried creating the Main Application by 2 methods -

1) File> New > Plugin Project. Then I select the target as Eclipse 3.5 or greater and created a simple HelloRCP application. I did this because according to the tutorials I followed online, I have to modify ApplicationWorkbenchWindowAdvisor file, which is not available if I use the Eclipse 4 Application Project wizard.
I couldn't finish the tutorials because if I select "based on features" radio button in the product file, I get a lot of org.osgi.framework.BundleException errors. If I dont select "features" radio button, but instead select "plugins" radio button, I do not get the "Install New Software" option at all in the menu.

2) File > New > Project... > Eclipse 4 Application Project. - Based on OSGi . This is what I used to build my original real world application. That project is sadly on hold because I'm unable to provide a "Install New Software" option in the menu with which users can exchange plugins. They have already coded plugins successfully for the application. The problem is that, those plugins have to be added to the main application's dependencies list while exporting. In short, people are creating plugins for the application already and even successfully running it in their own machines, but I'm unable to provide the menu option for installing these plugins.

If it's not easy to implement p2, can you atleast help me with the dropins method? I removed an already working plugin from the dependencies of the main application, exported the plugin separately as a jar and put it in the dropins folder. The main application does not pick it up.

Please help. Any tutorials / hints are much appreciated.
Previous Topic:headless build wilt luna (4.4.1) now breaks with An error occurred
Next Topic:Possible to use a dropins folder for an RCP application
Goto Forum:

Current Time: Mon Sep 16 12:05:43 GMT 2019

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

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

Back to the top