1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 19:35:36 +02:00

Follow-up fix for Bug 325783

This commit is contained in:
Anton Leherbauer 2010-10-22 09:18:42 +00:00
parent b78e2ea29a
commit 7a3b67561a
2 changed files with 15 additions and 12 deletions

View file

@ -1868,6 +1868,7 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
align.fSpaceBetweenEmptyParen= preferences.insert_space_between_empty_parens_in_method_invocation; align.fSpaceBetweenEmptyParen= preferences.insert_space_between_empty_parens_in_method_invocation;
align.fSpaceBeforeComma= preferences.insert_space_before_comma_in_method_invocation_arguments; align.fSpaceBeforeComma= preferences.insert_space_before_comma_in_method_invocation_arguments;
align.fSpaceAfterComma= preferences.insert_space_after_comma_in_method_invocation_arguments; align.fSpaceAfterComma= preferences.insert_space_after_comma_in_method_invocation_arguments;
align.fTieBreakRule = Alignment.R_OUTERMOST;
formatList(expressions, align, true, false); formatList(expressions, align, true, false);
} }

View file

@ -742,11 +742,13 @@ public class CodeFormatterTest extends BaseUITestCase {
// int aVeryLongParameterThatShouldBeInOneLine1; // int aVeryLongParameterThatShouldBeInOneLine1;
// int aVeryLongParameterThatShouldBeInOneLine2; // int aVeryLongParameterThatShouldBeInOneLine2;
// //
// myNewFunctionCall1(Object(aVeryLongParameterThatShouldBeInOneLine1, // myNewFunctionCall1(
// aVeryLongParameterThatShouldBeInOneLine2)); // Object(aVeryLongParameterThatShouldBeInOneLine1,
// aVeryLongParameterThatShouldBeInOneLine2));
// //
// myNewFunctionCall2(new Object(aVeryLongParameterThatShouldBeInOneLine1, // myNewFunctionCall2(
// aVeryLongParameterThatShouldBeInOneLine2)); // new Object(aVeryLongParameterThatShouldBeInOneLine1,
// aVeryLongParameterThatShouldBeInOneLine2));
//} //}
public void testLineWrappingOfConstructorCall_Bug237097() throws Exception { public void testLineWrappingOfConstructorCall_Bug237097() throws Exception {
assertFormatterResult(); assertFormatterResult();
@ -1216,14 +1218,14 @@ public class CodeFormatterTest extends BaseUITestCase {
//void f() { //void f() {
// Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale, (200 + yoff) * ScaleY); // Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale, (200 + yoff) * ScaleY);
// Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale, (200 + yoff) * ScaleY); // Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale, (200 + yoff) * ScaleY);
// Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale, ((200 + yoff) * ScaleY) // Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale,
// - 1); // ((200 + yoff) * ScaleY) - 1);
// Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale, ((200 + yoff) * ScaleY) // Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale,
// - 1); // ((200 + yoff) * ScaleY) - 1);
// Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale, ((200 + yoff) * ScaleY) // Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale,
// + 1); // ((200 + yoff) * ScaleY) + 1);
// Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale, ((200 + yoff) * ScaleY) // Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale,
// + 1); // ((200 + yoff) * ScaleY) + 1);
//} //}
public void testScannerErrorWithIntegerFollowedByStar_Bug278118() throws Exception { public void testScannerErrorWithIntegerFollowedByStar_Bug278118() throws Exception {
assertFormatterResult(); assertFormatterResult();