Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set Eclipse not to insert blank lines between methods declaration in interfaces?

I'm having trouble to set up formatter not to insert blank lines between methods in interfaces. In the same time I still want to have blank lines between methods in classes. I cannot find appropriate formatter setting that would allow this. Can somebody point me to the right option?

like image 629
Rasto Avatar asked Nov 19 '12 07:11

Rasto


1 Answers

As stated in comments by vainolo, there isn't any direct option to do so. Following is the screenshot for the eclipse formatter for adding new lines and it doesn't distinguish between the methods of class and interface eclipse formatter- black lines

Workaround

But, a simple manual work-around is possible. Select the lines as shown below, and run a simple regex ^\s*\n find and replace to remove the blank lines.

work around

Hope this helps.

like image 102
mtk Avatar answered Nov 16 '22 04:11

mtk