Eclipse text formatting

I wrote code in eclipse that has a lot of blank lines. I need to format the code and delete the empty lines. How should I do it?

+3
source share
1 answer

You can use the default text formatting text by selecting the code you want to format, and then enter:

Ctrl + Shift + F (context menu Source → Format)

If this does not work, you can edit this default formatter by modifying existing blank lines. The number of blank lines to save from 1 to your number in Prefrences. Java Formatter Formatter Style. Editing the default Eclipse form. Empty line.

+6
source

Source: https://habr.com/ru/post/1769128/


All Articles