Wrap Chained Method Calls

Start each chained method call on a new line.

Do you prefer to have changed method calls on a separate line? Select the method calls, open Intention Actions ⌥⏎ (macOS) / Alt+Enter (Windows/Linux) and open the menu to Adjust code style settings. On the Wrapping and Braces tab, set Chained method calls to Wrap always.

To disable this option, open Settings and go to Editor | Code Style | Java. On the Wrapping and Braces tab, set Chained method calls to Do not wrap.


Related Resources

Create a new class
Create a new class
Create a new class and a new package.
JShell
JShell
Use JShell in IntelliJ IDEA to quickly evaluate Java expressions.
Endpoints tool window
Endpoints tool window
Work with endpoints to your application in a dedicated tool window.