Community
Participate
Working Groups
Created attachment 253874 [details] the NG capture Here is my sample java code: ------------------------------------ public class Test { public static void main(String[] args) { methodDepth0( ()-> methodDepth1( ()-> methodDepth2() ) ); } static Object methodDepth2() { return null; } interface MyIF { void call(); } static void methodDepth0(MyIF myIf){ myIf.call(); } interface MyIF2 { void call(); } static void methodDepth1(MyIF2 myIf2){ myIf2.call(); } } ------------------------------------ When I open call hierarchy of method methodDepth2() from Eclipse(4.4), open call hierarchy stop searching next caller: open call hierarchy stop searching next caller method What I expect is like opening call hierarchy of method methodDepth1() which show until the main method. * Here is the same discussion on StackOverflow with more captures: http://stackoverflow.com/questions/30254458/eclipse-open-call-hierarchy-stop-searching-in-lambda-chain
Thanks for the report. My initial intuition was, that JDT/UI may create a bogus search for the nested element, but it could of course also be JDT/Core that fails to properly answer this search.
The problem is in JDT Core. Debugging hints: - it's much easier to investigate if you rename the methods to unique names, e.g. call1 and call2 - in the Call Hierarchy view, you can right-click a node and choose Refresh The missing result for references to the inner lambda can be seen in PatternLocator#resolveLevelForType(char[], TypeBinding): In this case, the qualifiedPattern is "Test.*.*", which doesn't match "Test.MyIF2". I have a fix candidate in SearchPattern#enclosingTypeNames(IType).
New Gerrit change created: https://git.eclipse.org/r/49247
Hi, with this Gerrit: https://git.eclipse.org/r/49247 I can see 2 problems: 1) Same Functional Interfaces method names were showed in call hierarchy. 2) Not work when Functional Interfaces were defined in other package * Here is the eclipse captures for explanation: http://i.stack.imgur.com/xGm91.png
Bulk move out of 4.8
Eclipse is dead:(
(In reply to AndyFang from comment #6) > Eclipse is dead:( Sorry this bug was left unattended. The assignee had meanwhile left the team.
Tentatively putting this on the radar for 4.12 since Markus did provide a gerrit. This just fell between the cracks when Markus left the team.
Not as easy as I'd hoped, since we don't yet have a JUnit.
Any progress here? This is really a pressing issue for us with functional styles becoming more prevalent in current Java code, rendering the Eclipse call hierarchy increasingly unreliable.
Created attachment 281178 [details] workaround
(In reply to Vikas Chandra from comment #11) > Created attachment 281178 [details] > workaround Yes, quite likely we need some traversal to parent like this. Did you try https://git.eclipse.org/r/49247 ? Can you argue which is better?
Created attachment 281206 [details] examples
(In reply to Stephan Herrmann from comment #12) > (In reply to Vikas Chandra from comment #11) > > Created attachment 281178 [details] > > workaround > > Yes, quite likely we need some traversal to parent like this. > > Did you try https://git.eclipse.org/r/49247 ? Can you argue which is better? This gerrit ( if we move this to current code base) doesn't work for this case here https://stackoverflow.com/questions/55087055/eclipse-call-hierarchy-lambda Also it has couple of issues mentioned earlier on this bug ( didnt try them yet) Even this is a "workaround" as of now. I am investigating further. If I have a reviewable patch, I will post as a gerrit.
I think it's an interesting fact that both (this example and the one from https://stackoverflow.com/questions/55087055/eclipse-call-hierarchy-lambda) work correctly when I convert the lambda into an anonymous class. Is it possible to handle lambdas in call hierarchy similar to anonymous types?
Any progress on this? In async heavy code this bug is causing so much trouble and renders the call hierarchy feature unusable.
Fixed via 533524. *** This bug has been marked as a duplicate of bug 533524 ***