Community
Participate
Working Groups
Build Identifier: I20100608-0911 When calling org.eclipse.ui.internal.progress.ProgressManager#JobMonitor.setCanceled(false) the cancel flag is not reset as stated in javadoc of the implemented interface IProgressMonitor code snippet ProgressManager.JobMonitor line 270: if (value && !info.isCanceled()) { ... but no else section in case value == false for clearing the flag IProgressMonitor API spec: /** * Sets the cancel state to the given value. * * @param value <code>true</code> indicates that cancelation has * been requested (but not necessarily acknowledged); * <code>false</code> clears this flag * @see #isCanceled() */ Reproducible: Always Steps to Reproduce: 1. Create a Job 2. Schedule it 3. call setCanceled(true) on the monitor inside the job's run method 4. call setCanceled(false) on the monitor inside the job's run method 5. monitor.isCanceled still returns true
Once you cancel a job, there is no way to revert back to running state. The monitor has to reflect the state of the Job, so it can't simply return true, when the state of the job is cancelled. Unless the underlying jobs framework supports the setCancel(false), the UI can't do anything about it.