use of org.jetbrains.android.dom.attrs.AttributeFormat in project android by JetBrains.
the class BrowsePanel method getResourceTypes.
@NotNull
public static EnumSet<ResourceType> getResourceTypes(@NotNull String propertyName, @Nullable AttributeDefinition definition) {
Set<AttributeFormat> formats = definition != null ? definition.getFormats() : EnumSet.allOf(AttributeFormat.class);
// for some special known properties, we can narrow down the possible types (rather than the all encompassing reference type)
ResourceType type = AndroidDomUtil.SPECIAL_RESOURCE_TYPES.get(propertyName);
return type == null ? AttributeFormat.convertTypes(formats) : EnumSet.of(type);
}
Aggregations