Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@novell.com>2009-06-23 13:57:05 +0400
committerMike Krüger <mkrueger@novell.com>2009-06-23 13:57:05 +0400
commit25caaf4a4cb0ff6a95d0c898b478f5fee0e37b9c (patch)
tree9458370ee28adfd69c6148562e62ba51e1b1e13c /main/contrib
parente004c7986ce12ff39d6d98577b0ce5e09fd03b0c (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')
-rw-r--r--main/contrib/NRefactory/Project/ChangeLog6
-rw-r--r--main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs6
-rw-r--r--main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/PrettyPrintOptions.cs10
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;