user994165
user994165

Reputation: 9502

Newlines and blank lines formatting in eclipse

Is there a way to prevent the autoformatter from removing newlines in the comments and blank lines in the code?

Upvotes: 1

Views: 297

Answers (2)

AsSiDe
AsSiDe

Reputation: 1846

Windows>Preferences>java>Code Style>Formatter Click on new mention profile name then ok

Select Blank Lines Tabs. And customize blank line settings according to you. click on apply ...

Upvotes: 1

azurefrog
azurefrog

Reputation: 10945

In Eclipse go to Preferences - Java - Code Style - Formatter and Edit your Active Profile:

enter image description here

Go the the Blank Lines tab, and set Number of empty lines to preserve: to however many blank lines you'd like Eclipse to keep:

enter image description here

Upvotes: 2

Related Questions