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-10-20 10:58:12 +0400
committerMike Krüger <mkrueger@novell.com>2009-10-20 10:58:12 +0400
commitbfbdc491fa84696172eeccbff70b44a897abf241 (patch)
tree15171880dc3d206c99aaca1d84e2947f60698527 /main/contrib
parent763a298ef95d6571868bce24d082f199038b7d94 (diff)
* Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: Fixed 'Bug 547329
- Missing default policy for switch'. svn path=/trunk/monodevelop/; revision=144422
Diffstat (limited to 'main/contrib')
-rw-r--r--main/contrib/NRefactory/Project/ChangeLog5
-rw-r--r--main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs12
2 files changed, 7 insertions, 10 deletions
diff --git a/main/contrib/NRefactory/Project/ChangeLog b/main/contrib/NRefactory/Project/ChangeLog
index 61ddcc3e18..a94d707e5c 100644
--- a/main/contrib/NRefactory/Project/ChangeLog
+++ b/main/contrib/NRefactory/Project/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-20 Mike Krüger <mkrueger@novell.com>
+
+ * Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: Fixed 'Bug
+ 547329 - Missing default policy for switch'.
+
2009-10-12 Mike Krüger <mkrueger@novell.com>
* Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: Fixed 'Bug
diff --git a/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs b/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs
index cb1963a9ed..94125d1854 100644
--- a/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs
+++ b/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs
@@ -1544,20 +1544,12 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
outputFormatter.Space();
}
outputFormatter.PrintToken(Tokens.CloseParenthesis);
- outputFormatter.Space();
- outputFormatter.PrintToken(Tokens.OpenCurlyBrace);
- outputFormatter.NewLine();
- if (prettyPrintOptions.IndentSwitchBody)
- ++outputFormatter.IndentationLevel;
+ outputFormatter.BeginBrace(prettyPrintOptions.StatementBraceStyle, prettyPrintOptions.IndentSwitchBody);
foreach (SwitchSection section in switchStatement.SwitchSections) {
TrackVisit(section, data);
}
-
- if (prettyPrintOptions.IndentSwitchBody)
- --outputFormatter.IndentationLevel;
- outputFormatter.Indent();
- outputFormatter.PrintToken(Tokens.CloseCurlyBrace);
+ outputFormatter.EndBrace (prettyPrintOptions.IndentSwitchBody);
return null;
}