Search code examples
intellij-ideahotkeys

Generate public static final int for intellij


Is there a quick way generate a bunch of constants for Intellij. Like maybe I type

VARIABLE_A = 10;
VARIABLE_B = 20;
...

And the use some shortcut in add public static final int in front of all of them?


Solution

  • You can use the live templates:

    psfi

    Type psfi and press Tab to expand it.

    With the help of the multiple cursors you can do it for several lines at a time.