JetBrains/intellij-scala — pull request #38 by retronym (2013-09-09 10:47:16+00:00)
Title: SCL-4336 fix in-place rename of back-ticked references

Preserves the backticks in references after the rename.

class Test {
def test {
val yyyy = 1
val (`yyyy`, 0) = (1, 2)

val xxxxxx = 0
xxxxxx
`xxxxxx`
}
}

Previously, I had disabled in place renaming if back ticked references existed (aad00a9f95). That no longer worked after the addition of `ScalaInplaceRenamer`.

This commit adjusts `ScReference#getTextRange` to exclude backticks.

During the fix, I noticed another problem. In the code below, the usage search for `xxxx` comes up empty.

// File1.scala
object O {
val xxxx = 0
}

// File2.scala
object Test { O.`xxxx` }

Review by @niktrop, @alefas