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-03-13 19:59:59 +0300
committerMike Krüger <mkrueger@novell.com>2009-03-13 19:59:59 +0300
commit3f2c2708a7d5e6adb19394772a9a94c4926bdcea (patch)
tree479c66d13adac9cb90f5d983393d58a5fe8e6483 /main/contrib
parentaff733a2fd1fd8e1d8fe3b9c4a37ee1a30fbef5d (diff)
* Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: updated
nrefactory. svn path=/trunk/monodevelop/; revision=129305
Diffstat (limited to 'main/contrib')
-rw-r--r--main/contrib/NRefactory/Project/ChangeLog5
-rw-r--r--main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs66
2 files changed, 54 insertions, 17 deletions
diff --git a/main/contrib/NRefactory/Project/ChangeLog b/main/contrib/NRefactory/Project/ChangeLog
index 0fb2ae6e96..1f4dfeda73 100644
--- a/main/contrib/NRefactory/Project/ChangeLog
+++ b/main/contrib/NRefactory/Project/ChangeLog
@@ -1,5 +1,10 @@
2009-03-13 Mike Krüger <mkrueger@novell.com>
+ * Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: updated
+ nrefactory.
+
+2009-03-13 Mike Krüger <mkrueger@novell.com>
+
* Src/PrettyPrinter/CSharp/OutputFormatter.cs:
* Src/PrettyPrinter/CSharp/PrettyPrintOptions.cs:
* Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs: Updated
diff --git a/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs b/main/contrib/NRefactory/Project/Src/PrettyPrinter/CSharp/CSharpOutputVisitor.cs
index 5e9acab298..5e77ce157b 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: 3848 $</version>
+// <version>$Revision: 3849 $</version>
// </file>
using System;
@@ -263,9 +263,13 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
public override object TrackedVisitNamedArgumentExpression(NamedArgumentExpression namedArgumentExpression, object data)
{
outputFormatter.PrintIdentifier(namedArgumentExpression.Name);
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
outputFormatter.PrintToken(Tokens.Assign);
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
TrackVisit(namedArgumentExpression.Expression, data);
return null;
}
@@ -279,9 +283,13 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
outputFormatter.PrintIdentifier(@using.Name);
if (@using.IsAlias) {
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
outputFormatter.PrintToken(Tokens.Assign);
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
TrackVisit(@using.Alias, data);
}
@@ -335,9 +343,13 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
outputFormatter.Indent();
outputFormatter.PrintIdentifier(f.Name);
if (f.Initializer != null && !f.Initializer.IsNull) {
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
outputFormatter.PrintToken(Tokens.Assign);
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
TrackVisit(f.Initializer, data);
}
if (i < typeDeclaration.Children.Count - 1) {
@@ -527,9 +539,13 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
outputFormatter.PrintToken(Tokens.CloseSquareBracket);
}
if (!variableDeclaration.Initializer.IsNull) {
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
outputFormatter.PrintToken(Tokens.Assign);
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
TrackVisit(variableDeclaration.Initializer, data);
}
return null;
@@ -604,9 +620,13 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
outputFormatter.PrintIdentifier(eventDeclaration.Name);
if (!eventDeclaration.Initializer.IsNull) {
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
outputFormatter.PrintToken(Tokens.Assign);
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
TrackVisit(eventDeclaration.Initializer, data);
}
@@ -1071,9 +1091,13 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
outputFormatter.Indent();
}
TrackVisit(eraseStatement.Expressions[i], data);
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
outputFormatter.PrintToken(Tokens.Assign);
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
outputFormatter.PrintToken(Tokens.Null);
outputFormatter.PrintToken(Tokens.Semicolon);
}
@@ -1696,9 +1720,13 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
} else {
TrackVisit(forNextStatement.LoopVariableExpression, data);
}
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
outputFormatter.PrintToken(Tokens.Assign);
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
TrackVisit(forNextStatement.Start, data);
outputFormatter.PrintToken(Tokens.Semicolon);
outputFormatter.Space();
@@ -2751,9 +2779,13 @@ namespace ICSharpCode.NRefactory.PrettyPrinter
outputFormatter.PrintToken(Tokens.Let);
outputFormatter.Space();
outputFormatter.PrintIdentifier(letClause.Identifier);
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
outputFormatter.PrintToken(Tokens.Assign);
- outputFormatter.Space();
+ if (this.prettyPrintOptions.AroundAssignmentParentheses) {
+ outputFormatter.Space();
+ }
return letClause.Expression.AcceptVisitor(this, data);
}