eclipse close lifttime [message #257381] |
Thu, 01 July 2004 04:25  |
Eclipse User |
|
|
|
Originally posted by: naficbm.1net.gr
hello,I have a plugin which does some work
in a long running background
thread.
This plugin include two ViewPart, The two
ViewPart shared this background thread.
When the user closes the workbench (by clicking X, not the
QuitAtion),I want to stop this thread, before
workbench close.
who may give me some hint.
thanks in advance.
|
|
|
|
|
Re: eclipse close lifttime [message #259882 is a reply to message #257381] |
Thu, 08 July 2004 17:43  |
Eclipse User |
|
|
|
Originally posted by: john.eclipsefaq.org
I think your best bet is to maintain a counter of the number of open
workbench windows. You can update the counter by adding an
IWindowListener to IWorkbench. When the counts reaches zero, all windows
are closed, and the application is about to exit. You can then cancel or
join the background thread.
The only other approach I can think of is a workspace ISaveParticipant.
Save participants get a chance to run before the workbench exits. Look
up ISaveParticipant in the help system for more details. This will not
be available in an RCP application.
--
mastiff_cm wrote:
> hello,I have a plugin which does some work
> in a long running background
> thread.
> This plugin include two ViewPart, The two
> ViewPart shared this background thread.
> When the user closes the workbench (by clicking X, not the
> QuitAtion),I want to stop this thread, before
> workbench close.
>
> who may give me some hint.
> thanks in advance.
|
|
|
Powered by
FUDForum. Page generated in 0.02616 seconds