use of org.jetbrains.android.dom.AndroidResourceType in project android by JetBrains.
the class ResourceReferenceConverter method getResourceTypes.
@NotNull
public Set<ResourceType> getResourceTypes(@NotNull DomElement element) {
AndroidResourceType resourceType = element.getAnnotation(AndroidResourceType.class);
Set<ResourceType> types = EnumSet.copyOf(myResourceTypes);
if (resourceType != null) {
String s = resourceType.value();
if (s != null) {
ResourceType t = ResourceType.getEnum(s);
if (t != null) {
types.add(t);
}
}
}
if (types.size() == 0) {
return VALUE_RESOURCE_TYPES;
} else if (types.contains(ResourceType.DRAWABLE)) {
types.add(ResourceType.COLOR);
}
return types;
}
Aggregations