PsiEnumConstant (@Nullable String s, ConvertContext context) { if (s == null) return null; PsiClass enumClass = getEnumClass(context); if (enumClass == null) return null; final PsiField name = enumClass.findFieldByName(fromXmlName(s), false); return name instanceof PsiEnumConstant ? (PsiEnumConstant)name : null; }