ContentDiffRequest (final FileDifferenceModel m) { final Ref<ContentDiffRequest> requestRef = new Ref<>(); new Task.Modal(myProject, message("message.processing.revisions"), false) { @Override public void run(final @NotNull ProgressIndicator i) { i.setIndeterminate(false); ApplicationManager.getApplication().runReadAction(() -> { RevisionProcessingProgressAdapter p = new RevisionProcessingProgressAdapter(i); p.processingLeftRevision(); DiffContent left = m.getLeftDiffContent(p); p.processingRightRevision(); DiffContent right = m.getRightDiffContent(p); requestRef.set(new SimpleDiffRequest(m.getTitle(), left, right, m.getLeftTitle(p), m.getRightTitle(p))); }); } }.queue(); return requestRef.get(); }