Community
Participate
Working Groups
IIRC, the formatter is not supposed to touch a file if no changes are made to it. The following class breaks this: public class Test { /** * Any text * * @param b */ public void a(int b) { } } You can repeatedly Format, Save, Format, Save. It always marks it dirty. If you change it to: public class Test { /** * @param b */ public void a(int b) { } } It works as expected. Also removing the @param and leaving the description text works as expected as well. Something with having both the description and @param tag (or any tag actually). Which pretty much means every documented class. An Undo will show a selected area of the whole blank line after the * up to the @ of the tag.
Can reproduce using R3.2 or latest 3.3 build. Happens as soon as there's a Javadoc comment.
JDT Core gives us back edits.
We can detect that no edit are required. I added an extra check when creating the optimized edits inside the scribe. Released for 3.3M6. Added regression test in org.eclipse.jdt.core.tests.formatter.comment.JavaDocTestCase#test152850
Verified for 3.3 M6 using build I20070320-0010