void (int lineNum) { if (lineNum >= 0 && lineNum < myLines.size()) { LineInfo info = myLines.get(lineNum); VirtualFile root = ProjectLevelVcsManager.getInstance(myProject).getVcsRootFor(myFilePath); if (root == null) return; CompletableFuture<Boolean> shownInLog; if (ModalityState.current() == ModalityState.nonModal() && Registry.is("vcs.blame.show.affected.files.in.log")) { Hash hash = HashImpl.build(info.getRevisionNumber().asString()); shownInLog = VcsLogNavigationUtil.jumpToRevisionAsync(myProject, root, hash, info.getFilePath()); } else { shownInLog = CompletableFuture.completedFuture(false); // can't use log tabs in modal dialogs (ex: commit, merge) } shownInLog.whenCompleteAsync((success, ex) -> { if (ex instanceof CancellationException) return; if (ex != null) { LOG.error(ex); } if (!Boolean.TRUE.equals(success)) { AbstractVcsHelperImpl.loadAndShowCommittedChangesDetails(myProject, info.getRevisionNumber(), myFilePath, false, () -> getRevisionsChangesProvider().getChangesIn(lineNum)); } }, EdtExecutorService.getInstance()); } }