tags:

views:

81

answers:

1

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?

+4  A: 

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

MrWiggles
Margus
This is in the current workspace, not in the Eclipse installation, hence you need to export and import your preferences to have this available in other workspaces.
Thorbjørn Ravn Andersen