Take new name when layout rename started from reference

This commit is contained in:
Nikolay Krasko
2016-12-21 18:01:53 +03:00
parent da5f2a0784
commit 49d57124c1

View File

@@ -48,10 +48,7 @@ class AndroidSimpleNameReferenceExtension : SimpleNameReferenceExtension {
return psiFactory.createNameIdentifier(newSyntheticPropertyName.name)
}
else if (isLayoutPackageIdentifier(reference)) {
return if (newElementName.endsWith(".xml"))
psiFactory.createSimpleName(newElementName.dropLast(".xml".length)).getIdentifier()
else
reference.element.getIdentifier()
return psiFactory.createSimpleName(newElementName.substringBeforeLast(".xml")).getIdentifier()
}
return null