Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I dislike how auto format messes up empty cycle body, like:

Before

for (int i = 0; isTest(i); i++); 

After

for (int i = 0; isTest(i); i++)
    ;

How to configure eclipse not to do this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
290 views
Welcome To Ask or Share your Answers For Others

1 Answer

Go to Windows -> Preferences, and in the options table select Java -> Code Style -> Formatter, then configure to your hearts content.

For future reference, in the Preferences menu you can just type in a search term to find all options for that term - so just going onto the Preferences menu and typing "format" will show you all options


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...