| Summary: | [formatter] Javadoc comment formatter should use code 'Blank Lines to Preserve' value at the beginning of <pre>...</pre> tags | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Frederic Fusier <frederic_fusier> |
| Component: | Core | Assignee: | Mateusz Matela <mateusz.matela> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jerome_lanneluc, mateusz.matela, robert.roth.off |
| Version: | 3.4 | ||
| Target Milestone: | 4.8 M5 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | To be verified for 4.8 M5 | ||
|
Description
Frederic Fusier
The real problem is in fact for blank lines at the beginning of the code (e.g. after the <pre> tag and before the first character of the snippet) and at the end of the code (e.g. after the last character of the snippet and before the </pre> tag).
The following example:
interface X01 {
/**
* <pre>
*
*
* public class Example {final int a= 1;final boolean b= true;}
*
*
* </pre>
*/
int foo();
}
is currently formatted as follow with Eclipse built-in:
interface X01 {
/**
* <pre>
*
*
* public class Example {
* final int a = 1;
* final boolean b = true;
* }
*
*
* </pre>
*/
int foo();
}
(Note that Number of empty lines to preserve = 1 for Eclipse built-in settings)
So, the formatted output should be instead:
interface X01 {
/**
* <pre>
*
* public class Example {
* final int a = 1;
* final boolean b = true;
* }
*
* </pre>
*/
int foo();
}
Note that in 3.3 the output is:
interface X01 {
/**
* <pre>
* public class Example {
* final int a = 1;
* final boolean b = true;
* }
*
* </pre>
*/
int foo();
}
On eclipse 4.5M6 I get the correct number of empty lines preserved inside <pre> tags. Do you still see this issue with a recent eclipse version? This problem no longer occurs after the formatter redesign. *** This bug has been marked as a duplicate of bug 303519 *** |