void (@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); Project project = e.getProject(); VirtualFile file = JBIterable.from(e.getData(VcsDataKeys.VIRTUAL_FILES)).single(); presentation.setVisible(project != null); presentation.setEnabled(project != null && file != null && isEnabled(getRepositoryManager(project).getRepositoryForFileQuick(file))); }