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-09-21 15:39:48 +0400
committerMike Krüger <mkrueger@novell.com>2009-09-21 15:39:48 +0400
commitc691f735c1b54f81e05479c35c10b6afab217579 (patch)
treea1d5459f4c217933a9cc7def74ea774281250b93 /main/contrib
parent1e0375adadaf1eca3a1915fe35b75fbe825f14f7 (diff)
* Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: Fixed 'Bug 540466
- Code formatter "place else on new line" is broken'. svn path=/trunk/monodevelop/; revision=142314
Diffstat (limited to 'main/contrib')
-rw-r--r--main/contrib/NRefactory/Project/ChangeLog5
-rw-r--r--main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs3
2 files changed, 7 insertions, 1 deletions
diff --git a/main/contrib/NRefactory/Project/ChangeLog b/main/contrib/NRefactory/Project/ChangeLog
index f90971c2f1..612275fce3 100644
--- a/main/contrib/NRefactory/Project/ChangeLog
+++ b/main/contrib/NRefactory/Project/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-21 Mike Krüger <mkrueger@novell.com>
+
+ * Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: Fixed 'Bug
+ 540466 - Code formatter "place else on new line" is broken'.
+
2009-09-18 Mike Krüger <mkrueger@novell.com>
* Src/Ast/AbstractNode.cs:
diff --git a/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs b/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs
index 39e9212be9..ad888a2723 100644
--- a/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs
+++ b/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs
@@ -1331,7 +1331,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
if (statements.Count == 1 && (statements[0] is BlockStatement)) {
OutputBlock((BlockStatement)statements[0],
prettyPrintOptions.StatementBraceStyle,
- prettyPrintOptions.PlaceElseOnNewLine);
+ prettyPrintOptions.PlaceElseOnNewLine && prettyPrintOptions.PlaceElseIfOnNewLine);
return;
}
/* if (statements.Count != 1 || !(statements[0] is BlockStatement)) {
@@ -1346,6 +1346,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
}
foreach (Statement stmt in statements) {
+
TrackVisit(stmt, prettyPrintOptions.StatementBraceStyle);
}