Bug 165337

Summary: [formatter] Java Convention [built-in] formatting settings result in weird comment formats
Product: [Eclipse Project] JDT Reporter: Peter Portante <Peter.Portante>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: aris
Version: 3.2.1   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Peter Portante CLA 2006-11-21 11:46:31 EST
Using either Elipse preferences or per-project preferences, selecting "Java Code Style"/"Formatter"->"Java Conventions [built-in]" and then pressing "Show..." to see how comments are formatted displays:

12345678901234567890
    /**
        * This is an example comment.
        * This is the last line of this comment.
        */

However, the indentation is set to Mixed mode, with 4 space indentation using tabs representing 8 spaces. The display example, both the one above and the one shown in the dialog box properly indents the first line of the comment, but the second line of the comment is indented 8 spaces when it should be indented only four (plus one to line up the asterisks).
Comment 1 Peter Portante CLA 2006-11-21 11:48:48 EST
I should add that when I am editing code, and I have used the auto formatter on a paragraph of comments like the above, and then move to the beginning of a line (column 1) that is indented too much, and then press the "TAB" key, that line is adjusted to be formatted as expected.
Comment 2 Olivier Thomann CLA 2006-11-22 11:17:13 EST
Where do you get this code from?
12345678901234567890
    /**
        * This is an example comment.
        * This is the last line of this comment.
        */
Comment 3 Peter Portante CLA 2006-11-22 11:21:16 EST
I took that from the example display in the dialog box for "Comments" in the formatter setup.
Comment 4 Olivier Thomann CLA 2006-11-23 07:09:23 EST
*** Bug 165475 has been marked as a duplicate of this bug. ***
Comment 5 Olivier Thomann CLA 2006-11-23 13:17:37 EST

*** This bug has been marked as a duplicate of 145544 ***
Comment 6 Eclipse Webmaster CLA 2007-07-29 09:21:12 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991