Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » cancel in ProgressMonitor?
cancel in ProgressMonitor? [message #239557] Fri, 07 May 2004 09:35 Go to next message
Eclipse UserFriend
Hi all,


I have a job scheduled and I can see it's progress in the workbench
progress monitor (at bottom right of window). The problem I have is that
I can't cancel this job, although I activated the cancelation via the
configurer.getStatusLineManager().setCancelEnabled(true) method.
Does anybody have an idea on how to enable cancelation this way?
Thanks for your help.

Mathieu.
Re: cancel in ProgressMonitor? [message #239582 is a reply to message #239557] Fri, 07 May 2004 10:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

You still need to check the cancel of the progress monitor given to your
job. Cancel is only request, it is not a command. Your job must look at
the cancel status periodically and then cancel if set.


--
Thanks, Rich Kulp

Re: cancel in ProgressMonitor? [message #239586 is a reply to message #239582] Fri, 07 May 2004 10:49 Go to previous messageGo to next message
Eclipse UserFriend
Rich Kulp wrote:
> You still need to check the cancel of the progress monitor given to your
> job. Cancel is only request, it is not a command. Your job must look at
> the cancel status periodically and then cancel if set.
>
>

Ok. I thought enableCancel() method was adding a button in the progress
monitor ui, in the way of sending a cancel request to the current job. I
noticed the way I have to cancel the job once request has been made. Ok.
But is there a way to display a button in progress monitor allowing to
send the cancel request? (this is strange to have the progress bar
moving and no way to stop the job).
Thanks for you help!

Mathieu.
Re: cancel in ProgressMonitor? [message #239595 is a reply to message #239586] Fri, 07 May 2004 11:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Mouse button 2, popup menu should have cancel on it. This 3.0 M8 or
later. This is the little progress bar that appears in the lower
right-hand corner of the window.


--
Thanks, Rich Kulp

Re: cancel in ProgressMonitor? [message #239607 is a reply to message #239595] Fri, 07 May 2004 12:33 Go to previous messageGo to next message
Eclipse UserFriend
Rich Kulp wrote:
> Mouse button 2, popup menu should have cancel on it. This 3.0 M8 or
> later. This is the little progress bar that appears in the lower
> right-hand corner of the window.
>
>
Ok. I have the M8 but I can't get this popup menu you're talking about.
More, when I try to get it in my eclipse ide (during build or cvs
synchronization for instance), it doesn't appear nor. I can see the
progress bar, in eclipse and also in my own application, but when I
mouse hover on it I get this yellow tooltip, but I really do not find
the way to get the popup menu which allows to cancel the task.

Here is my code for job creation :

public void doMyJob() {
Job myJob = new MyJob("jobName");
myJob.schedule();
}


public class MyJob extends Job {

public MyJob (String name) {
super(name);
}

protected IStatus run(IProgressMonitor monitor) {
monitor.beginTask("Where does it appear?", 10));
// do my job
return Status.OK_STATUS;
}
}

In the my WorkbenchAdvisor I activated canelation this way :

configurer.getStatusLineManager().setCancelEnabled(true);


If you have an idea...
Many thanks for you help!

Mathieu.
Re: cancel in ProgressMonitor? [message #239612 is a reply to message #239607] Fri, 07 May 2004 12:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Opps, the popup menu is one the Progress Viewer, not the little progress
monitor. Double-click on the progress monitor will open the progress
view. And from there you can click on the job, bring up the menu and hit
cancel.

--
Thanks, Rich Kulp

Re: cancel in ProgressMonitor? [message #239713 is a reply to message #239612] Sat, 08 May 2004 07:06 Go to previous messageGo to next message
Eclipse UserFriend
Rich Kulp wrote:
> Opps, the popup menu is one the Progress Viewer, not the little progress
> monitor. Double-click on the progress monitor will open the progress
> view. And from there you can click on the job, bring up the menu and hit
> cancel.
>
Ok thanks!!! Now it's ok I can see the progress viewer in eclipse, as
you said it appears when I double click on the little progress monitor.

The fact is now I would like to have the same behavior in my own stand
alone application (RCP), and get this progress view opened when I double
click on the little progress monitor. Do I have to put my own listener
or is there already some methods allowing to do it simply? Where is this
progress view located, do I have to use a particular extension point?

Many thanks for you help, I'm really pleased of it.

Mathieu.
Is progress view w/jobs available for RCP? [message #240036 is a reply to message #239713] Mon, 10 May 2004 11:57 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

I don't know RCP, so someone else will need to answer about that.

--
Thanks, Rich Kulp

Previous Topic:RCP - Trying to get Coolbar to appear
Next Topic:Problems recompiling downloaded plugins
Goto Forum:
  


Current Time: Tue Jul 15 00:19:13 EDT 2025

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

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

Back to the top