Fixed references move refactoring for NonCode usages

We need to try correctly refactor NonCode usages of Java-like facade FQ names
i.e. if we have file A.kt with method foo we need to check AKt.foo and foo entries for non-code text search

Fixed #KT-36382
This commit is contained in:
Igor Yakovlev
2020-02-19 23:01:06 +03:00
parent aef8028a9c
commit b205b017fe
8 changed files with 84 additions and 8 deletions
@@ -0,0 +1,3 @@
package code.anotherPackage
fun MyTest() {}
@@ -0,0 +1,7 @@
package code
fun main(args: Array<String>) {
// MyTest
// code.anotherPackage.MyTest
// code.anotherPackage.TestKt.MyTest
}
@@ -0,0 +1,9 @@
package code
fun <caret>MyTest() {}
fun main(args: Array<String>) {
// MyTest
// code.MyTest
// code.TestKt.MyTest
}
@@ -0,0 +1,5 @@
{
"mainFile": "code/test.kt",
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
"targetPackage": "code.anotherPackage"
}
@@ -0,0 +1,4 @@
//Here we are using newPackage.foo name for test pure kotlin naming of top level kotlin function
//And we are using newPackage.FunKt.foo name for test java naming of top level kotlin function
@@ -0,0 +1,4 @@
//Here we are using oldPackage.foo name for test pure kotlin naming of top level kotlin function
//And we are using oldPackage.FunKt.foo name for test java naming of top level kotlin function