Community
Participate
Working Groups
HEAD. The JavaElementImplementationHyperlink does not work for method declarations: it always opens the Quick Hierarchy.
Created attachment 127793 [details] Patch with the fix. Calculates the reciever type for method declarations.
The patch works fine for the declaration of an abstract method, but I find it strange that it still opens the quick hierarchy when I try to open an overriding implementation of a non-abstract method. E.g. on declaration A#method(), it's obvious that A#method() must be an implementation, so why don't we just jump to B#method()? public class Try { abstract class A { // public abstract void method(); public void method() {} } public static class B extends A { public void method() {} void xx() { super.method(); } } } If you agree to not count the click target itself as an implementation, then the same exclusion should probably be made for super.method(), where it's also clear that the click target would be an implementation itself, but the user probably wants to jump to a sub-implementation.
>E.g. on declaration A#method(), it's obvious that A#method() must be an >implementation, so why don't we just jump to B#method()? This would be strange. Either we do a Ctrl+T or nothing. I prefer Ctrl+T.
Thanks, released to HEAD. Filed bug 267682 for the super invocation, since that's different from the declaration case.