Is there a keyboard shortcut in Xcode for jumping to the implementation of a method? I am aware of the fact the command+click will jump to definition, but I want to jump to the implementation method, not the definition. Also, I want to use keyboard shortcuts, with no involvement of the mouse (including clicks).
Keyboard shortcut for 'jump to definition' in XCode 4.5: Control-Command-J
Another useful shortcut after jumping to definition is Control-Command-Left (which takes you back).
Command + click will work, If you want "keyboard only" shortcut you need to map it under Preferences->key bindings->Edit->Find->jump to definition
Hold Command and click on the method you want to see it's implementation.
In eclipse, when mouse pointer moves over on method help hint shows. I want to show method help on eclipse like Visual Studio. When I pressed Ctrl+Shift+Space when cursor inside method parenthesis, I want to see method help as hint. How can I do it? Which shortcut's setting should I change?
PS: Netbeans IDE completley works as I wanted, but I want to do same in eclipse.
You can use the JavaDoc View (View -> Show View -> JavaDoc / Alt+Shift+Q,J) to show the JavaDoc of the method your text cursor is inside. Or place the mouse cursor over the method name and the JavaDoc will be presented as tooltip.
F2 (Show Tooltip decription) will give you the JavaDoc as mentioned in your question update. Ctrl-Shift-Space gives you Context Information (e.g. list of all possible methods) and you probably won't lose this due to new declaration.
In General > Editors > Keys look the command should be "Show tooltip description", which is binded to F2 as default (same effect as the hover tooltip)
File -> Settings -> Editor -> General
In the other Section you will find - "Show quick doc on mouse move"
Just mark the checkbox to help in 500ms(Time delay is changable)
I'm looking for the equivalent to CTRL-Q of IntelliJ, that shows you the documentation for the current code.
I've never used IntelliJ, so not sure it's an exact equivalent, but when I press F2 in Eclipse, I have a popup that displays some help.
For example, here, I pressed F2 as my pointer was on Log :
(source: pascal-martin.fr)
To see the attached Javadoc of a class, you can open the Javadoc view in another panel by pressing Alt + Shift + Q, J (as described in this answer). Alternatively, select "Window -> Show View -> Other -> Java -> Javadoc". The view will be updated with the selection in the code editor and will show the Javadoc for the method, class or even field at the cursor position.
I don't know if there is anything similar for other languages though.
You know how in Eclipse, pressing F3 over a method will take you to its declaration? Well I have a method that is part of an interface; clicking F3 over this naturally takes me to the declaring interface.
Obviously there is an object implementing this interface and this is where the method is actually implemented. I want, when I press F3, to jump to the implementation, not the interface declaration. I know that the implementation may not be known at compile-time, so is there a way for Eclipse to show me all the classes implementing the interface so that I can select which implemented method to view? Right now when this happens I am just manually searching for this to find the implemented method.
Here's what I do:
In the interface, move the cursor to the method name. Press F4. => Type Hierarchy view appears
In the lower part of the view, the method should already be selected. In its toolbar, click "Lock view and show members in hierarchy" (should be the leftmost toolbar icon).
In the upper part of the view, you can browse through all implementations of the method.
The procedure isn't very quick, but it gives you a good overview.
Well... well... I hope you use Eclipse Helios, because what you asked is available on Helios.
Put your text cursor again on the method and click menu Navigate → Open Implementation. Now if you have more than one implementation of the method, you will get choice to pick which implementation to open.
By defining a keybinding on Preferences → General → Keys you can even use the feature easier, but before you do that, see if this shortcut is fast enough for you.
Press Ctrl + click and hold. Now move your mouse over the same method. Tadam… you will get choice.
If you pick Open Implementation you’ll get the same choice as before.
Press Ctrl + T on the method name (rather than F3). This gives the type hierarchy as a pop-up so is slightly faster than using F4 and the type hierarchy view.
Also, when done on a method, subtypes that don't implement/override the method will be greyed out, and when you double click on a class in the list it will take you straight to the method in that class.
There's a big productivity boost if you add an Alt + F3 key binding to the Open Implementation feature, and just use F3 to go to interfaces, and Alt + F3 to go to implementations.
Highlight an interface and use Ctrl+T to open "Quick Type Hierarchy".
ctrl + mouse hover + click "Open Implementation"
On ctrl + hover, you should see the following menu:
Tested on Eclipse Mars.2 (4.5.2)
Here is what I do:
I press command (on Mac, probably control on PC) and then hover over the method or class. When you do this a popup window will appear with the choices "Open Declaration", "Open Implementation", "Open Return Type". You can then click on what you want and Eclipse brings you right there. I believe this works for version 3.6 and up.
It is just as quick as IntelliJ I think.
See In eclipse, ctrl-click goes to the declaration of the method I clicked. For interfaces with one implementation, how can I just directly to that implementation? for some alternative solutions.
Anyway, I think you might be looking for something like this:
http://eclipse-tools.sourceforge.net/implementors/
I always use this implementors plugin to find all the implementation of an Interface
http://eclipse-tools.sourceforge.net/updates/
it's my favorite and the best
If you are really looking to speed your code navigation, you might want to take a look at nWire for Java. It is a code exploration plugin for Eclipse. You can instantly see all the related artifacts. So, in that case, you will focus on the method call and instantly see all possible implementations, declarations, invocations, etc.
The best solution would be Ctrl+Alt+I.
I am curious to know if eclipse has the feature of showing all the list of classes that are extending the current class. This feature is available in INTELLIJ..any ideas.
Others have mentioned the Type Hierarchy View. There's also the Quick Type Hierarchy: Ctrl + T
The Type Hierarchy View.
The type hierarchy tree shows supertypes, subtypes or both of a given type depending on the selection made in the toolbar.
"Show the Subtype Hierarchy": This command displays the subtypes of the selected class and/or all implementors of the interface in the Hierarchy view. The tree starts at the selected type and displays the result of traversing down the hierarchy
It's called Type Hierarchy. Default keyboard shortcut key is F4.
There's couple of ways to do this.
1) Open the code, click it's class declaration and press F4 or Right click and select "Open Type Hierarchy F4" menu option.
2) Right Click on the source File, and select "Open Type Hierarchy F4"
PS. For more Eclipse Shortcut key, press Ctrl+Shift+L or select "Help"->"Key Assist.... Ctrl+Shift+L" menu option.
I believe you're looking for Type Hierarchy