Revision a179ac89
Added by Cherian Mathew over 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java | ||
---|---|---|
66 | 66 |
import eu.etaxonomy.cdm.common.monitor.IRemotingProgressMonitor; |
67 | 67 |
import eu.etaxonomy.cdm.model.common.IEnumTerm; |
68 | 68 |
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation; |
69 |
import eu.etaxonomy.taxeditor.operation.IFeedbackGenerator; |
|
69 | 70 |
import eu.etaxonomy.taxeditor.operation.IPostMoniteredOperationEnabled; |
70 | 71 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
71 | 72 |
import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler; |
... | ... | |
420 | 421 |
final UUID uuid, |
421 | 422 |
final int pollInterval, |
422 | 423 |
final boolean cancelable, |
423 |
final IPostMoniteredOperationEnabled postOp) { |
|
424 |
final IPostMoniteredOperationEnabled postOp, |
|
425 |
final IFeedbackGenerator feedbackGenerator) { |
|
424 | 426 |
|
425 | 427 |
try { |
426 | 428 |
// get the remoting monitor the first time to make sure that the |
... | ... | |
439 | 441 |
// run the monitor until the operation is finished |
440 | 442 |
IRemotingProgressMonitor remotingMonitor; |
441 | 443 |
try { |
442 |
remotingMonitor = CdmStore.getProgressMonitorClientManager().pollMonitor(label, uuid, pollInterval, postOp, monitor); |
|
443 |
} catch (InterruptedException ie) { |
|
444 |
return new Status(Status.ERROR, TaxeditorStorePlugin.PLUGIN_ID, "Operation Interrupted", ie); |
|
444 |
remotingMonitor = CdmStore.getProgressMonitorClientManager().pollMonitor(label, |
|
445 |
uuid, |
|
446 |
pollInterval, |
|
447 |
postOp, |
|
448 |
feedbackGenerator, |
|
449 |
monitor); |
|
450 |
} catch (Exception ex) { |
|
451 |
return new Status(Status.ERROR, TaxeditorStorePlugin.PLUGIN_ID, "Operation Interrupted", ex); |
|
445 | 452 |
} |
446 | 453 |
final StringBuilder reportSb = new StringBuilder(); |
447 | 454 |
// collect reports |
... | ... | |
469 | 476 |
} |
470 | 477 |
}; |
471 | 478 |
|
472 |
// job.addJobChangeListener(new JobChangeAdapter() { |
|
473 |
// @Override |
|
474 |
// public void done(IJobChangeEvent event) { |
|
475 |
// if(event.getJob().) { |
|
476 |
// logger.warn("in jobc change listener"); |
|
477 |
// } |
|
478 |
// } |
|
479 |
// }); |
|
480 |
|
|
481 | 479 |
// configure the job |
482 | 480 |
job.setProperty(IProgressConstants.KEEP_PROPERTY, true); |
483 | 481 |
job.setUser(true); |
Also available in: Unified diff
#5297 Implement monitor feedback, Add corresponding tests
#5297 Add inconsistent monitor feedback test