V
V
Vasily Vasilyev2017-08-31 14:48:30
Java
Vasily Vasilyev, 2017-08-31 14:48:30

IDEA. Extension for generating patterns.?

I study patterns. There was an idea - what if the blanks of these patterns are washed down in Postfix Correction? (When you enter fori + tab in the idea - and it unfolds into a for() loop , where you only need to set the variable name, only here - set the names of variables, classes, interfaces etc).
Perhaps there is already such a solution ready? Or any alternatives?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
ivan19631224, 2017-08-31
@Basil_Dev

These are not exactly patterns. This is the thing called in IDEA Live Templates (in Editor -> Live Templates settings). This is essentially an improved text substitution that can insert the current class name, methods, generate variable names, take into account name conflicts, etc. What you mentioned "fori" is there in the "iterations" section. There are many more, like "sout" for "System.out.println();", "psvm" for "public static void main(String[] args){}", "psfs" for "public static final String " etc.
I highly recommend browsing the areas of interest, and mastering the ones you use frequently. You can also create your own, the rules there are simple.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question