Bug 165337 - [formatter] Java Convention [built-in] formatting settings result in weird comment formats
Summary: [formatter] Java Convention [built-in] formatting settings result in weird co...
Status: RESOLVED DUPLICATE of bug 145544
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 165475 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-21 11:46 EST by Peter Portante CLA
Modified: 2007-07-29 09:21 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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