boolean (@NotNull FileHistoryModel model, @Nullable VcsCommitMetadata detail, @NotNull AnActionEvent e) { VcsKey key = e.getData(VcsDataKeys.VCS); if (key == null) return false; AbstractVcs vcs = VcsUtil.findVcsByKey(Objects.requireNonNull(e.getProject()), key); if (vcs == null) return false; AnnotationProvider provider = vcs.getAnnotationProvider(); if (provider == null) return false; if (detail != null) { VcsFileRevision fileRevision = model.createRevision(detail); return AnnotateRevisionActionBase.isEnabled(vcs, FileHistoryUtil.createVcsVirtualFile(fileRevision), fileRevision); } return true; }