Bug 50900 - [formatting] comment indention
Summary: [formatting] comment indention
Status: RESOLVED DUPLICATE of bug 47620
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-29 14:38 EST by Sebastian Davids CLA
Modified: 2004-02-03 07:14 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Davids CLA 2004-01-29 14:38:51 EST
@@ original @@

    void endlineComment() {
        System.out.println("            ");
//veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery endline comment
    }

@@ after formatting @@

    void endlineComment() {
        System.out.println("            "); //veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery
                                            // endline comment
    }

@@ after formatting a second time @@

    void endlineComment() {
        System.out.println("            "); //veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery
        // endline comment
    }

@@@@

Is this intented?

Why is the new alignment of the first run not preserved by the second run?
Comment 1 Sebastian Davids CLA 2004-01-29 14:39:42 EST
The endline comment in the original is after the System.out.println("          
 "); statement.
Comment 2 Olivier Thomann CLA 2004-01-29 17:30:11 EST
This is a side-effect of having the line comment split.
The code formatter indents the comments relative to the current indentation, but
it doesn't split line comment.
Move to JDT/Text.
Comment 3 Dani Megert CLA 2004-02-03 05:30:03 EST
If this bug is about the indentation i.e. step 2 then please reopen and move to
JDT Core.


*** This bug has been marked as a duplicate of 47620 ***
Comment 4 Sebastian Davids CLA 2004-02-03 07:14:32 EST
I'll wait and see how bug 47620 turns out.

The main point of this bug would be:

Two consecutive runs of the formatter (with the same settings) should produce
exactly the same result.

And right now it's not the case.