navigate to where variable is instantiated

Is there a quick keyboard combo to navigate to where a variable/field is instantiated (or first instantiated) with a value?

2 comments
Comment actions Permalink

Hi Christian,

Navigate | Declaration  (Ctrl+Click) ?

0
Comment actions Permalink

Ctrl+B is the default keyboard shortcut for navigating to where a variable is declared (or CTRL+Click as Andriy mentions). Also note that you can merely view (or Inspect) the declaration in a popup via CTRL+SHIFT+I. But to my knowledge, there is no shortcut for taking you to where a variable is instantiated in the event that it is different from where it is declared. The closest thing would be to use CTRL+ALT+F7 (Edit > Find > Show Usages). That will open a popup with all the usages in the file. Writes (i.e. assignments) will have a small red icon. Reads will have a small green icon. (You can filter the list to show reads only or writes only) Just find the red icon for the instantiation. Then use the arrow keys to select, and press enter and you will navigate to that location. If instead of the popup, you prefer the results in the "Find" tool window, you can use ALT+F7 (Edit > Find > Find Usages).

0

Please sign in to leave a comment.