void (@NotNull AnActionEvent e) { Project project = e.getProject(); boolean visible = project != null && isSvnActive(project); boolean enabled = visible && isEnabled(project, JBIterable.from(e.getData(VcsDataKeys.VIRTUAL_FILES)).single()); e.getPresentation().setVisible(visible); e.getPresentation().setEnabled(enabled); }