Is there a way to change how auto generated code looks in eclipse?
Currently it generate code like
int a = something;
But I would really like it do do it like
int a=something
That is: Without all that extra space. This also goes for functions, where there is an extra space before the ,
I would really prefer f(int a,int b); instead of f(int a, int b);
You can always change the way your code is formatted in your preferences under Java –> Code-Style –> Formatter. Modify the existing styles or just create your own.



There’s also a tab for white spaces. Just uncheck those
before/after commaoptions.Code already written can be formatted automatically by pressing
ctrl + shift + f.(or
cmd + shift + fon a Mac).Example for methods:
Assignments without spaces: