void (@NotNull AnActionEvent e) { Project project = e.getProject(); GroupItem groupItem = e.getData(GroupItem.DATA_KEY); e.getPresentation().setEnabled(project != null && groupItem != null && !groupItem.isReadOnly()); }