Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 303957

Summary: [formatting] Formatter deletes the first character in a javadoc comment
Product: [Eclipse Project] JDT Reporter: Oliver Wong <owong>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: daniel_megert, jarthana, markus.kell.r, satyam.kandula
Version: 3.6   
Target Milestone: 3.5.2   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Formatter settings none

Description Oliver Wong CLA 2010-02-25 14:08:00 EST
Build Identifier: M20090917-0800

 

Reproducible: Always

Steps to Reproduce:
1. Create a file "Test.java" with the following contents:

/**
 * <pre>
 *    A
 *   / \
 *  B   C
 * / \ / \
 *D  E F  G
 * </pre>
 */

2. Press CTRL-F to cause the code to get formatted.
3. Observe that the "D" gets deleted, resulting in:

/**
 * <pre>
 *    A
 *   / \
 *  B   C
 * / \ / \
 *   E F  G
 * </pre>
 */
Comment 1 Oliver Wong CLA 2010-02-25 14:10:17 EST
Created attachment 160221 [details]
Formatter settings

Here's the formatter I used to replicate the bug; not sure if the bug exists with other formatters.
Comment 2 Dani Megert CLA 2010-02-26 03:14:44 EST
In your formatter settings you must disable to format code inside <pre> tags.
Comment 3 Markus Keller CLA 2010-02-26 06:53:16 EST
This was indeed broken up to and including 3.5.1, but has been fixed for 3.5.2.

*** This bug has been marked as a duplicate of bug 287833 ***
Comment 4 Satyam Kandula CLA 2010-03-08 05:15:40 EST
Verified for 3.6M6 using build I20100305-101
Comment 5 Jay Arthanareeswaran CLA 2010-03-08 05:24:49 EST
Verified.