Cancel job from status line [message #447441] |
Wed, 05 April 2006 15:07  |
Eclipse User |
|
|
|
Folks,
I'm sure I'm being dense, but after a few hours of fiddling with this, I'd
appreciate a little help.
I've got a standalone RCP application working pretty well. There are two
main jobs with isCanceled() checks at strategic points. When the job
runs, the job name (but not the job icon?), the progress monitor, and a
single button appear in the right side of the status line. That is all
fine. But clicking the button does nothing. My main problem is that I
would like to be able to cancel the job. I've added the following line to
the ApplicationActionBarAdvisor constructor method.
configurer.getStatusLineManager().setCancelEnabled(true);
No difference. In fact, if I later test isCancelEnabled() I find it is
"false". I set it to "true" using a method I wrote for
ApplicationActionBarConfigurer just before running my job (and a test
indicates it is really "true" now), still no change in the behavior.
What am I not understanding? Eclipse 3.1.2 on Windows XP.
Michael Schmidt
|
|
|
Re: Cancel job from status line [message #447602 is a reply to message #447441] |
Tue, 11 April 2006 12:39   |
Eclipse User |
|
|
|
I think you're mixing two things. On the status line there is a
progress region for showing *modal* operations that block the UI while
they are running (IWorkbenchWindow.run(...)). This region has a cancel
button, and the IStatusLineManager API you refer to is used to
enable/disable cancel for that region.
There is a completely separate region where progress from background
jobs is shown (by default on the far right). This area does *not* have
a cancel button. Jobs can only be cancelled from the progress view that
is opened by clicking the button that appears when jobs are running.
--
Michael Schmidt wrote:
> Folks,
> I'm sure I'm being dense, but after a few hours of fiddling with this,
> I'd appreciate a little help.
>
> I've got a standalone RCP application working pretty well. There are
> two main jobs with isCanceled() checks at strategic points. When the
> job runs, the job name (but not the job icon?), the progress monitor,
> and a single button appear in the right side of the status line. That
> is all fine. But clicking the button does nothing. My main problem is
> that I would like to be able to cancel the job. I've added the
> following line to the ApplicationActionBarAdvisor constructor method.
>
> configurer.getStatusLineManager().setCancelEnabled(true);
>
> No difference. In fact, if I later test isCancelEnabled() I find it is
> "false". I set it to "true" using a method I wrote for
> ApplicationActionBarConfigurer just before running my job (and a test
> indicates it is really "true" now), still no change in the behavior.
>
> What am I not understanding? Eclipse 3.1.2 on Windows XP.
>
> Michael Schmidt
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.06424 seconds