void (PsiField field, Settings settings) { if (!settings.isIntroduceEnumConstant()) { if (settings.isDeclareStatic()) { PsiUtil.setModifierProperty(field, PsiModifier.STATIC, true); } if (settings.isDeclareFinal()) { PsiUtil.setModifierProperty(field, PsiModifier.FINAL, true); } if (settings.isAnnotateAsNonNls()) { PsiAnnotation annotation = JavaPsiFacade.getElementFactory(field.getProject()) .createAnnotationFromText("@" + AnnotationUtil.NON_NLS, field); final PsiModifierList modifierList = field.getModifierList(); LOG.assertTrue(modifierList != null); modifierList.addAfter(annotation, null); } } JavaCodeStyleManager.getInstance(field.getProject()).shortenClassReferences(field); }