Reputation: 9502
Is there a way to prevent the autoformatter from removing newlines in the comments and blank lines in the code?
Upvotes: 1
Views: 297
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
Reputation: 10945
In Eclipse go to Preferences - Java - Code Style - Formatter and Edit your Active Profile:
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:
Upvotes: 2