Rename: Record new name for Kotlin function which is being renamed via light method
#KT-12732 Fixed (cherry picked from commit 28b9d3e)
This commit is contained in:
@@ -85,6 +85,9 @@ class RenameKotlinFunctionProcessor : RenameKotlinPsiProcessor() {
|
||||
|
||||
override fun prepareRenaming(element: PsiElement, newName: String?, allRenames: MutableMap<PsiElement, String>, scope: SearchScope) {
|
||||
super.prepareRenaming(element, newName, allRenames, scope)
|
||||
if (element is KtLightMethod && newName != null && getJvmName(element) == null) {
|
||||
(element.kotlinOrigin as? KtNamedFunction)?.let { allRenames[it] = newName }
|
||||
}
|
||||
val psiMethod = wrapPsiMethod(element)
|
||||
if (psiMethod?.containingClass != null) {
|
||||
javaMethodProcessorInstance.prepareRenaming(psiMethod, newName, allRenames, scope)
|
||||
|
||||
Reference in New Issue
Block a user