Community
Participate
Working Groups
Build Identifier: 20100617-1415 The Navigate->Open Implementation call complains ("The operation is not applicable to the current selection. Select an overridable method") about a method that is private. This is rather annoying. Instead the call should fall back to open the method directly. That way a user does not have to think about if a given method is an interfaced method or a direct method. Only when you really want to navigate to the Interface you will have to think about Interfaces and Implementations. This is annoying, because if you navigate code you don't know intimately you won't know before hand if the method is overridable and so have to do multiple clicks before you get where you intended to go. This call is about fast and quick navigation and such de-tours are the opposite of the goal. Reproducible: Always Steps to Reproduce: 1. Select the call of a private method in your Java Editor 2. Select Navigate-->Open Implementation 3.
I completely agree. This is just an oversight. Also nee to fix (Ctrl+click > Open Implementation). Test Case: public class Test { void doit() { priv(); // does not work pack(); // works publi();// works } private void priv() {} void pack() {} public void publi() {} }
Open Implementation should also work for static methods. I would even let it call Open Declaration if there's no other implementation. That way, Open Implementation could be used as a replacement for people who always want to jump to the implementation directly. Missing functionality could then be added gradually (e.g. bug 294769).
Created attachment 176322 [details] Fix The check for overridable method is removed now for both open implementation hyperlink and command and it now works on any method. In case of non-overridable methods it directly opens the method declaration using open action.
The patch looks good except that you inlined the canBeOverriddenMethod(...) code into openImplementations(...). We should keep that code in a separate method (in JavaElementImplementationHyperlink).
(In reply to comment #4) > The patch looks good except that you inlined the canBeOverriddenMethod(...) > code into openImplementations(...). We should keep that code in a separate > method (in JavaElementImplementationHyperlink). Extracted the method and committed to HEAD.
Verified in I20100914-0100 Cocoa.