use of org.jetbrains.android.dom.converters.StaticEnumConverter in project android by JetBrains.
the class NlDesignProperties method getDefinitionByName.
private static AttributeDefinition getDefinitionByName(@NotNull String name) {
AttributeDefinition definition = ToolsAttributeUtil.getAttrDefByName(name);
assert definition != null;
ResolvingConverter converter = ToolsAttributeUtil.getConverter(definition);
// TODO: Figure out how to provide the correct reference editor depending on the converter.
if (converter instanceof StaticEnumConverter) {
Collection variants = converter.getVariants(null);
for (Object variant : variants) {
definition.addValue(variant.toString());
}
}
return definition;
}
Aggregations