Mehdi
Mehdi

Reputation: 1485

How do I prevent Intellij from removing line breaks for getters and setters

I'm new to Intellij and this IDE is automatically removing new lines for my getters and setters putting them in one line !

public void setSocialNetwork(SocialNetwork socialNetwork) { this.socialNetwork = socialNetwork; }

I searched and found that I can use the following setting under Settings >> Code Style >> Java. However I have the wanted option selected but it still removes the new lines.

enter image description here

Upvotes: 0

Views: 694

Answers (1)

donquih0te
donquih0te

Reputation: 595

Go to the Settings -> Editor -> General -> Code Folding and uncheck the checkbox One-line methods

One-line method

Upvotes: 2

Related Questions