Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to automatically use new Plugins in my RCP 3.5 App
How to automatically use new Plugins in my RCP 3.5 App [message #489073] Thu, 01 October 2009 12:53 Go to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Hello,

I've a Eclipse 3.5 based RCP application.
I want this app to automatically recongnise new plugins and features. Prior 3.5 this was done by copying the plugin com.ibm.icu into the plugin folder.
Now with the application converted to 3.5 this does not work anymore. The config.ini in the configuration directory seems to have become more complex recently. For instance under the point 'osgi.bundles' follows a list of all plugins included in to my product.

What do I have to do to be able to use new plugins and features again?

Thanks!
Jan
Re: How to automatically use new Plugins in my RCP 3.5 App [message #489084 is a reply to message #489073] Thu, 01 October 2009 13:22 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Option 1 ... use an update site. That will allow you to add new features, update the features, and provide feature patches if you need to replace existing plugins without upgrading the feature.

If your RCP is small and you just want to randomly have plugins included (no control) then you can use the dropins mechanism. That is scanned on each startup and the plugins are installed (on a best effort basis). http://wiki.eclipse.org/Equinox_p2_Getting_Started#Dropins

To do that, though, I believe you need a config.ini that has a line like:
osgi.bundles=reference\:file\: org.eclipse.equinox.simpleconfigurator_1.0.200.v20090831.jar @1\:start

This replaces starting the osgi framework + old org.eclipse.update.configurator

PW


Re: How to automatically use new Plugins in my RCP 3.5 App [message #489104 is a reply to message #489084] Thu, 01 October 2009 14:11 Go to previous messageGo to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
My configuration.ini is now like this:
#Product Runtime Configuration File
eclipse.application=com.swisslab.xslprocessor.application.ap plication
osgi.bundles.defaultStartLevel=4
eclipse.product=com.swisslab.xslprocessor.application.produc t
osgi.splashPath=platform:/base/plugins/com.swisslab.xslproce ssor.application
osgi.bundles=reference\:file\: org.eclipse.equinox.simpleconfigurator_1.0.100.v20090520-190 5.jar @1\:start

When starting the applikation I'm getting the following error:
!ENTRY org.eclipse.osgi 4 0 2009-10-01 16:07:27.114
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)


It seems something else has to be done.
Alternatelly I also would be happy is I could tell the app to use a new feature I created for it. Can this also be done using the config.ini?
Re: How to automatically use new Plugins in my RCP 3.5 App [message #489200 is a reply to message #489104] Thu, 01 October 2009 19:49 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I guess it depends on your setup.

I have a Product Configuration and my RCP app is feature based. I included the p2 stuff, and so I can support all of the update modes (dropins, p2 director installs, updates, etc).

In order to install new features in a controlled manner, you need p2. In order to allow eclipse to recognize new features or plugins just by placing files, you either need the p2 stuff or the old org.eclipse.update* plugins.

PW


Re: How to automatically use new Plugins in my RCP 3.5 App [message #491909 is a reply to message #489200] Fri, 16 October 2009 14:13 Go to previous messageGo to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
Paul,

thank you for that hints!
What p2 Plugins do I need in order to get the dropins folder run? I'm asking because there're a lot of them and I'm wondering if I have to include all of them

Jan.
Re: How to automatically use new Plugins in my RCP 3.5 App [message #491954 is a reply to message #491909] Fri, 16 October 2009 17:34 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I'm not sure ... I usually just included most of them, they tend to be small. If you include the simple configurator and the dropins bundle and then add required plugins, that should get you part of the way there, right?

PW


Re: How to automatically use new Plugins in my RCP 3.5 App [message #500974 is a reply to message #489073] Mon, 30 November 2009 14:42 Go to previous messageGo to next message
Jan Kohnert is currently offline Jan KohnertFriend
Messages: 196
Registered: July 2009
Senior Member
After having a painful time of not having a self refreshing product environment with Eclipse 3.5, I now solved my issues. Thanks to the BIRT designer RCP I managed to get a config.ini file that automatically adds newly added plugins into the application on start-up.

If you add the org.eclipse.update.configurator plugin to you product configuration (or feature) you can use the following configuration. Just replace the BIRT designer classes from the lines 'osgi.splashPath', 'eclipse.application' and 'eclipse.product' with the appropriate entries.

from your product:
untime Configuration File
osgi.splashPath=platform:/base/plugins/org.eclipse.birt.repo rt.designer.ui.rcp
eclipse.application=org.eclipse.birt.report.designer.ui.rcp. DesignerApplication
eclipse.product=org.eclipse.birt.report.designer.ui.rcp.BIRT
osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start,org.eclipse.core.runtime@start
osgi.bundles.defaultStartLevel=4

Re: How to automatically use new Plugins in my RCP 3.5 App [message #501701 is a reply to message #500974] Thu, 03 December 2009 14:31 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

And just a warning, this uses the old update manager code. I think it will continue to work fine with traditional update sites, you will just never be able to use any of the new repos/touchpoints/IU metadata, etc

PW


Previous Topic:close editor on save
Next Topic:classloader/thread instanceof problem
Goto Forum:
  


Current Time: Thu Apr 25 12:21:09 GMT 2024

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

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

Back to the top