Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Startup work in Code
Startup work in Code [message #140738] Mon, 20 July 2009 07:56 Go to next message
Markus  rüger is currently offline Markus rügerFriend
Messages: 369
Registered: July 2009
Senior Member
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
Re: Startup work in Code [message #140750 is a reply to message #140738] Mon, 20 July 2009 08:50 Go to previous message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
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
Previous Topic:How to set an individual presentation scheme for Table-Cell,List-Item...
Next Topic:Disable Highlights from Rows or only enable Highlights from Table-Cells in JFace TableViewer
Goto Forum:
  


Current Time: Fri Mar 29 11:00:23 GMT 2024

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

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

Back to the top