Customize "Generate code" popup

Is there any possibility to customize the Code => Generate popup? I would like for example to add "main", which would add to my current class a public static void main(String[] args) ...

2 comments
Comment actions Permalink

In general, yes, you can customize it - simply add an action to the action group with the ID of "GenerateGroup" and implement any logic that you need. For this specific case, there's an existing feature in IntelliJ IDEA that generates a "main" method for you via a live template. Just type "psvm" and press Tab.

0
Comment actions Permalink

Thanks! And thanks for the tip about the live template!

0

Please sign in to leave a comment.