Community
Participate
Working Groups
After applying code formatting, the code is reformatted to the following: public class ... public void ...() { ... TestUtils .testName( ACCEPTABLE_NAMES, UNACCEPTABLE_NAMES, new TestUtils.TestNamesWithCommonObject(c) { public void doTest(String name) throws Exception { ((Company) getObject()).setName(name); } }, MalformedNameException.class); } } Besides the extreme usage of vertical screen space, the indentation of the method of the anonymous inner class is a whee bit to the left. Also, the closing curly bracket of the anonymous inner class definition is to very leftish. As humble suggestion for good formatting: public class ... public void ...() { ... TestUtils.testName( ACCEPTABLE_NAMES, UNACCEPTABLE_NAMES, new TestUtils.TestNamesWithCommonObject(c) { public void doTest(String name) throws Exception { ((Company) getObject()).setName(name); } }, MalformedNameException.class ); } } Eclipse version 3.0M4 on Win 2000 Build id: 200310101454
Ahum, I had the new code formatter disabled. My bad. After enabling it and reformatting the code, the result is the following: public void testCompanyConstructor() { TestUtils.testName(ACCEPTABLE_NAMES, UNACCEPTABLE_NAMES, new TestUtils.TestNameInterface() { public void doTest(String name) throws Exception { Company c = new Company(name); } }, MalformedNameException.class); } Now I can only nitpick that the larger 'gap' looks a bit weird. I guess that is more a matter of taste ;-)
I was about to ask you if you enabled the new formatter. Ok to close?
Go ahead and close. It looks solved for me. Thanks and keep up the good work ;-)
Close as WORKSFORME.