I think 5 years has passed since Lambda has been released for Java.
public static void main(String[] args) {
go();
}
private static void go() {
Set<String> set = new HashSet<>();
set.stream().forEach((s) -> {
inner(s);
});
}
private static void inner(String s) {
inner1(s);
}
private static void inner1(String s) {
}
When I press CTRL-ALT-H - (open call hierarchy) on inner1
method, I expect to see a whole stack trace from in inner1
to main
method. Instead, my staktrace is trimmed on inner
method. I've just downloaded the newest Eclipse, I think it 2018-12, previously I was using Mars.
Intellij can show me the expected call-hierarchy, and I don't really understand why Eclipse still can't do it. Not sure if anyone else is using Eclipse in 2019, but maybe you can advise a plugin or something.
Switching to Intellij is not an option, I tried couple of times, but the habit is hard to overcome.
UPDATE
There is similar - SO question
At run time, evaluation of a lambda expression is similar to evaluation of a class instance creation expression, insofar as normal completion produces a reference to an object. Evaluation of a lambda expression is distinct from execution of the lambda body.
and
Just note, that for lambdas implementing library types like Consumer, the number of callers into accept(T) in a workspace may easily become unmanageable, similar to any call hierarchy through, e.g, Runnable.run() - but that doesn't question the general usefulness of call hierarchies through lambdas.
I don't really care about lambda internals, somehow other IDE is able to show expected stacktrace