non deprecated api for Platform.getPlugin [message #43454] |
Wed, 16 June 2004 08:22 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03238 seconds