Reputation: 8536
In IntilliJ Idea/Goland, Is there any shortcut that would allow me to select a method inside interface definition and jump to implementation of that method or give me list of implementations.
I am looking for something like what I get when Cmd+Click and get usage of the methods/function.
But instead of usage of method I need short cut for implementation. Currently I have to copy the method name and search in the project, which does not feels like most efficient way.
I am using intelliJ Idea (Community Edition) 2016.2.2 EAP with Go plugin Version: 0.12.1724.
I have tried Cmd+Alt+b but always getting No implementation found
Upvotes: 9
Views: 6121
Reputation: 11
For GoLand you can follow the available keyboard shortcuts which is provided in the GoLand official documentation. It is possible to jump to the method implementations using Ctrl + Alt + B
(windows/linux).
Same command also works for Intellij IDEA. You can find all available keyboard shortcuts here.
Upvotes: 1
Reputation: 135
it depends on the keymap settings, if you use Visual Studio keymap like me, the shortcuts will be a bit different: Options+End
on Mac does the thing (GoLand 2022.2). IntelliJ keymap is Options+Cmd+B
.
You can find your shortcut by searching action Go to implementation
, see:
Upvotes: 1
Reputation: 8536
This support has been added in Goland (or with go plugin in IntelliJ ultimate) now. Shortcut for the same is Alt+Cmd+B
(Option+Cmd+B
for Mac).
Upvotes: 20
Reputation: 176372
No, such shortcut doesn't exist.
You can use "Find Usage" to determine where the specific interface method is used, but if you want to see all the concrete implementations the current way is to search the entire project for the method name.
Upvotes: 1