简体   繁体   中英

Is there a shortcut to implement interface methods in intellij?

When I type something along the line of this:

class Foo implements Bar{}

intellij idea highlights that line and then I have to hover over it with the mouse pointer until a red lightbulb pops up and click "Implement methods". Is there a keyboard shortcut for this?

Ctrl + I / Cmd + I(Windows / Mac)是默认IntelliJ键盘映射中“实施方法”的快捷方式。

It also depends on which Keymap you are using. For instance, I am using Jetbrains Rider on MacOS and the shortcut for implementing missing members is "Cmd+Shift+I".

To be able to learn your shortcut key, go to Preferences (Cmd + ',') and select Keymap. You can just type 'implementation' to the search bar on the right, or Navigate to the Main menu > Code > Implement Methods. You will see the shortcut defined according to your settings.

Shortcut for Go to implementation(s) :
- For Mac: Cmd + Option + B .
- For Windows: Ctrl + Alt + B
Reference: https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM