diff options
author | Mike Krüger <mkrueger@novell.com> | 2009-06-23 13:57:05 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@novell.com> | 2009-06-23 13:57:05 +0400 |
commit | 25caaf4a4cb0ff6a95d0c898b478f5fee0e37b9c (patch) | |
tree | 9458370ee28adfd69c6148562e62ba51e1b1e13c /main/contrib | |
parent | e004c7986ce12ff39d6d98577b0ce5e09fd03b0c (diff) |
* Src/PrettyPrinter/CSharp/PrettyPrintOptions.cs:
* Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: Added anonymous
method brace style.
svn path=/trunk/monodevelop/; revision=136692
Diffstat (limited to 'main/contrib')
3 files changed, 19 insertions, 3 deletions
diff --git a/main/contrib/NRefactory/Project/ChangeLog b/main/contrib/NRefactory/Project/ChangeLog index 02f58b2a24..e552184df7 100644 --- a/main/contrib/NRefactory/Project/ChangeLog +++ b/main/contrib/NRefactory/Project/ChangeLog @@ -1,3 +1,9 @@ +2009-06-23 Mike Krüger <mkrueger@novell.com> + + * Src/PrettyPrinter/CSharp/PrettyPrintOptions.cs: + * Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: Added + anonymous method brace style. + 2009-06-22 Mike Krüger <mkrueger@novell.com> * Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: removed diff --git a/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs b/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs index 36468e4257..efefc84f25 100644 --- a/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs +++ b/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs @@ -2,7 +2,7 @@ // <copyright see="prj:///doc/copyright.txt"/> // <license see="prj:///doc/license.txt"/> // <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/> -// <version>$Revision: 3856 $</version> +// <version>$Revision: 4342 $</version> // </file> using System; @@ -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 } outputFormatter.PrintToken(Tokens.CloseParenthesis); } - OutputBlockAllowInline(anonymousMethodExpression.Body, this.prettyPrintOptions.MethodBraceStyle, false); + OutputBlockAllowInline(anonymousMethodExpression.Body, this.prettyPrintOptions.AnonymousMethodBraceStyle, false); return null; } diff --git a/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/PrettyPrintOptions.cs b/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/PrettyPrintOptions.cs index c789dbdc00..9e95d49608 100644 --- a/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/PrettyPrintOptions.cs +++ b/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/PrettyPrintOptions.cs @@ -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 } } + public BraceStyle AnonymousMethodBraceStyle { + get { + return anonymousMethodBraceStyle; + } + set { + anonymousMethodBraceStyle = value; + } + } + public BraceStyle PropertyBraceStyle { get { return propertyBraceStyle; |