Make project compilable after types enhancement

This commit is contained in:
Denis Zharkov
2015-07-08 12:13:24 +03:00
parent 4479c215d4
commit 0a19fb7df2
139 changed files with 227 additions and 212 deletions
@@ -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 {
@@ -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)
@@ -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)
}