Bug 236465 - [formatter] Single-line comments ending in words with quotes are truncated
Summary: [formatter] Single-line comments ending in words with quotes are truncated
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux-GTK
: P3 critical (vote)
Target Milestone: 3.4 RC3   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-10 12:49 EDT by Shaw Terwilliger CLA
Modified: 2008-06-11 04:18 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shaw Terwilliger CLA 2008-06-10 12:49:39 EDT
Build ID: I20080523-0100

Steps To Reproduce:
1. Enable "Eclipse [built-in]" formatting settings (though it happens with my custom settings too)

2. Create a new Java class or edit an existing one, and create a line with the following text:

  // abc def'ghi

3. Make sure the comment line contains no trailing whitespace

4. Format the document (Shift-Ctrl-F) and watch the 'ghi segment disappear.  The bug also affects lines with double-quote characters.

More information:
Using Eclipse 3.4 RC2 (I20080523-0100) on Linux x86_64 with Sun 1.6.0_03-b05.  A friend on Mac OS X using RC 2 could not reproduce this.

I'd consider this a critical bug because Eclipse is eating my source code.  I have to diff all my files before check-in and reword any comments that were eaten.
Comment 1 Shaw Terwilliger CLA 2008-06-10 16:40:28 EDT
Just updated to 3.4 RC3, and this bug seems to have gone away.  I'd be happy to send more information if anyone's interested in confirming the cause.

Leaving as NEW in case someone on the formatter team is interested.  If not, feel free to resolve.
Comment 2 Shaw Terwilliger CLA 2008-06-10 16:42:06 EDT
Sorry, I failed at leaving the bug NEW (stupid back button).
Comment 3 Lin Zhu CLA 2008-06-11 00:27:32 EDT
*** Bug 236566 has been marked as a duplicate of this bug. ***
Comment 4 Frederic Fusier CLA 2008-06-11 03:49:28 EDT
(In reply to comment #3)
> *** Bug 236566 has been marked as a duplicate of this bug. ***
> 
Forgot this comment, it was a mistake...
Comment 5 Frederic Fusier CLA 2008-06-11 04:18:01 EDT
Thanks for the feedback, I think it has been fixed while fixing bug 232768...
Comment 6 Frederic Fusier CLA 2008-06-11 04:18:26 EDT
Verified by user