提交 5edcfa9d 编写于 作者: T Tomas Matousek

Enable editing methods with anonymous types and remove unused rude edit kinds

上级 6577b5c9
......@@ -495,7 +495,7 @@ class C
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "get"));
Diagnostic(RudeEditKind.DeleteActiveStatement, "get"));
}
[Fact]
......@@ -545,7 +545,7 @@ class C
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "=> M()"));
Diagnostic(RudeEditKind.DeleteActiveStatement, "=> M()"));
}
#endregion
......@@ -903,7 +903,7 @@ class SampleCollection<T>
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "{"));
Diagnostic(RudeEditKind.DeleteActiveStatement, "{"));
}
[Fact]
......@@ -1002,7 +1002,7 @@ class SampleCollection<T>
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "{"));
Diagnostic(RudeEditKind.DeleteActiveStatement, "{"));
}
#endregion
......
......@@ -191,7 +191,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "using (C x)", "using statement"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "using (C x)", "using statement"));
}
#endregion
......@@ -234,7 +234,7 @@ static void Foo(int a)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "{"));
Diagnostic(RudeEditKind.DeleteActiveStatement, "{"));
}
// TODO (tomat): considering a change
......@@ -359,20 +359,20 @@ static void Foo(int a)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "{"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "{"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "{"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "case 2:"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "default:"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "{"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "{"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "while (true)"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "do"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "for (int i = 0; i < 10; i++ )"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "foreach (var i in new[] { 1, 2 })"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "using ( var z = new C() )"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "fixed ( char* p = \"s\" )"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "label"));
Diagnostic(RudeEditKind.DeleteActiveStatement, "{"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "{"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "{"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "case 2:"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "default:"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "{"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "{"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "while (true)"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "do"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "for (int i = 0; i < 10; i++ )"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "foreach (var i in new[] { 1, 2 })"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "using ( var z = new C() )"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "fixed ( char* p = \"s\" )"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "label"));
}
[Fact]
......@@ -582,7 +582,7 @@ static void Foo(int a)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "{"));
Diagnostic(RudeEditKind.DeleteActiveStatement, "{"));
}
[WorkItem(755959)]
......@@ -2284,7 +2284,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "lock (lockThis)", "lock statement"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "lock (lockThis)", "lock statement"));
}
[WorkItem(755749)]
......@@ -2318,7 +2318,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "lock (lockThis)", "lock statement"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "lock (lockThis)", "lock statement"));
}
[Fact]
......@@ -2411,8 +2411,8 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "lock (d)", "lock statement"),
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "lock (e)", "lock statement"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "lock (d)", "lock statement"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "lock (e)", "lock statement"));
}
[Fact]
......@@ -2472,7 +2472,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "lock (d)", "lock statement"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "lock (d)", "lock statement"));
}
[WorkItem(755752)]
......@@ -2507,7 +2507,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "lock (\"test\")", "lock statement"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "lock (\"test\")", "lock statement"));
}
[Fact]
......@@ -2659,7 +2659,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "fixed (int* pj = &value)", "fixed statement"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "fixed (int* pj = &value)", "fixed statement"));
}
[Fact]
......@@ -2741,7 +2741,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "fixed (int* pj = &value)", "fixed statement"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "fixed (int* pj = &value)", "fixed statement"));
}
[WorkItem(755742)]
......@@ -2832,7 +2832,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "fixed (int* p = &value)", "fixed statement"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "fixed (int* p = &value)", "fixed statement"));
}
[WorkItem(755746)]
......@@ -2892,9 +2892,9 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "fixed (int* a = &value2)", "fixed statement"),
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "fixed (int* d = &value1)", "fixed statement"),
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "fixed (int* e = &value1)", "fixed statement"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "fixed (int* a = &value2)", "fixed statement"),
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "fixed (int* d = &value1)", "fixed statement"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "fixed (int* e = &value1)", "fixed statement"));
}
[Fact]
......@@ -3114,7 +3114,7 @@ static void Main(string[] args)
// not ideal, but good enough:
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.ActiveStatementUpdate, "object c"),
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "foreach ( object c in F())", "foreach statement"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "foreach ( object c in F())", "foreach statement"));
}
[Fact]
......@@ -3253,9 +3253,9 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "foreach (var b in e1)", "foreach statement"),
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "foreach (var c in e1)", "foreach statement"),
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "foreach (var a in e1)", "foreach statement"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "foreach (var b in e1)", "foreach statement"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "foreach (var c in e1)", "foreach statement"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "foreach (var a in e1)", "foreach statement"));
}
[Fact]
......@@ -3444,8 +3444,8 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "foreach (var a in e1)", "foreach statement"),
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "foreach (var b in e1)", "foreach statement"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "foreach (var a in e1)", "foreach statement"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "foreach (var b in e1)", "foreach statement"));
}
#endregion
......@@ -3562,7 +3562,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "for (; i < 10 ; i++)"));
Diagnostic(RudeEditKind.DeleteActiveStatement, "for (; i < 10 ; i++)"));
}
[Fact]
......@@ -3740,7 +3740,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "for (int i = 1; ; i++ )"));
Diagnostic(RudeEditKind.DeleteActiveStatement, "for (int i = 1; ; i++ )"));
}
[Fact]
......@@ -3934,7 +3934,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "using (c)", "using statement"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "using (c)", "using statement"));
}
[Fact]
......@@ -3995,7 +3995,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "using (c)", "using statement"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "using (c)", "using statement"));
}
#endregion
......@@ -4300,7 +4300,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "try", "try block"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "try", "try block"));
}
[Fact]
......@@ -4385,7 +4385,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Foo();", "try block"));
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Foo();", "try block"));
}
[Fact]
......@@ -4476,7 +4476,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "try", "try block"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "try", "try block"));
}
[Fact]
......@@ -4667,7 +4667,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "catch", "catch clause"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "catch", "catch clause"));
}
[Fact]
......@@ -4710,7 +4710,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "catch", "catch clause"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "catch", "catch clause"));
}
[Fact]
......@@ -4753,7 +4753,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Foo();", "catch clause"));
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Foo();", "catch clause"));
}
[Fact]
......@@ -4796,7 +4796,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Console.WriteLine(1);", "catch clause"));
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Console.WriteLine(1);", "catch clause"));
}
[Fact]
......@@ -4845,7 +4845,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "catch", "catch clause"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "catch", "catch clause"));
}
[Fact]
......@@ -4891,7 +4891,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "catch", "catch clause"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "catch", "catch clause"));
}
[Fact]
......@@ -4940,7 +4940,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "catch", "catch clause"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "catch", "catch clause"));
}
[Fact]
......@@ -4987,7 +4987,7 @@ static void Foo()
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.ActiveStatementUpdate, "when (Foo(2))"),
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "catch", "catch clause"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "catch", "catch clause"));
}
[Fact]
......@@ -5023,7 +5023,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "catch", "catch clause"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "catch", "catch clause"));
}
[Fact]
......@@ -5059,7 +5059,7 @@ static void Main(string[] args)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "catch", "catch clause"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "catch", "catch clause"));
}
#endregion
......@@ -5106,7 +5106,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "finally", "finally clause"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "finally", "finally clause"));
}
[Fact]
......@@ -5149,7 +5149,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "finally", "finally clause"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "finally", "finally clause"));
}
[Fact]
......@@ -5192,7 +5192,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Foo();", "finally clause"));
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Foo();", "finally clause"));
}
[Fact]
......@@ -5235,7 +5235,7 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Console.WriteLine(1);", "finally clause"));
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Console.WriteLine(1);", "finally clause"));
}
#endregion
......@@ -5324,10 +5324,10 @@ static void Foo()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "catch", "catch clause"),
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "try", "try block"),
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Foo();", "try block"),
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "finally", "finally clause"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "catch", "catch clause"),
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "try", "try block"),
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Foo();", "try block"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "finally", "finally clause"));
}
[Fact]
......@@ -5593,7 +5593,7 @@ static void Main()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "return 1 + Foo(x);", "try block"));
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "return 1 + Foo(x);", "try block"));
}
[Fact]
......@@ -5716,7 +5716,7 @@ private static int M(int a, int b)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "checked", "checked statement"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "checked", "checked statement"));
}
[Fact]
......@@ -5755,7 +5755,7 @@ private static int M(int a, int b)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "System.Console.WriteLine(5 * M(1, 2));", "checked statement"));
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "System.Console.WriteLine(5 * M(1, 2));", "checked statement"));
}
[Fact]
......@@ -5797,7 +5797,7 @@ private static int M(int a, int b)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "checked", "checked statement"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "checked", "checked statement"));
}
[Fact]
......@@ -5843,7 +5843,7 @@ private static int M(int a, int b)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "checked", "checked statement"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "checked", "checked statement"));
}
[Fact]
......@@ -5897,7 +5897,7 @@ private static int M(int a, int b)
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "checked", "checked statement"));
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "checked", "checked statement"));
}
#endregion
......@@ -6508,7 +6508,7 @@ static IEnumerable<int> F()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "yield return 1;", "yield statement"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "yield return 1;", "yield statement"));
}
[Fact]
......@@ -6598,7 +6598,7 @@ static async Task<int> F()
var active = GetActiveStatements(src1, src2);
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "await", "await expression"));
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "await", "await expression"));
}
[Fact]
......
......@@ -638,7 +638,7 @@ public static void Main()
Assert.True(result.IsSingle());
Assert.Equal(1, result.Single().RudeEditErrors.Count());
Assert.Equal(RudeEditKind.RUDE_EDIT_ADD_NEW_FILE, result.Single().RudeEditErrors.Single().Kind);
Assert.Equal(RudeEditKind.InsertFile, result.Single().RudeEditErrors.Single().Kind);
}
}
}
......
......@@ -3083,22 +3083,18 @@ public void MethodUpdate_AnonymousType()
var edits = GetTopEdits(src1, src2);
// TODO (tomat): no errors
edits.VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "new", "method"));
edits.VerifyRudeDiagnostics();
}
[Fact]
public void MethodWithExpressionBody_Update_AnonymousType()
{
var src1 = "class C { void M() => new { A = 1, B = 2 }; }";
var src2 = "class C { void M() => new { A = 10, B = 20 }; }";
var src1 = "class C { void M() => F(new { A = 1, B = 2 }); }";
var src2 = "class C { void M() => F(new { A = 10, B = 20 }); }";
var edits = GetTopEdits(src1, src2);
// TODO (tomat): no errors
edits.VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "new", "method"));
edits.VerifyRudeDiagnostics();
}
[Fact]
......@@ -3543,7 +3539,7 @@ class B
Diagnostic(RudeEditKind.Delete, "class B", "destructor"));
}
[Fact(Skip = "789577")]
[Fact]
[WorkItem(789577)]
public void ConstructorUpdate_AnonymousTypeInFieldInitializer()
{
......@@ -3552,9 +3548,7 @@ public void ConstructorUpdate_AnonymousTypeInFieldInitializer()
var edits = GetTopEdits(src1, src2);
// TODO (tomat): no errors
edits.VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "new", "constructor"));
edits.VerifyRudeDiagnostics();
}
[Fact]
......@@ -4529,9 +4523,7 @@ public void FieldInitializerUpdate_AnonymousTypeInConstructor()
var edits = GetTopEdits(src1, src2);
// TODO (tomat): no errors
edits.VerifySemanticDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "new", "constructor"));
edits.VerifySemanticDiagnostics();
}
[Fact]
......@@ -4542,9 +4534,7 @@ public void PropertyInitializerUpdate_AnonymousTypeInConstructor()
var edits = GetTopEdits(src1, src2);
// TODO (tomat): no errors
edits.VerifySemanticDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "new", "constructor"));
edits.VerifySemanticDiagnostics();
}
[Fact]
......@@ -4687,9 +4677,7 @@ public void FieldInitializerUpdate_AnonymousType()
var edits = GetTopEdits(src1, src2);
// TODO (tomat): no errors
edits.VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "new", "field"));
edits.VerifyRudeDiagnostics();
}
[Fact]
......@@ -4700,9 +4688,7 @@ public void PropertyInitializerUpdate_AnonymousType()
var edits = GetTopEdits(src1, src2);
// TODO (tomat): no errors
edits.VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "new", "auto-property"));
edits.VerifyRudeDiagnostics();
}
#endregion
......
......@@ -22,18 +22,10 @@ public void ToDiagnostic()
var arg0 = new HashSet<RudeEditKind>()
{
RudeEditKind.ActiveStatementUpdate,
RudeEditKind.STMT_MID_DELETE,
RudeEditKind.STMT_NON_LEAF_DELETE,
RudeEditKind.STMT_CTOR_CALL,
RudeEditKind.STMT_FIELD_INIT,
RudeEditKind.STMT_DELETE,
RudeEditKind.STMT_DELETE_REMAP,
RudeEditKind.STMT_READONLY,
RudeEditKind.RUDE_NO_ACTIVE_STMT,
RudeEditKind.RUDE_ACTIVE_STMT_DELETED,
RudeEditKind.EXC_HANDLER_ERROR,
RudeEditKind.EXC_FINALLY_ERROR,
RudeEditKind.EXC_CATCH_ERROR,
RudeEditKind.DeleteActiveStatement,
RudeEditKind.UpdateExceptionHandlerOfActiveTry,
RudeEditKind.UpdateTryOrCatchWithActiveFinally,
RudeEditKind.UpdateCatchHandlerAroundActiveStatement,
RudeEditKind.FieldKindUpdate,
RudeEditKind.TypeKindUpdate,
RudeEditKind.AccessorKindUpdate,
......@@ -48,23 +40,7 @@ public void ToDiagnostic()
RudeEditKind.GenericTypeUpdate,
RudeEditKind.ExperimentalFeaturesEnabled,
RudeEditKind.AwaitStatementUpdate,
RudeEditKind.RUDE_EDIT_MODIFY_ANON_METHOD,
RudeEditKind.RUDE_EDIT_ADD_ANON_METHOD,
RudeEditKind.RUDE_EDIT_DELETE_ANON_METHOD,
RudeEditKind.RUDE_EDIT_MOVE_ANON_METHOD,
RudeEditKind.RUDE_EDIT_MODIFY_LAMBDA_EXPRESSION,
RudeEditKind.RUDE_EDIT_ADD_LAMBDA_EXPRESSION,
RudeEditKind.RUDE_EDIT_DELETE_LAMBDA_EXPRESSION,
RudeEditKind.RUDE_EDIT_MOVE_LAMBDA_EXPRESSION,
RudeEditKind.RUDE_EDIT_MODIFY_QUERY_EXPRESSION,
RudeEditKind.RUDE_EDIT_ADD_QUERY_EXPRESSION,
RudeEditKind.RUDE_EDIT_DELETE_QUERY_EXPRESSION,
RudeEditKind.RUDE_EDIT_MOVE_QUERY_EXPRESSION,
RudeEditKind.RUDE_EDIT_MODIFY_ANONYMOUS_TYPE,
RudeEditKind.RUDE_EDIT_ADD_ANONYMOUS_TYPE,
RudeEditKind.RUDE_EDIT_DELETE_ANONYMOUS_TYPE,
RudeEditKind.RUDE_EDIT_MOVE_ANONYMOUS_TYPE,
RudeEditKind.RUDE_EDIT_ADD_NEW_FILE,
RudeEditKind.InsertFile,
};
var arg2 = new HashSet<RudeEditKind>()
......
......@@ -313,7 +313,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "Shared Sub Main()"))
Diagnostic(RudeEditKind.DeleteActiveStatement, "Shared Sub Main()"))
End Sub
<Fact, WorkItem(755959)>
......@@ -418,21 +418,21 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "Do"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "If True"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "Else"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "Case 1, 2"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "Case Else"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "While True"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "Do Until True"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "If True Then"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "Else"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "For i = 0 To 10"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "For Each i In {1, 2}"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "Using z = New C()"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "With expr"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "Shared Sub Main()"),
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "SyncLock Nothing"))
Diagnostic(RudeEditKind.DeleteActiveStatement, "Do"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "If True"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "Else"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "Case 1, 2"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "Case Else"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "While True"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "Do Until True"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "If True Then"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "Else"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "For i = 0 To 10"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "For Each i In {1, 2}"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "Using z = New C()"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "With expr"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "Shared Sub Main()"),
Diagnostic(RudeEditKind.DeleteActiveStatement, "SyncLock Nothing"))
End Sub
<Fact>
......@@ -473,7 +473,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "If c1 Then"))
Diagnostic(RudeEditKind.DeleteActiveStatement, "If c1 Then"))
End Sub
<Fact>
......@@ -510,7 +510,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "If c1 Then"))
Diagnostic(RudeEditKind.DeleteActiveStatement, "If c1 Then"))
End Sub
<Fact, WorkItem(755959)>
......@@ -645,7 +645,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, "Sub Main()"))
Diagnostic(RudeEditKind.DeleteActiveStatement, "Sub Main()"))
End Sub
<Fact, WorkItem(755959)>
......@@ -2423,7 +2423,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "SyncLock lockThis", "SyncLock block"))
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "SyncLock lockThis", "SyncLock block"))
End Sub
<Fact>
......@@ -2459,8 +2459,8 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "SyncLock d", "SyncLock block"),
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "SyncLock e", "SyncLock block"))
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "SyncLock d", "SyncLock block"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "SyncLock e", "SyncLock block"))
End Sub
<Fact>
......@@ -2496,7 +2496,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "SyncLock d", "SyncLock statement"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "SyncLock d", "SyncLock statement"))
End Sub
<WorkItem(755752)>
......@@ -2523,7 +2523,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "SyncLock ""test""", "SyncLock statement"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "SyncLock ""test""", "SyncLock statement"))
End Sub
<Fact>
......@@ -2674,9 +2674,9 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "For Each b In e1", "For Each block"),
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "For Each c In e1", "For Each block"),
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "For Each a In e1", "For Each block"))
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "For Each b In e1", "For Each block"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "For Each c In e1", "For Each block"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "For Each a In e1", "For Each block"))
End Sub
<Fact>
......@@ -2809,8 +2809,8 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "For Each a In e1", "For Each block"),
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "For Each b In e1", "For Each block"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "For Each a In e1", "For Each block"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "For Each b In e1", "For Each block"),
Diagnostic(RudeEditKind.RUDE_EDIT_LAMBDA_EXPRESSION, "Sub()", "method"))
End Sub
......@@ -2846,7 +2846,7 @@ End Class
"
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active, Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "Using c", "Using block"))
edits.VerifyRudeDiagnostics(active, Diagnostic(RudeEditKind.InsertAroundActiveStatement, "Using c", "Using block"))
End Sub
<Fact>
......@@ -2887,7 +2887,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "Using c", "Using block"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "Using c", "Using block"),
Diagnostic(RudeEditKind.RUDE_EDIT_LAMBDA_EXPRESSION, "Function()", "method"))
End Sub
......@@ -2924,7 +2924,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "With c", "With block"))
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "With c", "With block"))
End Sub
<Fact>
......@@ -2965,7 +2965,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "With c", "With block"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "With c", "With block"),
Diagnostic(RudeEditKind.RUDE_EDIT_LAMBDA_EXPRESSION, "Function()", "method"))
End Sub
......@@ -3005,7 +3005,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "Try", "Try block"))
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "Try", "Try block"))
End Sub
<Fact>
......@@ -3071,7 +3071,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Foo()", "Try block"))
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Foo()", "Try block"))
End Sub
<Fact>
......@@ -3141,7 +3141,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "Try", "Try block"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "Try", "Try block"))
End Sub
<Fact>
......@@ -3281,7 +3281,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "Catch", "Catch clause"))
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "Catch", "Catch clause"))
End Sub
<Fact>
......@@ -3316,7 +3316,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "Catch", "Catch clause"))
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "Catch", "Catch clause"))
End Sub
<Fact>
......@@ -3351,7 +3351,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Foo()", "Catch clause"))
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Foo()", "Catch clause"))
End Sub
<Fact>
......@@ -3384,7 +3384,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Console.WriteLine(1)", "Catch clause"))
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Console.WriteLine(1)", "Catch clause"))
End Sub
<Fact>
......@@ -3421,7 +3421,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "Catch", "Catch clause"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "Catch", "Catch clause"))
End Sub
<Fact>
......@@ -3458,7 +3458,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "Catch", "Catch clause"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "Catch", "Catch clause"))
End Sub
<Fact>
......@@ -3496,7 +3496,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.ActiveStatementUpdate, "Catch e As IOException When Foo(2)"),
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "Catch", "Catch clause"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "Catch", "Catch clause"))
End Sub
<Fact>
......@@ -3533,7 +3533,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "Catch", "Catch clause"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "Catch", "Catch clause"))
End Sub
<Fact>
......@@ -3571,7 +3571,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "Catch", "Catch clause"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "Catch", "Catch clause"))
End Sub
<Fact>
......@@ -3605,7 +3605,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "Finally", "Finally clause"))
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "Finally", "Finally clause"))
End Sub
<Fact>
......@@ -3638,7 +3638,7 @@ End Class
"
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active, Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "Finally", "Finally clause"))
edits.VerifyRudeDiagnostics(active, Diagnostic(RudeEditKind.InsertAroundActiveStatement, "Finally", "Finally clause"))
End Sub
<Fact>
......@@ -3672,7 +3672,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Foo()", "Finally clause"))
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Foo()", "Finally clause"))
End Sub
<Fact>
......@@ -3707,7 +3707,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Console.WriteLine(1)", "Finally clause"))
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Console.WriteLine(1)", "Finally clause"))
End Sub
<Fact>
......@@ -3761,10 +3761,10 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "Catch", "Catch clause"),
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "Try", "Try block"),
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Foo()", "Try block"),
Diagnostic(RudeEditKind.RUDE_EDIT_INSERT_AROUND, "Finally", "Finally clause"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "Catch", "Catch clause"),
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "Try", "Try block"),
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Foo()", "Try block"),
Diagnostic(RudeEditKind.InsertAroundActiveStatement, "Finally", "Finally clause"))
End Sub
<Fact>
......@@ -3887,7 +3887,7 @@ End Class
Dim edits = GetTopEdits(src1, src2)
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_DELETE_AROUND, "Return 1 + Foo(x)", "Try block"),
Diagnostic(RudeEditKind.DeleteAroundActiveStatement, "Return 1 + Foo(x)", "Try block"),
Diagnostic(RudeEditKind.RUDE_EDIT_LAMBDA_EXPRESSION, "Function(x)", "method"))
End Sub
......@@ -4424,7 +4424,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "On Error GoTo label", "On Error statement"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "On Error GoTo label", "On Error statement"))
End Sub
<Fact>
......@@ -4435,7 +4435,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "On Error GoTo 0", "On Error statement"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "On Error GoTo 0", "On Error statement"))
End Sub
<Fact>
......@@ -4446,7 +4446,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "On Error GoTo -1", "On Error statement"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "On Error GoTo -1", "On Error statement"))
End Sub
<Fact>
......@@ -4457,7 +4457,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "On Error Resume Next", "On Error statement"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "On Error Resume Next", "On Error statement"))
End Sub
<Fact>
......@@ -4468,7 +4468,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "Resume", "Resume statement"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "Resume", "Resume statement"))
End Sub
<Fact>
......@@ -4479,7 +4479,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "Resume Next", "Resume statement"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "Resume Next", "Resume statement"))
End Sub
<Fact>
......@@ -4490,7 +4490,7 @@ End Class
Dim active = GetActiveStatements(src1, src2)
edits.VerifyRudeDiagnostics(active,
Diagnostic(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, "Resume label", "Resume statement"))
Diagnostic(RudeEditKind.UpdateAroundActiveStatement, "Resume label", "Resume statement"))
End Sub
#End Region
......
......@@ -2366,8 +2366,7 @@ End Class
Dim src2 = "Class C" & vbLf & "Sub M()" & vbLf & "F(2, New With { .A = 1, .B = 2 }) : End Sub : End Class"
Dim edits = GetTopEdits(src1, src2)
edits.VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "New With", "method"))
edits.VerifyRudeDiagnostics()
End Sub
<Fact>
......@@ -2411,7 +2410,7 @@ End Class
"Insert [()]@44")
edits.VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ADD_HANDLES_CLAUSE, "Private Sub Foo()", "method"))
Diagnostic(RudeEditKind.InsertHandlesClause, "Private Sub Foo()", "method"))
End Sub
#End Region
......@@ -2469,14 +2468,13 @@ End Class
Diagnostic(RudeEditKind.Insert, "b As Integer", "parameter"))
End Sub
<Fact(Skip:="789577"), WorkItem(789577)>
<Fact, WorkItem(789577)>
Public Sub ConstructorUpdate_AnonymousTypeInFieldInitializer()
Dim src1 = "Class C : Dim a As Integer = F(New With { .A = 1, .B = 2 })" & vbLf & "Sub New()" & vbLf & " x = 1 : End Sub : End Class"
Dim src2 = "Class C : Dim a As Integer = F(New With { .A = 1, .B = 2 })" & vbLf & "Sub New()" & vbLf & " x = 2 : End Sub : End Class"
Dim edits = GetTopEdits(src1, src2)
edits.VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "new", "constructor"))
edits.VerifyRudeDiagnostics()
End Sub
<Fact>
......@@ -4381,24 +4379,22 @@ End Class
Diagnostic(RudeEditKind.RUDE_EDIT_QUERY_EXPRESSION, "From", "constructor"))
End Sub
<Fact(Skip:="726990")>
<Fact>
Public Sub FieldUpdate_AnonymousTypeInConstructor()
Dim src1 = "Class C : Dim a As Integer = 1 : " & vbLf & "Sub New()" & vbLf & "F(New With { .A = 1, .B = 2 }) : End Sub : End Class"
Dim src2 = "Class C : Dim a As Integer = 2 : " & vbLf & "Sub New()" & vbLf & "F(New With { .A = 1, .B = 2 }) : End Sub : End Class"
Dim edits = GetTopEdits(src1, src2)
edits.VerifySemanticDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "new", "constructor"))
edits.VerifySemanticDiagnostics()
End Sub
<Fact(Skip:="726990")>
<Fact>
Public Sub PropertyUpdate_AnonymousTypeInConstructor()
Dim src1 = "Class C : Property a As Integer = 1 : " & vbLf & "Sub New()" & vbLf & "F(New With { .A = 1, .B = 2 }) : End Sub : End Class"
Dim src2 = "Class C : Property a As Integer = 2 : " & vbLf & "Sub New()" & vbLf & "F(New With { .A = 1, .B = 2 }) : End Sub : End Class"
Dim edits = GetTopEdits(src1, src2)
edits.VerifySemanticDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "New With", "constructor"))
edits.VerifySemanticDiagnostics()
End Sub
<Fact>
......@@ -4687,8 +4683,7 @@ End Class
Dim src2 = "Class C : Dim a As Integer = F(2, New With { .A = 1, .B = 2 }) : End Class"
Dim edits = GetTopEdits(src1, src2)
edits.VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "New With", "field"))
edits.VerifyRudeDiagnostics()
End Sub
<Fact>
......@@ -4697,8 +4692,7 @@ End Class
Dim src2 = "Class C : Property a As Integer = F(2, New With { .A = 1, .B = 2 }) : End Class"
Dim edits = GetTopEdits(src1, src2)
edits.VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "New With", "auto-property"))
edits.VerifyRudeDiagnostics()
End Sub
<Fact>
......@@ -4707,8 +4701,7 @@ End Class
Dim src2 = "Class C : Property a As New C(2, New With { .A = 1, .B = 2 }) : End Class"
Dim edits = GetTopEdits(src1, src2)
edits.VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, "New With", "auto-property"))
edits.VerifyRudeDiagnostics()
End Sub
#End Region
......
......@@ -640,7 +640,7 @@ End Class
Assert.True(result.IsSingle())
Assert.Equal(1, result.Single().RudeEditErrors.Count())
Assert.Equal(RudeEditKind.RUDE_EDIT_ADD_NEW_FILE, result.Single().RudeEditErrors.Single().Kind)
Assert.Equal(RudeEditKind.InsertFile, result.Single().RudeEditErrors.Single().Kind)
End Using
End Sub
End Class
......
......@@ -2511,11 +2511,6 @@ public void ClassifyDeclarationBodyRudeUpdates(SyntaxNode newDeclarationOrBody,
ReportError(RudeEditKind.RUDE_EDIT_QUERY_EXPRESSION, node, _newNode);
}
return;
case SyntaxKind.AnonymousObjectCreationExpression:
// TODO (tomat): allow
ReportError(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, node, _newNode);
return;
}
}
}
......
......@@ -416,7 +416,7 @@ private bool HasInitializer(SyntaxNode declaration)
{
DocumentAnalysisResults.Log.Write("A new file added: {0}", document.Name);
return DocumentAnalysisResults.SyntaxErrors(ImmutableArray.Create(
new RudeEditDiagnostic(RudeEditKind.RUDE_EDIT_ADD_NEW_FILE, default(TextSpan))));
new RudeEditDiagnostic(RudeEditKind.InsertFile, default(TextSpan))));
}
cancellationToken.ThrowIfCancellationRequested();
......@@ -1073,7 +1073,7 @@ internal struct UpdatedMethodInfo
{
// rude edit: internal active statement deleted
diagnostics.Add(
new RudeEditDiagnostic(RudeEditKind.RUDE_ACTIVE_STMT_DELETED,
new RudeEditDiagnostic(RudeEditKind.DeleteActiveStatement,
GetDeletedNodeDiagnosticSpan(match.Matches, oldStatementSyntax)));
}
}
......@@ -1275,7 +1275,7 @@ internal struct UpdatedMethodInfo
var insertedNode = newStateMachineSuspensionPoints[rudeEdit.NewIndex];
diagnostics.Add(new RudeEditDiagnostic(
creatingStateMachineAroundActiveStatement ? RudeEditKind.RUDE_EDIT_INSERT_AROUND : RudeEditKind.Insert,
creatingStateMachineAroundActiveStatement ? RudeEditKind.InsertAroundActiveStatement : RudeEditKind.Insert,
GetDiagnosticSpan(insertedNode, EditKind.Insert),
insertedNode,
new[] { GetStatementDisplayName(insertedNode, EditKind.Insert) }));
......@@ -1588,7 +1588,7 @@ protected void AddRudeDiagnostic(List<RudeEditDiagnostic> diagnostics, SyntaxNod
protected void AddRudeUpdateAroundActiveStatement(List<RudeEditDiagnostic> diagnostics, SyntaxNode newNode)
{
diagnostics.Add(new RudeEditDiagnostic(
RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT,
RudeEditKind.UpdateAroundActiveStatement,
GetDiagnosticSpan(newNode, EditKind.Update),
newNode,
new[] { GetStatementDisplayName(newNode, EditKind.Update) }));
......@@ -1597,7 +1597,7 @@ protected void AddRudeUpdateAroundActiveStatement(List<RudeEditDiagnostic> diagn
protected void AddRudeInsertAroundActiveStatement(List<RudeEditDiagnostic> diagnostics, SyntaxNode newNode)
{
diagnostics.Add(new RudeEditDiagnostic(
RudeEditKind.RUDE_EDIT_INSERT_AROUND,
RudeEditKind.InsertAroundActiveStatement,
GetDiagnosticSpan(newNode, EditKind.Insert),
newNode,
new[] { GetStatementDisplayName(newNode, EditKind.Insert) }));
......@@ -1606,7 +1606,7 @@ protected void AddRudeInsertAroundActiveStatement(List<RudeEditDiagnostic> diagn
protected void AddRudeDeleteAroundActiveStatement(List<RudeEditDiagnostic> diagnostics, SyntaxNode oldNode, SyntaxNode newActiveStatement)
{
diagnostics.Add(new RudeEditDiagnostic(
RudeEditKind.RUDE_EDIT_DELETE_AROUND,
RudeEditKind.DeleteAroundActiveStatement,
newActiveStatement.Span,
oldNode,
new[] { GetStatementDisplayName(oldNode, EditKind.Delete) }));
......
......@@ -14,21 +14,13 @@ internal static class RudeEditDiagnosticDescriptors
{
private static readonly ImmutableDictionary<RudeEditKind, DiagnosticDescriptor> s_descriptors = new List<KeyValuePair<RudeEditKind, DiagnosticDescriptor>>
{
{ GetDescriptorPair(RudeEditKind.STMT_MID_DELETE, FeaturesResources.EditingOrDeletingBeingExecuted) },
{ GetDescriptorPair(RudeEditKind.STMT_NON_LEAF_DELETE, FeaturesResources.EditingOrDeletingNotAtTheTop) },
{ GetDescriptorPair(RudeEditKind.STMT_CTOR_CALL, FeaturesResources.EditingOrDeletingConstructorDeclaration) },
{ GetDescriptorPair(RudeEditKind.STMT_FIELD_INIT, FeaturesResources.EditingOrDeletingFieldInitializer) },
{ GetDescriptorPair(RudeEditKind.STMT_DELETE, FeaturesResources.AnActiveStatementMarkerHasBeenDeleted) },
{ GetDescriptorPair(RudeEditKind.STMT_DELETE_REMAP, FeaturesResources.AnActiveStatementMarkerHasBeenDeletedAnd) },
{ GetDescriptorPair(RudeEditKind.STMT_READONLY, FeaturesResources.EditingOrCommentingOut) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_INSERT_AROUND, FeaturesResources.AddingAAroundAnActiveStatement) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_DELETE_AROUND, FeaturesResources.DeletingAAroundAnActiveStatement) },
{ GetDescriptorPair(RudeEditKind.RUDE_NO_ACTIVE_STMT, FeaturesResources.ErrorLocatingAnActiveStatement) },
{ GetDescriptorPair(RudeEditKind.RUDE_ACTIVE_STMT_DELETED, FeaturesResources.AnActiveStatementHasBeenRemoved) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_AROUND_ACTIVE_STMT, FeaturesResources.UpdatingAStatementAroundActive) },
{ GetDescriptorPair(RudeEditKind.EXC_HANDLER_ERROR, FeaturesResources.ModifyingACatchFinallyHandler) },
{ GetDescriptorPair(RudeEditKind.EXC_FINALLY_ERROR, FeaturesResources.ModifyingATryCatchFinally) },
{ GetDescriptorPair(RudeEditKind.EXC_CATCH_ERROR, FeaturesResources.ModifyingACatchHandlerAround) },
{ GetDescriptorPair(RudeEditKind.InsertAroundActiveStatement, FeaturesResources.AddingAAroundAnActiveStatement) },
{ GetDescriptorPair(RudeEditKind.DeleteAroundActiveStatement, FeaturesResources.DeletingAAroundAnActiveStatement) },
{ GetDescriptorPair(RudeEditKind.DeleteActiveStatement, FeaturesResources.AnActiveStatementHasBeenRemoved) },
{ GetDescriptorPair(RudeEditKind.UpdateAroundActiveStatement, FeaturesResources.UpdatingAStatementAroundActive) },
{ GetDescriptorPair(RudeEditKind.UpdateExceptionHandlerOfActiveTry, FeaturesResources.ModifyingACatchFinallyHandler) },
{ GetDescriptorPair(RudeEditKind.UpdateTryOrCatchWithActiveFinally, FeaturesResources.ModifyingATryCatchFinally) },
{ GetDescriptorPair(RudeEditKind.UpdateCatchHandlerAroundActiveStatement, FeaturesResources.ModifyingACatchHandlerAround) },
{ GetDescriptorPair(RudeEditKind.Update, FeaturesResources.UpdatingAWillPrevent) },
{ GetDescriptorPair(RudeEditKind.ModifiersUpdate, FeaturesResources.UpdatingTheModifiersOf) },
{ GetDescriptorPair(RudeEditKind.VarianceUpdate, FeaturesResources.UpdatingTheVarianceOf) },
......@@ -78,52 +70,19 @@ internal static class RudeEditDiagnosticDescriptors
{ GetDescriptorPair(RudeEditKind.NotAccessingCapturedVariableInLambda, FeaturesResources.NotAccessingCapturedVariableInLambda) },
{ GetDescriptorPair(RudeEditKind.InsertLambdaWithMultiScopeCapture, FeaturesResources.InsertLambdaWithMultiScopeCapture) },
{ GetDescriptorPair(RudeEditKind.DeleteLambdaWithMultiScopeCapture, FeaturesResources.DeleteLambdaWithMultiScopeCapture) },
{ GetDescriptorPair(RudeEditKind.ActiveStatementUpdate, FeaturesResources.UpdatingAnActiveStatement) },
{ GetDescriptorPair(RudeEditKind.ActiveStatementLambdaRemoved, FeaturesResources.RemovingThatContainsActiveStatement) },
{ GetDescriptorPair(RudeEditKind.InsertFile, FeaturesResources.AddingANewFile) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_ANON_METHOD, FeaturesResources.ModifyingAWhichContainsAnonymousMethod) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_YIELD, FeaturesResources.ModifyingAWhichContainsYield) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_FIELD_ANON_METH, FeaturesResources.ModifyingAInitializerWithAnonymousMethod) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_NON_USER_STMT, FeaturesResources.ModifyingAContainingAnActiveStatement) },
{ GetDescriptorPair(RudeEditKind.FIELD_WITH_ANON_METHOD, FeaturesResources.ConstructorCannotBeModifiedAnonymousMethod) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_LAMBDA_EXPRESSION, FeaturesResources.ModifyingAWhichContainsLambda) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_QUERY_EXPRESSION, FeaturesResources.ModifyingAWhichContainsQuery) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, FeaturesResources.ModifyingAWhichContainsAnonymousType) },
{ GetDescriptorPair(RudeEditKind.FIELD_WITH_LAMBDA, FeaturesResources.ConstructorCannotBeModifiedLambda) },
{ GetDescriptorPair(RudeEditKind.FIELD_WITH_QUERY, FeaturesResources.ConstructorCannotBeModifiedQuery) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_FIELD_LAMBDA, FeaturesResources.ModifyingAInitializerWithLambda) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_FIELD_QUERY, FeaturesResources.ModifyingAInitializerWithQuery) },
{ GetDescriptorPair(RudeEditKind.FIELD_WITH_ANON_TYPE, FeaturesResources.ConstructorCannotBeModifiedAnonymousType) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_FIELD_ANON_TYPE, FeaturesResources.ModifyingAInitializerWithAnonymousType) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_DYNAMIC_INVOCATION, FeaturesResources.ModifyingAWhichContainsDynamic) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_NOPIA_USAGE, FeaturesResources.ModifyingAWhichContainsEmbeddedInterop) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_MODIFY_ANON_METHOD, FeaturesResources.ModifyingAStatementWhichContainsAnonymousMethod) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_ADD_ANON_METHOD, FeaturesResources.AddingAStatementWhichContainsAnAnonymousMethod) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_DELETE_ANON_METHOD, FeaturesResources.DeletingAStatementWhichContainsAnonymousMethod) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_MOVE_ANON_METHOD, FeaturesResources.MovingAStatementWhichContainsAnonymousMethod) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_LOCAL_USED_IN_ANON_METHOD, FeaturesResources.ModifyingLocalReferencedInAnonymousMethod) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_MODIFY_LAMBDA_EXPRESSION, FeaturesResources.ModifyingAStatementWhichContainsLambda) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_ADD_LAMBDA_EXPRESSION, FeaturesResources.AddingAStatementWhichContainsALambda) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_DELETE_LAMBDA_EXPRESSION, FeaturesResources.DeletingAStatementWhichContainsLambda) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_MOVE_LAMBDA_EXPRESSION, FeaturesResources.MovingAStatementWhichContainsLambda) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_LOCAL_USED_IN_LAMBDA_EXPRESSION, FeaturesResources.ModifyingLocalReferencedInLambda) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_MODIFY_QUERY_EXPRESSION, FeaturesResources.ModifyingAStatementWhichContainsQuery) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_ADD_QUERY_EXPRESSION, FeaturesResources.AddingAStatementWhichContainsAQuery) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_DELETE_QUERY_EXPRESSION, FeaturesResources.DeletingAStatementWhichContainsQuery) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_MOVE_QUERY_EXPRESSION, FeaturesResources.MovingAStatementWhichContainsQuery) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_LOCAL_USED_IN_QUERY_EXPRESSION, FeaturesResources.ModifyingLocalReferencedInQuery) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_MODIFY_ANONYMOUS_TYPE, FeaturesResources.ModifyingAStatementWhichContainsAnonymousType) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_ADD_ANONYMOUS_TYPE, FeaturesResources.AddingAStatementWhichContainsAnAnonymousType) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_DELETE_ANONYMOUS_TYPE, FeaturesResources.DeletingAStatementWhichContainsAnonymousType) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_MOVE_ANONYMOUS_TYPE, FeaturesResources.MovingAStatementWhichContainsAnonymousType) },
{ GetDescriptorPair(RudeEditKind.AsyncMethodUpdate, FeaturesResources.ModifyingAnAsynchronous) },
{ GetDescriptorPair(RudeEditKind.AsyncMethodTriviaUpdate, FeaturesResources.ModifyingTriviaOfAnAsynchronous) },
{ GetDescriptorPair(RudeEditKind.ActiveStatementUpdate, FeaturesResources.UpdatingAnActiveStatement) },
{ GetDescriptorPair(RudeEditKind.ActiveStatementLambdaRemoved, FeaturesResources.RemovingThatContainsActiveStatement) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_ADD_NEW_FILE, FeaturesResources.AddingANewFile) },
// VB specific,
{ GetDescriptorPair(RudeEditKind.HandlesClauseUpdate, FeaturesResources.UpdatingTheHandlesClause) },
{ GetDescriptorPair(RudeEditKind.ImplementsClauseUpdate, FeaturesResources.UpdatingTheImplementsClause) },
{ GetDescriptorPair(RudeEditKind.ConstraintKindUpdate, FeaturesResources.ChangingTheConstraintFromTo) },
{ GetDescriptorPair(RudeEditKind.RUDE_EDIT_ADD_HANDLES_CLAUSE, FeaturesResources.AddingAWithTheHandlesClause) },
{ GetDescriptorPair(RudeEditKind.InsertHandlesClause, FeaturesResources.AddingAWithTheHandlesClause) },
}.ToImmutableDictionary();
private static KeyValuePair<RudeEditKind, DiagnosticDescriptor> GetDescriptorPair(RudeEditKind kind, string message)
......
......@@ -2,12 +2,11 @@
namespace Microsoft.CodeAnalysis.EditAndContinue
{
// TODO (tomat): cleanup
// TELEMETRY: DO NOT MODIFY ANY ENUM VALUES OF THIS ENUM.
// IT WILL BREAK OUR SQM VARIABLE MAPPINGS.
internal enum RudeEditKind : ushort
{
// TELEMETRY: DO NOT MODIFY ANY ENUM VALUES BELOW THIS POINT.
// IT WILL BREAK OUR SQM VARIABLE MAPPINGS.
None = 0,
ActiveStatementUpdate = 1,
......@@ -52,14 +51,15 @@ internal enum RudeEditKind : ushort
GenericTypeTriviaUpdate = 39,
GenericTypeInitializerUpdate = 40,
PartialTypeInitializerUpdate = 41,
AsyncMethodUpdate = 42,
AsyncMethodTriviaUpdate = 43,
//// AsyncMethodUpdate = 42,
//// AsyncMethodTriviaUpdate = 43,
StackAllocUpdate = 44,
ExperimentalFeaturesEnabled = 45,
AwaitStatementUpdate = 46,
ChangingConstructorVisibility = 47,
CapturingVariable = 48,
NotCapturingVariable = 49,
DeletingCapturedVariable = 50,
......@@ -72,63 +72,24 @@ internal enum RudeEditKind : ushort
InsertLambdaWithMultiScopeCapture = 57,
DeleteLambdaWithMultiScopeCapture = 58,
// TELEMETRY: DO NOT MODIFY ANY ENUM VALUES ABOVE THIS POINT.
// IT WILL BREAK OUR SQM VARIABLE MAPPINGS.
// 59 can be used
InsertAroundActiveStatement = 60,
DeleteAroundActiveStatement = 61,
DeleteActiveStatement = 62,
UpdateAroundActiveStatement = 63,
UpdateExceptionHandlerOfActiveTry = 64,
UpdateTryOrCatchWithActiveFinally = 65,
UpdateCatchHandlerAroundActiveStatement = 66,
// 67-69 can be used
// Values below here are not mapped by sqm:
STMT_MID_DELETE = 0x100,
STMT_NON_LEAF_DELETE,
STMT_CTOR_CALL,
STMT_FIELD_INIT,
STMT_DELETE,
STMT_DELETE_REMAP,
STMT_READONLY,
RUDE_EDIT_INSERT_AROUND,
RUDE_EDIT_DELETE_AROUND,
RUDE_NO_ACTIVE_STMT,
RUDE_ACTIVE_STMT_DELETED,
RUDE_EDIT_AROUND_ACTIVE_STMT,
EXC_HANDLER_ERROR,
EXC_FINALLY_ERROR,
EXC_CATCH_ERROR,
RUDE_EDIT_NON_USER_STMT,
InsertHandlesClause = 70,
InsertFile = 71,
// anonymous types, iterators, lambdas, queries, dynamic, nopia
RUDE_EDIT_ANON_METHOD,
RUDE_EDIT_YIELD, // VB only
RUDE_EDIT_FIELD_ANON_METH,
RUDE_EDIT_DYNAMIC_INVOCATION,
RUDE_EDIT_NOPIA_USAGE,
FIELD_WITH_ANON_METHOD,
// TODO: remove values below
RUDE_EDIT_ANON_METHOD = 0x100,
RUDE_EDIT_LAMBDA_EXPRESSION,
RUDE_EDIT_QUERY_EXPRESSION,
RUDE_EDIT_ANONYMOUS_TYPE,
FIELD_WITH_LAMBDA,
FIELD_WITH_QUERY,
RUDE_EDIT_FIELD_LAMBDA,
RUDE_EDIT_FIELD_QUERY,
FIELD_WITH_ANON_TYPE,
RUDE_EDIT_FIELD_ANON_TYPE,
RUDE_EDIT_MODIFY_ANON_METHOD,
RUDE_EDIT_ADD_ANON_METHOD,
RUDE_EDIT_DELETE_ANON_METHOD,
RUDE_EDIT_MOVE_ANON_METHOD,
RUDE_EDIT_LOCAL_USED_IN_ANON_METHOD,
RUDE_EDIT_MODIFY_LAMBDA_EXPRESSION,
RUDE_EDIT_ADD_LAMBDA_EXPRESSION,
RUDE_EDIT_DELETE_LAMBDA_EXPRESSION,
RUDE_EDIT_MOVE_LAMBDA_EXPRESSION,
RUDE_EDIT_LOCAL_USED_IN_LAMBDA_EXPRESSION,
RUDE_EDIT_MODIFY_QUERY_EXPRESSION,
RUDE_EDIT_ADD_QUERY_EXPRESSION,
RUDE_EDIT_DELETE_QUERY_EXPRESSION,
RUDE_EDIT_MOVE_QUERY_EXPRESSION,
RUDE_EDIT_LOCAL_USED_IN_QUERY_EXPRESSION,
RUDE_EDIT_MODIFY_ANONYMOUS_TYPE,
RUDE_EDIT_ADD_ANONYMOUS_TYPE,
RUDE_EDIT_DELETE_ANONYMOUS_TYPE,
RUDE_EDIT_MOVE_ANONYMOUS_TYPE,
RUDE_EDIT_ADD_HANDLES_CLAUSE,
RUDE_EDIT_ADD_NEW_FILE,
}
}
......@@ -132,42 +132,6 @@ internal class FeaturesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Adding a statement which contains a lambda expression will prevent the debug session from continuing..
/// </summary>
internal static string AddingAStatementWhichContainsALambda {
get {
return ResourceManager.GetString("AddingAStatementWhichContainsALambda", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Adding a statement which contains an anonymous method will prevent the debug session from continuing..
/// </summary>
internal static string AddingAStatementWhichContainsAnAnonymousMethod {
get {
return ResourceManager.GetString("AddingAStatementWhichContainsAnAnonymousMethod", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Adding a statement which contains an anonymous type will prevent the debug session from continuing..
/// </summary>
internal static string AddingAStatementWhichContainsAnAnonymousType {
get {
return ResourceManager.GetString("AddingAStatementWhichContainsAnAnonymousType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Adding a statement which contains a query expression will prevent the debug session from continuing..
/// </summary>
internal static string AddingAStatementWhichContainsAQuery {
get {
return ResourceManager.GetString("AddingAStatementWhichContainsAQuery", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Adding &apos;{0}&apos; will prevent the debug session from continuing..
/// </summary>
......@@ -276,24 +240,6 @@ internal class FeaturesResources {
}
}
/// <summary>
/// Looks up a localized string similar to An active statement marker has been deleted. You must revert your changes to continue or restart the debugging session..
/// </summary>
internal static string AnActiveStatementMarkerHasBeenDeleted {
get {
return ResourceManager.GetString("AnActiveStatementMarkerHasBeenDeleted", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An active statement marker has been deleted and cannot be remapped in the current source file. You must revert your changes to continue or restart the debugging session..
/// </summary>
internal static string AnActiveStatementMarkerHasBeenDeletedAnd {
get {
return ResourceManager.GetString("AnActiveStatementMarkerHasBeenDeletedAnd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Anonymous Types:.
/// </summary>
......@@ -446,18 +392,7 @@ internal class FeaturesResources {
return ResourceManager.GetString("ChangingCapturedVariableScope", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Changing the type of a captured variable &apos;{0}&apos; previously of type &apos;{1}&apos; will prevent the debug session from continuing..
/// </summary>
internal static string DeletingCapturedVariable
{
get
{
return ResourceManager.GetString("DeletingCapturedVariable", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Changing the type of a captured variable &apos;{0}&apos; previously of type &apos;{1}&apos; will prevent the debug session from continuing..
/// </summary>
......@@ -512,42 +447,6 @@ internal static string DeletingCapturedVariable
}
}
/// <summary>
/// Looks up a localized string similar to Constructor cannot be modified while debugging because field &apos;{0}&apos; has an initializer using an anonymous method..
/// </summary>
internal static string ConstructorCannotBeModifiedAnonymousMethod {
get {
return ResourceManager.GetString("ConstructorCannotBeModifiedAnonymousMethod", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Constructor cannot be modified while debugging because field &apos;{0}&apos; has an initializer with an anonymous type..
/// </summary>
internal static string ConstructorCannotBeModifiedAnonymousType {
get {
return ResourceManager.GetString("ConstructorCannotBeModifiedAnonymousType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Constructor cannot be modified while debugging because field &apos;{0}&apos; has an initializer using a lambda expression..
/// </summary>
internal static string ConstructorCannotBeModifiedLambda {
get {
return ResourceManager.GetString("ConstructorCannotBeModifiedLambda", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Constructor cannot be modified while debugging because field &apos;{0}&apos; has an initializer using a query expression..
/// </summary>
internal static string ConstructorCannotBeModifiedQuery {
get {
return ResourceManager.GetString("ConstructorCannotBeModifiedQuery", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Parameters&apos; type or return type cannot be an anonymous type : [{0}].
/// </summary>
......@@ -603,47 +502,20 @@ internal static string DeletingCapturedVariable
}
/// <summary>
/// Looks up a localized string similar to Deleting a statement which contains an anonymous method will prevent the debug session from continuing..
/// </summary>
internal static string DeletingAStatementWhichContainsAnonymousMethod {
get {
return ResourceManager.GetString("DeletingAStatementWhichContainsAnonymousMethod", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Deleting a statement which contains an anonymous type will prevent the debug session from continuing..
/// </summary>
internal static string DeletingAStatementWhichContainsAnonymousType {
get {
return ResourceManager.GetString("DeletingAStatementWhichContainsAnonymousType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Deleting a statement which contains a lambda expression will prevent the debug session from continuing..
/// </summary>
internal static string DeletingAStatementWhichContainsLambda {
get {
return ResourceManager.GetString("DeletingAStatementWhichContainsLambda", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Deleting a statement which contains a query expression will prevent the debug session from continuing..
/// Looks up a localized string similar to Deleting &apos;{0}&apos; will prevent the debug session from continuing..
/// </summary>
internal static string DeletingAStatementWhichContainsQuery {
internal static string DeletingAWillPrevent {
get {
return ResourceManager.GetString("DeletingAStatementWhichContainsQuery", resourceCulture);
return ResourceManager.GetString("DeletingAWillPrevent", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Deleting &apos;{0}&apos; will prevent the debug session from continuing..
/// Looks up a localized string similar to Deleting captured variable &apos;{0}&apos; will prevent the debug session from continuing..
/// </summary>
internal static string DeletingAWillPrevent {
internal static string DeletingCapturedVariable {
get {
return ResourceManager.GetString("DeletingAWillPrevent", resourceCulture);
return ResourceManager.GetString("DeletingCapturedVariable", resourceCulture);
}
}
......@@ -674,51 +546,6 @@ internal static string DeletingCapturedVariable
}
}
/// <summary>
/// Looks up a localized string similar to Editing or commenting out an active statement inside a readonly section will prevent the debug session from continuing..
/// </summary>
internal static string EditingOrCommentingOut {
get {
return ResourceManager.GetString("EditingOrCommentingOut", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Editing or deleting an active statement which is being executed will prevent the debug session from continuing..
/// </summary>
internal static string EditingOrDeletingBeingExecuted {
get {
return ResourceManager.GetString("EditingOrDeletingBeingExecuted", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Editing or deleting an active statement on a constructor declaration will prevent the debug session from continuing..
/// </summary>
internal static string EditingOrDeletingConstructorDeclaration {
get {
return ResourceManager.GetString("EditingOrDeletingConstructorDeclaration", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Editing or deleting an active statement in a field initializer will prevent the debug session from continuing..
/// </summary>
internal static string EditingOrDeletingFieldInitializer {
get {
return ResourceManager.GetString("EditingOrDeletingFieldInitializer", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Editing or deleting an active statement which is not at the top of the callstack will prevent the debug session from continuing..
/// </summary>
internal static string EditingOrDeletingNotAtTheTop {
get {
return ResourceManager.GetString("EditingOrDeletingNotAtTheTop", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Encapsulate field: &apos;{0}&apos;.
/// </summary>
......@@ -755,15 +582,6 @@ internal static string DeletingCapturedVariable
}
}
/// <summary>
/// Looks up a localized string similar to Error locating an active statement in source file. You must restart the debugging session..
/// </summary>
internal static string ErrorLocatingAnActiveStatement {
get {
return ResourceManager.GetString("ErrorLocatingAnActiveStatement", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The selection contains an error or unknown type..
/// </summary>
......@@ -1376,15 +1194,6 @@ internal static string DeletingCapturedVariable
}
}
/// <summary>
/// Looks up a localized string similar to Modifying &apos;{0}&apos; containing an active statement in compiler generated code will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAContainingAnActiveStatement {
get {
return ResourceManager.GetString("ModifyingAContainingAnActiveStatement", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying source with experimental language features enabled will prevent the debug session from continuing..
/// </summary>
......@@ -1403,42 +1212,6 @@ internal static string DeletingCapturedVariable
}
}
/// <summary>
/// Looks up a localized string similar to Modifying &apos;{0}&apos; initializer with an anonymous method will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAInitializerWithAnonymousMethod {
get {
return ResourceManager.GetString("ModifyingAInitializerWithAnonymousMethod", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying &apos;{0}&apos; initializer with an anonymous type will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAInitializerWithAnonymousType {
get {
return ResourceManager.GetString("ModifyingAInitializerWithAnonymousType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying &apos;{0}&apos; initializer with a lambda expression will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAInitializerWithLambda {
get {
return ResourceManager.GetString("ModifyingAInitializerWithLambda", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying &apos;{0}&apos; initializer with a query expression will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAInitializerWithQuery {
get {
return ResourceManager.GetString("ModifyingAInitializerWithQuery", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying a method inside the context of a generic type will prevent the debug session from continuing..
/// </summary>
......@@ -1448,51 +1221,6 @@ internal static string DeletingCapturedVariable
}
}
/// <summary>
/// Looks up a localized string similar to Modifying an asynchronous &apos;{0}&apos; will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAnAsynchronous {
get {
return ResourceManager.GetString("ModifyingAnAsynchronous", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying a statement which contains an anonymous method will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAStatementWhichContainsAnonymousMethod {
get {
return ResourceManager.GetString("ModifyingAStatementWhichContainsAnonymousMethod", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying a statement which contains an anonymous type will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAStatementWhichContainsAnonymousType {
get {
return ResourceManager.GetString("ModifyingAStatementWhichContainsAnonymousType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying a statement which contains a lambda expression will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAStatementWhichContainsLambda {
get {
return ResourceManager.GetString("ModifyingAStatementWhichContainsLambda", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying a statement which contains a query expression will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAStatementWhichContainsQuery {
get {
return ResourceManager.GetString("ModifyingAStatementWhichContainsQuery", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying a try/catch/finally statement when the finally block is active will prevent the debug session from continuing..
/// </summary>
......@@ -1511,33 +1239,6 @@ internal static string DeletingCapturedVariable
}
}
/// <summary>
/// Looks up a localized string similar to Modifying &apos;{0}&apos; which contains an anonymous type will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAWhichContainsAnonymousType {
get {
return ResourceManager.GetString("ModifyingAWhichContainsAnonymousType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying &apos;{0}&apos; which contains a dynamic invocation will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAWhichContainsDynamic {
get {
return ResourceManager.GetString("ModifyingAWhichContainsDynamic", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying &apos;{0}&apos; which contains a usage of an embedded interop type/member will prevent the debug session from continuing.\r\nTo enable Edit and Continue, try setting \&quot;Embed Interop Types\&quot; property to \&quot;False\&quot; for COM references when debugging..
/// </summary>
internal static string ModifyingAWhichContainsEmbeddedInterop {
get {
return ResourceManager.GetString("ModifyingAWhichContainsEmbeddedInterop", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying &apos;{0}&apos; which contains a lambda expression will prevent the debug session from continuing..
/// </summary>
......@@ -1574,42 +1275,6 @@ internal static string DeletingCapturedVariable
}
}
/// <summary>
/// Looks up a localized string similar to Modifying &apos;{0}&apos; which contains &apos;yield return&apos; or &apos;yield break&apos; statement will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingAWhichContainsYield {
get {
return ResourceManager.GetString("ModifyingAWhichContainsYield", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying local &apos;{0}&apos; which is referenced in an anonymous method will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingLocalReferencedInAnonymousMethod {
get {
return ResourceManager.GetString("ModifyingLocalReferencedInAnonymousMethod", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying local &apos;{0}&apos; which is referenced in a lambda expression will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingLocalReferencedInLambda {
get {
return ResourceManager.GetString("ModifyingLocalReferencedInLambda", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying local &apos;{0}&apos; which is referenced in a query expression will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingLocalReferencedInQuery {
get {
return ResourceManager.GetString("ModifyingLocalReferencedInQuery", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Modifying the initializer of &apos;{0}&apos; in a generic type will prevent the debug session from continuing..
/// </summary>
......@@ -1646,51 +1311,6 @@ internal static string DeletingCapturedVariable
}
}
/// <summary>
/// Looks up a localized string similar to Modifying whitespace or comments in an asynchronous &apos;{0}&apos; will prevent the debug session from continuing..
/// </summary>
internal static string ModifyingTriviaOfAnAsynchronous {
get {
return ResourceManager.GetString("ModifyingTriviaOfAnAsynchronous", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Moving a statement which contains an anonymous method will prevent the debug session from continuing..
/// </summary>
internal static string MovingAStatementWhichContainsAnonymousMethod {
get {
return ResourceManager.GetString("MovingAStatementWhichContainsAnonymousMethod", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Moving a statement which contains an anonymous type will prevent the debug session from continuing..
/// </summary>
internal static string MovingAStatementWhichContainsAnonymousType {
get {
return ResourceManager.GetString("MovingAStatementWhichContainsAnonymousType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Moving a statement which contains a lambda expression will prevent the debug session from continuing..
/// </summary>
internal static string MovingAStatementWhichContainsLambda {
get {
return ResourceManager.GetString("MovingAStatementWhichContainsLambda", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Moving a statement which contains a query expression will prevent the debug session from continuing..
/// </summary>
internal static string MovingAStatementWhichContainsQuery {
get {
return ResourceManager.GetString("MovingAStatementWhichContainsQuery", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Moving &apos;{0}&apos; will prevent the debug session from continuing..
/// </summary>
......
......@@ -369,27 +369,6 @@
<data name="ChangeTo" xml:space="preserve">
<value>Change '{0}' to '{1}.{2}'.</value>
</data>
<data name="EditingOrDeletingBeingExecuted" xml:space="preserve">
<value>Editing or deleting an active statement which is being executed will prevent the debug session from continuing.</value>
</data>
<data name="EditingOrDeletingNotAtTheTop" xml:space="preserve">
<value>Editing or deleting an active statement which is not at the top of the callstack will prevent the debug session from continuing.</value>
</data>
<data name="EditingOrDeletingConstructorDeclaration" xml:space="preserve">
<value>Editing or deleting an active statement on a constructor declaration will prevent the debug session from continuing.</value>
</data>
<data name="EditingOrDeletingFieldInitializer" xml:space="preserve">
<value>Editing or deleting an active statement in a field initializer will prevent the debug session from continuing.</value>
</data>
<data name="AnActiveStatementMarkerHasBeenDeleted" xml:space="preserve">
<value>An active statement marker has been deleted. You must revert your changes to continue or restart the debugging session.</value>
</data>
<data name="AnActiveStatementMarkerHasBeenDeletedAnd" xml:space="preserve">
<value>An active statement marker has been deleted and cannot be remapped in the current source file. You must revert your changes to continue or restart the debugging session.</value>
</data>
<data name="EditingOrCommentingOut" xml:space="preserve">
<value>Editing or commenting out an active statement inside a readonly section will prevent the debug session from continuing.</value>
</data>
<data name="UpdatingAWillPrevent" xml:space="preserve">
<value>Updating '{0}' will prevent the debug session from continuing.</value>
</data>
......@@ -531,9 +510,6 @@
<data name="DeletingAMethodBodyWillPrevent" xml:space="preserve">
<value>Deleting a method body will prevent the debug session from continuing.</value>
</data>
<data name="ErrorLocatingAnActiveStatement" xml:space="preserve">
<value>Error locating an active statement in source file. You must restart the debugging session.</value>
</data>
<data name="AnActiveStatementHasBeenRemoved" xml:space="preserve">
<value>An active statement has been removed from its original method. You must revert your changes to continue or restart the debugging session.</value>
</data>
......@@ -576,117 +552,15 @@
<data name="ModifyingAWhichContainsAnonymousMethod" xml:space="preserve">
<value>Modifying '{0}' which contains an anonymous method will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAWhichContainsYield" xml:space="preserve">
<value>Modifying '{0}' which contains 'yield return' or 'yield break' statement will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAInitializerWithAnonymousMethod" xml:space="preserve">
<value>Modifying '{0}' initializer with an anonymous method will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAContainingAnActiveStatement" xml:space="preserve">
<value>Modifying '{0}' containing an active statement in compiler generated code will prevent the debug session from continuing.</value>
</data>
<data name="ConstructorCannotBeModifiedAnonymousMethod" xml:space="preserve">
<value>Constructor cannot be modified while debugging because field '{0}' has an initializer using an anonymous method.</value>
</data>
<data name="ModifyingAWhichContainsLambda" xml:space="preserve">
<value>Modifying '{0}' which contains a lambda expression will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAWhichContainsQuery" xml:space="preserve">
<value>Modifying '{0}' which contains a query expression will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAWhichContainsAnonymousType" xml:space="preserve">
<value>Modifying '{0}' which contains an anonymous type will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAFileWithExperimentalFeaturesEnabled" xml:space="preserve">
<value>Modifying source with experimental language features enabled will prevent the debug session from continuing.</value>
</data>
<data name="ConstructorCannotBeModifiedLambda" xml:space="preserve">
<value>Constructor cannot be modified while debugging because field '{0}' has an initializer using a lambda expression.</value>
</data>
<data name="ConstructorCannotBeModifiedQuery" xml:space="preserve">
<value>Constructor cannot be modified while debugging because field '{0}' has an initializer using a query expression.</value>
</data>
<data name="ModifyingAInitializerWithLambda" xml:space="preserve">
<value>Modifying '{0}' initializer with a lambda expression will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAInitializerWithQuery" xml:space="preserve">
<value>Modifying '{0}' initializer with a query expression will prevent the debug session from continuing.</value>
</data>
<data name="ConstructorCannotBeModifiedAnonymousType" xml:space="preserve">
<value>Constructor cannot be modified while debugging because field '{0}' has an initializer with an anonymous type.</value>
</data>
<data name="ModifyingAInitializerWithAnonymousType" xml:space="preserve">
<value>Modifying '{0}' initializer with an anonymous type will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAWhichContainsDynamic" xml:space="preserve">
<value>Modifying '{0}' which contains a dynamic invocation will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAWhichContainsEmbeddedInterop" xml:space="preserve">
<value>Modifying '{0}' which contains a usage of an embedded interop type/member will prevent the debug session from continuing.\r\nTo enable Edit and Continue, try setting \"Embed Interop Types\" property to \"False\" for COM references when debugging.</value>
</data>
<data name="ModifyingAStatementWhichContainsAnonymousMethod" xml:space="preserve">
<value>Modifying a statement which contains an anonymous method will prevent the debug session from continuing.</value>
</data>
<data name="AddingAStatementWhichContainsAnAnonymousMethod" xml:space="preserve">
<value>Adding a statement which contains an anonymous method will prevent the debug session from continuing.</value>
</data>
<data name="DeletingAStatementWhichContainsAnonymousMethod" xml:space="preserve">
<value>Deleting a statement which contains an anonymous method will prevent the debug session from continuing.</value>
</data>
<data name="MovingAStatementWhichContainsAnonymousMethod" xml:space="preserve">
<value>Moving a statement which contains an anonymous method will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingLocalReferencedInAnonymousMethod" xml:space="preserve">
<value>Modifying local '{0}' which is referenced in an anonymous method will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAStatementWhichContainsLambda" xml:space="preserve">
<value>Modifying a statement which contains a lambda expression will prevent the debug session from continuing.</value>
</data>
<data name="AddingAStatementWhichContainsALambda" xml:space="preserve">
<value>Adding a statement which contains a lambda expression will prevent the debug session from continuing.</value>
</data>
<data name="DeletingAStatementWhichContainsLambda" xml:space="preserve">
<value>Deleting a statement which contains a lambda expression will prevent the debug session from continuing.</value>
</data>
<data name="MovingAStatementWhichContainsLambda" xml:space="preserve">
<value>Moving a statement which contains a lambda expression will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingLocalReferencedInLambda" xml:space="preserve">
<value>Modifying local '{0}' which is referenced in a lambda expression will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAStatementWhichContainsQuery" xml:space="preserve">
<value>Modifying a statement which contains a query expression will prevent the debug session from continuing.</value>
</data>
<data name="AddingAStatementWhichContainsAQuery" xml:space="preserve">
<value>Adding a statement which contains a query expression will prevent the debug session from continuing.</value>
</data>
<data name="DeletingAStatementWhichContainsQuery" xml:space="preserve">
<value>Deleting a statement which contains a query expression will prevent the debug session from continuing.</value>
</data>
<data name="MovingAStatementWhichContainsQuery" xml:space="preserve">
<value>Moving a statement which contains a query expression will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingLocalReferencedInQuery" xml:space="preserve">
<value>Modifying local '{0}' which is referenced in a query expression will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAStatementWhichContainsAnonymousType" xml:space="preserve">
<value>Modifying a statement which contains an anonymous type will prevent the debug session from continuing.</value>
</data>
<data name="AddingAStatementWhichContainsAnAnonymousType" xml:space="preserve">
<value>Adding a statement which contains an anonymous type will prevent the debug session from continuing.</value>
</data>
<data name="DeletingAStatementWhichContainsAnonymousType" xml:space="preserve">
<value>Deleting a statement which contains an anonymous type will prevent the debug session from continuing.</value>
</data>
<data name="MovingAStatementWhichContainsAnonymousType" xml:space="preserve">
<value>Moving a statement which contains an anonymous type will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingAnAsynchronous" xml:space="preserve">
<value>Modifying an asynchronous '{0}' will prevent the debug session from continuing.</value>
</data>
<data name="ModifyingTriviaOfAnAsynchronous" xml:space="preserve">
<value>Modifying whitespace or comments in an asynchronous '{0}' will prevent the debug session from continuing.</value>
</data>
<data name="UpdatingAnActiveStatement" xml:space="preserve">
<value>Updating an active statement will prevent the debug session from continuing.</value>
</data>
......
......@@ -1860,7 +1860,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.EditAndContinue
End If
If method.HandlesClause IsNot Nothing Then
ReportError(RudeEditKind.RUDE_EDIT_ADD_HANDLES_CLAUSE)
ReportError(RudeEditKind.InsertHandlesClause)
End If
ClassifyModifiedMemberInsert(method.Modifiers)
......@@ -2569,10 +2569,6 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.EditAndContinue
Case SyntaxKind.QueryExpression
ReportError(RudeEditKind.RUDE_EDIT_QUERY_EXPRESSION, node, Me.newNode)
Return
Case SyntaxKind.AnonymousObjectCreationExpression
ReportError(RudeEditKind.RUDE_EDIT_ANONYMOUS_TYPE, node, Me.newNode)
Return
End Select
Next
End Sub
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册