When I split arguments onto multiple lines in IntelliJ, it puts the argument at a slight indent from the line above. For example:
ClassName.staticMethod(argument1,
argument2,
argument3);
Quick, what are the arguments above? Okay, that's easy because of the example names I chose, but how about below? Which arguments are going to staticMethod
below?
ClassName.staticMethod(this.instanceMethod(argument1,
argument2),
argument3);
staticMethod
is taking the results of a call to instanceMethod
and argment3
, but with IntelliJ's default formatting, at a glance you'd completely miss the fact that argument2
is an argument for instanceMethod
, not staticMethod
.
This is a freaking terrible default behavior. How can I get it to properly line arguments up, as in the modified examples below?
ClassName.staticMethod(argument1,
argument2,
argument3);
ClassName.staticMethod(this.instanceMethod(argument1,
argument2),
argument3);