Search code examples
javaintellij-ideaformatidepretty-print

Intellij one line getter/setter/constructor prettify code


IntelliJ Idea sometimes shortens short constructors/getters and setters into one-liners. (It doesn't literally affect the code, its just a view thing in the ide)

I've tried to google how to stop IntelliJ from doing this, but all the answers I get is how TO DO this, not how undo this. (not explained how to undo this in the same articles)

Here is how the one-liner looks like (again not affecting the code itself, just changes the view in IntelliJ until you click to edit that code, it will display like the second image:

one-liner that ide does

how it looks when u go to edit it (how I want it to look by default)


Solution

  • I assume this should fix it. In case it's not, play with the settings

    enter image description here