void (@NotNull AnActionEvent e) { List<Pair<Integer, I18nizedPropertyData<D>>> selection = getSelectedDataWithIndices(); e.getPresentation().setEnabled(!selection.isEmpty()); e.getPresentation().setText(shouldMarkAsNonNls(selection) ? JavaI18nBundle.message("action.text.mark.as.nonnls") : JavaI18nBundle.message("action.text.unmark.as.nonnls")); }