void (@NotNull final Project project, @NotNull final FilePath filePath, @NotNull final VcsFileRevision older, @NotNull final VcsFileRevision newer) { new Task.Backgroundable(project, VcsBundle.message("file.history.diff.revisions.process")) { @Override public void run(@NotNull ProgressIndicator indicator) { try { showDiff(project, filePath, older, newer, makeTitle(older), makeTitle(newer)); } catch (final VcsException e) { LOG.info(e); WaitForProgressToShow.runOrInvokeLaterAboveProgress( () -> Messages.showErrorDialog(VcsBundle.message("message.text.cannot.show.differences", e.getLocalizedMessage()), VcsBundle.message("message.title.show.differences")), null, project); } catch (IOException e) { LOG.info(e); } } @NotNull private static @NlsContexts.Label String makeTitle(@NotNull VcsFileRevision revision) { return revision.getRevisionNumber().asString() + (revision instanceof CurrentRevision ? " (" + VcsBundle.message("diff.title.local") + ")" : ""); } }.queue(); }