KT-33372 Remove renaming file reference to the contents of the file

- There is still a hack with returning null from `getLastFileReference`,
it is here to keep KT-25674 issue fixed
- Overrides of `bindToElement` are removed, they caused renames of the
file references to their contents
- Code of `KotlinFilePathReferenceContributor.kt` is refactored
- ^KT-33372 ^KT-32514 ^KT-36306 Fixed
This commit is contained in:
Roman Golyshev
2020-02-14 11:48:14 +03:00
committed by Roman Golyshev
parent 50c477bee1
commit 3461effd47
19 changed files with 86 additions and 31 deletions
@@ -0,0 +1,2 @@
val a = "."
val b = ".."
@@ -0,0 +1,2 @@
val a = "."
val b = ".."
@@ -0,0 +1,5 @@
{
"mainFile": "a/a/main.kt",
"type": "MOVE_FILES",
"targetDirectory": "b"
}
@@ -0,0 +1,6 @@
fun take(a: String) {}
fun usage() {
take("new_resource.txt")
take("new_resource.txt")
}
@@ -0,0 +1 @@
resource content
@@ -0,0 +1,6 @@
fun take(a: String) {}
fun usage() {
take("resource.txt")
take("./resource.txt")
}
@@ -0,0 +1 @@
resource content
@@ -0,0 +1,5 @@
{
"type": "FILE",
"file": "resource.txt",
"newName": "new_resource.txt"
}