Late startup? [message #1714423] |
Thu, 12 November 2015 09:58  |
Eclipse User |
|
|
|
I haven't quite been able to sort out the Google magic to find an answer for this myself...
I know that Eclipse has a mechanism for starting bundles on start up in the form of the IStartup with its earlyStartup method.
Is there a notion of "late startup"?
I have something that I'd like to run every time Eclipse starts up, but I don't need it to start immediately. Some mechanism that activates the bundle sometime after everything else is running would be perfect.
I know that I can create a lightweight bundle that starts early and use a workspace job to make the good stuff happen later. Is there a better (lazier) option?
I don't need a lot of detail in an answer. Just a pointer if you have one.
Thanks,
Wayne
|
|
|
Re: Late startup? [message #1714429 is a reply to message #1714423] |
Thu, 12 November 2015 11:10  |
Eclipse User |
|
|
|
Wayne,
Comments below.
On 12/11/2015 3:58 PM, Wayne Beaton wrote:
> I haven't quite been able to sort out the Google magic to find an
> answer for this myself...
>
> I know that Eclipse has a mechanism for starting bundles on start up
> in the form of the IStartup with its earlyStartup method.
Yes, though it's actually not so early. I.e., it's called after the
workbench is up and running and has presented its face to the user.
>
> Is there a notion of "late startup"?
I think the current mechanism is late enough!
>
> I have something that I'd like to run every time Eclipse starts up,
> but I don't need it to start immediately. Some mechanism that
> activates the bundle sometime after everything else is running would
> be perfect.
Then it should be a good fit. Furthermore, it's called on a background
thread so you can do work that will not interfere with the activities of
the display thread.
>
> I know that I can create a lightweight bundle that starts early and
> use a workspace job to make the good stuff happen later. Is there a
> better (lazier) option?
That's not a good option, best to use IStartup. There you can also
create a Job and schedule it with a delay
org.eclipse.core.runtime.jobs.Job.schedule(long) with this mechanism
you can kick something off arbitrarily long after the workbench as
displayed itself.
In the ideal world, UI contributions would be more careful about doing
lots of work in the bundle start and use this mechanism instead. UI
bundles tend to run start on the UI thread and kick in early, preventing
the workbench from coming up quickly...
>
> I don't need a lot of detail in an answer. Just a pointer if you have
> one.
>
> Thanks,
>
> Wayne
|
|
|
Powered by
FUDForum. Page generated in 0.04647 seconds