Call Hierarchy: Add support of local declarations
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
<node text="client.[anonymous] ()" base="true">
|
||||
<node text="JA.JA()(2 usages) ()"/>
|
||||
<node text="JA.foo(String) ()">
|
||||
<node text="PrintStream.println(String) (java.io)"/>
|
||||
</node>
|
||||
<node text="KA(2 usages) ()"/>
|
||||
<node text="KA.foo(String) ()"/>
|
||||
<node text="KA.name ()"/>
|
||||
<node text="packageFun(String)(2 usages) ()"/>
|
||||
</node>
|
||||
@@ -0,0 +1,32 @@
|
||||
class KA {
|
||||
val name = "A"
|
||||
fun foo(s: String): String = "A: $s"
|
||||
}
|
||||
|
||||
fun packageFun(s: String): String = s
|
||||
|
||||
val packageVal = ""
|
||||
|
||||
fun client() {
|
||||
val obj = <caret>object {
|
||||
val bar = run {
|
||||
val localVal = packageFun("")
|
||||
|
||||
KA().foo(KA().name)
|
||||
JA().foo(JA().name)
|
||||
packageFun(localVal)
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
KA().foo(KA().name)
|
||||
JA().foo(JA().name)
|
||||
}
|
||||
}
|
||||
|
||||
fun localFun(s: String): String = packageFun(s)
|
||||
|
||||
|
||||
KA().foo(KA().name)
|
||||
JA().foo(JA().name)
|
||||
localFun(packageVal)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class JA {
|
||||
public String name = "A";
|
||||
|
||||
public JA() {
|
||||
|
||||
}
|
||||
|
||||
public String foo(String s) {
|
||||
System.out.println(s);
|
||||
return "A " + s;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
<node text="KClient" base="true">
|
||||
<node text="KClientBase"/>
|
||||
<node text="KA(4 usages)"/>
|
||||
<node text="KA.name(2 usages)"/>
|
||||
<node text="KA.foo(String)(2 usages)"/>
|
||||
<node text="KA.name(2 usages)"/>
|
||||
<node text="JA.JA()(4 usages)"/>
|
||||
<node text="JA.foo(String)(2 usages)">
|
||||
<node text="PrintStream.println(String) (java.io)"/>
|
||||
</node>
|
||||
<node text="KClient.localFun(String)">
|
||||
<node text="packageFun(String)"/>
|
||||
</node>
|
||||
<node text="packageVal"/>
|
||||
<node text="packageFun(String)(2 usages)"/>
|
||||
</node>
|
||||
|
||||
+4
-1
@@ -1,7 +1,10 @@
|
||||
<node text="KClient.bar()" base="true">
|
||||
<node text="bar.localFun(String)(2 usages)">
|
||||
<node text="packageFun(String)"/>
|
||||
</node>
|
||||
<node text="KA(4 usages)"/>
|
||||
<node text="KA.name(2 usages)"/>
|
||||
<node text="KA.foo(String)(2 usages)"/>
|
||||
<node text="KA.name(2 usages)"/>
|
||||
<node text="JA.JA()(4 usages)"/>
|
||||
<node text="JA.foo(String)(2 usages)">
|
||||
<node text="PrintStream.println(String) (java.io)"/>
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<node text="client.T ()" base="true">
|
||||
<node text="JA.JA()(2 usages) ()"/>
|
||||
<node text="JA.foo(String) ()">
|
||||
<node text="PrintStream.println(String) (java.io)"/>
|
||||
</node>
|
||||
<node text="KA(2 usages) ()"/>
|
||||
<node text="KA.foo(String) ()"/>
|
||||
<node text="KA.name ()"/>
|
||||
<node text="packageFun(String)(2 usages) ()"/>
|
||||
</node>
|
||||
@@ -0,0 +1,32 @@
|
||||
class KA {
|
||||
val name = "A"
|
||||
fun foo(s: String): String = "A: $s"
|
||||
}
|
||||
|
||||
fun packageFun(s: String): String = s
|
||||
|
||||
val packageVal = ""
|
||||
|
||||
fun client() {
|
||||
class <caret>T {
|
||||
val bar = run {
|
||||
val localVal = packageFun("")
|
||||
|
||||
KA().foo(KA().name)
|
||||
JA().foo(JA().name)
|
||||
packageFun(localVal)
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
KA().foo(KA().name)
|
||||
JA().foo(JA().name)
|
||||
}
|
||||
}
|
||||
|
||||
fun localFun(s: String): String = packageFun(s)
|
||||
|
||||
|
||||
KA().foo(KA().name)
|
||||
JA().foo(JA().name)
|
||||
localFun(packageVal)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class JA {
|
||||
public String name = "A";
|
||||
|
||||
public JA() {
|
||||
|
||||
}
|
||||
|
||||
public String foo(String s) {
|
||||
System.out.println(s);
|
||||
return "A " + s;
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<node text="client.localFun(String) ()" base="true">
|
||||
<node text="JA.JA()(2 usages) ()"/>
|
||||
<node text="JA.foo(String) ()">
|
||||
<node text="PrintStream.println(String) (java.io)"/>
|
||||
</node>
|
||||
<node text="KA(2 usages) ()"/>
|
||||
<node text="KA.foo(String) ()"/>
|
||||
<node text="KA.name ()"/>
|
||||
<node text="localFun.bar() ()">
|
||||
<node text="KA.name ()"/>
|
||||
<node text="JA.foo(String) ()">
|
||||
<node text="PrintStream.println(String) (java.io)"/>
|
||||
</node>
|
||||
<node text="KA(2 usages) ()"/>
|
||||
<node text="JA.JA()(2 usages) ()"/>
|
||||
<node text="KA.foo(String) ()"/>
|
||||
</node>
|
||||
<node text="packageFun(String)(2 usages) ()"/>
|
||||
</node>
|
||||
@@ -0,0 +1,31 @@
|
||||
class KA {
|
||||
val name = "A"
|
||||
fun foo(s: String): String = "A: $s"
|
||||
}
|
||||
|
||||
fun packageFun(s: String): String = s
|
||||
|
||||
val packageVal = ""
|
||||
|
||||
fun client() {
|
||||
fun <caret>localFun(s: String): String {
|
||||
val bar = run {
|
||||
val localVal = packageFun("")
|
||||
|
||||
KA().foo(KA().name)
|
||||
JA().foo(JA().name)
|
||||
packageFun(localVal)
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
KA().foo(KA().name)
|
||||
JA().foo(JA().name)
|
||||
}
|
||||
|
||||
bar()
|
||||
}
|
||||
|
||||
KA().foo(KA().name)
|
||||
JA().foo(JA().name)
|
||||
localFun(packageVal)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class JA {
|
||||
public String name = "A";
|
||||
|
||||
public JA() {
|
||||
|
||||
}
|
||||
|
||||
public String foo(String s) {
|
||||
System.out.println(s);
|
||||
return "A " + s;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
<node text="KClient" base="true">
|
||||
<node text="KClientBase"/>
|
||||
<node text="KA(4 usages)"/>
|
||||
<node text="KA.name(2 usages)"/>
|
||||
<node text="KA.foo(String)(2 usages)"/>
|
||||
<node text="KA.name(2 usages)"/>
|
||||
<node text="JA.JA()(4 usages)"/>
|
||||
<node text="JA.foo(String)(2 usages)">
|
||||
<node text="PrintStream.println(String) (java.io)"/>
|
||||
</node>
|
||||
<node text="KClient.localFun(String)">
|
||||
<node text="packageFun(String)"/>
|
||||
</node>
|
||||
<node text="packageVal"/>
|
||||
<node text="packageFun(String)(2 usages)"/>
|
||||
</node>
|
||||
|
||||
+4
-1
@@ -1,7 +1,10 @@
|
||||
<node text="KClient.bar" base="true">
|
||||
<node text="KClient.localFun(String)(2 usages)">
|
||||
<node text="packageFun(String)"/>
|
||||
</node>
|
||||
<node text="KA(4 usages)"/>
|
||||
<node text="KA.name(2 usages)"/>
|
||||
<node text="KA.foo(String)(2 usages)"/>
|
||||
<node text="KA.name(2 usages)"/>
|
||||
<node text="JA.JA()(4 usages)"/>
|
||||
<node text="JA.foo(String)(2 usages)">
|
||||
<node text="PrintStream.println(String) (java.io)"/>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<node text="KA" base="true">
|
||||
<node text="JA"/>
|
||||
<node text="JA.newKA()"/>
|
||||
<node text="KClient"/>
|
||||
<node text="KClient"/>
|
||||
<node text="KClient.bar"/>
|
||||
<node text="KClient.bar()(2 usages)"/>
|
||||
<node text="KClientObj"/>
|
||||
<node text="main0.kt"/>
|
||||
<node text="bar.localFun()"/>
|
||||
<node text="packageFun(String)"/>
|
||||
<node text="KClient"/>
|
||||
<node text="KClient.bar()"/>
|
||||
<node text="main0.kt"/>
|
||||
<node text="JA.newKA()"/>
|
||||
<node text="JA"/>
|
||||
<node text="KClient.bar"/>
|
||||
<node text="KClient"/>
|
||||
</node>
|
||||
|
||||
+8
-7
@@ -1,11 +1,12 @@
|
||||
<node text="KA.foo(String)" base="true">
|
||||
<node text="JA"/>
|
||||
<node text="JA.foo()"/>
|
||||
<node text="KClient"/>
|
||||
<node text="KClient"/>
|
||||
<node text="KClient.bar"/>
|
||||
<node text="KClient.bar()(2 usages)"/>
|
||||
<node text="KClientObj"/>
|
||||
<node text="main0.kt"/>
|
||||
<node text="bar.localFun()"/>
|
||||
<node text="packageFun(String)"/>
|
||||
<node text="KClientObj"/>
|
||||
<node text="KClient.bar"/>
|
||||
<node text="main0.kt"/>
|
||||
<node text="JA.foo()"/>
|
||||
<node text="JA"/>
|
||||
<node text="KClient"/>
|
||||
<node text="KClient.bar()"/>
|
||||
</node>
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<node text="client.KA ()" base="true">
|
||||
<node text="bar.localFun() ()"/>
|
||||
<node text="client.bar() ()"/>
|
||||
<node text="client.KClientObj ()"/>
|
||||
<node text="KClient.client() ()"/>
|
||||
</node>
|
||||
@@ -0,0 +1,20 @@
|
||||
class KClient {
|
||||
fun client() {
|
||||
class <caret>KA {
|
||||
val name = "A"
|
||||
fun foo(s: String): String = "A: $s"
|
||||
}
|
||||
|
||||
val bar: String = KA().name
|
||||
|
||||
fun bar() {
|
||||
fun localFun() = KA()
|
||||
|
||||
KA()
|
||||
}
|
||||
|
||||
object KClientObj {
|
||||
val a = KA()
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<node text="client.foo(String) ()" base="true">
|
||||
<node text="client.bar() ()"/>
|
||||
<node text="bar.localFun() ()"/>
|
||||
<node text="client.KClientObj ()"/>
|
||||
<node text="KClient.client() ()"/>
|
||||
</node>
|
||||
@@ -0,0 +1,17 @@
|
||||
class KClient {
|
||||
fun client() {
|
||||
fun <caret>foo(s: String): String = ""
|
||||
|
||||
val bar: String = foo("")
|
||||
|
||||
fun bar() {
|
||||
fun localFun() = foo("")
|
||||
|
||||
foo("")
|
||||
}
|
||||
|
||||
object KClientObj {
|
||||
val a = foo("")
|
||||
}
|
||||
}
|
||||
}
|
||||
+7
-6
@@ -1,11 +1,12 @@
|
||||
<node text="KA.name" base="true">
|
||||
<node text="JA"/>
|
||||
<node text="JA.getName()"/>
|
||||
<node text="KClient(2 usages)"/>
|
||||
<node text="KClient(2 usages)"/>
|
||||
<node text="KClient.bar()(4 usages)"/>
|
||||
<node text="packageFun(String)(2 usages)"/>
|
||||
<node text="KClient.bar()(2 usages)"/>
|
||||
<node text="KClient.bar(4 usages)"/>
|
||||
<node text="bar.localFun()(2 usages)"/>
|
||||
<node text="JA.getName()"/>
|
||||
<node text="JA"/>
|
||||
<node text="KClient(2 usages)"/>
|
||||
<node text="KClient(2 usages)"/>
|
||||
<node text="KClientObj(4 usages)"/>
|
||||
<node text="main0.kt(2 usages)"/>
|
||||
<node text="packageFun(String)(2 usages)"/>
|
||||
</node>
|
||||
|
||||
Reference in New Issue
Block a user