void (@NotNull AnActionEvent e) { Project project = e.getProject(); Change[] changes = e.getRequiredData(VcsDataKeys.SELECTED_CHANGES_IN_DETAILS); boolean isEnabled = project != null && changes.length > 0; e.getPresentation().setEnabledAndVisible(isEnabled); e.getPresentation().setText(VcsBundle.message("action.name.get.file.content.from.repository")); }