Source:
<code>public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { fMonitor = monitor; traceTypeViewer.getControl().getDisplay().syncExec(new Runnable() { @Override public void run() { fMonitor = SubMonitor.convert(getMonitor()); getMonitor().setTaskName(Messages.ImportTraceWizardPageScan_scanning + " "); ((SubMonitor) getMonitor()).setWorkRemaining(IProgressMonitor.UNKNOWN); } }); while (fCanRun == true) { boolean updated = false; boolean validCombo; if (fTracesToScan.isEmpty()) { traceTypeViewer.getControl().getDisplay().asyncExec(new Runnable() { @Override public void run() { getMonitor().setTaskName(Messages.ImportTraceWizardPageScan_scanning + " "); getMonitor().subTask(Messages.ImportTraceWizardPageScan_done); } }); } final TraceToValidate traceToScan = fTracesToScan.take(); if (!getBatchWizard().hasScanned(traceToScan)) { getBatchWizard().addResult(traceToScan, ImportUtils.getInstance().validate(traceToScan)); } validCombo = getBatchWizard().getResult(traceToScan); if (validCombo) { getBatchWizard().getScannedTraces().addCandidate(traceToScan.getTraceType(), new File(traceToScan.getTraceToScan())); updated = true; } if (updated) { if (!traceTypeViewer.getControl().isDisposed()) { traceTypeViewer.getControl().getDisplay().asyncExec(new Runnable() { @Override public void run() { if (!traceTypeViewer.getControl().isDisposed()) { getMonitor().setTaskName(Messages.ImportTraceWizardPageScan_scanning + " "); getMonitor().subTask(traceToScan.getTraceToScan()); getMonitor().worked(1); } } } <START> ); <END> } } final boolean editing = traceTypeViewer.isCellEditorActive(); if (updated && !editing) { if (!traceTypeViewer.getControl().isDisposed()) { traceTypeViewer.getControl().getDisplay().asyncExec(new Runnable() { @Override public void run() { if (!traceTypeViewer.getControl().isDisposed()) { if(!traceTypeViewer.isCellEditorActive()) { traceTypeViewer.refresh(); } } } }); } } } }</code><technical_language>this previous line });</technical_language>

Target:
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { fMonitor = monitor; final Control control = traceTypeViewer.getControl(); control.getDisplay().syncExec(new Runnable() { @Override public void run() { fMonitor = SubMonitor.convert(getMonitor()); getMonitor().setTaskName(Messages.ImportTraceWizardPageScan_scanning + " "); ((SubMonitor) getMonitor()).setWorkRemaining(IProgressMonitor.UNKNOWN); } }); while (fCanRun == true) { boolean updated = false; boolean validCombo; if (fTracesToScan.isEmpty() && !control.isDisposed()) { control.getDisplay().asyncExec(new Runnable() { @Override public void run() { if (!control.isDisposed()) { getMonitor().setTaskName(Messages.ImportTraceWizardPageScan_scanning + " "); getMonitor().subTask(Messages.ImportTraceWizardPageScan_done); } } }); } final TraceValidationHelper traceToScan = fTracesToScan.take(); if (!getBatchWizard().hasScanned(traceToScan)) { getBatchWizard().addResult(traceToScan, TmfTraceType.getInstance().validate(traceToScan)); } validCombo = getBatchWizard().getResult(traceToScan); if (validCombo) { getBatchWizard().getScannedTraces().addCandidate(traceToScan.getTraceType(), new File(traceToScan.getTraceToScan())); updated = true; } if (updated) { if (!control.isDisposed()) { control.getDisplay().asyncExec(new Runnable() { @Override public void run() { if (!control.isDisposed()) { getMonitor().setTaskName(Messages.ImportTraceWizardPageScan_scanning + " "); getMonitor().subTask(traceToScan.getTraceToScan()); getMonitor().worked(1); } } } ); } } final boolean editing = traceTypeViewer.isCellEditorActive(); if (updated && !editing) { if (!control.isDisposed()) { control.getDisplay().asyncExec(new Runnable() { @Override public void run() { if (!control.isDisposed()) { if (!traceTypeViewer.isCellEditorActive()) { traceTypeViewer.refresh(); } } } }); } } } }