use of com.intellij.xml.impl.BasicXmlAttributeDescriptor in project intellij-community by JetBrains.
the class XmlAttributeValueGetter method getEnumeratedValues.
@NotNull
public static String[] getEnumeratedValues(XmlAttribute attribute) {
final XmlAttributeDescriptor descriptor = attribute.getDescriptor();
if (descriptor == null) {
return ArrayUtil.EMPTY_STRING_ARRAY;
}
String[] result;
if (descriptor instanceof BasicXmlAttributeDescriptor) {
result = ((BasicXmlAttributeDescriptor) descriptor).getEnumeratedValues(attribute);
} else if (descriptor instanceof XmlEnumerationDescriptor) {
result = ((XmlEnumerationDescriptor) descriptor).getValuesForCompletion();
} else {
result = descriptor.getEnumeratedValues();
}
return result != null ? StringUtil.filterEmptyStrings(result) : ArrayUtil.EMPTY_STRING_ARRAY;
}
Aggregations