Bug 46033 - New formatter not formatting nested constructor/methods properly
Summary: New formatter not formatting nested constructor/methods properly
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 46023 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-04 10:48 EST by Joseph Cavanaugh CLA
Modified: 2003-11-17 18:32 EST (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 Joseph Cavanaugh CLA 2003-11-04 10:48:31 EST
In the example below, the "Expression s = getBuilder ...." line should be
indented to the same spot as the comment above it.

public class Test {

	protected void doSomeStuff() {
		/*
		 * Comment
		 */
		doSomething(Expression.class, "Sting value for something",
				new Object() {
					public Something buildSomething() {
						// Comment
					Expression s = getBuilder().get("name")
							.equal(getArgument("name", String.class, 0));
					return s;
				}

				});
	}
}
Comment 1 Olivier Thomann CLA 2003-11-06 09:14:26 EST
Now we have:
public class Test {
    protected void doSomeStuff() {
        /*
         * Comment
         */
        doSomething(Expression.class, "Sting value for something",
                new Object() {
                    public Something buildSomething() {
                        // Comment
                        Expression s = getBuilder().get("name")
                                .equal(getArgument("name", String.class, 0));
                        return s;
                    }
                });
    }
}

I think it is much better.
Fixed and released in HEAD.
Regression test added.
Comment 2 Olivier Thomann CLA 2003-11-06 09:45:28 EST
*** Bug 46023 has been marked as a duplicate of this bug. ***
Comment 3 Olivier Thomann CLA 2003-11-06 10:10:25 EST
Change milestone.