PhpStorm 8.0.2 Web Help

Navigating to Declaration or Type Declaration of a Symbol

While editing your source code, you might need to navigate to the location where a particular named code reference (a symbol) has been first declared. Go To | Declaration command enables you to navigate back to the initial declaration of a symbol from any place in the source code, even if it is from inside another class, or comment.

To navigate to the declaration of a symbol

  1. Place the caret at the desired symbol in the editor.
  2. Do one of the following:
    • On the main menu, choose Navigate | Declaration .
    • Press Ctrl+B.
    • Click the middle mouse button.
    • Keeping Ctrl pressed, point to the symbol, and click, when it turns to a hyperlink. You can also see declaration at the tooltip while keeping Ctrl pressed.
      web_ide_viewDeclaration.png

To navigate to the type declaration of a symbol

  1. Place the caret at the desired symbol in the editor.
  2. Do one of the following:
    • On the main menu, choose Navigate | Type Declaration .
    • Press Ctrl+Shift+B.
    • Press the Ctrl+Shift keys and hover your mouse pointer over the symbol. When the symbol turns to a hyperlink, click it without releasing Ctrl+Shift keys. The type declaration of the symbol opens in the editor. You can also see the declaration at the tooltip while keeping Ctrl+Shift pressed.
      web_ide_viewTypeDeclaration.png

See Also

Last modified: 10 December 2014