Parameters for automatically filling stubs for designers in Intellij

Does Intellij have any way to auto-create constructor calls based on parameters from the constructor signature?

The idea is that I type the class name (constructor name), press Magic + Key + Combination , select the appropriate constructor and IntelliJ types in all parameters based on the names in the constructor signature. Obviously, in most cases this will not compile, but it is OK, as I will create the necessary parameters with the corresponding names.

An even better idea is for the function to also create parameter definitions for me right above the constructor call.

Any idea?

+5
source share
2 answers

In accordance with JetBrains support, this feature is not supported (the latest IntelliJ version is 14.1).

0
source

I am an Eclipse user recently ported to IntelliJ, and this was one of the features that I really missed, especially. when there are calls with many parameters (and not just with constructors). As long as there are corresponding variables in the area, ctrl-shift-space is somewhat similar. This is not as good as in Eclipse, because if there are no variables, it will not create stubs, and I don’t think it works if the parameter names do not match, but it works like a crutch, at least in some cases ...

+1
source

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


All Articles