void (@NotNull AnActionEvent e) { Change[] changes = e.getData(VcsDataKeys.CHANGES); Project project = e.getData(CommonDataKeys.PROJECT); if (ActionPlaces.MAIN_MENU.equals(e.getPlace())) { e.getPresentation().setEnabled(project != null && changes != null && changes.length > 0); } else { e.getPresentation().setEnabled(project != null && canShowDiff(project, changes)); } }