Community
Participate
Working Groups
Eclipse code formatter should abide to Sun's Java code conventions. Most of the time it does a good job, but at line splitting it has some problems. I included examples of what I think are bugs: // Here is how it should look like acording to Java conventions // longName1 = longName2 * (longName3 + longName4 - longName5) // + 4 * longname6; // PREFER // // Here is Eclipse formatting longName1 = longName2 * (longName3 + longName4 - longName5) + 4 * longName6; // Here is how it should look like // System.out.println("Server Name: " + serverName_ + ", port=" // + serverPort_ + ", numOrbs=" + numOrbs_); // // Here is Eclipse formatting System.out.println( "Server Name: " + serverName_ + ", port=" + serverPort_ + ", numOrbs=" + numOrbs_); // // Here is how I would format it (Sun's code converntions does not say) // String[][] doubleList = { // { "alfa", "beta" }, // { "alfa", "beta" }, // { "alfa", "beta" }, // { "alfa", "beta" }, // }; // // Here is how Eclipse format it String[][] doubleList = { { "alfa", "beta" }, { "alfa", "beta" }, { "alfa", "beta" }, { "alfa", "beta" }, }; // Method parameters formatting. // My formatting // protected void processRequest(long param1, long param2,long param3, // long param4) { // } // // Eclipse formatting protected void processRequest( long param1, long param2, long param3, long param4) { }
Thanks, will consider post 2.0
Resurrecting formatter issues in 2.1 stream.
Clearing resolution
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 improved with the new formatter. Fixed and released in HEAD.
Verified.