Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Load plug-in dynamically
Load plug-in dynamically [message #511861] Wed, 03 February 2010 09:41 Go to next message
Patrick  is currently offline Patrick Friend
Messages: 5
Registered: January 2010
Junior Member
Hi,

i would like to load a rap plug-in (which are osgi bundles) dynamically by another rap plug-in. The latter plug-in (a rap application) is running and should be able to load an additional plug-in based on a user input. Afterwards i want to access some classes of the loaded plug-in. The plug-in to load is located somewhere in the filesystem.

The goal is to get the same handling as adding the plug-in as dependency in the manifest, just doing this while runtime.

I deal with rap just since a few weeks. I searched for this issue but didn't find a satisfaying answer. Read something about a BundleContext in the Activator. Could someone explaine a bit?

Would be kind if you post some short example code.

Kind regards,
Patrick
Re: Load plug-in dynamically [message #511926 is a reply to message #511861] Wed, 03 February 2010 12:52 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 338
Registered: July 2009
Senior Member
Hi Patrick,

The BundleContext is given to you once your bundle is started and if it
provides an Activator (see first page of the Manifest Editor). You're
free to hold on the BundleContext to reuse it later for installing bundles.
You should be able to use BundleContext#installBundle to dynamically add
bundles to the runtime. Maybe you even need the PackageAdmin to force
the bundle to be resolved but please ask on the Equinox group if you
still encounter problems.

Regards,
Ben

Patrick wrote:
> Hi,
>
> i would like to load a rap plug-in (which are osgi bundles) dynamically
> by another rap plug-in. The latter plug-in (a rap application) is
> running and should be able to load an additional plug-in based on a user
> input. Afterwards i want to access some classes of the loaded plug-in.
> The plug-in to load is located somewhere in the filesystem.
>
> The goal is to get the same handling as adding the plug-in as dependency
> in the manifest, just doing this while runtime.
>
> I deal with rap just since a few weeks. I searched for this issue but
> didn't find a satisfaying answer. Read something about a BundleContext
> in the Activator. Could someone explaine a bit?
>
> Would be kind if you post some short example code.
>
> Kind regards,
> Patrick


--
Benjamin Muskalla | EclipseSource Karlsruhe
http://www.eclipsesource.com | http://twitter.com/eclipsesource
Re: Load plug-in dynamically [message #511950 is a reply to message #511861] Wed, 03 February 2010 14:09 Go to previous message
Patrick  is currently offline Patrick Friend
Messages: 5
Registered: January 2010
Junior Member
Thanks for the help. I try that.

Regards,
Patrick
Previous Topic:Can't resize TableViewer's columns in Firefox 3.6
Next Topic:Widget Disposed Exception with RAP 1.3M4
Goto Forum:
  


Current Time: Fri Apr 26 06:28:36 GMT 2024

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

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

Back to the top