PopupStep (final Nls.Capitalization selectedValue, boolean finalChoice) { WriteCommandAction.writeCommandAction(project).run(() -> { String nls = Nls.class.getName(); PsiAnnotation annotation = JavaPsiFacade.getInstance(project).getElementFactory() .createAnnotationFromText("@" + nls + "(capitalization = " + nls + ".Capitalization." + selectedValue.toString() + ")", modifierListOwner); new AddAnnotationFix(Nls.class.getName(), modifierListOwner, annotation.getParameterList().getAttributes()).applyFix(); }); return FINAL_CHOICE; }