Details:
If I want to navigate to the declaration of a method I can choose one of the following approaches:
If I want to navigate to the implementation of a method I can choose one of the following approaches:
In Eclipse, if I press Ctrl and the mouse is over a method, a popup appears and I can choose what to do (go to Implementation/Declaration). If I press "left click" ( Ctrl is still pressed ) the first option will be chosen.
How can I achieve the same / a similar behavior in IntelliJ IDEA ?
To navigate to the implementation, press Ctrl+Alt+B .
Choose Navigate | Go to Declaration in the main menu, press F12 , or click the symbol while holding the Ctrl key.
Pressing ⌘/ (MacOS) or Ctrl+/ (Windows/Linux) anywhere on a line will comment out this line of code with a line comment. Pressing the same shortcut will un-comment the line if it is already commented. If we select a whole code block, we can use ⌥⌘/ (MacOS) or Shift+Ctrl+/ (Windows/Linux) to add a block comment.
Switch between projects If you have several opened projects at the same time, you can switch between them using the following options: Switch to the next project window: Ctrl+Alt+] (Window | Next Project Window) Switch to the previous project window: Ctrl+Alt+[ (Window | Previous Project Window)
There is not a built-in option for this. You would need to configure a custom quick list to do such.
Note that in the quick list that opens, you will have numbers next to each action for quick selection.
Edit: Adding a screenshot of final quick list for additional clarity
I was looking for the same thing, because I was also used to it in Eclipse. Nevertheless, in 99% of the cases, I went to the implementation. If that's your case too, you may consider changing the Ctrl+click shortcut in IntelliJ:
I know this answer comes like 2 years too late, but hopefully it may help others?
EDIT : This shortcut also applies when you want to navigate to the declaration of a super class. Therefore, my "99%" first declared above drops a bit. I've added the ctrl + right-click as a shortcut to go the declaration (which conflicts with no other shortcut - but you need a mouse with at least two buttons...).
If you select the method and hit Ctrl+T
it will show the implementations of the methods. You can click on the options to navigate to that implemented method. Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With