final PsiConstantEvaluationHelper evalHelper = JavaPsiFacade.getInstance(field.getProject()).getConstantEvaluationHelper();
final PsiAnnotation attrAnno = findAnnotation(Attribute.class, field, getter, setter);
if (attrAnno != null) {
final String attrName = getStringAttribute(attrAnno, "value", evalHelper);
if (attrName != null) {
<BUG>boolean isClass = withElement != null || fieldName.endsWith("Class");
</BUG>
final DomExtension extension =
registrar.registerGenericAttributeValueChildExtension(new XmlName(attrName), isClass ? PsiClass.class : String.class).setDeclaringElement(field);
markAsClass(extension, fieldName, withElement);

final PsiConstantEvaluationHelper evalHelper = JavaPsiFacade.getInstance(field.getProject()).getConstantEvaluationHelper();
final PsiAnnotation attrAnno = findAnnotation(Attribute.class, field, getter, setter);
if (attrAnno != null) {
final String attrName = getStringAttribute(attrAnno, "value", evalHelper);
if (attrName != null) {
boolean isClass = withElement != null || isClassField(fieldName);
final DomExtension extension =
registrar.registerGenericAttributeValueChildExtension(new XmlName(attrName), isClass ? PsiClass.class : String.class).setDeclaringElement(field);
markAsClass(extension, fieldName, withElement);
