Can IntelliJ automatically complete and enable simple generics?

I recently returned to IntelliJ from Eclipse, and one thing I struggle with is automatic completion, especially when declaring collections. * This is not a question of which IDE is best, just a question of how to complete a task, if that task is possible *

In IntelliJ, I type

List<String> listOfNames = new ArrayL  (then key stroke **Alt Ctrl Space**)

I get

List<String> listOfNames = new ArrayList

Which saves me by typing three letters, and not big savings, I'm sure you will agree

If I use Eclipse and use the Ctrl Space key bar on

List<String> listOfNames = new Ar

I get this result, including generics

List<String> listOfNames = new ArrayList<String>()

I am sure that I am missing something like a keystroke that I cannot find, or a plugin that I need to add.

thank

+3
1

type

List<String> listOfNames = new //be aware of the space after new

crtl + shift + , !

+5

Source: https://habr.com/ru/post/1771904/


All Articles