| Summary: | [formatter] Javadoc formatter bugs (extra whitespaces and wrapped periods) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Joerg Hohwiller <joerg> | ||||||||
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | ||||||||||
| Version: | 4.2 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 7 | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 218111 [details]
The exported formatter settings
Created attachment 218112 [details]
The original source code
Created attachment 218113 [details]
The original source code after removing formatter off/on tags and formatting
What applies for periods also applies for parentheses:
* Formatter should NOT wrap directly after '('
* Formatter should NOT wrap directly before ')'
Once you add an argument to the tag (e.g. "{@value foo}") formatting works fine. This is how the tag is intended to be used.
(In reply to comment #5) > Once you add an argument to the tag (e.g. "{@value foo}") formatting works > fine. This is how the tag is intended to be used. Thanks for the response but you are missing the point. In this case you just insert a few more characters and therefore change the position of the period or parenthesis. I can sill reproduce the same bug with {@value foo}. If I misunderstood your point, please be more precisely. BTW: Also I disagree that e.g. {@link MyEntity} is bad practice and I should use {@link MyEntity my entity} instead because the extra text does not participate in refactorings. I retested this with Eclipse Mars and it seems the bug has been fixed meanwhile. Thanks for your great work! |
Build Identifier: I20120608-1400 There are various existing issues for the formatter. In this issue, I will concentrate on formatting JavaDoc and only on the problems that are both nasty as well as quite easy to confirm and potentially easy to fix (tough I do not have a clue about the Eclipse codebase): 1. The formatter is always adding a whitespace after {@value} 2. The formatter wraps periods I will attach: * my exported formatter settings * an example java source file * the source file after formatter Reproducible: Always Steps to Reproduce: 1. Use attached sourcecode 2. Remove formatter:off comment 3. Format the sourcecode (using attached formatter settings) Expected result: the source does not change. Actual result: Undesired spaces are added and a period is wrapped to the next line.