Browse Source

* Src/PrettyPrinter/CSharp/PrettyPrintOptions.cs:

* Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: Added anonymous
  method brace style.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@4349 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Mike Krüger 16 years ago
parent
commit
a3b56d8ca4
  1. 4
      src/Libraries/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs
  2. 10
      src/Libraries/NRefactory/Project/Src/PrettyPrinter/CSharp/PrettyPrintOptions.cs

4
src/Libraries/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs

@ -1048,7 +1048,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter @@ -1048,7 +1048,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
outputFormatter.NewLine();
}
} else {
OutputBlock(blockStatement, braceStyle);
OutputBlock(blockStatement, braceStyle, useNewLine);
}
}
@ -2531,7 +2531,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter @@ -2531,7 +2531,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
}
outputFormatter.PrintToken(Tokens.CloseParenthesis);
}
OutputBlockAllowInline(anonymousMethodExpression.Body, this.prettyPrintOptions.MethodBraceStyle, false);
OutputBlockAllowInline(anonymousMethodExpression.Body, this.prettyPrintOptions.AnonymousMethodBraceStyle, false);
return null;
}

10
src/Libraries/NRefactory/Project/Src/PrettyPrinter/CSharp/PrettyPrintOptions.cs

@ -30,6 +30,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter @@ -30,6 +30,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
BraceStyle constructorBraceStyle = BraceStyle.NextLine;
BraceStyle destructorBraceStyle = BraceStyle.NextLine;
BraceStyle methodBraceStyle = BraceStyle.NextLine;
BraceStyle anonymousMethodBraceStyle = BraceStyle.EndOfLine;
BraceStyle propertyBraceStyle = BraceStyle.EndOfLine;
bool allowPropertyGetBlockInline = true;
@ -127,6 +128,15 @@ namespace ICSharpCode.NRefactory.PrettyPrinter @@ -127,6 +128,15 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
}
}
public BraceStyle AnonymousMethodBraceStyle {
get {
return anonymousMethodBraceStyle;
}
set {
anonymousMethodBraceStyle = value;
}
}
public BraceStyle PropertyBraceStyle {
get {
return propertyBraceStyle;

Loading…
Cancel
Save