void (boolean trySync) { if (isDisposed()) return; abortRediff(); fireEvent(EventType.BEFORE_REDIFF); onBeforeRediff(); boolean forceEDT = forceRediffSynchronously(); int waitMillis = trySync || tryRediffSynchronously() ? ProgressIndicatorWithDelayedPresentation.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS : 0; myTaskExecutor.executeAndTryWait( indicator -> { final Runnable callback = performRediff(indicator); return () -> { callback.run(); onAfterRediff(); fireEvent(EventType.AFTER_REDIFF); }; }, this::onSlowRediff, waitMillis, forceEDT ); }