Bug 238853 - [formatter] Code Formatter does not properly format valid xhtml (<br /> & <p />) in javadoc.
Summary: [formatter] Code Formatter does not properly format valid xhtml (<br /> & <p ...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows Vista
: P3 normal with 1 vote (vote)
Target Milestone: 3.4.1   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-27 17:11 EDT by Brian Dougan CLA
Modified: 2008-09-15 11:40 EDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (3.16 KB, patch)
2008-07-02 12:15 EDT, Frederic Fusier CLA
no flags Details | Diff
Proposed patch for R3_4_maintenance stream (3.18 KB, patch)
2008-07-03 05:17 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 Brian Dougan CLA 2008-06-27 17:11:26 EDT
Build ID: I20080617-2000

Steps To Reproduce:
1: Attempt to format the following, which should not change.

<code>
/**
 * This is a test comment. 
 * <p /> 
 * Another comment. <br /> 
 * Another comment.
 */
private void testMethod1()
{
}
</code>

You'll get this....

<code>
/**
 * This is a test comment. <p /> Another comment. <br /> Another comment.
 */
private void testMethod1()
{
}
</code>

Which is not what is expected (and is not what occurs in eclipse 3.3).


More information:
Just FYI, the following, which is non-valid xhtml, formats just fine.

<code>
/**
 * This is a test comment.
 * <p>
 * Another comment. <br>
 * Another comment.
 */
private void testMethod2()
{
}
</code>
Comment 1 Frederic Fusier CLA 2008-06-30 06:05:22 EDT
Indeed the the comment is properly formatted using 3.3.2:
/**
 * This is a test comment. 
 * <p /> 
 * Another comment. <br /> 
 * Another comment.
 */
private void testMethod1()
{
}

I'll inevstigate...
Comment 2 Frederic Fusier CLA 2008-07-02 12:15:07 EDT
Created attachment 106326 [details]
Proposed patch

The FormatterCommentParser needed to accept this peculiar xhtml syntax while parsing html tag...
Comment 3 Frederic Fusier CLA 2008-07-02 12:37:09 EDT
Released for 3.5M1.

Jerome, could you validate the backport to 3.4.1?
Comment 4 Jerome Lanneluc CLA 2008-07-03 04:41:48 EDT
+1 for 3.4.1 since this is a regression comparing to 3.3.2
Comment 5 Frederic Fusier CLA 2008-07-03 04:51:51 EDT
Reopen to fix it in R3_4_maintenance stream...
Comment 6 Frederic Fusier CLA 2008-07-03 05:17:53 EDT
Created attachment 106407 [details]
Proposed patch for R3_4_maintenance stream
Comment 7 Frederic Fusier CLA 2008-07-03 05:55:26 EDT
Released for 3.4.1
Comment 8 Brian Dougan CLA 2008-07-10 16:02:46 EDT
Verified the fix in the 3.4.1 stream fixed the issue.  
Comment 9 Brian Dougan CLA 2008-07-10 16:14:20 EDT
Any ETA on when 3.4.1 will be released?  I've hacked my copy by copying in the org.eclipse.jdt.core jar from the 3.4.1 stream, but it's a bit of a pain :)
Comment 10 Jerome Lanneluc CLA 2008-08-14 09:03:05 EDT
(In reply to comment #9)
> Any ETA on when 3.4.1 will be released?  I've hacked my copy by copying in the
> org.eclipse.jdt.core jar from the 3.4.1 stream, but it's a bit of a pain :)
> 
According to http://wiki.eclipse.org/Ganymede#Coordinated_Service_Releases_.28Proposed.29, the tentative date for 3.4.1 is September 24th
Comment 11 Frederic Fusier CLA 2008-08-18 06:57:01 EDT
(In reply to comment #10)
> (In reply to comment #9)
> > Any ETA on when 3.4.1 will be released?  I've hacked my copy by copying in the
> > org.eclipse.jdt.core jar from the 3.4.1 stream, but it's a bit of a pain :)
> > 
> According to
> http://wiki.eclipse.org/Ganymede#Coordinated_Service_Releases_.28Proposed.29,
> the tentative date for 3.4.1 is September 24th
> 
You can also use the latest maintenance stream build giving a preview of coming 3.4.1 and also including the fix you're waiting for...
E.g. the last week maintenance build is accessible there:
http://download.eclipse.org/eclipse/downloads/drops/M20080813-0800/index.php

Comment 12 Frederic Fusier CLA 2008-08-21 12:21:33 EDT
(In reply to comment #8)
> Verified the fix in the 3.4.1 stream fixed the issue.  
> 
Please do not change the status of bug. We use it during our milestone verification process, thanks
Comment 13 Frederic Fusier CLA 2008-08-21 12:22:37 EDT
Bug was reopen to include it in verification process (we missed it during 3.5M1!)
Comment 14 Olivier Thomann CLA 2008-08-28 12:36:34 EDT
Verified for 3.4.1 using M20080827-2000
Comment 15 David Audel CLA 2008-09-15 11:40:13 EDT
Verified for 3.5M2 using I20080914-2000