Reputation: 3534
When i open any file in eclipse. it show alternative blank line after all the code lines and blank line. how can i remove it....
Upvotes: 16
Views: 32258
Reputation: 591
The good thing is that this is all well and good when you work alone;
The unfortunate side is that it also exposes "bad team cooperation" when you check in your files in the version control: there will be people who will gladly help you keep things consistent while there are many others who will ignore your pleas and keep overwriting your beautifully properly formatted code.
Upvotes: 0
Reputation: 3564
Upvotes: 1
Reputation: 31218
In eclipse preference setting you can remove all the unwanted blank lines. Eclipse: Window > Preferences > Java > Code Style > Formatter > Edit the formatter and following screen will pop up.
And when you format the code all unwanted blank lines will be removed.
Upvotes: 18
Reputation: 388
Maybe you didn't understand what Anshu said. Do a Ctr-F on your editor. In the options, select Regular Expression. Enter ^\s*\n for the Find expression. Keep the Replace box empty. Replace All!
This of course might lead to removal of unwanted lines as well.
Upvotes: 2
Reputation: 363
Due to your eclipse setting.
you can change your setting from preferences.
Upvotes: 1