|
Re: Startup work in Code [message #140750 is a reply to message #140738] |
Mon, 20 July 2009 08:50 |
Benjamin Muskalla Messages: 338 Registered: July 2009 |
Senior Member |
|
|
Hi Markus,
that the bundle activator does not work in your case is pretty easy to
explain: All bundles are only started once and shared across all
sessions so there is no way to map a bundle activator to a session. What
you try to do (access the UI) depends on a running session and needs to
be executed per session and not only once.
As a side note to lazy loading: Personally I love to have lazy-loading
bundles, but speaking of OSGi on the server-side I don't see the real
benefit. In my eyes when doing server-side development it's ok to start
all bundles at deployment time and just access time during runtime. This
also lowers the time the application needs to start for each session.
In case you're doing single-sourcing: you could extract your logic out
in some operation and depending on the environment start it in IStartup
or in the activator.
Maybe that helps.
Cheers
Ben
Markus Krüger wrote:
> Hi all,
>
> I need some help. Some of my plugins need to excecute some code (i.e. adding
> perspective listener or open a dialog). I realized it with the startup
> extension point, but I want to change this, as this always load all of my
> plugins that might be never needed, so lazy loading is not used anymore.
>
> Is there another way to add something on startup with access to
> workbenchwindow, page, and some other UI stuff?
> In RCP it could be done in the plugin's start method, but in RAP I get some
> context error :-(
>
> Any ideas?
>
> Regards,
> Markus
>
>
--
Benjamin Muskalla | EclipseSource Karlsruhe
http://www.eclipsesource.com | http://twitter.com/eclipsesource
|
|
|
Powered by
FUDForum. Page generated in 0.02829 seconds