195

Is there some shortcut that would allow me after creating method in an interface, select and jump to implementing class of that interface?

cellepo
  • 4,001
  • 2
  • 38
  • 57
MatBanik
  • 26,356
  • 39
  • 116
  • 178
  • 6
    In most cases there is an arrow on the left of the method/interface to show all the implementing/overriding classes/methods. – Peter Lawrey Feb 19 '11 at 16:52
  • 2
    Here is a [list/cheatsheet](http://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard.pdf) of all the default key options. The CTRL + ALT + B was mentioned below. – jmq Feb 21 '11 at 05:32

7 Answers7

309

Yes, On mac, it is Command + Option + B. You will need to move your cursor to the interface name before invoking the shortcut. I'm not sure what's the shortcut in PC, for if you right click the interface name -> "Go To" -> "Implementations"... the shortcut is listed there.

In Windows, it is CTRL + ALT + B: JetBrains navigation documentation.

Lavish
  • 642
  • 7
  • 12
limc
  • 39,366
  • 20
  • 100
  • 145
  • 2
    In my case go to implementation is typically more often what I want to see, so I swapped Ctrl-B (`Navigate`->`Implementation(s)`) and Ctrl-Alt-B (`Navigate`->`Declaration`) – jakub.g Jun 16 '17 at 12:34
  • 1
    In my case: Ctrl-Option-B – sNICkerssss Oct 31 '19 at 12:18
  • 2
    Just in case someone forgets how to go from implementation to interface, it's Ctrl + U – ovichiro Nov 20 '20 at 15:38
  • Just for a side note, it is working on Ubuntu as well. Ctrl + Alt + B or Ctrl + Alt + Left Mouse Click will take you to the implementation. – vchar Jul 19 '22 at 23:30
  • Wouldn't it make more sense for middle-click to jump to the actual implementation method, and if we want to view the interface use a keyboard shortcut? Most of the time wouldn't we want to view the implementation version of the method anyways rather than just the interface? – Collin Apr 12 '23 at 15:23
82

In addition to Ctrl + Alt + B mentioned above, you can also use the mouse: Ctrl + Alt + LeftMouseButton to jump directly to implementations.

Boris Pavlović
  • 63,078
  • 28
  • 122
  • 148
Pakka Pakka
  • 2,046
  • 15
  • 9
21

If you did Command (Mac) / Ctrl (Windows) + Mouse click on method you want to navigate to You will be navigated to interface (Declaration)

but If you did Alt + Ctrl + Mouse click on method you want to navigate to You will be navigated to class (Implementation)    you can use also Alt + Ctrl + b if you dont want leave keybourd

Arayan Singh
  • 3,192
  • 3
  • 16
  • 35
Basheer AL-MOMANI
  • 14,473
  • 9
  • 96
  • 92
8

On OSX you can jump to the implementation with your mouse by using Alt + Command + Mouse. (comparable with Ctrl + mouse in Eclipse)

userM1433372
  • 5,345
  • 35
  • 38
  • How to change what? What do you mean? Do you want to change the shortcut? In that case see the `Preferences` -> `Keymap` setting. – userM1433372 Dec 02 '14 at 08:51
5

If you do not know the shortcut for a specific IntelliJ Command, press Ctrl + Alt + A (or Apple + Alt + A on Mac). That will open a pop-up that allows you to search for all shortcuts. Alternatively, you can access it using the Find Action... from the Help menu.

Moreover, there is the Default Keymap Reference also available from the Help menu (that among other shortcuts contains the shortcut to the Find Action... described above).

Lastly, you can configure your own keyboard shortcuts (and see the current settings) in the Preferences -> Keymap setting.

matsev
  • 32,104
  • 16
  • 121
  • 156
  • @cellepo Have you tried? You can also find the shortcut to the `Find Action...` in the `Default Keymap Reference`. – matsev Jul 14 '16 at 07:30
  • 2
    Looked in the help menu... On Intellij 2016.1.3 on Mac, the command that is listed there and works for me instead is Shift+Apple+A. – cellepo Jul 14 '16 at 16:44
  • 2
    For last 4 years this is ctrl + shift + A, probably it was alt before that. – Vipin Jan 25 '19 at 06:36
5

On MacOs: cmd + (option) + B

Maksim Turaev
  • 4,115
  • 1
  • 29
  • 42
4

To go to the declaration of a symbol, press Ctrl + B. For example, pressing this on a variable will take the cursor to the variable declaration.

Using it on a class name will open a new tab and take you to the class file. With ⌥ + ⌘ + B on MacOS and Ctrl+Alt+B on [Windows/Linux], you can navigate to an implementation too.

Monu Rohilla
  • 1,311
  • 5
  • 20