void (@NotNull AnActionEvent e) { Project project = e.getProject(); VcsLogUiEx ui = e.getData(VcsLogInternalDataKeys.LOG_UI_EX); if (project == null || ui == null) { e.getPresentation().setEnabledAndVisible(false); } else { e.getPresentation().setEnabledAndVisible(ui.getTable().getSelectedRowCount() == 1); } }