Posts Tagged ‘tips and tricks’

IntelliJ IDEA PSI Viewer

Thursday, November 19th, 2009

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

Quick Lists to Group Your Favorite Actions

Thursday, October 1st, 2009

There’s a lot of useful actions in IntelliJ IDEA that don’t have shortcuts for many different reasons: they’re not used too often or there’s simply no more convenient key combinations left.

For example, I often want to get access to VCS actions like Compare with latest repository version or Revert current file or even submit a single file with a quick NPE fix without opening a menu or going to Changes view.

So how can I call any of these actions with a single shortcut? That’s really easy: I just need to define my own Quick List and map it to a shortcut (Control-X in my case). After I’ve done that, every time I press Control-X I will get a pop-up like this:

Quick List in action

Quick List in action

Now I can press 5 to quickly commit the current file or 2 to revert all my changes. OK, now let’s see how to create a Quick List and assign it a shortcut.

(more…)