Community
Participate
Working Groups
Build I20091208-0100. The indentation computed while formatting may be still wrong even after the fix for bug 293300 which solves most of invalid cases. For instance, the following test case: public class X { /** * The foo method */ void foo() {} } is wrongly formatted as follow when all comments formatting is disabled: public class X06 { /** * The foo method */ void foo() { } } This is due to an invalid guess of the indentation value when there's a mix of tab and spaces in the current comment indentation... This was partially fixed while fixing bug 293300, but apparently, there is still some problematic cases.
Created attachment 154025 [details] Proposed patch Verify all places where similar algorithm is used. Rename methods and variables as it's safer to compute the indentation and add 1 when the column is needed...
All JDT (Core/UI/Text) tests pass with the proposed patch and massive formatter tests only show improvements, hence I have released it for 3.6M4...
+1 for 3.6M4. We want the code formatter to be as stable as possible as soon as possible.
Verified for 3.6M4 using Build id: I20091209-0100
Verified.