Community
Participate
Working Groups
The code formatter does not give you much control over how the code within a line is formatted. The only control it gives you is whether there is a space before an assignment operator. It will format code like the following: if (method((a[i] + 2) * 3) I cannot begin to tell you how much I hate that formatting. You may like it but you should let the user choose how to format it by adding options to control spaces in various places. My style calls for formatting it like this: if( method( ( a[ i ] + b() ) * 3 ) ) The options I would like to see are: - Control whether opening and closing parentheses are separated from the expression inside. You might want a separate setting for when the parentheses are denoting a cast (for which I don't put spaces). - Probably a separate control for what to do for empty parenteses. - The same two settings for brackets for arrays. - Setting for whether keyword is separated from the parenthesis. - Setting for whether method name is separated from the parenthesis. I really suggest looking at Jindent documentation for examples of lots of other controls to be added.
Thanks for suggestion. Will consider post 2.0.
Resurrecting formatter issues in 2.1 stream.
Clearing resolution
More space-formatting-control is really needed! The style-guide for my company prefers foo.someMethod (param); for calling methods (spaces between method name and opening brace). This little (missing) space character hinders me from using Eclipse in our software production process ;-)
We need to clear 2.1 bug reports that won't be addressed before 2.1. The new implementation is still in the works. Therefore we cannot include it for 2.1. Not enough testing and we need to polish the preferences. This will be address for 2.2 as stated in the JDT/Core plan.
Resurrecting for 3.0
Reopen for 3.0 consideration.
This is addressed in the new formatter. Fixed and released in HEAD. Regression test added.
Verified.