Find Usages: Fix reference matching for declarations located in libraries

#KT-5762 Fixed
This commit is contained in:
Alexey Sedunov
2014-12-26 12:30:17 +03:00
parent 59d646bc16
commit c8cb5f8c29
13 changed files with 90 additions and 3 deletions
@@ -0,0 +1,7 @@
// PSI_ELEMENT: com.intellij.psi.PsiClass
// OPTIONS: usages
// FIND_BY_REF
// FIND_BY_MIRROR_ELEMENT
fun test() {
<caret>System.exit(0)
}
@@ -0,0 +1 @@
Nested class/object (6: 5) System.exit(0)
@@ -0,0 +1,9 @@
// PSI_ELEMENT: com.intellij.psi.PsiField
// OPTIONS: usages
// FIND_BY_REF
// FIND_BY_MIRROR_ELEMENT
import java.awt.Dimension
fun test() {
Dimension().<caret>width = 1
}
@@ -0,0 +1 @@
Value write (8: 17) Dimension().width = 1
@@ -0,0 +1,9 @@
// PSI_ELEMENT: com.intellij.psi.PsiMethod
// OPTIONS: usages
// FIND_BY_REF
// FIND_BY_MIRROR_ELEMENT
import java.awt.Dimension
fun test() {
Dimension().<caret>setSize(1.0, 2.0)
}
@@ -0,0 +1 @@
Function call (8: 17) Dimension().setSize(1.0, 2.0)
@@ -0,0 +1,7 @@
// PSI_ELEMENT: com.intellij.psi.PsiField
// OPTIONS: usages
// FIND_BY_REF
// FIND_BY_MIRROR_ELEMENT
fun test() {
System.<caret>out.println()
}
@@ -0,0 +1 @@
Receiver (6: 12) System.out.println()
@@ -0,0 +1,7 @@
// PSI_ELEMENT: com.intellij.psi.PsiMethod
// OPTIONS: usages
// FIND_BY_REF
// FIND_BY_MIRROR_ELEMENT
fun test() {
System.<caret>exit(0)
}
@@ -0,0 +1 @@
Function call (6: 12) System.exit(0)