Community
Participate
Working Groups
I think many of us have fought a war concerning code formatting conventions at some point. I think that is a waste of energy and valuable resources (well, it can be amusing also, but anyway) so I propose the following enhancement: As a first step, Eclipse should provide a way to automatically reformat code that is checked out from a team repository (CVS first of course) according to user preference and reverse that formatting whenever code is checked in according to another preference. The automatic formatting must of course apply when files are compared also. In a later iteration, the same kind of formatting should be possible whenever a remote sources is viewed (such as the source to the rt.jar, the Eclipse plugins, etc.). This should also be controlled by a user preference setting. In an even later iteration, more conventions could be enforced. The sorting of members for instance. That however, implies improvements that prevent the initialization order of the members to change when that order is relevant. Rationale: Many of us have different opinions about the placement of curly braces, indents, whitespace etc. All of that is totally irrelevant for the actual code and its semantics. A situation where I can work with the code formatted to suite my needs while someone else does the same using a completely different formatting would be ideal as long as it's always checked in in accordance with some common agreement. It's often argued that automatic formatting of code results in unnecessary merges. The truth is actually the opposite. If automatic formatting used consistently, all differences due to difference in code format disappear.
*** This bug has been marked as a duplicate of 45423 ***