|
|
|
@ -213,6 +213,15 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
@@ -213,6 +213,15 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
|
|
|
|
|
outputFormatter.Space(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
void PrintFormattedCommaAndNewLine() |
|
|
|
|
{ |
|
|
|
|
if (this.prettyPrintOptions.SpacesBeforeComma) { |
|
|
|
|
outputFormatter.Space(); |
|
|
|
|
} |
|
|
|
|
outputFormatter.PrintToken(Tokens.Comma); |
|
|
|
|
outputFormatter.NewLine(); |
|
|
|
|
outputFormatter.Indent(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override object TrackedVisitAttributeSection(AttributeSection attributeSection, object data) |
|
|
|
|
{ |
|
|
|
@ -1285,7 +1294,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
@@ -1285,7 +1294,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
|
|
|
|
|
prettyPrintOptions.PlaceElseOnNewLine); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
/* if (statements.Count != 1 || !(statements[0] is BlockStatement)) { |
|
|
|
|
/* if (statements.Count != 1 || !(statements[0] is BlockStatement)) { |
|
|
|
|
outputFormatter.Space(); |
|
|
|
|
}*/ |
|
|
|
|
if (statements.Count != 1) { |
|
|
|
@ -1305,7 +1314,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
@@ -1305,7 +1314,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
|
|
|
|
|
} else { |
|
|
|
|
outputFormatter.PrintToken(Tokens.CloseCurlyBrace); |
|
|
|
|
} |
|
|
|
|
/* if (statements.Count != 1 || !(statements[0] is BlockStatement)) { |
|
|
|
|
/* if (statements.Count != 1 || !(statements[0] is BlockStatement)) { |
|
|
|
|
outputFormatter.Space(); |
|
|
|
|
}*/ |
|
|
|
|
} |
|
|
|
@ -2939,10 +2948,10 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
@@ -2939,10 +2948,10 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
|
|
|
|
|
foreach (T node in list) { |
|
|
|
|
node.AcceptVisitor(this, null); |
|
|
|
|
if (i + 1 < list.Count) { |
|
|
|
|
PrintFormattedComma(); |
|
|
|
|
if (alwaysBreakLine || (i + 1) % 10 == 0) { |
|
|
|
|
outputFormatter.NewLine(); |
|
|
|
|
outputFormatter.Indent(); |
|
|
|
|
PrintFormattedCommaAndNewLine(); |
|
|
|
|
} else { |
|
|
|
|
PrintFormattedComma(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
i++; |
|
|
|
|