Bug 229103 - [formatter] New comment formatter split inlined tags incorrectly
Summary: [formatter] New comment formatter split inlined tags incorrectly
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-28 11:54 EDT by Frederic Fusier CLA
Modified: 2008-04-29 11:25 EDT (History)
1 user (show)

See Also:


Attachments
Test case to illustrate the problem (243 bytes, application/octet-stream)
2008-04-28 11:54 EDT, Frederic Fusier CLA
no flags Details
Proposed patch (88.58 KB, patch)
2008-04-28 12:19 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2008-04-28 11:54:48 EDT
Created attachment 97795 [details]
Test case to illustrate the problem

I20080427-2000.

The new comment formatter does not correctly format the attached test case.

The closing brace is put on a new line on the first format and brought back on the inline tag line on the second one...
Comment 1 Frederic Fusier CLA 2008-04-28 11:57:44 EDT
Problem comes from the fact that the line length is 77 characters and is on the same line than the javadoc header (e.g. '/** ') and so starts at column 5. As a new line is necessary, after the format, this line will be put on the second line which starts with ' * , hence the column start will be only 4 and gives one extra character for the line => the closing brace can be let on the same line than the inline tag...
Comment 2 Frederic Fusier CLA 2008-04-28 12:19:27 EDT
Created attachment 97798 [details]
Proposed patch

This patch also fixes bug 229017 and bug 229018
Comment 3 Frederic Fusier CLA 2008-04-28 12:27:08 EDT
(In reply to comment #2)
> Created an attachment (id=97798) [details]
> Proposed patch
> 
> This patch also fixes bug 229017 and bug 229018
> 
Sorry wrong bug numbers, they should read bug 229107 and bug 229108 instead...

Comment 4 Frederic Fusier CLA 2008-04-28 12:31:31 EDT
Released for 3.4M7 in HEAD stream.
Comment 5 Kent Johnson CLA 2008-04-29 11:25:49 EDT
Verified for 3.4M7 using I20080429-0100