Reputation: 5545
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);
Upvotes: 0
Views: 95
Reputation: 3510
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 comma
options.
Code already written can be formatted automatically by pressing ctrl + shift + f
.
(or cmd + shift + f
on a Mac).
Example for methods:
Assignments without spaces:
Upvotes: 1