Make project compilable after types enhancement
This commit is contained in:
+1
-1
@@ -62,7 +62,7 @@ public abstract class AndroidResourceManager(val project: Project) {
|
||||
.map { psiManager.findFile(it) }
|
||||
.filterNotNull()
|
||||
.groupBy { it.getName().substringBeforeLast('.') }
|
||||
.mapValues { it.getValue().sortBy { it.getParent().getName().length() } }
|
||||
.mapValues { it.getValue().sortBy { it.getParent()!!.getName().length() } }
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
+1
-1
@@ -193,7 +193,7 @@ public abstract class AndroidUIXmlProcessor(protected val project: Project) {
|
||||
|
||||
for (res in resources) {
|
||||
if (resourceMap.contains(res.id)) {
|
||||
val existing = resourceMap[res.id]
|
||||
val existing = resourceMap[res.id]!!
|
||||
|
||||
if (!res.sameClass(existing)) {
|
||||
resourcesToExclude.add(res.id)
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class AndroidXmlHandler(private val elementCallback: (String, String) -> Unit) :
|
||||
val attributesMap = attributes.toMap()
|
||||
val idAttribute = attributesMap[AndroidConst.ID_ATTRIBUTE_NO_NAMESPACE]
|
||||
val widgetType = attributesMap[AndroidConst.CLASS_ATTRIBUTE_NO_NAMESPACE] ?: localName
|
||||
val name = idAttribute?.let { idToName(idAttribute) }
|
||||
val name = idAttribute?.let { idToName(idAttribute!!) }
|
||||
if (name != null) elementCallback(name, widgetType)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user