Eclipse RCP - Install Additional Plugins (P2 Install Feature or dropins) [message #1469965] |
Wed, 12 November 2014 02:02 |
Aswin R 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 #1474934 is a reply to message #1470716] |
Sat, 15 November 2014 21:51 |
Aswin R 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.
www.subshell.com/en/subshell/blog/article-equinox-p2-in-your-own-RCP-Application100.html
www.ralfebert.de/archive/eclipse_rcp/p2_updates_tutorial_36/
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.
|
|
|
Powered by
FUDForum. Page generated in 0.02880 seconds