diff options
author | Mike Krüger <mkrueger@novell.com> | 2009-09-21 15:39:48 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@novell.com> | 2009-09-21 15:39:48 +0400 |
commit | c691f735c1b54f81e05479c35c10b6afab217579 (patch) | |
tree | a1d5459f4c217933a9cc7def74ea774281250b93 /main/contrib | |
parent | 1e0375adadaf1eca3a1915fe35b75fbe825f14f7 (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/ChangeLog | 5 | ||||
-rw-r--r-- | main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs | 3 |
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); } |