CreateFileResourceQuickFix now accepts ResourceFolderType instead of ResourceType
(cherry picked from commit 55f350f)
This commit is contained in:
committed by
Dmitry Jemerov
parent
4be5fcc14a
commit
59055e28ee
+5
-4
@@ -49,10 +49,11 @@ class KotlinAndroidResourceQuickFixProvider : UnresolvedReferenceQuickFixProvide
|
|||||||
if (AndroidResourceUtil.ALL_VALUE_RESOURCE_TYPES.contains(resourceType)) {
|
if (AndroidResourceUtil.ALL_VALUE_RESOURCE_TYPES.contains(resourceType)) {
|
||||||
registrar.register(CreateValueResourceQuickFix(facet, resourceType, info.fieldName, contextFile, true))
|
registrar.register(CreateValueResourceQuickFix(facet, resourceType, info.fieldName, contextFile, true))
|
||||||
}
|
}
|
||||||
|
if (AndroidResourceUtil.XML_FILE_RESOURCE_TYPES.contains(resourceType)) {
|
||||||
val folderType = AndroidResourceUtil.XML_FILE_RESOURCE_TYPES[resourceType] as? ResourceFolderType
|
val resourceFolderType = ResourceFolderType.getTypeByName(resourceType.getName());
|
||||||
if (folderType != null) {
|
if (resourceFolderType != null) {
|
||||||
registrar.register(CreateFileResourceQuickFix(facet, folderType, info.fieldName, contextFile, true))
|
registrar.register(CreateFileResourceQuickFix(facet, resourceFolderType, info.fieldName, contextFile, true))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user