diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/search/usagesSearch/ExpressionsOfTypeProcessor.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/search/usagesSearch/ExpressionsOfTypeProcessor.kt index aa9b3db154d..b046701e302 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/search/usagesSearch/ExpressionsOfTypeProcessor.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/search/usagesSearch/ExpressionsOfTypeProcessor.kt @@ -75,7 +75,8 @@ class ExpressionsOfTypeProcessor( val fqName = element.getKotlinFqName()?.asString() ?: (element as? KtNamedDeclaration)?.name return when (element) { - is PsiMethod, is KtFunction -> fqName + "()" + is PsiMethod -> fqName + element.parameterList.text + is KtFunction -> fqName + element.valueParameterList!!.text is KtParameter -> { val owner = element.ownerFunction?.let { logPresentation(it) } ?: element.parent.toString() "parameter ${element.name} of $owner" diff --git a/idea/testData/findUsages/kotlin/conventions/components/SAM.log b/idea/testData/findUsages/kotlin/conventions/components/SAM.log index a88f2804797..30b37a8c15d 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/SAM.log +++ b/idea/testData/findUsages/kotlin/conventions/components/SAM.log @@ -1,7 +1,7 @@ Resolved java class to descriptor: JavaSAM -Searched references to JavaClass.takeSAM() in Kotlin files +Searched references to JavaClass.takeSAM(JavaSAM sam) in Kotlin files Searched references to JavaSAM in java files Searched references to pack.A -Used plain search of parameter a of A() in LocalSearchScope: +Used plain search of parameter a of A(val a: Int, val b: String) in LocalSearchScope: CLASS:A { val (x, y) = it } diff --git a/idea/testData/findUsages/kotlin/conventions/components/callableReferences.log b/idea/testData/findUsages/kotlin/conventions/components/callableReferences.log index 54d3422faa3..e4465907342 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/callableReferences.log +++ b/idea/testData/findUsages/kotlin/conventions/components/callableReferences.log @@ -12,5 +12,5 @@ Searched references to constructor in Kotlin files Searched references to f1() in Kotlin files Searched references to fun2 in Kotlin files Searched references to fun3 in Kotlin files -Used plain search of parameter a of A() in LocalSearchScope: +Used plain search of parameter a of A(val a: Int, val b: Int) in LocalSearchScope: CLASS:A diff --git a/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.log b/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.log index da7691b4aac..068fe5a1c20 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.log +++ b/idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.log @@ -1,3 +1,3 @@ Searched references to A -Used plain search of parameter x of A() in LocalSearchScope: +Used plain search of parameter x of A(val x: Int, val y: Int) in LocalSearchScope: CLASS:A diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClass.log b/idea/testData/findUsages/kotlin/conventions/components/dataClass.log index 8151d7c7a83..d187e2b8330 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClass.log +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClass.log @@ -21,9 +21,9 @@ Searched references to h() in Kotlin files Searched references to listOfA() in Kotlin files Searched references to pack.A Searched references to pack.X -Searched references to parameter p1 of test2() in Kotlin files -Searched references to parameter p2 of test2() in Kotlin files -Used plain search of parameter n of A() in LocalSearchScope: +Searched references to parameter p1 of test2(p1: JavaClass2, p2: JavaClass3) in Kotlin files +Searched references to parameter p2 of test2(p1: JavaClass2, p2: JavaClass3) in Kotlin files +Used plain search of parameter n of A(val n: Int, val s: String, val o: Any) in LocalSearchScope: CLASS:A CLASS:X FUN:ext1 diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.log b/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.log index 30c447a10e9..c0237c1818b 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.log +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.log @@ -2,5 +2,5 @@ Checked type of a Resolved (x, y, z) Searched references to A Searched references to a in Kotlin files -Used plain search of parameter n of A() in LocalSearchScope: +Used plain search of parameter n of A(val n: Int, val s: String, val o: Any) in LocalSearchScope: CLASS:A \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.log b/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.log index 5144f969766..4dcd79d0396 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.log +++ b/idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.log @@ -8,12 +8,12 @@ Searched references to C Searched references to C.component1() in Kotlin files Searched references to a in Kotlin files Searched references to a1 in Kotlin files -Searched references to parameter a of B() in Kotlin files -Searched references to parameter b of f() in Kotlin files -Searched references to parameter c of f() in Kotlin files +Searched references to parameter a of B(val a: A, val n: Int) in Kotlin files +Searched references to parameter b of f(b: B, c: C) in Kotlin files +Searched references to parameter c of f(b: B, c: C) in Kotlin files Used plain search of C.component1() in LocalSearchScope: CLASS:C -Used plain search of parameter a of B() in LocalSearchScope: +Used plain search of parameter a of B(val a: A, val n: Int) in LocalSearchScope: CLASS:B -Used plain search of parameter x of A() in LocalSearchScope: +Used plain search of parameter x of A(val x: Int, val y: Int, val z: String) in LocalSearchScope: CLASS:A \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.log b/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.log index d6419a5b256..1b107656639 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.log +++ b/idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.log @@ -7,8 +7,8 @@ Searched references to Y Searched references to Z1 Searched references to Z2 Searched references to f() in Kotlin files -Searched references to parameter z1 of g() in Kotlin files -Searched references to parameter z2 of g() in Kotlin files +Searched references to parameter z1 of g(z1: Z1, z2: Z2) in Kotlin files +Searched references to parameter z2 of g(z1: Z1, z2: Z2) in Kotlin files Used plain search of component2() in LocalSearchScope: CLASS:X CLASS:Y diff --git a/idea/testData/findUsages/kotlin/conventions/components/for.log b/idea/testData/findUsages/kotlin/conventions/components/for.log index 12a487106f5..2df6432d820 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/for.log +++ b/idea/testData/findUsages/kotlin/conventions/components/for.log @@ -3,5 +3,5 @@ Resolved (x, y) Resolved (x, y, z) Searched references to A Searched references to parameter a of FOR in Kotlin files -Used plain search of parameter n of A() in LocalSearchScope: +Used plain search of parameter n of A(val n: Int, val s: String, val o: Any) in LocalSearchScope: CLASS:A \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/isAndAs.log b/idea/testData/findUsages/kotlin/conventions/components/isAndAs.log index 9b1336d6f41..123485f4e18 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/isAndAs.log +++ b/idea/testData/findUsages/kotlin/conventions/components/isAndAs.log @@ -3,6 +3,6 @@ Resolved (x, y) Resolved (x1, y1) Searched references to A Searched references to list in Kotlin files -Used plain search of parameter x of A() in LocalSearchScope: +Used plain search of parameter x of A(val x: Int, val y: Int) in LocalSearchScope: CLASS:A FUN:x diff --git a/idea/testData/findUsages/kotlin/conventions/components/lambdas.log b/idea/testData/findUsages/kotlin/conventions/components/lambdas.log index e37423702ef..1b55c6d9a7d 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/lambdas.log +++ b/idea/testData/findUsages/kotlin/conventions/components/lambdas.log @@ -1,17 +1,17 @@ Searched references to A -Searched references to parameter p of foo() in Kotlin files -Searched references to parameter p of takeExtFun() in Kotlin files -Searched references to parameter p of takeFun1() in Kotlin files -Searched references to parameter p of takeFun2() in Kotlin files -Searched references to parameter p of takeFun3() in Kotlin files -Searched references to parameter p of takeFuns() in Kotlin files -Searched references to takeExtFun() in Kotlin files -Searched references to takeFun1() in Kotlin files -Searched references to takeFun2() in Kotlin files -Searched references to takeFun3() in Kotlin files -Searched references to takeFuns() in Kotlin files +Searched references to parameter p of foo(p: A) in Kotlin files +Searched references to parameter p of takeExtFun(p: A.() -> Unit) in Kotlin files +Searched references to parameter p of takeFun1(p: (A) -> Unit) in Kotlin files +Searched references to parameter p of takeFun2(p: ((A?, Int) -> Unit)?) in Kotlin files +Searched references to parameter p of takeFun3(p: (List) -> Unit) in Kotlin files +Searched references to parameter p of takeFuns(p: MutableList<(A) -> Unit>) in Kotlin files +Searched references to takeExtFun(p: A.() -> Unit) in Kotlin files +Searched references to takeFun1(p: (A) -> Unit) in Kotlin files +Searched references to takeFun2(p: ((A?, Int) -> Unit)?) in Kotlin files +Searched references to takeFun3(p: (List) -> Unit) in Kotlin files +Searched references to takeFuns(p: MutableList<(A) -> Unit>) in Kotlin files Searched references to v in Kotlin files -Used plain search of parameter a of A() in LocalSearchScope: +Used plain search of parameter a of A(val a: Int, val b: Int) in LocalSearchScope: CLASS:A { a, n -> val (x, y) = a!! } { val (x, y ) = it } diff --git a/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.log b/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.log index 85bc0d56d07..2aa23ac656e 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.log +++ b/idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.log @@ -1,11 +1,11 @@ -Checked type of y1() +Checked type of y1(a: A) Resolved (x1, y1) Searched references to A -Searched references to parameter a of condition() in Kotlin files -Searched references to parameter a of x() in Kotlin files -Searched references to parameter a of y1() in Kotlin files -Searched references to parameter a of y2() in Kotlin files -Searched references to parameter a of y3() in Kotlin files -Used plain search of parameter n of A() in LocalSearchScope: +Searched references to parameter a of condition(a: A) in Kotlin files +Searched references to parameter a of x(a: A, b: Boolean, list: List) in Kotlin files +Searched references to parameter a of y1(a: A) in Kotlin files +Searched references to parameter a of y2(a: A) in Kotlin files +Searched references to parameter a of y3(a: A) in Kotlin files +Used plain search of parameter n of A(val n: Int, val s: String) in LocalSearchScope: CLASS:A { val (x2, y2) = this } \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/operators.log b/idea/testData/findUsages/kotlin/conventions/components/operators.log index d47eca69646..86f47f74485 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/operators.log +++ b/idea/testData/findUsages/kotlin/conventions/components/operators.log @@ -2,12 +2,12 @@ Resolved (x, y) Resolved b1 + b2 Searched references to A Searched references to B -Searched references to parameter b1 of f() in Kotlin files -Searched references to parameter b2 of f() in Kotlin files -Searched references to parameter other of plus() in Kotlin files -Searched references to plus() in Kotlin files -Used plain search of parameter x of A() in LocalSearchScope: +Searched references to parameter b1 of f(b1: B, b2: B) in Kotlin files +Searched references to parameter b2 of f(b1: B, b2: B) in Kotlin files +Searched references to parameter other of plus(other: B) in Kotlin files +Searched references to plus(other: B) in Kotlin files +Used plain search of parameter x of A(val x: Int, val y: Int) in LocalSearchScope: CLASS:A -Used plain search of plus() in LocalSearchScope: +Used plain search of plus(other: B) in LocalSearchScope: CLASS:B FUN:plus \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.log b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.log index e3deeaa3abf..b2b48e65546 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.log +++ b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.log @@ -2,7 +2,7 @@ Resolved (a1, n1) Resolved (a2, n2) Resolved (a2, n2) Searched references to A -Searched references to parameter a of A() in Kotlin files -Searched references to parameter a of f() in Kotlin files -Used plain search of parameter a of A() in LocalSearchScope: +Searched references to parameter a of A(val a: A?, val n: Int) in Kotlin files +Searched references to parameter a of f(a: A) in Kotlin files +Used plain search of parameter a of A(val a: A?, val n: Int) in LocalSearchScope: CLASS:A diff --git a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.log b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.log index 6581209fb1c..e144a44ab7f 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.log +++ b/idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.log @@ -4,10 +4,10 @@ Searched references to A Searched references to B Searched references to a1 in Kotlin files Searched references to b in Kotlin files -Searched references to parameter a of B() in Kotlin files -Searched references to parameter a of f() in Kotlin files -Searched references to parameter b of A() in Kotlin files -Used plain search of parameter a of B() in LocalSearchScope: +Searched references to parameter a of B(val a: A?, val s: String) in Kotlin files +Searched references to parameter a of f(a: A) in Kotlin files +Searched references to parameter b of A(val b: B, val n: Int) in Kotlin files +Used plain search of parameter a of B(val a: A?, val s: String) in LocalSearchScope: CLASS:B -Used plain search of parameter b of A() in LocalSearchScope: +Used plain search of parameter b of A(val b: B, val n: Int) in LocalSearchScope: CLASS:A \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/components/when.log b/idea/testData/findUsages/kotlin/conventions/components/when.log index fc9459bc0e3..546cbfc3b77 100644 --- a/idea/testData/findUsages/kotlin/conventions/components/when.log +++ b/idea/testData/findUsages/kotlin/conventions/components/when.log @@ -1,5 +1,5 @@ Searched references to A -Used plain search of parameter a of A() in LocalSearchScope: +Used plain search of parameter a of A(val a: Int, val b: Int) in LocalSearchScope: CLASS:A KtWhenEntry "else" KtWhenEntry "is A" diff --git a/idea/testData/findUsages/kotlin/conventions/invoke.log b/idea/testData/findUsages/kotlin/conventions/invoke.log index 4d00ac21ec6..e5e73090a9c 100644 --- a/idea/testData/findUsages/kotlin/conventions/invoke.log +++ b/idea/testData/findUsages/kotlin/conventions/invoke.log @@ -4,5 +4,5 @@ Resolved f(2) Resolved f(2)(2) Searched references to B Searched references to f() in Kotlin files -Used plain search of B.invoke() in LocalSearchScope: +Used plain search of B.invoke(i: Int) in LocalSearchScope: CLASS:B \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/conventions/plus.log b/idea/testData/findUsages/kotlin/conventions/plus.log index 9623a91a934..7850f1957ae 100644 --- a/idea/testData/findUsages/kotlin/conventions/plus.log +++ b/idea/testData/findUsages/kotlin/conventions/plus.log @@ -14,15 +14,15 @@ Resolved a += A(1) Resolved a += A(1) Searched references to A Searched references to A -Searched references to A.plus() in Kotlin files -Searched references to A.plus() in Kotlin files -Searched references to A.plus() in Kotlin files -Searched references to A.plus() in Kotlin files +Searched references to A.plus(a: A) in Kotlin files +Searched references to A.plus(a: A) in Kotlin files +Searched references to A.plus(m: Int) in Kotlin files +Searched references to A.plus(m: Int) in Kotlin files Searched references to a in Kotlin files Searched references to a in Kotlin files -Searched references to parameter a of A.plus() in Kotlin files -Searched references to parameter a of A.plus() in Kotlin files -Used plain search of A.plus() in LocalSearchScope: +Searched references to parameter a of A.plus(a: A) in Kotlin files +Searched references to parameter a of A.plus(a: A) in Kotlin files +Used plain search of A.plus(a: A) in LocalSearchScope: CLASS:A -Used plain search of A.plus() in LocalSearchScope: +Used plain search of A.plus(m: Int) in LocalSearchScope: CLASS:A \ No newline at end of file diff --git a/idea/testData/findUsages/kotlin/findParameterUsages/kotlinComponentFunctionParameterUsages.log b/idea/testData/findUsages/kotlin/findParameterUsages/kotlinComponentFunctionParameterUsages.log index bd3cd725862..a8bdca8aea8 100644 --- a/idea/testData/findUsages/kotlin/findParameterUsages/kotlinComponentFunctionParameterUsages.log +++ b/idea/testData/findUsages/kotlin/findParameterUsages/kotlinComponentFunctionParameterUsages.log @@ -1,3 +1,3 @@ Searched references to test.KotlinDataClass -Used plain search of parameter foo of KotlinDataClass() in LocalSearchScope: +Used plain search of parameter foo of KotlinDataClass(val foo: Int, val bar: String) in LocalSearchScope: CLASS:KotlinDataClass \ No newline at end of file