Browse Source

Merge remote-tracking branch 'upstream/master' into mansheng

newNRvisualizers
Mansheng Yang 14 years ago
parent
commit
9c078eb0fe
  1. 11
      ICSharpCode.NRefactory.CSharp/Ast/Expressions/IdentifierExpression.cs
  2. 2
      ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs
  3. 4
      ICSharpCode.NRefactory.Tests/CSharp/CodeActions/CreateFieldTests.cs
  4. 1
      ICSharpCode.NRefactory.Tests/CSharp/CodeActions/IntroduceConstantTests.cs

11
ICSharpCode.NRefactory.CSharp/Ast/Expressions/IdentifierExpression.cs

@ -55,7 +55,16 @@ namespace ICSharpCode.NRefactory.CSharp @@ -55,7 +55,16 @@ namespace ICSharpCode.NRefactory.CSharp
SetChildByRole(Roles.Identifier, CSharp.Identifier.Create (value));
}
}
public Identifier IdentifierToken {
get {
return GetChildByRole (Roles.Identifier);
}
set {
SetChildByRole (Roles.Identifier, value);
}
}
public AstNodeCollection<AstType> TypeArguments {
get { return GetChildrenByRole (Roles.TypeArgument); }
}

2
ICSharpCode.NRefactory.CSharp/Refactoring/Script.cs

@ -263,8 +263,6 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring @@ -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);
}

4
ICSharpCode.NRefactory.Tests/CSharp/CodeActions/CreateFieldTests.cs

@ -83,7 +83,6 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions @@ -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 @@ -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 @@ -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 @@ -162,7 +159,6 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
}", @"static class TestClass
{
static int foo;
public TestClass ()
{
foo = 5;

1
ICSharpCode.NRefactory.Tests/CSharp/CodeActions/IntroduceConstantTests.cs

@ -83,7 +83,6 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions @@ -83,7 +83,6 @@ namespace ICSharpCode.NRefactory.CSharp.CodeActions
}", @"class TestClass
{
const string HelloWorld = ""Hello World"";
public void Hello ()
{
System.Console.WriteLine (HelloWorld);

Loading…
Cancel
Save