IntelliJ IDEA jump from interface to implementing

2019-03-07 23:00发布

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

5条回答
干净又极端
2楼-- · 2019-03-07 23:16

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

查看更多
贼婆χ
3楼-- · 2019-03-07 23:22

Yes.... in mac, it is Apple + ALT + 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 PC, it is CTRL + ALT + B: JetBrains navigation documentation.

查看更多
▲ chillily
4楼-- · 2019-03-07 23:22

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

查看更多
Rolldiameter
5楼-- · 2019-03-07 23:23

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.

查看更多
做个烂人
6楼-- · 2019-03-07 23:30

If you did Alt + Mouse click on method method you want to navigate to You will be navigated to interface (Declaration)

but If you did Alt + Ctrl + Mouse click on method method you want to navigate to You will be navigated to class (Implementation)

查看更多
登录 后发表回答