Fix WrongIdFormat exception on Android XML widgets with non-@+id/ format
This commit is contained in:
+3
-1
@@ -129,7 +129,9 @@ public class AndroidRenameProcessor : RenamePsiElementProcessor() {
|
||||
if (element == null) return
|
||||
val oldPropName = AndroidResourceUtil.getResourceNameByReferenceText(attribute.getValue())
|
||||
val newPropName = idToName(newName)
|
||||
renameSyntheticProperties(allRenames, newPropName, oldPropName, processor)
|
||||
if (oldPropName != null && newPropName != null) {
|
||||
renameSyntheticProperties(allRenames, newPropName, oldPropName, processor)
|
||||
}
|
||||
}
|
||||
|
||||
private fun renameSyntheticProperties(
|
||||
|
||||
+2
-1
@@ -45,7 +45,8 @@ class AndroidXmlVisitor(
|
||||
val attributeValue = attribute.getValue()
|
||||
if (attributeValue != null) {
|
||||
val classNameAttr = tag?.getAttribute(AndroidConst.CLASS_ATTRIBUTE_NO_NAMESPACE)?.getValue() ?: tag?.getLocalName()
|
||||
elementCallback(idToName(attributeValue), classNameAttr!!, attribute)
|
||||
val name = idToName(attributeValue)
|
||||
if (name != null) elementCallback(name, classNameAttr!!, attribute)
|
||||
}
|
||||
}
|
||||
tag?.acceptChildren(this)
|
||||
|
||||
Reference in New Issue
Block a user