mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Revert "Bug 357300 - Function parameter line wrapping wraps commas separating parameters"
This reverts commit cd17d74157
.
This commit is contained in:
parent
5c47f3f1a1
commit
6e0285bb2a
2 changed files with 8 additions and 14 deletions
|
@ -2089,6 +2089,14 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < elementsLength; i++) {
|
for (i = 0; i < elementsLength; i++) {
|
||||||
final IASTNode node= elements.get(i);
|
final IASTNode node= elements.get(i);
|
||||||
|
if (i < elementsLength - 1) {
|
||||||
|
scribe.setTailFormatter(
|
||||||
|
new TrailingTokenFormatter(options.fSeparatorToken,
|
||||||
|
options.fSpaceBeforeSeparator,
|
||||||
|
options.fSpaceAfterSeparator));
|
||||||
|
} else {
|
||||||
|
scribe.setTailFormatter(tailFormatter);
|
||||||
|
}
|
||||||
scribe.alignFragment(alignment, i);
|
scribe.alignFragment(alignment, i);
|
||||||
if (node instanceof ICPPASTConstructorChainInitializer) {
|
if (node instanceof ICPPASTConstructorChainInitializer) {
|
||||||
// Constructor chain initializer is a special case.
|
// Constructor chain initializer is a special case.
|
||||||
|
@ -2097,13 +2105,7 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
|
||||||
node.accept(this);
|
node.accept(this);
|
||||||
}
|
}
|
||||||
if (i < elementsLength - 1) {
|
if (i < elementsLength - 1) {
|
||||||
scribe.setTailFormatter(
|
|
||||||
new TrailingTokenFormatter(options.fSeparatorToken,
|
|
||||||
options.fSpaceBeforeSeparator,
|
|
||||||
options.fSpaceAfterSeparator));
|
|
||||||
scribe.runTailFormatter();
|
scribe.runTailFormatter();
|
||||||
} else {
|
|
||||||
scribe.setTailFormatter(tailFormatter);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (addEllipsis) {
|
if (addEllipsis) {
|
||||||
|
|
|
@ -2688,12 +2688,4 @@ public class CodeFormatterTest extends BaseUITestCase {
|
||||||
assertFormatterResult();
|
assertFormatterResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
//void wrap_when_necessary(more_than_one_template_argument_t<int, float> p1, no_template_arguments_t p2, no_template_arguments_t p3) {}
|
|
||||||
|
|
||||||
//void wrap_when_necessary(more_than_one_template_argument_t<int, float> p1,
|
|
||||||
// no_template_arguments_t p2, no_template_arguments_t p3) {
|
|
||||||
//}
|
|
||||||
public void testTemplateIdInParameterList_Bug357300() throws Exception {
|
|
||||||
assertFormatterResult();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue