void (@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); DiffRequest request = e.getData(DiffDataKeys.DIFF_REQUEST); e.getPresentation().setEnabledAndVisible(project != null && request != null); }