Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » non deprecated api for Platform.getPlugin
non deprecated api for Platform.getPlugin [message #43454] Wed, 16 June 2004 08:22 Go to next message
Eclipse UserFriend
Originally posted by: egglersim.post.ch

i have a Plugin that implements the BundleListener interface. when the
bundleChanged(BundleEvent event) method is called, i have access to the
event.getBundle() bundle. unfortunatly, the bundle returned is an eclipse
internal implementation of the osgi bundle interface (BundleHost) and
there's no access to the plugin class that activated the plugin (Plugin
implements BundleActivator).

i can retrieve the instance of the plugin by calling
Platform.getPlugin(event.getBundle().getSymbolicName()), but that method
is deprecated.

can i still access the plugin-instance via api?

cheers,
simon
Re: non deprecated api for Platform.getPlugin [message #43484 is a reply to message #43454] Wed, 16 June 2004 11:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pascal.ibm.canada

You can no longer access the plugin-instance via API (unless using the
deprecated API).
It is now the responsibility of the plugin author to expose its instance.

Why do you need to acces the plugin instance?

PaScaL

Simon Eggler wrote:
> i have a Plugin that implements the BundleListener interface. when the
> bundleChanged(BundleEvent event) method is called, i have access to the
> event.getBundle() bundle. unfortunatly, the bundle returned is an eclipse
> internal implementation of the osgi bundle interface (BundleHost) and
> there's no access to the plugin class that activated the plugin (Plugin
> implements BundleActivator).
>
> i can retrieve the instance of the plugin by calling
> Platform.getPlugin(event.getBundle().getSymbolicName()), but that method
> is deprecated.
>
> can i still access the plugin-instance via api?
>
> cheers,
> simon
>
Re: non deprecated api for Platform.getPlugin [message #43698 is a reply to message #43484] Thu, 24 June 2004 14:39 Go to previous message
Eclipse UserFriend
Originally posted by: egglersim.post.ch

i'm working on a framework that injects registered services into the the
bundles activator class. in order to do that, i'd be a lot easier to
have access to the activator and the bundles context.

right now i instantiate and register services via extensions from one
plugin and inject ther services into plugins that wish to use the
services (also configured via extensions).

would subclassing of the plugin class be a better method?

cheers,
simon


Pascal Rapicault wrote:

> You can no longer access the plugin-instance via API (unless using the
> deprecated API).
> It is now the responsibility of the plugin author to expose its instance.
>
> Why do you need to acces the plugin instance?
>
> PaScaL
>
> Simon Eggler wrote:
>
>> i have a Plugin that implements the BundleListener interface. when the
>> bundleChanged(BundleEvent event) method is called, i have access to the
>> event.getBundle() bundle. unfortunatly, the bundle returned is an eclipse
>> internal implementation of the osgi bundle interface (BundleHost) and
>> there's no access to the plugin class that activated the plugin (Plugin
>> implements BundleActivator).
>> i can retrieve the instance of the plugin by calling
>> Platform.getPlugin(event.getBundle().getSymbolicName()), but that method
>> is deprecated.
>> can i still access the plugin-instance via api?
>>
>> cheers,
>> simon
>>
Previous Topic:How to dynamically load eclipse plugins/features from the file system?
Next Topic:retreiving BundleContext or BundleActivator from Bundle class
Goto Forum:
  


Current Time: Sat Aug 08 18:48:31 GMT 2020

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

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

Back to the top