dell116 dell116 - 12 days ago 4
Java Question

Keyboard shortcut to preview method code in a popup

What is the keyboard shortcut to preview a method's code as a pop-up?

I'm looking to preview the code inside of a given method much like one would preview the javadoc by placing the caret on the method and pressing F1.

I used to know this shortcut, but my memory is failing me harder than the various search algorithms and mom isn't home right now. ;-)

Answer

I think you need the shortcut keys to Quick Definition. So jos76's idea is correct. But we have to map it to your keymap.

As I found from Settings -> Keymap, these are the keyboard shortcuts for Mac OS 10.5+. You may change as your convenience.

enter image description here

And you can also try

  • Place cursor on the method.
  • From Main menu View -> Quick Definition(2nd row under view, You can also see shortcut key combinations appearing there). So there would be a pop up appearing with method implementation view as you suggested :))

So it looks like this.

enter image description here

Comments