Community
Participate
Working Groups
Using build I20080502-0100. The new comment formatter wrongly formats the following test case (the line break in the comment is due to bugzilla, the @throws description is on the same line): public class X { /** * @throws import org.eclipse.core.runtime.CoreException if there's a marker problem */ void foo() { } } as follow: public class X { /** * @throws org.eclipse.core.runtime.CoreException if there's a marker * problem */ void foo() { } } Note that the import has disappeared! Then reformatting twice change again the output to: public class X { /** * @throws org.eclipse.core.runtime.CoreException * if there's a marker problem */ void foo() { } } Set as major as the formatter remove some text from the original source...
The problem comes from the fact that the reference is invalid (the 'import' keyword). The FormatterCommentParser should handle this case properly...
The patch fixing this issue has been attached to bug 230230. Jerome can you please review?
Released for 3.4RC1 in HEAD stream.
Verified for 3.4RC1 using build I20080510-2000.
(In reply to comment #4) question: should the @throws tag behave as the @param tag regarding javadoc formatting preferences? Using the new formatter (Build id: I20080510-2000): /** * @throws import org.eclipse.core.runtime.CoreException if there's a marker * problem */ Using the old formatter (Build id: M20070921-1145): /** * @throws import * org.eclipse.core.runtime.CoreException if there's a marker * problem */ Note: with the new formatter, no new line is added after the @throws reference, whereas, with the old formatter, the @throws tag is handled like a @param tag (this is confirmed by switching corresponding preference: when New line after @param tags preference is disabled, no new line is added when formatting the above javadoc)
(In reply to comment #5) discussing this with Frederic, opened a new bug 231796