import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.e4.ui.di.UISynchronize;
@Override
public IStatus run(IProgressMonitor monitor) {
// run the monitor until the operation is finished
- monitor.beginTask("Start", 100);
+ SubMonitor subMonitor = SubMonitor.convert(monitor, 100);
+ //subMonitor.beginTask("Start", 100);
IRemotingProgressMonitor remotingMonitor;
try {
remotingMonitor = CdmStore.getProgressMonitorClientManager().pollMonitor(label,
pollInterval,
postOp,
feedbackGenerator,
- monitor);
+ subMonitor);
} catch (Exception ex) {
return new Status(Status.ERROR, TaxeditorStorePlugin.PLUGIN_ID, "Operation Interrupted", ex);
}
@Override
public IStatus run(IProgressMonitor monitor) {
// run the monitor until the operation is finished
- monitor.beginTask("Start", 100);
+ SubMonitor subMonitor = SubMonitor.convert(monitor, 100);
+ // subMonitor.beginTask("Start", 100);
+
IRemotingProgressMonitor remotingMonitor;
try {
remotingMonitor = CdmStore.getProgressMonitorClientManager().pollMonitor(label,
pollInterval,
postOp,
feedbackGenerator,
- monitor);
+ subMonitor);
} catch (Exception ex) {
return new Status(Status.ERROR, TaxeditorStorePlugin.PLUGIN_ID, "Operation Interrupted", ex);
}
reportSb.append(((ExportResult)remotingMonitor.getResult()).createReport());
}else if (remotingMonitor.getResult() instanceof UpdateResult){
if (((UpdateResult)remotingMonitor.getResult()).isOk()){
- reportSb.append("Update successfull. \n"+"Updated Objects: " + ((UpdateResult)remotingMonitor.getResult()).getUpdatedObjects().size());
+ reportSb.append("Update successful. \n"+"Updated Objects: " + ((UpdateResult)remotingMonitor.getResult()).getUpdatedObjects().size());
}
if (!((UpdateResult)remotingMonitor.getResult()).getExceptions().isEmpty()){
reportSb.append(((UpdateResult)remotingMonitor.getResult()).getExceptions().toString());