diff --git a/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs b/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs index caf62c78f8..db7dba7edd 100644 --- a/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs +++ b/ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs @@ -263,8 +263,6 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring node.AcceptVisitor (visitor); string text = stringWriter.ToString().TrimEnd(); - if (node is FieldDeclaration) - text += Options.EolMarker; return new NodeOutput(text, formatter.NewSegments); } diff --git a/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/CreateFieldTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/CreateFieldTests.cs index d705fb00c7..7c48571ca0 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/CreateFieldTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/CreateFieldTests.cs @@ -83,7 +83,6 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions "class TestClass" + Environment.NewLine + "{" + Environment.NewLine + " object foo;" + Environment.NewLine + - "" + Environment.NewLine + " void Test ()" + Environment.NewLine + " {" + Environment.NewLine + " Console.WriteLine (foo);" + Environment.NewLine + @@ -111,7 +110,6 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions "class TestClass" + Environment.NewLine + "{" + Environment.NewLine + " int foo;" + Environment.NewLine + - "" + Environment.NewLine + " void Test ()" + Environment.NewLine + " {" + Environment.NewLine + " foo = 0x10;" + Environment.NewLine + @@ -141,7 +139,6 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions "{" + Environment.NewLine + " void FooBar(out string par) {}" + Environment.NewLine + " string foo;" + Environment.NewLine + - "" + Environment.NewLine + " void Test ()" + Environment.NewLine + " {" + Environment.NewLine + " FooBar(out foo);" + Environment.NewLine + @@ -162,7 +159,6 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions }", @"static class TestClass { static int foo; - public TestClass () { foo = 5; diff --git a/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/IntroduceConstantTests.cs b/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/IntroduceConstantTests.cs index f555cd10b4..e1b601a8c2 100644 --- a/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/IntroduceConstantTests.cs +++ b/ICSharpCode.NRefactory.Tests/CSharp/CodeActions/IntroduceConstantTests.cs @@ -83,7 +83,6 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions }", @"class TestClass { const string HelloWorld = ""Hello World""; - public void Hello () { System.Console.WriteLine (HelloWorld);