Description
Maybe this is related to the improvements you made for 3.4.0 and you cite in the release notes (paragraph "Call Hierarchy and Find Occurrences"), but I feel like there's a problem with Call Hierarchy invoked on class properties on recent builds (maybe it has always worked like this? I can't check).
Consider the same example code as in #935: if I invoke Ctrl+Alt+H on MyBean.foo
I don't get any results, while I would expect to find the access at Test53.doSomething()
, which is indeed an implicit setter call.
I don't know the internals, but it seems like invoking Call Hierarchy on a field causes that view to be set in "property access" mode rather than in "method call" mode. And, from this point of view, what I see for the example in #935 is correct (i.e.: there's no direct field access). However with Groovy, since we indeed have implicit getter and setter methods generated for that property, an actual "method call" reference exists for MyBean.foo
and it's the one I would expect to find in the Call Hierarchy.
Indeed, I would have assumed "Call Hierarchy" just shows "method Calls": in fact when I read the 3.4.0 release notes I did not agree with the change you mention about implicit-this references, because for that case Groovy uses direct field accesses, not method calls. However I just realised that "Call Hierarchy" actually shows field accesses when invoked on class fields, so you are right and I was wrong... Nevertheless, I feel there's something unexpected here.
What do you think? Is there a way to make Call Hierarchy work in a "mixed" mode, showing both field accesses and implicit method calls for class properties?