Can IntelliJ auto-complete constructor parameters on “new” expression?

后端 未结 5 2060
旧巷少年郎
旧巷少年郎 2020-12-13 01:56

If my class has a non-empty constructor, is it possible to auto-complete parameters in the new expression?

With Eclipse, if you press ctrl+

5条回答
  •  醉梦人生
    2020-12-13 02:42

    I usually start with CtrlP (Parameter Info action) to see what arguments are accepted (auto guess complete is way to error prone in my opinion). And if as in your case you want to fill in name type n a dropdown menu appears with all available variables/fields (etc) starting with n Arrow Up/Down and Tab to select name, or CtrlSpace to select a method (or even CtrlAltSpace to be killed by suggestions;-), followed by , and v Tab for value.

提交回复
热议问题