Bug 227043 - [formatter] CodeFormatter does not format line and block comments
Summary: [formatter] CodeFormatter does not format line and block comments
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-14 18:07 EDT by Frederic Fusier CLA
Modified: 2008-04-29 11:28 EDT (History)
3 users (show)

See Also:


Attachments
Released patch for line comments (124.33 KB, patch)
2008-04-16 17:32 EDT, Frederic Fusier CLA
no flags Details | Diff
Released patch for block comments (214.93 KB, patch)
2008-04-23 06:14 EDT, Frederic Fusier CLA
no flags Details | Diff
First patch which tunes the implementation (66.54 KB, patch)
2008-04-25 09:32 EDT, Frederic Fusier CLA
no flags Details | Diff
Second patch solving other issues (71.33 KB, patch)
2008-04-25 09:35 EDT, Frederic Fusier CLA
no flags Details | Diff
Third patch solving corner cases in block comments (27.56 KB, patch)
2008-04-25 18:15 EDT, Frederic Fusier CLA
no flags Details | Diff
Fourth patch solving other corner cases in javadoc and block comments (112.63 KB, patch)
2008-04-27 06:10 EDT, Frederic Fusier CLA
no flags Details | Diff
Fifth patch solving issues with inlined tags (71.22 KB, patch)
2008-04-27 12:34 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-14 18:07:36 EDT
Follow-up of bug 102780 which fixed the problem for javadoc comments. We also need to change the formatter to format line and block comments when formatting the compilation unit (e.g. using the K_COMPILATION_UNIT or the K_UNKNOWN format kinds).
Comment 1 Frederic Fusier CLA 2008-04-16 17:32:58 EDT
Created attachment 96351 [details]
Released patch for line comments

Note that the activation is similar than for javadoc comments: clients need to set the CodeFormatter.F_LINE_COMMENTS (see bug 102780 for more details).
Comment 2 Frederic Fusier CLA 2008-04-23 06:14:26 EDT
Created attachment 97185 [details]
Released patch for block comments

This patch also fixes some big troubles with Javadoc comments formatting released for bug 102780. Now invalid html tags structure, typically unclosed tags, are well taken into account and does not prevent the formatter to process the comment correctly.

However, there are still remaining issues. I'm working on them and will close this bug only when the formatter will succeed to format all compilation unit of an Eclipse full source workspace without error (which means no new change on the second formatting...)

Note that it also includes fix for bug 228193.
Comment 3 Frederic Fusier CLA 2008-04-25 09:32:46 EDT
Created attachment 97606 [details]
First patch which tunes the implementation
Comment 4 Frederic Fusier CLA 2008-04-25 09:35:40 EDT
Created attachment 97607 [details]
Second patch solving other issues
Comment 5 Frederic Fusier CLA 2008-04-25 09:36:14 EDT
Forgot to say, that first and second patches were released in HEAD stream...
Comment 6 Frederic Fusier CLA 2008-04-25 18:15:22 EDT
Created attachment 97693 [details]
Third patch solving corner cases in block comments

Released in HEAD stream.
Comment 7 Frederic Fusier CLA 2008-04-27 06:10:19 EDT
Created attachment 97723 [details]
Fourth patch solving other corner cases in javadoc and block comments

Released in HEAD.
Comment 8 Frederic Fusier CLA 2008-04-27 12:34:12 EDT
Created attachment 97730 [details]
Fifth patch solving issues with inlined tags
Comment 9 Frederic Fusier CLA 2008-04-27 12:35:25 EDT
Released for 3.4M7 in HEAD stream.
Comment 10 Kent Johnson CLA 2008-04-29 11:28:29 EDT
Verified for 3.4M7 using I20080429-0100