public static boolean isSchemaEnumerated(final PsiElement element) { if (element instanceof XmlTag) { final XmlTag simpleContent = XmlUtil.getSchemaSimpleContent((XmlTag)element); if (simpleContent != null && XmlUtil.collectEnumerationValues(simpleContent, new HashSet<String>())) { return true; } } if (element instanceof XmlAttributeValue) { final PsiElement parent = element.getParent(); if (parent instanceof XmlAttribute) { final XmlAttributeDescriptor descriptor = ((XmlAttribute)parent).getDescriptor(); if (descriptor != null && descriptor.isEnumerated()) { return true; } String[] enumeratedValues = XmlAttributeValueGetter.getEnumeratedValues((XmlAttribute)parent); if (enumeratedValues != null && enumeratedValues.length > 0) { String value = descriptor == null ? null : descriptor.getDefaultValue(); if (value == null || enumeratedValues.length != 1 || !value.equals(enumeratedValues[0])) { return true; } } } } return false; }
protected XmlAttributeValueGetter getAttributeValueGetter() { return new XmlAttributeValueGetter(); }
@Override protected XmlAttributeValueGetter getAttributeValueGetter() { return new HtmlAttributeValueGetter(!isCaseInsensitive()); }
protected XmlAttributeValueGetter getAttributeValueGetter() { return new HtmlAttributeValueGetter(!isCaseInsensitive()); }