Avoid full references search for languages without PsiClass (KT-14974)

Make smart type search work for Groovy.

 #KT-14974 Fixed
This commit is contained in:
Nikolay Krasko
2017-04-18 17:54:36 +03:00
parent 102310e3c2
commit 111f0b1e66
8 changed files with 189 additions and 54 deletions
@@ -1,6 +1,6 @@
class GroovyClass extends JavaWithGroovyInvoke_0 {
def fieldNoType = new JavaWithGroovyInvoke_0.OtherJavaClass()
def JavaWithGroovyInvoke_0.OtherJavaClass fieldWithType = new JavaWithGroovyInvoke_0.OtherJavaClass()
public def fieldNoType = new JavaWithGroovyInvoke_0.OtherJavaClass()
public def JavaWithGroovyInvoke_0.OtherJavaClass fieldWithType = fieldNoType
def methodNoType() {
new JavaWithGroovyInvoke_0.OtherJavaClass()
@@ -1,5 +1,16 @@
Downgrade to plain text search: Unsupported reference: 'JavaWithGroovyInvoke_0' in JavaWithGroovyInvoke.0.groovy line 1 column 27
Resolved c()
Resolved fieldWithType()
Resolved methodWithType()
Resolved o()
Resolved o()
Resolved o.methodNoType()()
Resolved o.methodWithType()()
Resolved o.methodWithType()()
Searched references to GroovyClass
Searched references to GroovyClass.fieldWithType in non-Java files
Searched references to GroovyClass.methodWithType in non-Java files
Searched references to JavaWithGroovyInvoke_0
Used plain search of JavaWithGroovyInvoke_0.invoke() in LocalSearchScope:
JetFile: JavaWithGroovyInvoke.0.kt
Used plain search of JavaWithGroovyInvoke_0.invoke() in whole search scope
Searched references to JavaWithGroovyInvoke_0.OtherJavaClass
Searched references to parameter c of f(c: JavaWithGroovyInvoke_0) in non-Java files
Searched references to parameter o of foo(o: JavaWithGroovyInvoke_0.OtherJavaClass) in non-Java files
Searched references to parameter o of gr(o: GroovyClass) in non-Java files
@@ -4,4 +4,6 @@
public class JavaClass {
public void <caret>invoke() {
}
public static class OtherJavaClass extends JavaClass {}
}
@@ -1,3 +1,7 @@
fun f(c: JavaClass) {
c()
}
fun foo(o: JavaClass.OtherJavaClass) {
o()
}
@@ -1,3 +1,6 @@
Resolved c()
Resolved o()
Searched references to JavaClass
Searched references to parameter c of f(c: JavaClass) in non-Java files
Searched references to JavaClass.OtherJavaClass
Searched references to parameter c of f(c: JavaClass) in non-Java files
Searched references to parameter o of foo(o: JavaClass.OtherJavaClass) in non-Java files
@@ -1 +1,2 @@
Implicit 'invoke' 2 c()
Implicit 'invoke' 2 c()
Implicit 'invoke' 6 o()