Community
Participate
Working Groups
Build Identifier: 20090920-1017 The option 'New lines in empty method body wrong behavior' is deactivated and the rest is like Java convention. When I have a method/constructor with only comment(s), it will be formatted like this: public Thread() { // TODO Auto-generated constructor stub } I think the correct indentation is like this: public Thread() { // TODO Auto-generated constructor stub } Reproducible: Always Steps to Reproduce: 1. Set the formatter options like I mention in the description 2. Create a class with an empty constructor
Created attachment 155321 [details] The patch for the formatter This is the patch for the problem.
why it takes so long to apply the patch to 3.6?
It takes so long because we missed it. Thanks for reminding us to take a look. Could you please provide a regression test?
Created attachment 167320 [details] Additional tests Added two tests to verify the proposed fix...
Comment on attachment 155321 [details] The patch for the formatter Patch is good for me
Olivier, OK for RC1?
+1.
Released for 3.6RC1. Regression tests added in: org.eclipse.jdt.core.tests.formatter.FormatterBugsTests#testBug298844a org.eclipse.jdt.core.tests.formatter.FormatterBugsTests#testBug298844b
Verified for 3.6RC1 using build I20100513-150
Verified.