Revision 0658fcc1
Added by Katja Luther almost 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java | ||
---|---|---|
39 | 39 |
import org.eclipse.core.runtime.NullProgressMonitor; |
40 | 40 |
import org.eclipse.core.runtime.OperationCanceledException; |
41 | 41 |
import org.eclipse.core.runtime.Status; |
42 |
import org.eclipse.core.runtime.SubMonitor; |
|
42 | 43 |
import org.eclipse.core.runtime.SubProgressMonitor; |
43 | 44 |
import org.eclipse.core.runtime.jobs.Job; |
44 | 45 |
import org.eclipse.e4.ui.di.UISynchronize; |
... | ... | |
251 | 252 |
@Override |
252 | 253 |
public IStatus run(IProgressMonitor monitor) { |
253 | 254 |
// run the monitor until the operation is finished |
254 |
monitor.beginTask("Start", 100); |
|
255 |
SubMonitor subMonitor = SubMonitor.convert(monitor, 100); |
|
256 |
//subMonitor.beginTask("Start", 100); |
|
255 | 257 |
IRemotingProgressMonitor remotingMonitor; |
256 | 258 |
try { |
257 | 259 |
remotingMonitor = CdmStore.getProgressMonitorClientManager().pollMonitor(label, |
... | ... | |
259 | 261 |
pollInterval, |
260 | 262 |
postOp, |
261 | 263 |
feedbackGenerator, |
262 |
monitor);
|
|
264 |
subMonitor);
|
|
263 | 265 |
} catch (Exception ex) { |
264 | 266 |
return new Status(Status.ERROR, TaxeditorStorePlugin.PLUGIN_ID, "Operation Interrupted", ex); |
265 | 267 |
} |
... | ... | |
614 | 616 |
@Override |
615 | 617 |
public IStatus run(IProgressMonitor monitor) { |
616 | 618 |
// run the monitor until the operation is finished |
617 |
monitor.beginTask("Start", 100); |
|
619 |
SubMonitor subMonitor = SubMonitor.convert(monitor, 100); |
|
620 |
// subMonitor.beginTask("Start", 100); |
|
621 |
|
|
618 | 622 |
IRemotingProgressMonitor remotingMonitor; |
619 | 623 |
try { |
620 | 624 |
remotingMonitor = CdmStore.getProgressMonitorClientManager().pollMonitor(label, |
... | ... | |
622 | 626 |
pollInterval, |
623 | 627 |
postOp, |
624 | 628 |
feedbackGenerator, |
625 |
monitor);
|
|
629 |
subMonitor);
|
|
626 | 630 |
} catch (Exception ex) { |
627 | 631 |
return new Status(Status.ERROR, TaxeditorStorePlugin.PLUGIN_ID, "Operation Interrupted", ex); |
628 | 632 |
} |
Also available in: Unified diff
use submonitor for progressmmonitor in longrunning tasks