Browse Source

Use newlines in array initializers.

pull/70/head
Daniel Grunwald 15 years ago
parent
commit
bac3c5c21d
  1. 12
      NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

12
NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

@ -462,7 +462,17 @@ namespace ICSharpCode.NRefactory.CSharp @@ -462,7 +462,17 @@ namespace ICSharpCode.NRefactory.CSharp
else
style = BraceStyle.EndOfLine;
OpenBrace(style);
WriteCommaSeparatedList(arrayInitializerExpression.Children);
bool isFirst = true;
foreach (AstNode node in arrayInitializerExpression.Children) {
if (isFirst) {
isFirst = false;
} else {
Comma(node);
NewLine();
}
node.AcceptVisitor(this, null);
}
NewLine();
CloseBrace(style);
return EndNode(arrayInitializerExpression);
}

Loading…
Cancel
Save