void (boolean trySync) { myStatusPanel.setBusy(true); final List<TextMergeChange> scheduled = new ArrayList<>(myScheduled); myScheduled.clear(); List<Document> documents = ThreeSide.map((side) -> getEditor(side).getDocument()); final List<InnerChunkData> data = ContainerUtil.map(scheduled, change -> new InnerChunkData(change, documents)); int waitMillis = trySync ? ProgressIndicatorWithDelayedPresentation.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS : 0; ProgressIndicator progress = BackgroundTaskUtil.executeAndTryWait(indicator -> performRediff(scheduled, data, indicator), null, waitMillis, false); if (progress.isRunning()) { myProgress = progress; } }