Community
Participate
Working Groups
@@ original @@ void endlineComment() { System.out.println(" "); //veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery endline comment } @@ after formatting @@ void endlineComment() { System.out.println(" "); //veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery // endline comment } @@ after formatting a second time @@ void endlineComment() { System.out.println(" "); //veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery // endline comment } @@@@ Is this intented? Why is the new alignment of the first run not preserved by the second run?
The endline comment in the original is after the System.out.println(" "); statement.
This is a side-effect of having the line comment split. The code formatter indents the comments relative to the current indentation, but it doesn't split line comment. Move to JDT/Text.
If this bug is about the indentation i.e. step 2 then please reopen and move to JDT Core. *** This bug has been marked as a duplicate of 47620 ***
I'll wait and see how bug 47620 turns out. The main point of this bug would be: Two consecutive runs of the formatter (with the same settings) should produce exactly the same result. And right now it's not the case.