Imagine you have multiple wildcard imports in a source file. Or a class/interface that extends multiple interfaces of a deep hierarchy. You've just encountered a symbol and would like to know which expression in the file is responsible for bringing it into scope. Is there any way to highlight such expression in IntelliJ IDEA?
For example,
import a.b.c.* /* doStuff comes from here */
import x.y.z.*
class MyClass
extends BaseClass /* doOtherStuff comes from here */ {
MyClass() {
doStuff() // when the cursor is here, highlight 'import a.b.c.*'
doOtherStuff() // when the cursor here, highlight the 'extends BaseClass'
}
}
PS: I know multiple ad-hoc ways of figuring this out, but am looking for a shortcut, "single click" solution.