Friday, August 24, 2012

Eclipse: change autoformat settings

I hate almost everything in Eclipse, including the way it autoformats Java code.
I simply hate seeing code split in multiple lines. Good coders should know how to write decently short lines, and there should never be the case for line wrapping.

So, here we go:

Windows/Preferences/Java/Code Style/Formatter
create a new Active Profile based on the "Java Conventions (built in)",
edit the profile, go to Line Wrapping tab, "Maximum line width" = 1000.

Especially, stay away from the Eclipse templates, they break all possible coding conventions (who the f... wants a curly brace alone in a new line??? )

No comments: