IntelliJ IDEA PSI Viewer

If you’re an IntelliJ IDEA plugin developer, you’re surely going to enjoy IntelliJ IDEA PSI Viewer (Tools -> View PSI Structure), which displays internal structure of various files, as they’re interpreted by IntelliJ IDEA. If you’re implementing a new language support, or trying to add some cool new features to what’s already supported — this viewer is what you’re gonna need a lot.

As you see, PSI Viewer is made up of of tree parts:

  • An editor with file content
  • PSI structure view with parent-child tree of its elements
  • Area that displays references of element selected in PSI structure view.

Note that references marked as red resolve to null.

Available since build 92.35

This entry was posted in Plugin Development. Bookmark the permalink.

7 Responses to IntelliJ IDEA PSI Viewer

  1. Squee-D says:

    Absolutely the most useful thing ever :)
    What would also be nice is a “Getting Started With Psi” doc explaining how to best navigate files using Psi (and later how to construct/save etc).

    Plugins are quite easy in IDEA, considering this is my first foray into JAVA (Flex dev here). However because you’re likely to see more and more non-Java devs wanting to augment the app, I think helping us a little with the common patterns IDEA uses would go a long way to building community support.

    Anyway, fantastic feature, great IDE.

  2. Hi,

    Also, it would be nice to have a document, which maps how to use PSI viewer to write a script in search for Structural search would be most useful.

    Raja Nagendra Kumar

  3. Ryan says:

    What is PSI stands for anyway? -Thanks!

  4. PhpStorm? says:

    While it loads in PhpStorm and is visible in plugins, I don’t get any new action (while I get them in IDEA). Would it be possible to get it? :)

  5. Victor says:

    Should be stated that “Note that PSI viewer command is only available when there is at least one plugin module in project.”

  6. Selters says:

    There is still no mention of what PSI actually stands for anywhere – every jetbrains page just assume that everyone knows what PSI is anyway – no need to define it – not even once.

    What is PSI??

Leave a Reply

Your email address will not be published. Required fields are marked *