void (@NotNull AnActionEvent event) { Project project = event.getRequiredData(CommonDataKeys.PROJECT); AbstractVcs vcs = Objects.requireNonNull(getVcs(project, event.getData(VcsDataKeys.VCS))); Pair<FilePath, VcsRevisionNumber> fileAndRevision = Objects.requireNonNull(getFileAndRevision(event)); FilePath file = fileAndRevision.getFirst(); VcsRevisionNumber revisionNumber = fileAndRevision.getSecond(); String revisionNumberString = revisionNumber.asString(); if (canShowNewFileHistory(project, file, revisionNumberString)) { showNewFileHistory(project, file, revisionNumberString); } else { VcsHistoryProviderEx vcsHistoryProvider = Objects.requireNonNull((VcsHistoryProviderEx)vcs.getVcsHistoryProvider()); AbstractVcsHelperImpl helper = Objects.requireNonNull(getVcsHelper(project)); helper.showFileHistory(vcsHistoryProvider, file, vcs, revisionNumber); } }