开发者

eclipse text formatter

开发者 https://www.devze.com 2023-01-19 12:08 出处:网络
I have written some code in eclipse which has a lot of blank lines. I need to format the co开发者_StackOverflow社区de and remove the blank lines.

I have written some code in eclipse which has a lot of blank lines. I need to format the co开发者_StackOverflow社区de and remove the blank lines. How do I go about this?


You can use the default text formatter by selecting the code you want to format and then typing:

Ctrl + Shift + F (Contextual menu Source -> Format)

If this doesn't work you can edit this default formatter by changing the Existing blank lines - Number of empty lines to preserve from 1 to your number in Prefrences Java Code Style Formatter Edit Eclipse default formater Blank line tab.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号