diff --git a/SharpDevelop.sln b/SharpDevelop.sln
index 873d53ea78..b539ecb077 100644
--- a/SharpDevelop.sln
+++ b/SharpDevelop.sln
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
-# SharpDevelop 4.2.0.8634-beta
+# SharpDevelop 4.2.0.8783
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{256F5C28-532C-44C0-8AB8-D8EC5E492E01}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
@@ -1099,6 +1099,546 @@ Global
{062B7E01-AF3D-430D-BE33-17FF3EF4F647}.Release|Win32.ActiveCfg = Release|x86
{062B7E01-AF3D-430D-BE33-17FF3EF4F647}.Release|x86.Build.0 = Release|x86
{062B7E01-AF3D-430D-BE33-17FF3EF4F647}.Release|x86.ActiveCfg = Release|x86
+ {3DF4060F-5EE0-41CF-8096-F27355FD5511}.Debug|Win32.Build.0 = Debug|Any CPU
+ {3DF4060F-5EE0-41CF-8096-F27355FD5511}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {3DF4060F-5EE0-41CF-8096-F27355FD5511}.Debug|x86.Build.0 = Debug|Any CPU
+ {3DF4060F-5EE0-41CF-8096-F27355FD5511}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3DF4060F-5EE0-41CF-8096-F27355FD5511}.Release|Win32.Build.0 = Release|Any CPU
+ {3DF4060F-5EE0-41CF-8096-F27355FD5511}.Release|Win32.ActiveCfg = Release|Any CPU
+ {3DF4060F-5EE0-41CF-8096-F27355FD5511}.Release|x86.Build.0 = Release|Any CPU
+ {3DF4060F-5EE0-41CF-8096-F27355FD5511}.Release|x86.ActiveCfg = Release|Any CPU
+ {CE498514-D12D-4B6E-AE0E-FEC29BD43748}.Debug|Win32.Build.0 = Debug|Any CPU
+ {CE498514-D12D-4B6E-AE0E-FEC29BD43748}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {CE498514-D12D-4B6E-AE0E-FEC29BD43748}.Debug|x86.Build.0 = Debug|Any CPU
+ {CE498514-D12D-4B6E-AE0E-FEC29BD43748}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CE498514-D12D-4B6E-AE0E-FEC29BD43748}.Release|Win32.Build.0 = Release|Any CPU
+ {CE498514-D12D-4B6E-AE0E-FEC29BD43748}.Release|Win32.ActiveCfg = Release|Any CPU
+ {CE498514-D12D-4B6E-AE0E-FEC29BD43748}.Release|x86.Build.0 = Release|Any CPU
+ {CE498514-D12D-4B6E-AE0E-FEC29BD43748}.Release|x86.ActiveCfg = Release|Any CPU
+ {08CE9972-283B-44F4-82FA-966F7DFA6B7A}.Debug|Win32.Build.0 = Debug|Any CPU
+ {08CE9972-283B-44F4-82FA-966F7DFA6B7A}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {08CE9972-283B-44F4-82FA-966F7DFA6B7A}.Debug|x86.Build.0 = Debug|Any CPU
+ {08CE9972-283B-44F4-82FA-966F7DFA6B7A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {08CE9972-283B-44F4-82FA-966F7DFA6B7A}.Release|Win32.Build.0 = Release|Any CPU
+ {08CE9972-283B-44F4-82FA-966F7DFA6B7A}.Release|Win32.ActiveCfg = Release|Any CPU
+ {08CE9972-283B-44F4-82FA-966F7DFA6B7A}.Release|x86.Build.0 = Release|Any CPU
+ {08CE9972-283B-44F4-82FA-966F7DFA6B7A}.Release|x86.ActiveCfg = Release|Any CPU
+ {3EAA45A9-735C-4AC7-A799-947B93EA449D}.Debug|Win32.Build.0 = Debug|Any CPU
+ {3EAA45A9-735C-4AC7-A799-947B93EA449D}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {3EAA45A9-735C-4AC7-A799-947B93EA449D}.Debug|x86.Build.0 = Debug|Any CPU
+ {3EAA45A9-735C-4AC7-A799-947B93EA449D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3EAA45A9-735C-4AC7-A799-947B93EA449D}.Release|Win32.Build.0 = Release|Any CPU
+ {3EAA45A9-735C-4AC7-A799-947B93EA449D}.Release|Win32.ActiveCfg = Release|Any CPU
+ {3EAA45A9-735C-4AC7-A799-947B93EA449D}.Release|x86.Build.0 = Release|Any CPU
+ {3EAA45A9-735C-4AC7-A799-947B93EA449D}.Release|x86.ActiveCfg = Release|Any CPU
+ {1F261725-6318-4434-A1B1-6C70CE4CD324}.Debug|Win32.Build.0 = Debug|Any CPU
+ {1F261725-6318-4434-A1B1-6C70CE4CD324}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {1F261725-6318-4434-A1B1-6C70CE4CD324}.Debug|x86.Build.0 = Debug|Any CPU
+ {1F261725-6318-4434-A1B1-6C70CE4CD324}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1F261725-6318-4434-A1B1-6C70CE4CD324}.Release|Win32.Build.0 = Release|Any CPU
+ {1F261725-6318-4434-A1B1-6C70CE4CD324}.Release|Win32.ActiveCfg = Release|Any CPU
+ {1F261725-6318-4434-A1B1-6C70CE4CD324}.Release|x86.Build.0 = Release|Any CPU
+ {1F261725-6318-4434-A1B1-6C70CE4CD324}.Release|x86.ActiveCfg = Release|Any CPU
+ {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|Win32.Build.0 = Debug|Any CPU
+ {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|x86.Build.0 = Debug|Any CPU
+ {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|Win32.Build.0 = Release|Any CPU
+ {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|Win32.ActiveCfg = Release|Any CPU
+ {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|x86.Build.0 = Release|Any CPU
+ {88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|x86.ActiveCfg = Release|Any CPU
+ {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|Win32.Build.0 = Debug|Any CPU
+ {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|x86.Build.0 = Debug|Any CPU
+ {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|Win32.Build.0 = Release|Any CPU
+ {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|Win32.ActiveCfg = Release|Any CPU
+ {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|x86.Build.0 = Release|Any CPU
+ {78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|x86.ActiveCfg = Release|Any CPU
+ {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|Win32.Build.0 = Debug|Any CPU
+ {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|x86.Build.0 = Debug|Any CPU
+ {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|Win32.Build.0 = Release|Any CPU
+ {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|Win32.ActiveCfg = Release|Any CPU
+ {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|x86.Build.0 = Release|Any CPU
+ {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|x86.ActiveCfg = Release|Any CPU
+ {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Win32.Build.0 = Debug|Any CPU
+ {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|x86.Build.0 = Debug|Any CPU
+ {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Win32.Build.0 = Release|Any CPU
+ {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Win32.ActiveCfg = Release|Any CPU
+ {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|x86.Build.0 = Release|Any CPU
+ {66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|x86.ActiveCfg = Release|Any CPU
+ {DFB936AD-90EE-4B4F-941E-4F4A636F0D92}.Debug|Win32.Build.0 = Debug|Any CPU
+ {DFB936AD-90EE-4B4F-941E-4F4A636F0D92}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {DFB936AD-90EE-4B4F-941E-4F4A636F0D92}.Debug|x86.Build.0 = Debug|Any CPU
+ {DFB936AD-90EE-4B4F-941E-4F4A636F0D92}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DFB936AD-90EE-4B4F-941E-4F4A636F0D92}.Release|Win32.Build.0 = Release|Any CPU
+ {DFB936AD-90EE-4B4F-941E-4F4A636F0D92}.Release|Win32.ActiveCfg = Release|Any CPU
+ {DFB936AD-90EE-4B4F-941E-4F4A636F0D92}.Release|x86.Build.0 = Release|Any CPU
+ {DFB936AD-90EE-4B4F-941E-4F4A636F0D92}.Release|x86.ActiveCfg = Release|Any CPU
+ {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}.Debug|Win32.Build.0 = Debug|Any CPU
+ {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}.Debug|x86.Build.0 = Debug|Any CPU
+ {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}.Release|Win32.Build.0 = Release|Any CPU
+ {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}.Release|Win32.ActiveCfg = Release|Any CPU
+ {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}.Release|x86.Build.0 = Release|Any CPU
+ {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}.Release|x86.ActiveCfg = Release|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Debug|Win32.Build.0 = Debug|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Debug|x86.Build.0 = Debug|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Release|Win32.Build.0 = Release|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Release|Win32.ActiveCfg = Release|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Release|x86.Build.0 = Release|Any CPU
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54}.Release|x86.ActiveCfg = Release|Any CPU
+ {CBC6C247-747B-4908-B09A-4D2E0F640B6B}.Debug|Win32.Build.0 = Debug|Any CPU
+ {CBC6C247-747B-4908-B09A-4D2E0F640B6B}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {CBC6C247-747B-4908-B09A-4D2E0F640B6B}.Debug|x86.Build.0 = Debug|Any CPU
+ {CBC6C247-747B-4908-B09A-4D2E0F640B6B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CBC6C247-747B-4908-B09A-4D2E0F640B6B}.Release|Win32.Build.0 = Release|Any CPU
+ {CBC6C247-747B-4908-B09A-4D2E0F640B6B}.Release|Win32.ActiveCfg = Release|Any CPU
+ {CBC6C247-747B-4908-B09A-4D2E0F640B6B}.Release|x86.Build.0 = Release|Any CPU
+ {CBC6C247-747B-4908-B09A-4D2E0F640B6B}.Release|x86.ActiveCfg = Release|Any CPU
+ {0162E499-42D0-409B-AA25-EED21F75336B}.Debug|Win32.Build.0 = Debug|Any CPU
+ {0162E499-42D0-409B-AA25-EED21F75336B}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {0162E499-42D0-409B-AA25-EED21F75336B}.Debug|x86.Build.0 = Debug|Any CPU
+ {0162E499-42D0-409B-AA25-EED21F75336B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0162E499-42D0-409B-AA25-EED21F75336B}.Release|Win32.Build.0 = Release|Any CPU
+ {0162E499-42D0-409B-AA25-EED21F75336B}.Release|Win32.ActiveCfg = Release|Any CPU
+ {0162E499-42D0-409B-AA25-EED21F75336B}.Release|x86.Build.0 = Release|Any CPU
+ {0162E499-42D0-409B-AA25-EED21F75336B}.Release|x86.ActiveCfg = Release|Any CPU
+ {DCA2703D-250A-463E-A68A-07ED105AE6BD}.Debug|Win32.Build.0 = Debug|Any CPU
+ {DCA2703D-250A-463E-A68A-07ED105AE6BD}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {DCA2703D-250A-463E-A68A-07ED105AE6BD}.Debug|x86.Build.0 = Debug|Any CPU
+ {DCA2703D-250A-463E-A68A-07ED105AE6BD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DCA2703D-250A-463E-A68A-07ED105AE6BD}.Release|Win32.Build.0 = Release|Any CPU
+ {DCA2703D-250A-463E-A68A-07ED105AE6BD}.Release|Win32.ActiveCfg = Release|Any CPU
+ {DCA2703D-250A-463E-A68A-07ED105AE6BD}.Release|x86.Build.0 = Release|Any CPU
+ {DCA2703D-250A-463E-A68A-07ED105AE6BD}.Release|x86.ActiveCfg = Release|Any CPU
+ {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Debug|Win32.Build.0 = Debug|Any CPU
+ {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Debug|x86.Build.0 = Debug|Any CPU
+ {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|Win32.Build.0 = Release|Any CPU
+ {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|Win32.ActiveCfg = Release|Any CPU
+ {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|x86.Build.0 = Release|Any CPU
+ {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|x86.ActiveCfg = Release|Any CPU
+ {08F772A1-F0BE-433E-8B37-F6522953DB05}.Debug|Win32.Build.0 = Debug|Any CPU
+ {08F772A1-F0BE-433E-8B37-F6522953DB05}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {08F772A1-F0BE-433E-8B37-F6522953DB05}.Debug|x86.Build.0 = Debug|Any CPU
+ {08F772A1-F0BE-433E-8B37-F6522953DB05}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {08F772A1-F0BE-433E-8B37-F6522953DB05}.Release|Win32.Build.0 = Release|Any CPU
+ {08F772A1-F0BE-433E-8B37-F6522953DB05}.Release|Win32.ActiveCfg = Release|Any CPU
+ {08F772A1-F0BE-433E-8B37-F6522953DB05}.Release|x86.Build.0 = Release|Any CPU
+ {08F772A1-F0BE-433E-8B37-F6522953DB05}.Release|x86.ActiveCfg = Release|Any CPU
+ {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}.Debug|Win32.Build.0 = Debug|Any CPU
+ {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}.Debug|x86.Build.0 = Debug|Any CPU
+ {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}.Release|Win32.Build.0 = Release|Any CPU
+ {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}.Release|Win32.ActiveCfg = Release|Any CPU
+ {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}.Release|x86.Build.0 = Release|Any CPU
+ {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}.Release|x86.ActiveCfg = Release|Any CPU
+ {0991423A-DBF6-4C89-B365-A1DF1EB32E42}.Debug|Win32.Build.0 = Debug|Any CPU
+ {0991423A-DBF6-4C89-B365-A1DF1EB32E42}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {0991423A-DBF6-4C89-B365-A1DF1EB32E42}.Debug|x86.Build.0 = Debug|Any CPU
+ {0991423A-DBF6-4C89-B365-A1DF1EB32E42}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0991423A-DBF6-4C89-B365-A1DF1EB32E42}.Release|Win32.Build.0 = Release|Any CPU
+ {0991423A-DBF6-4C89-B365-A1DF1EB32E42}.Release|Win32.ActiveCfg = Release|Any CPU
+ {0991423A-DBF6-4C89-B365-A1DF1EB32E42}.Release|x86.Build.0 = Release|Any CPU
+ {0991423A-DBF6-4C89-B365-A1DF1EB32E42}.Release|x86.ActiveCfg = Release|Any CPU
+ {A9F12710-24E4-46D4-832C-6ECB395B9EAD}.Debug|Win32.Build.0 = Debug|Any CPU
+ {A9F12710-24E4-46D4-832C-6ECB395B9EAD}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {A9F12710-24E4-46D4-832C-6ECB395B9EAD}.Debug|x86.Build.0 = Debug|Any CPU
+ {A9F12710-24E4-46D4-832C-6ECB395B9EAD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A9F12710-24E4-46D4-832C-6ECB395B9EAD}.Release|Win32.Build.0 = Release|Any CPU
+ {A9F12710-24E4-46D4-832C-6ECB395B9EAD}.Release|Win32.ActiveCfg = Release|Any CPU
+ {A9F12710-24E4-46D4-832C-6ECB395B9EAD}.Release|x86.Build.0 = Release|Any CPU
+ {A9F12710-24E4-46D4-832C-6ECB395B9EAD}.Release|x86.ActiveCfg = Release|Any CPU
+ {B7823AE9-4B43-4859-8796-2EBDC116FBB8}.Debug|Win32.Build.0 = Debug|Any CPU
+ {B7823AE9-4B43-4859-8796-2EBDC116FBB8}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {B7823AE9-4B43-4859-8796-2EBDC116FBB8}.Debug|x86.Build.0 = Debug|Any CPU
+ {B7823AE9-4B43-4859-8796-2EBDC116FBB8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B7823AE9-4B43-4859-8796-2EBDC116FBB8}.Release|Win32.Build.0 = Release|Any CPU
+ {B7823AE9-4B43-4859-8796-2EBDC116FBB8}.Release|Win32.ActiveCfg = Release|Any CPU
+ {B7823AE9-4B43-4859-8796-2EBDC116FBB8}.Release|x86.Build.0 = Release|Any CPU
+ {B7823AE9-4B43-4859-8796-2EBDC116FBB8}.Release|x86.ActiveCfg = Release|Any CPU
+ {BAD94D6E-4159-4CB6-B991-486F412D9BB6}.Debug|Win32.Build.0 = Debug|Any CPU
+ {BAD94D6E-4159-4CB6-B991-486F412D9BB6}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {BAD94D6E-4159-4CB6-B991-486F412D9BB6}.Debug|x86.Build.0 = Debug|Any CPU
+ {BAD94D6E-4159-4CB6-B991-486F412D9BB6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BAD94D6E-4159-4CB6-B991-486F412D9BB6}.Release|Win32.Build.0 = Release|Any CPU
+ {BAD94D6E-4159-4CB6-B991-486F412D9BB6}.Release|Win32.ActiveCfg = Release|Any CPU
+ {BAD94D6E-4159-4CB6-B991-486F412D9BB6}.Release|x86.Build.0 = Release|Any CPU
+ {BAD94D6E-4159-4CB6-B991-486F412D9BB6}.Release|x86.ActiveCfg = Release|Any CPU
+ {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}.Debug|Win32.Build.0 = Debug|Any CPU
+ {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}.Debug|x86.Build.0 = Debug|Any CPU
+ {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}.Release|Win32.Build.0 = Release|Any CPU
+ {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}.Release|Win32.ActiveCfg = Release|Any CPU
+ {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}.Release|x86.Build.0 = Release|Any CPU
+ {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}.Release|x86.ActiveCfg = Release|Any CPU
+ {EEF5E054-4192-4A57-8FBF-E860D808A51D}.Debug|Win32.Build.0 = Debug|Any CPU
+ {EEF5E054-4192-4A57-8FBF-E860D808A51D}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {EEF5E054-4192-4A57-8FBF-E860D808A51D}.Debug|x86.Build.0 = Debug|Any CPU
+ {EEF5E054-4192-4A57-8FBF-E860D808A51D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {EEF5E054-4192-4A57-8FBF-E860D808A51D}.Release|Win32.Build.0 = Release|Any CPU
+ {EEF5E054-4192-4A57-8FBF-E860D808A51D}.Release|Win32.ActiveCfg = Release|Any CPU
+ {EEF5E054-4192-4A57-8FBF-E860D808A51D}.Release|x86.Build.0 = Release|Any CPU
+ {EEF5E054-4192-4A57-8FBF-E860D808A51D}.Release|x86.ActiveCfg = Release|Any CPU
+ {AFE34868-AFA1-4E1C-9450-47AB4BE329D5}.Debug|Win32.Build.0 = Debug|Any CPU
+ {AFE34868-AFA1-4E1C-9450-47AB4BE329D5}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {AFE34868-AFA1-4E1C-9450-47AB4BE329D5}.Debug|x86.Build.0 = Debug|Any CPU
+ {AFE34868-AFA1-4E1C-9450-47AB4BE329D5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {AFE34868-AFA1-4E1C-9450-47AB4BE329D5}.Release|Win32.Build.0 = Release|Any CPU
+ {AFE34868-AFA1-4E1C-9450-47AB4BE329D5}.Release|Win32.ActiveCfg = Release|Any CPU
+ {AFE34868-AFA1-4E1C-9450-47AB4BE329D5}.Release|x86.Build.0 = Release|Any CPU
+ {AFE34868-AFA1-4E1C-9450-47AB4BE329D5}.Release|x86.ActiveCfg = Release|Any CPU
+ {0008FCE9-9EB4-4E2E-979B-553278E5BBA6}.Debug|Win32.Build.0 = Debug|Any CPU
+ {0008FCE9-9EB4-4E2E-979B-553278E5BBA6}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {0008FCE9-9EB4-4E2E-979B-553278E5BBA6}.Debug|x86.Build.0 = Debug|Any CPU
+ {0008FCE9-9EB4-4E2E-979B-553278E5BBA6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0008FCE9-9EB4-4E2E-979B-553278E5BBA6}.Release|Win32.Build.0 = Release|Any CPU
+ {0008FCE9-9EB4-4E2E-979B-553278E5BBA6}.Release|Win32.ActiveCfg = Release|Any CPU
+ {0008FCE9-9EB4-4E2E-979B-553278E5BBA6}.Release|x86.Build.0 = Release|Any CPU
+ {0008FCE9-9EB4-4E2E-979B-553278E5BBA6}.Release|x86.ActiveCfg = Release|Any CPU
+ {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}.Debug|Win32.Build.0 = Debug|Any CPU
+ {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}.Debug|x86.Build.0 = Debug|Any CPU
+ {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}.Release|Win32.Build.0 = Release|Any CPU
+ {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}.Release|Win32.ActiveCfg = Release|Any CPU
+ {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}.Release|x86.Build.0 = Release|Any CPU
+ {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}.Release|x86.ActiveCfg = Release|Any CPU
+ {461606BD-E824-4D0A-8CBA-01810B1F5E02}.Debug|Win32.Build.0 = Debug|Any CPU
+ {461606BD-E824-4D0A-8CBA-01810B1F5E02}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {461606BD-E824-4D0A-8CBA-01810B1F5E02}.Debug|x86.Build.0 = Debug|Any CPU
+ {461606BD-E824-4D0A-8CBA-01810B1F5E02}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {461606BD-E824-4D0A-8CBA-01810B1F5E02}.Release|Win32.Build.0 = Release|Any CPU
+ {461606BD-E824-4D0A-8CBA-01810B1F5E02}.Release|Win32.ActiveCfg = Release|Any CPU
+ {461606BD-E824-4D0A-8CBA-01810B1F5E02}.Release|x86.Build.0 = Release|Any CPU
+ {461606BD-E824-4D0A-8CBA-01810B1F5E02}.Release|x86.ActiveCfg = Release|Any CPU
+ {64A3E5E6-90BF-47F6-94DF-68C94B62C817}.Debug|Win32.Build.0 = Debug|Any CPU
+ {64A3E5E6-90BF-47F6-94DF-68C94B62C817}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {64A3E5E6-90BF-47F6-94DF-68C94B62C817}.Debug|x86.Build.0 = Debug|Any CPU
+ {64A3E5E6-90BF-47F6-94DF-68C94B62C817}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {64A3E5E6-90BF-47F6-94DF-68C94B62C817}.Release|Win32.Build.0 = Release|Any CPU
+ {64A3E5E6-90BF-47F6-94DF-68C94B62C817}.Release|Win32.ActiveCfg = Release|Any CPU
+ {64A3E5E6-90BF-47F6-94DF-68C94B62C817}.Release|x86.Build.0 = Release|Any CPU
+ {64A3E5E6-90BF-47F6-94DF-68C94B62C817}.Release|x86.ActiveCfg = Release|Any CPU
+ {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Debug|Win32.Build.0 = Debug|Any CPU
+ {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Debug|x86.Build.0 = Debug|Any CPU
+ {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Release|Win32.Build.0 = Release|Any CPU
+ {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Release|Win32.ActiveCfg = Release|Any CPU
+ {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Release|x86.Build.0 = Release|Any CPU
+ {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Release|x86.ActiveCfg = Release|Any CPU
+ {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Debug|Win32.Build.0 = Debug|Any CPU
+ {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Debug|x86.Build.0 = Debug|Any CPU
+ {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Release|Win32.Build.0 = Release|Any CPU
+ {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Release|Win32.ActiveCfg = Release|Any CPU
+ {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Release|x86.Build.0 = Release|Any CPU
+ {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Release|x86.ActiveCfg = Release|Any CPU
+ {4B8F0F98-8BE1-402B-AA8B-C8D548577B38}.Debug|Win32.Build.0 = Debug|Any CPU
+ {4B8F0F98-8BE1-402B-AA8B-C8D548577B38}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {4B8F0F98-8BE1-402B-AA8B-C8D548577B38}.Debug|x86.Build.0 = Debug|Any CPU
+ {4B8F0F98-8BE1-402B-AA8B-C8D548577B38}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4B8F0F98-8BE1-402B-AA8B-C8D548577B38}.Release|Win32.Build.0 = Release|Any CPU
+ {4B8F0F98-8BE1-402B-AA8B-C8D548577B38}.Release|Win32.ActiveCfg = Release|Any CPU
+ {4B8F0F98-8BE1-402B-AA8B-C8D548577B38}.Release|x86.Build.0 = Release|Any CPU
+ {4B8F0F98-8BE1-402B-AA8B-C8D548577B38}.Release|x86.ActiveCfg = Release|Any CPU
+ {F93E52FD-DA66-4CE5-A0CB-BCD902811122}.Debug|Win32.Build.0 = Debug|Any CPU
+ {F93E52FD-DA66-4CE5-A0CB-BCD902811122}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {F93E52FD-DA66-4CE5-A0CB-BCD902811122}.Debug|x86.Build.0 = Debug|Any CPU
+ {F93E52FD-DA66-4CE5-A0CB-BCD902811122}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F93E52FD-DA66-4CE5-A0CB-BCD902811122}.Release|Win32.Build.0 = Release|Any CPU
+ {F93E52FD-DA66-4CE5-A0CB-BCD902811122}.Release|Win32.ActiveCfg = Release|Any CPU
+ {F93E52FD-DA66-4CE5-A0CB-BCD902811122}.Release|x86.Build.0 = Release|Any CPU
+ {F93E52FD-DA66-4CE5-A0CB-BCD902811122}.Release|x86.ActiveCfg = Release|Any CPU
+ {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}.Debug|Win32.Build.0 = Debug|Any CPU
+ {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}.Debug|x86.Build.0 = Debug|Any CPU
+ {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}.Release|Win32.Build.0 = Release|Any CPU
+ {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}.Release|Win32.ActiveCfg = Release|Any CPU
+ {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}.Release|x86.Build.0 = Release|Any CPU
+ {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}.Release|x86.ActiveCfg = Release|Any CPU
+ {9196DD8A-B4D4-4780-8742-C5762E547FC2}.Debug|Win32.Build.0 = Debug|Any CPU
+ {9196DD8A-B4D4-4780-8742-C5762E547FC2}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {9196DD8A-B4D4-4780-8742-C5762E547FC2}.Debug|x86.Build.0 = Debug|Any CPU
+ {9196DD8A-B4D4-4780-8742-C5762E547FC2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9196DD8A-B4D4-4780-8742-C5762E547FC2}.Release|Win32.Build.0 = Release|Any CPU
+ {9196DD8A-B4D4-4780-8742-C5762E547FC2}.Release|Win32.ActiveCfg = Release|Any CPU
+ {9196DD8A-B4D4-4780-8742-C5762E547FC2}.Release|x86.Build.0 = Release|Any CPU
+ {9196DD8A-B4D4-4780-8742-C5762E547FC2}.Release|x86.ActiveCfg = Release|Any CPU
+ {3CA90546-3B4C-4663-9445-C4E9371750A7}.Debug|x86.Build.0 = Debug|Any CPU
+ {3CA90546-3B4C-4663-9445-C4E9371750A7}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3CA90546-3B4C-4663-9445-C4E9371750A7}.Release|x86.Build.0 = Release|Any CPU
+ {3CA90546-3B4C-4663-9445-C4E9371750A7}.Release|x86.ActiveCfg = Release|Any CPU
+ {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}.Debug|Win32.Build.0 = Debug|Any CPU
+ {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}.Debug|x86.Build.0 = Debug|Any CPU
+ {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}.Release|Win32.Build.0 = Release|Any CPU
+ {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}.Release|Win32.ActiveCfg = Release|Any CPU
+ {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}.Release|x86.Build.0 = Release|Any CPU
+ {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}.Release|x86.ActiveCfg = Release|Any CPU
+ {1D18D788-F7EE-4585-A23B-34DC8EC63CB8}.Debug|Win32.Build.0 = Debug|Any CPU
+ {1D18D788-F7EE-4585-A23B-34DC8EC63CB8}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {1D18D788-F7EE-4585-A23B-34DC8EC63CB8}.Debug|x86.Build.0 = Debug|Any CPU
+ {1D18D788-F7EE-4585-A23B-34DC8EC63CB8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1D18D788-F7EE-4585-A23B-34DC8EC63CB8}.Release|Win32.Build.0 = Release|Any CPU
+ {1D18D788-F7EE-4585-A23B-34DC8EC63CB8}.Release|Win32.ActiveCfg = Release|Any CPU
+ {1D18D788-F7EE-4585-A23B-34DC8EC63CB8}.Release|x86.Build.0 = Release|Any CPU
+ {1D18D788-F7EE-4585-A23B-34DC8EC63CB8}.Release|x86.ActiveCfg = Release|Any CPU
+ {7C96B65D-28A5-4F28-A35B-8D83CE831EE8}.Debug|Win32.Build.0 = Debug|Any CPU
+ {7C96B65D-28A5-4F28-A35B-8D83CE831EE8}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {7C96B65D-28A5-4F28-A35B-8D83CE831EE8}.Debug|x86.Build.0 = Debug|Any CPU
+ {7C96B65D-28A5-4F28-A35B-8D83CE831EE8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7C96B65D-28A5-4F28-A35B-8D83CE831EE8}.Release|Win32.Build.0 = Release|Any CPU
+ {7C96B65D-28A5-4F28-A35B-8D83CE831EE8}.Release|Win32.ActiveCfg = Release|Any CPU
+ {7C96B65D-28A5-4F28-A35B-8D83CE831EE8}.Release|x86.Build.0 = Release|Any CPU
+ {7C96B65D-28A5-4F28-A35B-8D83CE831EE8}.Release|x86.ActiveCfg = Release|Any CPU
+ {BF38FB72-B380-4196-AF8C-95749D726C61}.Debug|Win32.Build.0 = Debug|Any CPU
+ {BF38FB72-B380-4196-AF8C-95749D726C61}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {BF38FB72-B380-4196-AF8C-95749D726C61}.Debug|x86.Build.0 = Debug|Any CPU
+ {BF38FB72-B380-4196-AF8C-95749D726C61}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BF38FB72-B380-4196-AF8C-95749D726C61}.Release|Win32.Build.0 = Release|Any CPU
+ {BF38FB72-B380-4196-AF8C-95749D726C61}.Release|Win32.ActiveCfg = Release|Any CPU
+ {BF38FB72-B380-4196-AF8C-95749D726C61}.Release|x86.Build.0 = Release|Any CPU
+ {BF38FB72-B380-4196-AF8C-95749D726C61}.Release|x86.ActiveCfg = Release|Any CPU
+ {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Debug|Win32.Build.0 = Debug|Any CPU
+ {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Debug|x86.Build.0 = Debug|Any CPU
+ {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Release|Win32.Build.0 = Release|Any CPU
+ {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Release|Win32.ActiveCfg = Release|Any CPU
+ {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Release|x86.Build.0 = Release|Any CPU
+ {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Release|x86.ActiveCfg = Release|Any CPU
+ {E1B288A2-08EE-4318-8BBB-8AB72C69E33E}.Debug|Win32.Build.0 = Debug|Any CPU
+ {E1B288A2-08EE-4318-8BBB-8AB72C69E33E}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {E1B288A2-08EE-4318-8BBB-8AB72C69E33E}.Debug|x86.Build.0 = Debug|Any CPU
+ {E1B288A2-08EE-4318-8BBB-8AB72C69E33E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E1B288A2-08EE-4318-8BBB-8AB72C69E33E}.Release|Win32.Build.0 = Release|Any CPU
+ {E1B288A2-08EE-4318-8BBB-8AB72C69E33E}.Release|Win32.ActiveCfg = Release|Any CPU
+ {E1B288A2-08EE-4318-8BBB-8AB72C69E33E}.Release|x86.Build.0 = Release|Any CPU
+ {E1B288A2-08EE-4318-8BBB-8AB72C69E33E}.Release|x86.ActiveCfg = Release|Any CPU
+ {8D732610-8FC6-43BA-94C9-7126FD7FE361}.Debug|Win32.Build.0 = Debug|Any CPU
+ {8D732610-8FC6-43BA-94C9-7126FD7FE361}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {8D732610-8FC6-43BA-94C9-7126FD7FE361}.Debug|x86.Build.0 = Debug|Any CPU
+ {8D732610-8FC6-43BA-94C9-7126FD7FE361}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8D732610-8FC6-43BA-94C9-7126FD7FE361}.Release|Win32.Build.0 = Release|Any CPU
+ {8D732610-8FC6-43BA-94C9-7126FD7FE361}.Release|Win32.ActiveCfg = Release|Any CPU
+ {8D732610-8FC6-43BA-94C9-7126FD7FE361}.Release|x86.Build.0 = Release|Any CPU
+ {8D732610-8FC6-43BA-94C9-7126FD7FE361}.Release|x86.ActiveCfg = Release|Any CPU
+ {D332F2D1-2CF1-43B7-903C-844BD5211A7E}.Debug|Win32.Build.0 = Debug|Any CPU
+ {D332F2D1-2CF1-43B7-903C-844BD5211A7E}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {D332F2D1-2CF1-43B7-903C-844BD5211A7E}.Debug|x86.Build.0 = Debug|Any CPU
+ {D332F2D1-2CF1-43B7-903C-844BD5211A7E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D332F2D1-2CF1-43B7-903C-844BD5211A7E}.Release|Win32.Build.0 = Release|Any CPU
+ {D332F2D1-2CF1-43B7-903C-844BD5211A7E}.Release|Win32.ActiveCfg = Release|Any CPU
+ {D332F2D1-2CF1-43B7-903C-844BD5211A7E}.Release|x86.Build.0 = Release|Any CPU
+ {D332F2D1-2CF1-43B7-903C-844BD5211A7E}.Release|x86.ActiveCfg = Release|Any CPU
+ {DBCF20A1-BA13-4582-BFA9-74DE4D987B73}.Debug|Win32.Build.0 = Debug|Any CPU
+ {DBCF20A1-BA13-4582-BFA9-74DE4D987B73}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {DBCF20A1-BA13-4582-BFA9-74DE4D987B73}.Debug|x86.Build.0 = Debug|Any CPU
+ {DBCF20A1-BA13-4582-BFA9-74DE4D987B73}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DBCF20A1-BA13-4582-BFA9-74DE4D987B73}.Release|Win32.Build.0 = Release|Any CPU
+ {DBCF20A1-BA13-4582-BFA9-74DE4D987B73}.Release|Win32.ActiveCfg = Release|Any CPU
+ {DBCF20A1-BA13-4582-BFA9-74DE4D987B73}.Release|x86.Build.0 = Release|Any CPU
+ {DBCF20A1-BA13-4582-BFA9-74DE4D987B73}.Release|x86.ActiveCfg = Release|Any CPU
+ {4AC2D5F1-F671-480C-A075-6BF62B3721B2}.Debug|Win32.Build.0 = Debug|Any CPU
+ {4AC2D5F1-F671-480C-A075-6BF62B3721B2}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {4AC2D5F1-F671-480C-A075-6BF62B3721B2}.Debug|x86.Build.0 = Debug|Any CPU
+ {4AC2D5F1-F671-480C-A075-6BF62B3721B2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4AC2D5F1-F671-480C-A075-6BF62B3721B2}.Release|Win32.Build.0 = Release|Any CPU
+ {4AC2D5F1-F671-480C-A075-6BF62B3721B2}.Release|Win32.ActiveCfg = Release|Any CPU
+ {4AC2D5F1-F671-480C-A075-6BF62B3721B2}.Release|x86.Build.0 = Release|Any CPU
+ {4AC2D5F1-F671-480C-A075-6BF62B3721B2}.Release|x86.ActiveCfg = Release|Any CPU
+ {70966F84-74C9-4067-A379-0C674A929233}.Debug|Win32.Build.0 = Debug|Any CPU
+ {70966F84-74C9-4067-A379-0C674A929233}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {70966F84-74C9-4067-A379-0C674A929233}.Debug|x86.Build.0 = Debug|Any CPU
+ {70966F84-74C9-4067-A379-0C674A929233}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {70966F84-74C9-4067-A379-0C674A929233}.Release|Win32.Build.0 = Release|Any CPU
+ {70966F84-74C9-4067-A379-0C674A929233}.Release|Win32.ActiveCfg = Release|Any CPU
+ {70966F84-74C9-4067-A379-0C674A929233}.Release|x86.Build.0 = Release|Any CPU
+ {70966F84-74C9-4067-A379-0C674A929233}.Release|x86.ActiveCfg = Release|Any CPU
+ {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}.Debug|Win32.Build.0 = Debug|Any CPU
+ {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}.Debug|x86.Build.0 = Debug|Any CPU
+ {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}.Release|Win32.Build.0 = Release|Any CPU
+ {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}.Release|Win32.ActiveCfg = Release|Any CPU
+ {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}.Release|x86.Build.0 = Release|Any CPU
+ {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}.Release|x86.ActiveCfg = Release|Any CPU
+ {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}.Debug|Win32.Build.0 = Debug|Any CPU
+ {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}.Debug|x86.Build.0 = Debug|Any CPU
+ {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}.Release|Win32.Build.0 = Release|Any CPU
+ {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}.Release|Win32.ActiveCfg = Release|Any CPU
+ {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}.Release|x86.Build.0 = Release|Any CPU
+ {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}.Release|x86.ActiveCfg = Release|Any CPU
+ {BDA49550-5ED1-4C6B-B648-657B2CACD8E0}.Debug|Win32.Build.0 = Debug|Any CPU
+ {BDA49550-5ED1-4C6B-B648-657B2CACD8E0}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {BDA49550-5ED1-4C6B-B648-657B2CACD8E0}.Debug|x86.Build.0 = Debug|Any CPU
+ {BDA49550-5ED1-4C6B-B648-657B2CACD8E0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BDA49550-5ED1-4C6B-B648-657B2CACD8E0}.Release|Win32.Build.0 = Release|Any CPU
+ {BDA49550-5ED1-4C6B-B648-657B2CACD8E0}.Release|Win32.ActiveCfg = Release|Any CPU
+ {BDA49550-5ED1-4C6B-B648-657B2CACD8E0}.Release|x86.Build.0 = Release|Any CPU
+ {BDA49550-5ED1-4C6B-B648-657B2CACD8E0}.Release|x86.ActiveCfg = Release|Any CPU
+ {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}.Debug|Win32.Build.0 = Debug|Any CPU
+ {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}.Debug|x86.Build.0 = Debug|Any CPU
+ {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}.Release|Win32.Build.0 = Release|Any CPU
+ {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}.Release|Win32.ActiveCfg = Release|Any CPU
+ {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}.Release|x86.Build.0 = Release|Any CPU
+ {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}.Release|x86.ActiveCfg = Release|Any CPU
+ {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|Win32.Build.0 = Debug|Any CPU
+ {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|x86.Build.0 = Debug|Any CPU
+ {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|Win32.Build.0 = Release|Any CPU
+ {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|Win32.ActiveCfg = Release|Any CPU
+ {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|x86.Build.0 = Release|Any CPU
+ {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|x86.ActiveCfg = Release|Any CPU
+ {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}.Debug|Win32.Build.0 = Debug|Any CPU
+ {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}.Debug|x86.Build.0 = Debug|Any CPU
+ {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}.Release|Win32.Build.0 = Release|Any CPU
+ {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}.Release|Win32.ActiveCfg = Release|Any CPU
+ {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}.Release|x86.Build.0 = Release|Any CPU
+ {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}.Release|x86.ActiveCfg = Release|Any CPU
+ {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Win32.Build.0 = Debug|Any CPU
+ {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|x86.Build.0 = Debug|Any CPU
+ {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Win32.Build.0 = Release|Any CPU
+ {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Win32.ActiveCfg = Release|Any CPU
+ {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|x86.Build.0 = Release|Any CPU
+ {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|x86.ActiveCfg = Release|Any CPU
+ {2FF700C2-A38A-48BD-A637-8CAFD4FE6237}.Debug|Win32.Build.0 = Debug|Any CPU
+ {2FF700C2-A38A-48BD-A637-8CAFD4FE6237}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {2FF700C2-A38A-48BD-A637-8CAFD4FE6237}.Debug|x86.Build.0 = Debug|Any CPU
+ {2FF700C2-A38A-48BD-A637-8CAFD4FE6237}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2FF700C2-A38A-48BD-A637-8CAFD4FE6237}.Release|Win32.Build.0 = Release|Any CPU
+ {2FF700C2-A38A-48BD-A637-8CAFD4FE6237}.Release|Win32.ActiveCfg = Release|Any CPU
+ {2FF700C2-A38A-48BD-A637-8CAFD4FE6237}.Release|x86.Build.0 = Release|Any CPU
+ {2FF700C2-A38A-48BD-A637-8CAFD4FE6237}.Release|x86.ActiveCfg = Release|Any CPU
+ {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Debug|Win32.Build.0 = Debug|Any CPU
+ {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Debug|x86.Build.0 = Debug|Any CPU
+ {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Release|Win32.Build.0 = Release|Any CPU
+ {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Release|Win32.ActiveCfg = Release|Any CPU
+ {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Release|x86.Build.0 = Release|Any CPU
+ {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Release|x86.ActiveCfg = Release|Any CPU
+ {B22522AA-B5BF-4A58-AC6D-D4B45805521F}.Debug|Win32.Build.0 = Debug|Any CPU
+ {B22522AA-B5BF-4A58-AC6D-D4B45805521F}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {B22522AA-B5BF-4A58-AC6D-D4B45805521F}.Debug|x86.Build.0 = Debug|Any CPU
+ {B22522AA-B5BF-4A58-AC6D-D4B45805521F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B22522AA-B5BF-4A58-AC6D-D4B45805521F}.Release|Win32.Build.0 = Release|Any CPU
+ {B22522AA-B5BF-4A58-AC6D-D4B45805521F}.Release|Win32.ActiveCfg = Release|Any CPU
+ {B22522AA-B5BF-4A58-AC6D-D4B45805521F}.Release|x86.Build.0 = Release|Any CPU
+ {B22522AA-B5BF-4A58-AC6D-D4B45805521F}.Release|x86.ActiveCfg = Release|Any CPU
+ {1152B71B-3C05-4598-B20D-823B5D40559E}.Debug|Win32.Build.0 = Debug|Any CPU
+ {1152B71B-3C05-4598-B20D-823B5D40559E}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {1152B71B-3C05-4598-B20D-823B5D40559E}.Debug|x86.Build.0 = Debug|Any CPU
+ {1152B71B-3C05-4598-B20D-823B5D40559E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1152B71B-3C05-4598-B20D-823B5D40559E}.Release|Win32.Build.0 = Release|Any CPU
+ {1152B71B-3C05-4598-B20D-823B5D40559E}.Release|Win32.ActiveCfg = Release|Any CPU
+ {1152B71B-3C05-4598-B20D-823B5D40559E}.Release|x86.Build.0 = Release|Any CPU
+ {1152B71B-3C05-4598-B20D-823B5D40559E}.Release|x86.ActiveCfg = Release|Any CPU
+ {8035765F-D51F-4A0C-A746-2FD100E19419}.Debug|Win32.Build.0 = Debug|Any CPU
+ {8035765F-D51F-4A0C-A746-2FD100E19419}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {8035765F-D51F-4A0C-A746-2FD100E19419}.Debug|x86.Build.0 = Debug|Any CPU
+ {8035765F-D51F-4A0C-A746-2FD100E19419}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8035765F-D51F-4A0C-A746-2FD100E19419}.Release|Win32.Build.0 = Release|Any CPU
+ {8035765F-D51F-4A0C-A746-2FD100E19419}.Release|Win32.ActiveCfg = Release|Any CPU
+ {8035765F-D51F-4A0C-A746-2FD100E19419}.Release|x86.Build.0 = Release|Any CPU
+ {8035765F-D51F-4A0C-A746-2FD100E19419}.Release|x86.ActiveCfg = Release|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|Win32.Build.0 = Debug|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|x86.Build.0 = Debug|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|Win32.Build.0 = Release|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|Win32.ActiveCfg = Release|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|x86.Build.0 = Release|Any CPU
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|x86.ActiveCfg = Release|Any CPU
+ {80318B5F-A25D-45AB-8A95-EF31D2370A4C}.Debug|Win32.Build.0 = Debug|Any CPU
+ {80318B5F-A25D-45AB-8A95-EF31D2370A4C}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {80318B5F-A25D-45AB-8A95-EF31D2370A4C}.Debug|x86.Build.0 = Debug|Any CPU
+ {80318B5F-A25D-45AB-8A95-EF31D2370A4C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {80318B5F-A25D-45AB-8A95-EF31D2370A4C}.Release|Win32.Build.0 = Release|Any CPU
+ {80318B5F-A25D-45AB-8A95-EF31D2370A4C}.Release|Win32.ActiveCfg = Release|Any CPU
+ {80318B5F-A25D-45AB-8A95-EF31D2370A4C}.Release|x86.Build.0 = Release|Any CPU
+ {80318B5F-A25D-45AB-8A95-EF31D2370A4C}.Release|x86.ActiveCfg = Release|Any CPU
+ {924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|Win32.Build.0 = Debug|Any CPU
+ {924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|x86.Build.0 = Debug|Any CPU
+ {924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|Win32.Build.0 = Release|Any CPU
+ {924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|Win32.ActiveCfg = Release|Any CPU
+ {924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|x86.Build.0 = Release|Any CPU
+ {924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|x86.ActiveCfg = Release|Any CPU
+ {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Debug|Win32.Build.0 = Debug|Any CPU
+ {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Debug|x86.Build.0 = Debug|Any CPU
+ {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Release|Win32.Build.0 = Release|Any CPU
+ {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Release|Win32.ActiveCfg = Release|Any CPU
+ {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Release|x86.Build.0 = Release|Any CPU
+ {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Release|x86.ActiveCfg = Release|Any CPU
+ {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Debug|Win32.Build.0 = Debug|Any CPU
+ {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Debug|x86.Build.0 = Debug|Any CPU
+ {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Release|Win32.Build.0 = Release|Any CPU
+ {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Release|Win32.ActiveCfg = Release|Any CPU
+ {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Release|x86.Build.0 = Release|Any CPU
+ {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Release|x86.ActiveCfg = Release|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|Win32.Build.0 = Debug|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|x86.Build.0 = Debug|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|Win32.Build.0 = Release|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|Win32.ActiveCfg = Release|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|x86.Build.0 = Release|Any CPU
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|x86.ActiveCfg = Release|Any CPU
+ {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}.Debug|Win32.Build.0 = Debug|Any CPU
+ {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}.Debug|x86.Build.0 = Debug|Any CPU
+ {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}.Release|Win32.Build.0 = Debug|Any CPU
+ {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}.Release|Win32.ActiveCfg = Debug|Any CPU
+ {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}.Release|x86.Build.0 = Debug|Any CPU
+ {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}.Release|x86.ActiveCfg = Debug|Any CPU
+ {4980B743-B32F-4aba-AABD-45E2CAD3568D}.Debug|Win32.Build.0 = Debug|Any CPU
+ {4980B743-B32F-4aba-AABD-45E2CAD3568D}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {4980B743-B32F-4aba-AABD-45E2CAD3568D}.Debug|x86.Build.0 = Debug|Any CPU
+ {4980B743-B32F-4aba-AABD-45E2CAD3568D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4980B743-B32F-4aba-AABD-45E2CAD3568D}.Release|Win32.Build.0 = Debug|Any CPU
+ {4980B743-B32F-4aba-AABD-45E2CAD3568D}.Release|Win32.ActiveCfg = Debug|Any CPU
+ {4980B743-B32F-4aba-AABD-45E2CAD3568D}.Release|x86.Build.0 = Debug|Any CPU
+ {4980B743-B32F-4aba-AABD-45E2CAD3568D}.Release|x86.ActiveCfg = Debug|Any CPU
+ {7DB80259-24D4-46C3-A024-53FF1987733D}.Debug|Win32.Build.0 = Debug|Any CPU
+ {7DB80259-24D4-46C3-A024-53FF1987733D}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {7DB80259-24D4-46C3-A024-53FF1987733D}.Debug|x86.Build.0 = Debug|Any CPU
+ {7DB80259-24D4-46C3-A024-53FF1987733D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7DB80259-24D4-46C3-A024-53FF1987733D}.Release|Win32.Build.0 = Release|Any CPU
+ {7DB80259-24D4-46C3-A024-53FF1987733D}.Release|Win32.ActiveCfg = Release|Any CPU
+ {7DB80259-24D4-46C3-A024-53FF1987733D}.Release|x86.Build.0 = Release|Any CPU
+ {7DB80259-24D4-46C3-A024-53FF1987733D}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/data/resources/StringResources.de.resx b/data/resources/StringResources.de.resx
index aa4ea7305c..25972a7c0c 100644
--- a/data/resources/StringResources.de.resx
+++ b/data/resources/StringResources.de.resx
@@ -1498,6 +1498,12 @@ Beispiele: "120", "MainClass", "Main.cs, 120".
Kursiv
+
+ Hervorhebungsfarben exportieren
+
+
+ Hervorhebungsfarben importieren
+
Wert
@@ -2181,11 +2187,14 @@ Wollen Sie die neue Datei zum Projekt ${CurrentProjectName} hinzufügen?
Deaktiviert
- Markierungen und Liniale
+ Markierungen
Markierungen und Liniale
+
+ Lineale
+
Verdeckte Definitionen anzeigen (nur geschweifte Klammern)
@@ -4033,6 +4042,12 @@ Grund: Der Wert zu dem zurückgesetzt werden soll ist ungültig weil sich eine a
Das öffentliche Schlüsseltoken der Assembly
+
+ Assembly referenzieren
+
+
+ Wenn auf false gesetzt, gibt diese Referenz nur eine Build-Reihenfolgenabhängigkeit an und fügt keine Assembly-Referenz zum Projekt hinzu.
+
Festgelegte Version
@@ -4979,6 +4994,9 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension<
Kopiere Wert in Zwischenablage
+
+ Name
+
Nicht-öffentliche Mitglieder
@@ -5000,6 +5018,12 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension<
Statische Mitglieder
+
+ Typ
+
+
+ Wert
+
Speicher
@@ -5375,6 +5399,15 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension<
Öffne beinhaltenden Ordner im Explorer
+
+ Kommandozeile hier öffnen
+
+
+ Ziel-Frameworks wählen
+
+
+ Konnte die Portable Class Library Tools nicht finden.
+
Alle Knoten einklappen
@@ -5510,6 +5543,9 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension<
Projekt sta&rten
+
+ Projekt ohne Debugger starten
+
Als St&artprojekt festlegen
diff --git a/data/resources/StringResources.fr.resx b/data/resources/StringResources.fr.resx
index 2f0e2f9e55..2ea1fca7a5 100644
--- a/data/resources/StringResources.fr.resx
+++ b/data/resources/StringResources.fr.resx
@@ -1862,6 +1862,9 @@ Voulez-vous ajouter le nouveau fichier au projet ${CurrentProjectName}?
Pas-Ã -pas en cours
+
+ Décompiler le code sans symboles
+
Utiliser 'Seulement mon code' pour le pas-Ã -pas
@@ -3379,6 +3382,9 @@ Configurez le chemin vers NAnt dans les options de SharpDevelop.
L'élément sélectionné n'est ni une classe ni un membre surchargeable: aucun symbole dérivé n'est disponible.
+
+ Impossible de trouver la définition du type sous le curseur.
+
Envoyer cette ligne vers la console Ruby
@@ -3774,6 +3780,9 @@ Toutes les modifications seront perdues.
Impossible de charger le concepteur. Vérifier les erreurs de syntaxe du code source et si toutes les références sont disponibles.
+
+ Une ou plusieurs erreurs sont survenues en essayant de vider le contenu du concepteur. C'est peut-être une exception non gérée dans un composant tiers sur le formulaire ou le contrôle.
+
Ne peut charger la librairie contenant la barre de composants.
Les composants Windows Form ne seront pas accessibles, veuillez configurer manuellement la barre de composants (clic droit sur une catégorie de la barre de menu -> Paramétrer la barre de menu).
@@ -3988,6 +3997,12 @@ Utilisez seulement des lettres, chiffres, espace, '.' ou '_'.
La culture supportée par la référence
+
+ Embarquer les types interop
+
+
+ Précise si les type d'interop COM définis dans l'assembly référencé sont embarqués dans l'assembly cible.
+
Copie locale
@@ -4006,6 +4021,12 @@ Utilisez seulement des lettres, chiffres, espace, '.' ou '_'.
Le jeton de clé publique
+
+ Référencer l'assembly
+
+
+ Si positionné à Faux, cette référence spécifie uniquement une dépendance dans l'ordre de la construction sans référencer l'assembly.
+
Version Spécifique
@@ -4051,6 +4072,9 @@ Utilisez seulement des lettres, chiffres, espace, '.' ou '_'.
Chargement de ${Filename}...
+
+ Fermer la solution
+
Laisser la solution précédente ouverte
@@ -4084,6 +4108,14 @@ Utilisez seulement des lettres, chiffres, espace, '.' ou '_'.
Mettre à jour le projet
+
+ Le projet '${ProjectName}' cible MSBuild ${OldToolsVersion}, mais cette version n'est pas installée.
+Voulez vous mettre à jour le projet vers MSBuild ${NewToolsVersion}?
+Le projet ne sera pas ouvert sans cette mise à jour.
+
+
+ Mettre à jour vers MSBuild ${NewToolsVersion}
+
Cette solution a été créée par une précédente version de SharpDevelop.
La mettre à jour vous permet d'utiliser de nouveaux languages, ou les évolutions du framework.
@@ -4165,7 +4197,7 @@ Allez dans 'Outils/Options->Style Visuel pour changer l'ambiance actuelle.Processus de travail {0} ASP.NET/IIS(Express) introuvable.
- Pas d'URL du projet spécifiée ou de programme externe. Vérifier le serveur web dans Propriétés du projet - Onglet debug.
+ Aucun programme externe ni URL spécifié. Vérifier le serveur web dans Propriétés du projet - onglet Web.
Port:
@@ -4783,7 +4815,7 @@ Soit ils n'existent pas, soit le document Wix n'est pas pour WiX 3.0 et l'espace
Vous ne pouvez pas changer pour une fonction sans symboles.
- Les options de décompilation du code doivent être activés pour aller vers une fonction sans symboles.
+ Impossible de basculer vers une méthode sans symboles de déboguage.Recompilez avec les symboles ou activer l'option de décompilation du code sans symboles.
[Méthodes externes]
@@ -4941,6 +4973,9 @@ Soit ils n'existent pas, soit le document Wix n'est pas pour WiX 3.0 et l'espace
Copier la valeur dans le presse-papier
+
+ Nom
+
Membres non publics
@@ -4962,6 +4997,12 @@ Soit ils n'existent pas, soit le document Wix n'est pas pour WiX 3.0 et l'espace
Membres statiques
+
+ Type
+
+
+ Valeur
+
Mémoire
@@ -5001,12 +5042,18 @@ Soit ils n'existent pas, soit le document Wix n'est pas pour WiX 3.0 et l'espace
Adresse
+
+ (dynamique)
+
Aucun symbole n'est chargé.
Symboles chargés.
+
+ (en mémoire)
+
Ordre
@@ -5331,6 +5378,9 @@ Soit ils n'existent pas, soit le document Wix n'est pas pour WiX 3.0 et l'espace
Ouvrir le répertoire dans l'explorateur
+
+ Ouvrir une invite de commande ici
+
Réduire tous les noeuds
@@ -5466,6 +5516,9 @@ Soit ils n'existent pas, soit le document Wix n'est pas pour WiX 3.0 et l'espace
Lance&r projet
+
+ Exécuter ce projet sans débogueur
+
Définir comme projet de dém&arrage
diff --git a/data/resources/StringResources.it.resx b/data/resources/StringResources.it.resx
index 4642534ac8..fe19da92bd 100644
--- a/data/resources/StringResources.it.resx
+++ b/data/resources/StringResources.it.resx
@@ -1860,6 +1860,9 @@ Vuoi aggiungere il nuovo file al progetto ${CurrentProjectName}?
Stepping
+
+ Decompila codice senza simboli
+
Usa 'Just My Code' per debug passo-passo
@@ -3692,7 +3695,7 @@ ${File}
Proprietà Griglia
- A<ezza
+ &Altezza
Abilita modifica in-linea dei ToolStrips
@@ -4011,6 +4014,9 @@ Sono ammesse solo lettere, numeri, spazi, '.' o '_'.
Il token di chiave pubblica
+
+ Referenzia assembly
+
Versione Specifica
@@ -4056,6 +4062,9 @@ Sono ammesse solo lettere, numeri, spazi, '.' o '_'.
Caricamento ${Filename}...
+
+ Chiudi soluzione
+
Mantieni aperta la vecchia soluzione
@@ -4089,6 +4098,13 @@ Sono ammesse solo lettere, numeri, spazi, '.' o '_'.
Aggiorna Progetto
+
+ Il progetto '${ProjectName}' usa MSBuild ${OldToolsVersion}, ma questa versione non è installata.
+Vuoi aggiornare il progetto a MSBuild ${NewToolsVersion}? Il progetto non può essere aperto senza essere aggiornato.
+
+
+ Aggiorna a MSBuild ${NewToolsVersion}
+
Questa soluzione è stata creata con una versione precedente di SharpDevelop. Potresti volerla aggiornare così da utilizzare le nuove funzionalità del linguaggio o del framework.
@@ -4169,7 +4185,7 @@ Vai a 'Opzioni->Stile visuale' e cambia l'attuale ambiente di linguaggio.ASP.NET/IIS (Express) worker process ({0}) non trovato.
- Non è stato specificato nessun Url di Progetto o programma esterno. Controlla il web server su Proprietà Progetto - Debug.
+ Non è stato specificato nessun Url di Progetto o programma esterno. Controlla il web server sulla linguetta Proprietà Progetto - Web.
Porta server:
@@ -4788,7 +4804,7 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension<
Non si può passare ad una funzione senza simboli di debug.
- Non puoi passare ad una funzione senza simboli senza attivare le opzioni di decompilazione del codice.
+ Non puoi passare ad una funzione senza simboli. Ricompila con i simboli o attiva "Decompila codice senza simboli" nelle opzioni.
[Metodi esterni]
@@ -4946,6 +4962,9 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension<
Copia il valore negli Appunti
+
+ Nome
+
Membro Non-Pubblico
@@ -4967,6 +4986,12 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension<
Membri statici
+
+ Tipo
+
+
+ Valore
+
Memoria
@@ -5006,12 +5031,18 @@ Microsoft.Tools.WindowsInstallerXml.Extensions.NetFxCompiler, WixNetFxExtension<
Indirizzo
+
+ (dinamico)
+
Nessun simbolo caricato.
Simboli caricati.
+
+ (in memoria)
+
Ordine
diff --git a/data/resources/StringResources.nl.resx b/data/resources/StringResources.nl.resx
index 4ccfb33a77..c72858459a 100644
--- a/data/resources/StringResources.nl.resx
+++ b/data/resources/StringResources.nl.resx
@@ -1501,6 +1501,12 @@ Voorbeelden: "120", "MainClass", "Main.cs, 120".
Cursief
+
+ Selectie kleuren expoorteren
+
+
+ Selectie kleuren importeren
+
Waarde
@@ -2184,11 +2190,14 @@ Wilt u het nieuwe bestand toevoegen aan project ${CurrentProjectName}?
Geen
- Markeringen en Linealen
+ Markeringen
Markeringen en Linealen
+
+ Linealen
+
Toon &verborgen definities(alleen haakjes)
@@ -2355,7 +2364,7 @@ Wilt u het nieuwe bestand toevoegen aan project ${CurrentProjectName}?
32 bit Intel-compatibele processor
- Doel Framework:
+ Doel raamwerk:
Behandel waarschuwingen als fouten
@@ -3046,7 +3055,7 @@ Er kan worden gekozen voor opslag van de instellingen in het .user bestand inpla
Bezig met Code Analyse...
- Onbekend doel Mono Framework Versie:
+ Onbekend doel Mono Raamwerk Versie:
Code Analyse
@@ -4023,6 +4032,12 @@ Alleen letters, getallen, spatie, '.' of '_' zijn toegestaan.
De openbare sleutel token
+
+ Referentie assembly
+
+
+ Indien false, specificeert deze referentie enkel een bouw-volgorde afhankelijkheid en heeft niet tot gevolg dat de assembly gerefereerd wordt.
+
Specifieke versie
@@ -4084,7 +4099,7 @@ Alleen letters, getallen, spatie, '.' of '_' zijn toegestaan.
Converteer geselecteerde &projecten naar
- Wijzig doel framework
+ Wijzig doel Raamwerk:
Versie van geselecteerde projecten wijzigen
@@ -4099,7 +4114,7 @@ Alleen letters, getallen, spatie, '.' of '_' zijn toegestaan.
<niet wijzigen>
- Doel framework
+ Doel Raamwerk
Project opwaarderen
@@ -4113,7 +4128,7 @@ Zonder opwaarderen kan het project niet geopend wordenh.
Opwaarderen naar MSBuild ${NewToolsVersion}
- Deze oplossing werd met een vorige versie van SharpDevelop gemaakt. Door te upgraden kan gebruik gemaakt worden van nieuwe taal of framework mogelijkheden.
+ Deze oplossing werd met een eerdere versie van SharpDevelop gemaakt. Door te upgraden kan gebruik gemaakt worden van nieuwe taal- of raamwerk mogelijkheden.
Momentele ambience niet gevonden.
@@ -4421,7 +4436,7 @@ Microsoft.Tools.WindowsInstallerXml.Extenties.NetFxCompiler, WixNetFxExtentieWiX localisatie bestanden
- .NET Framework uitbreiding
+ .NET Raamwerk uitbreiding
Geen verschil gevonden.
@@ -4969,6 +4984,9 @@ Microsoft.Tools.WindowsInstallerXml.Extenties.NetFxCompiler, WixNetFxExtentie
Kopieer waarde naar klembord
+
+ Naam
+
Niet openbare leden
@@ -4990,6 +5008,12 @@ Microsoft.Tools.WindowsInstallerXml.Extenties.NetFxCompiler, WixNetFxExtentie
Statische leden
+
+ Type
+
+
+ Waarde
+
Geheugen
@@ -5365,6 +5389,30 @@ Microsoft.Tools.WindowsInstallerXml.Extenties.NetFxCompiler, WixNetFxExtentie
Open de document bevattende map in de Explorer
+
+ Open hier de commando prompt
+
+
+ Selecteer doel-raamwerken.
+
+
+ Kan Portable Klasse-bibliotheek gereedschap niet vinden.
+
+
+ .NET Portable subset
+
+
+ Er moeten tenminste twee raamwerken worden geselecteerd.
+
+
+ Gekozen profiel:
+
+
+ Kies een Portable Bibliotheek profiel.
+
+
+ Om de portabele Klassebibliotheek gereedschappen te installeren zonder Visual Studio te installeren, sla het download bestand op (PortableLibraryTools.exe) op uw computer en voer de installatie uit via de commndoregel. Inclusief de /bouwmachine schakeling op de commandoregel.
+
Alle knooppunten invouwen
@@ -5500,6 +5548,9 @@ Microsoft.Tools.WindowsInstallerXml.Extenties.NetFxCompiler, WixNetFxExtentie
P&roject starten
+
+ Project uitvoeren zonder foutopsporing
+
Als startproject instellen.
@@ -6618,6 +6669,12 @@ De hulpbron bestanden zijn hernoemd/verplaatst op de beschreven wijze.
Gtk# toepassing
+
+ Bibliotheek, bruikbaar bij Windows, Silverlight, Windows Phone en Xbox.
+
+
+ Portable Klassen-bibliotheek
+
Windows installatie project om een MSI installatie programma te maken.
@@ -6769,7 +6826,7 @@ De hulpbron bestanden zijn hernoemd/verplaatst op de beschreven wijze.
Ontkoppel
- Kan .NET Framework versie van het programma niet krijgen. Ga na of het programma een beheerde assembly is.
+ Kan .NET Raamwerk versie van het programma niet oproepen. Ga na of het programma een gemanagede assembly is.
Kan niet bij proces aanhaken.
@@ -6784,7 +6841,7 @@ De hulpbron bestanden zijn hernoemd/verplaatst op de beschreven wijze.
Kan SharpDevelop foutopsporing niet starten omdat kernel foutopsporing is aangezet. Om de kernel foutopsporing uit te zetten, dient de schakeling "/debug" uit bestand Boot.ini verwijderd te worden en de computer opnieuw te worden opgestart.
- Foutopsporing bij .NET Framework 1.0 programmas is niet ondersteund.
+ Foutopsporing bij .NET Raamwerk 1.0 programmas is niet ondersteund.
Kan actie niet uitvoeren omdat er geen foutopsporing van een proces plaatsvindt.
diff --git a/data/resources/StringResources.resx b/data/resources/StringResources.resx
index 363b3b0163..349f8aafef 100644
--- a/data/resources/StringResources.resx
+++ b/data/resources/StringResources.resx
@@ -1550,6 +1550,12 @@ Examples: "120", "MainClass", "Main.cs, 120".
Italic
+
+ Export highlighting colors
+
+
+ Import highlighting colors
+
Value
@@ -2256,11 +2262,14 @@ system. I don't think that it needs translation.
None
- Markers and Rulers
+ Markers
Markers and Rulers
+
+ Rulers
+
Show &hidden definitions (brackets only)
@@ -5270,6 +5279,9 @@ Stop/terminate the debuggee.
Copy value to clipboard
Item in variable's context menu
+
+ Name
+
Non-Public members
@@ -5297,6 +5309,12 @@ Shows the full callstack of the error.
Static members
+
+ Type
+
+
+ Value
+
Memory
@@ -5686,6 +5704,35 @@ Removed the end part of the original message ", reason '${Message}'" since this
Open containing folder in Explorer
String for the editor tab context menu that will open the directory in which a documents file is contained in Windows Explorer.
+
+ Open command prompt here
+
+
+ choose target frameworks
+ Option in the "target framework" combobox in the "project upgrade" view that causes the "select portable profile" dialog to appear
+
+
+ Could not find Portable Class Library Tools.
+
+
+ .NET Portable Subset
+ Name for the portable target framework, shown in Project Upgrade view
+
+
+ Two or more frameworks must be selected.
+ Label shown when only 0 or 1 frameworks are selected
+
+
+ Selected profile:
+ Label that shows the selected portable library profile
+
+
+ Select Portable Library Profile
+ Title of the dialog used to pick the target frameworks for a portable library project
+
+
+ To install the Portable Class Library Tools without installing Visual Studio, save the download file (PortableLibraryTools.exe) on your computer, and run the installation program from a Command Prompt window. Include the /buildmachine switch on the command line.
+
Collapse all nodes
@@ -5830,6 +5877,9 @@ Removed the end part of the original message ", reason '${Message}'" since this
&Run Project
+
+ Run Project without Debugger
+
Set as St&artUp Project
@@ -6997,6 +7047,12 @@ The resources files have been renamed/moved accordingly.
Gtk# Application
Name of Gtk# project template.
+
+ Library that can be used on Windows, Silverlight, Windows Phone, and Xbox.
+
+
+ Portable Class Library
+
A windows installer project for creating a MSI installer.
diff --git a/data/resources/StringResources.tr.resx b/data/resources/StringResources.tr.resx
index 87df334241..fc6118ebe1 100644
--- a/data/resources/StringResources.tr.resx
+++ b/data/resources/StringResources.tr.resx
@@ -127,13 +127,13 @@
Kurulumu iptal et
- Güncelleştirmeyi durdur
+ Güncellemeyi iptal et
- Etkisiz kıl
+ Etkisiz
- EtkinleÅŸtir
+ Etkin
Yükle
@@ -145,49 +145,49 @@
Güncelle
- Bu eklenti için gerekli bir alt parça bulunamadı. Eklentiyi aktifleştirebilmek için gereken alt parçayı yüklemelisiniz.
+ Bu eklenti için bir bağımlılık bulunamadı. Eklentiyi kullanabilmek için yüklemelisiniz.
- Etkisiz kılınmış
+ Etkisiz
- Eklenti SharpDevelop yeniden başlatıldıktan sonra etkinleştirilecektir.
+ Eklenti SharpDevelop yeniden başlatıldıktan sonra kullanılabilir.
Eklenti SharpDevelop yeniden başlatıldıktan sonra yüklenecektir.
- Bu eklenti iki kez kurulmuştur. Lütfen birini kaldırın.
+ Bu eklenti iki kez kurulmuş. Lütfen birini kaldırın.
Eklentinin Eklenti Yöneticisi tarafindan kullanılmasi için bir <Identity> si olmalıdır
- Eklenti SharpDevelop yeniden başlatıldığında kaldırılacaktır.
+ Eklenti SharpDevelop yeniden başlatıldığında kaldırılacak.
- Eklenti SharpDevelop yeniden başlatıldığında güncellenecektir.
+ Eklenti SharpDevelop yeniden başlatıldığında güncellenecek.
- Eklenti SharpDevelop yeniden başlatıldığında etkisiz hale gelecektir.
+ Eklenti SharpDevelop yeniden başlatıldığında etkisiz olacak.
- Eklenti yöneticisini etkisizleştiremezsiniz çünkü eklentileri yeniden etkinleştirmelisiniz.
+ Eklenti yöneticisini devre dışı bırakamazsınız çünkü eklentileri yeniden etkinleştirmelisiniz.
- ${ProductName} dizinin içine eklenti yükleyemezsiniz,eklentiler otomatik olarak ön yüklemeli olarak algılanacaktır.
+ ${ProductName} dizini içine eklenti yükleyemezsiniz, eklentiler otomatik ön yüklemeli olarak algılanacaktır.
- Seçili eklentilerin kaldırılmasını iptal eder.
+ Seçili eklenti(ler)in kaldırılmasını iptal eder.
- Seçili eklentilerin kurulumunu iptal eder.
+ Seçili eklenti(ler)in kurulumunu iptal eder.
- Seçili eklentilerin güncelleştirilmesini iptal eder.
+ Seçili eklenti(ler)in güncelleştirilmesini iptal eder.
- Seçili eklentiyi etkisiz kılar.
+ Seçili eklentiyi etkisizleştirir.
Seçili eklentiyi etkinleştirir.
@@ -196,20 +196,20 @@
Seçim tutarsız, lütfen sadece aynı durumdaki eklentileri seçin.
- Eklenti yükleme paketi
+ Eklenti Yükleme Paketi
- SharpDevelop Eklentileri|*.addin;*.saddin|All files|*.*
+ SharpDevelop Eklentileri|*.addin;*.sdaddin|All files|*.*
- Eklenti &Kur
+ Eklenti Kur
Kurulu eklenti bulunmamaktadır.
-İnternetten eklenti indirin, 'Eklenti kur' seçeneğine tıklayın ve bunu kurmak için indirdiğiniz dosyayı seçin.
+İnternetten eklenti indirin, 'Eklenti kur' seçeneğine tıklayın ve kurmak için indirdiğiniz dosyayı seçin.
- Web sayfasını aç
+ Web Sitesi Aç
Seçenekler
@@ -221,13 +221,34 @@
Gerekli bağımlılıklar:
- Kurulu eklentileri göster
+ Önyüklenmiş eklentileri göster
Eklenti Yöneticisi
- Tanımlanamayan dosya biçimi:
+ Bilinmeyen dosya biçimi:
+
+
+ Bu dosya tutarsız satırlar içeriyor.
+
+
+ Tutarsız Satırlar
+
+
+ Standartlaştırma
+
+
+ Hata:
+
+
+ Sonrakini bul
+
+
+ Öncekini bul
+
+
+ Düzenli ifadeler kullanın
Sınıf Şemasını Göster
@@ -250,20 +271,29 @@
Yardım Modu
+
+ Seçilen veya yüklü bir yardım kataloğu olmadığından, Kütüphane Yöneticisi Yardımı başlatılamıyor. Yardım ayarlarınızı kontrol ediniz(Araçlar> Seçenekler> Araçlar> Microsoft Yardım Görüntüleyicisi).
+
+
+ Kütüphane Yöneticisi Yardımı bulunamadı. Doğru yüklenmiş olup olmadığını kontrol ediniz.
+
Yüklü Yardım Katalogları
+
+ Kütüphane Yöneticisi Yardımını Başlatınız
+
Microsoft Yardım Görüntüleyici
- Çevrimiçi yardım modunda çevrimdışı bir özellik kullanmaya çalıştın. Bu özelliği kullanabilmek için yardım modunu değiştirmelisin.
+ Çevrimiçi yardım modunda çevrimdışı bir özellik kullanmaya çalıştınız. Bu özelliği kullanabilmek için yardım modunu değiştirmelisiniz.
Ara
- Ne için:
+ Bakın:
Arama
@@ -281,7 +311,7 @@
Çevrimiçi yardımı kullanmak istiyorum
- Tek satırdaki bayt
+ Satır başına bayt değeri
Gösterim
@@ -290,13 +320,22 @@
Veri
- Ofset
+ DenkleÅŸtirme
Sayısal sistem
+
+ Ondalık
+
+
+ Onaltılık
+
+
+ Sekizlik
+
- Geçerli genişliğe sığdırmak için boyutlandır
+ Mevcut genişliğe uygun boyutlandır
Geri
@@ -314,7 +353,7 @@
Ana sayfa
- Yer
+ Konum
Yeni Pencere
@@ -329,34 +368,37 @@
Başlık
- Sonuçlar
+ Sonuç
- Birleşik Parçalar
+ Birleştirilmiş Düğümler
- {0} için olan tüm fonksiyonlar
+ {0} için tüm fonksiyonlar
- Seçili SharpDevelop profil oturumu yeni bir SharpDevelop sürümü ile oluşturulmuş ve açılamıyor.
+ Seçili SharpDevelop oturum profili yeni bir SharpDevelop sürümü ile oluşturulmuş ve açılamıyor.
SharpDevelop Profil Oturumu
- Çalıştırılabilir dosya bulunamadığı için proje başlatılamadı, lütfen projenin kendisinin ve tüm bağlantılarının doğruluğundan emin olunuz.
+ Çalıştırılabilir dosya bulunamadığı için proje başlatılamadı, lütfen projenin kendisinin ve tüm bağlantılarının doğruluğundan emin olunuz!
- Açılabilir bir proje bulunamadı. İptal ediliyor...
+ Başlatılabilir proje bulunamadı. Durduruluyor...
+
+
+ Bu proje baÅŸlatılamıyor.Yerine Çözüm BaÅŸlangıç ​​projesi profili istiyor musunuz?
Analiz için hazırlanıyor...
- COM kayıt istemcisine profil kaydı girilemedi. Profilleme başlatılamıyor.
+ COM kayıt defterine profil kaydı girilemedi. Profilleme başlatılamıyor!
- COM kayıt istemcisinden profil kaydı silinemedi!
+ COM kayıt defterinden profil kaydı silinemedi!
Profil
@@ -365,28 +407,52 @@
Yinelenen çağrıları birleştir.
- İç .NET çağrılarını profilleme.
+ Dahili .NET çağrıları profili yok.
- Verileri sadece bu oturumun sonunda derle.
+ Verileri sadece bu oturumun sonunda kaydet.
- Verilerin derlenmesini hemen oturum açılınca başlat.
+ Verileri oturum açılınca kaydetmeye başla.
Veri Koleksiyonu
- Geçici depolama dosyasının boyutu:
+ Geçici depolama dosyası boyutu:
- Olayları takip et
+ Olayları izle
Profilleme
+
+ Aktif proje profili
+
+
+ Çalıştırılabilir profil seç
+
- Veri geçersiz, lütfen tekrar deneyin.
+ Veri geçersiz, lütfen tekrar deneyin!
+
+
+ Komut satırı argümanları:
+
+
+ İstediğiniz profildeki çalıştırılabilir yolu seçin. İsteğe bağlı olarak, çalışan bir dizin ve komut satırı argümanlarını da belirtebilirsiniz.
+
+
+ Çalıştırılabilir yol:
+
+
+ Profilleme baÅŸlat
+
+
+ Çalıştırılabilir Profil
+
+
+ Çalışma dizini:
Veri topla
@@ -394,41 +460,176 @@
Kapat
+
+ Profil kontrol penceresi
+
+
+ Çağrı say
+
+
+ Çağrılar:
+
+
+ Açık sorgu geçmişi
+
+
+ Seçilen veriyi kopyala
+
+
+ Yığın izi kopyala
+
+
+ Seçili fonksiyon çağrılarını bul
+
+
+ Tanıma git
+
+
+ Root/BirleÅŸtir olarak ayarla
+
+
+ Fonksiyonları göster
+
+
+ CPU döngüleri:
+
+
+ Sorgu çalıştırma
+
+
+ Seçilen yeni yolu genişletin
+
Ad
+
+ Genel bakış
+
+
+ Sorgu Geçmişi
+
Ara:
+
+ Sorgu çubuğunu göster
+
+
+ Ebeveynin %
+
Geçen süre
+
+ Geçen süre/çağrı
+
+
+ Geçen süre(özel)
+
+
+ Geçen süre(özel)/çağrı
+
- Süre:
+ Zaman:
+
+
+ Oturum Profilleme Analizcisi
+
+
+ En iyi 20
+
+
+ Görüntü yenileniyor, Lütfen bekleyiniz ...
+
+
+ Profilci ile çalıştır
- Ara...
+ Aranıyor ...
+
+
+ Ayarlayıcı ekle
+
+
+ Özelliklerini oluşturmak istediğiniz alanları seçin:
+
+
+ INotifyÖzellikleriDeğişti Uygula
+
+
+ Özellikler oluştur
- Çıkartma yöntemi
+ Çıkarma yöntemi
+
+
+ Seçilen kod kapatılmamış bir döngüde, break ifadesi içeriyor. Lütfen seçiminizi değiştiriniz!
+
+
+ Seçilen kod kapatılmamış bir döngüde continue ifadesi içeriyor. Lütfen seçiminizi değiştiriniz!
+
+
+ Seçilen kod, etiketi olmayan bir goto deyimi içeriyor. Lütfen seçiminizi değiştiriniz!
- Yeni yöntem için bir isim girin
+ Yeni yöntem için bir ad girin
- Geçersiz oturum! Lütfen geçerli bir aralık seçin.
+ Geçersiz seçim! Lütfen geçerli bir aralık seçin.
- Ayırma işlemi sırasında hata oluştu! Yeni bir yöntem açılamadı.
+ Ayrıştırma sırasında hatalar oluştu!Yeni bir yöntem çıkartılamaz.
- {0} içinden çıkarım yöntemi desteklenmemektedir!
+ {0} içinden çıkartma yöntemi şu anda desteklenmemektedir!
+
+
+ Yapılandırıcı ekle
+
+
+ Boşluk kontrolü ekle
+
+
+ Aralık kontrolü ekle
+
+
+ Bununla birlikte bir yapılandırıcı oluşturmak istiyorsanız tüm alanları seçin:
DeÄŸiÅŸken
+
+ {1} deki {0} yöntemini tanıtma
+
+
+ Geçersiz Equals() ve GetHashCode()
+
- Arayüz ekle {0}
+ {0} arayüz ekle
+
+
+ Aşırı yükleme operatörü ekle
+
+
+ ${otherMethod} geçersiz ekleme
+
+
+ #region ile çevrili
+
+
+ Geçersiz ToString()
+
+
+ ToString() kullanmak istediğiniz alanları seçiniz:
+
+
+ Nitelik dönüştür:{0}
+
+
+ {0} uzantı yöntemini dönüştür
+
+
+ StyleCop ile mevcut projeyi kontrol et
StyleCop ile Kontrol Et
@@ -439,17 +640,32 @@
Engelleme listesine ekle
+
+ Kusur
+
+
+ BranÅŸ/Etiket
+
+
+ Bu altsürümün durumu '{0}' olduğundan, dosya / dizin kopyalanamaz.
+
+
+ Bu altsürümün durumu '{0}' olduğundan, dosya / dizin taşınamaz.
+
+
+ Bu altsürümün durumu '{0}' olduğundan, dosya / dizin silinemez.
+
- Modifikasyonlara bak
+ DeÄŸiÅŸiklikleri kontrol et
- Çıkış
+ Kontrol et
Temizle
- Gönder
+ İşle
Yama oluÅŸtur
@@ -464,10 +680,10 @@
Çakışmaları düzelt
- ${File} silinme hatası
+ ${File} silme hatası
- Aktar
+ Dışa Aktar
Hızlı sil
@@ -475,23 +691,41 @@
Geçmiş
+
+ '{0}' yasaklı listesinden çıkarıldı.
+
+
+ Kilitleme
+
+
+ Uyumsuzlukları çözülmüş olarak işaretle
+
BirleÅŸtir
- Yeni dosyaları otomatik olarak &ekle
+ Yeni dosyaları kendiliğinden ekle
- Kaldırılan dosyaları otomatik olarak sil
+ Kaldırılan dosyaları kendiliğinden sil
+
+
+ Proje dosya(lar)ı değiştiğinde projeyi güncelle
+
+
+ Altsürümdeki dosyaları(geçmiş kaydı) yeniden adlandır
- Yansürüm Ayarları
+ Altsürüm seçenekleri
+
+
+ Sürüm kontrollü dosyalar için geçmiş sekmesini göster
- YerleÅŸtir
+ Tekrar yerleÅŸtir
- Yoksayma listesinden kaldır
+ Yasaklı listesinden kaldır
Dosya bu konuma taşındı, gerçekten silmek istiyor musunuz?
@@ -503,10 +737,10 @@
Geri al
- Bu dosyada yerel değişiklikler yapılmış. Silmek istiyor musunuz?
+ Bu dosyada bazı değişiklikler yapılmış. Geri almak istiyor musunuz?
- Kontrol grafiÄŸi
+ Düzeltme grafiği
Dosyaları kaydet
@@ -520,27 +754,122 @@
DeÄŸiÅŸtir
+
+ Bu eylemi yürütmek için TortoiseSVN yüklü olması gerekmektedir.
+
Güncelle
- Kontrolü yenile
+ Düzeltmeleri güncelle
- Katılımınız için teşekkürler. İstediğiniz zaman SharpDevelop seçeneklerini kullanarak çıkabilirsiniz.
+ Katılımınız için teşekkürler! İstediğiniz zaman SharpDevelop seçeneklerini kullanarak çıkabilirsiniz.
- Katılmak istiyorum. Kullanım bilgilerini topla ve gönder
+ Katılmak istiyorum - Kullanım bilgilerini topla ve gönder
+
+
+ Daha sonra SharpDevelop seçeneklerinden ulaşabilirsiniz.
Katılmak istemiyorum
- Yardım talep ediyoruz! SharpDevelop'ı gelecekte de geliştirebilmek için; En çok kullanılan özelliklerinin hangileri olduğunu bilmek istiyoruz.
+ Sizden yardım bekliyoruz! SharpDevelop'u geliştirebilmek için; en çok kullanılan özelliklerin hangileri olduğunu bilmek istiyoruz.
SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir.
+
+ Gizlilik Bildirimi
+
+
+ Toplanan verileri göster
+
+
+ Veri Toplayıcı Kullanımı
+
+
+ SharpDevelop'un başlatıcıya dayalı şekillendirmesine izin verme.
+
+
+ Izgara sütun ve satır düzenleme
+
+
+ Stil özelliklerini çıkartma
+
+
+ Geçerli bir öğe seçilmedi!
+
+
+ Özellik/Olay Adı
+
+
+ Seçilen kontrolün zaten atanmış bir stili var.
+OluÅŸturulan stili yenisiyle deÄŸiÅŸtirmek istiyor musunuz?
+
+
+ Stil adı:
+
+
+ Özellik Değeri
+
+
+ Grup içine
+
+
+ Kenarı kaldır
+
+
+ Gereksiz özellikleri kaldır
+
+
+ <yeni olay iÅŸleyicisi>
+
+
+ Kod tamamlama
+
+
+ Olay rengi:
+
+
+ Olay işleyici desen adı:
+
+
+ XAML vurgulayıcı tarafından kullanılması gereken renkleri seçin:
+
+
+ Vurgulama
+
+
+ Yok Sayılan eleman rengi:
+
+
+ XML ad alanı bildirimi rengi:
+
+
+ Özellik rengi:
+
+
+ Yeni olay iÅŸleyicisi yerleÅŸtirildikten sonra kodu deÄŸiÅŸtirme
+
+
+ XAML
+
- Uzantu tamamlamasını kullan
+ Uzantı tamamlama biçimi kullan
+
+
+ GeliÅŸmiÅŸ vurgulama kullan
+
+
+ Dosya geçerli kodlama ${encoding} ile veri kaybı olmadan kaydedilemez.
+
+
+
+ Devam
+
+
+ UTF-8 olarak kaydet
Proje dll olarak yapılandırılmış ve hiç bir yürütme komutu belirtilmemiş. Proje seçeneklerinden bir yürütme komutu belirtebilirsiniz.
@@ -558,10 +887,13 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir.
Hakkında
- Versiyon:
+ Sürüm:
+
+
+ Çeşit
- &Nesneyi Kopyala
+ Nesneyi Kopyala
Metni kopyala
@@ -570,11 +902,14 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir.
Metin DeÄŸerini Kopyala
- Objeyi kes
+ Nesneyi kes
Olay Kaydetme
+
+ Tasarım Görünüşü
+
Nesneyi yapıştır
@@ -587,8 +922,11 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir.
Favorilerimden çıkar
+
+ TypeLib Kaldır
+
- Açılmış Bileşkeler
+ Açılmış Derlemeler
İliştirmede hata; işlem no {0}.
@@ -597,22 +935,31 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir.
İşlem
- Ekle
+ İliştir
Tür bulunamadı
- {0} türü, şu anda açık tümleşkelerin herhangi birinde bulunamadı.
+ {0} türü, şu anda açık çevirmelerin herhangi birinde bulunamadı.
+
+
+ Tipi
+
+
+ Tip
- Çevir
+ Tipi
- Çevrim türünü belirlemede hata
+ Tip türü belirlemede hata.
+
+
+ Tipi oturum boyunca hatırla?
- Çevrim türü nesnenin türüyle uyumsuz.
+ Tip türü, nesnenin türüyle uyumsuz.
BileÅŸen Kategorileri
@@ -624,13 +971,16 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir.
Arayüzler
- COM Nesneleri
+ Çalışan COM Nesneleri
+
+
+ Favori/Son Erişilen Kütüphane Türleri
Tür Kütüphaneleri
- OK tuşuna bastıktan sonra, eğer parametreli bir kurucu seçerseniz, lütfen parametreleri doldurun ve bu nesnenin nerede oluşturulmasını istiyorsanız, seçili kurucuyu oraya sürükleyin.
+ Eğer parametrelerle bir kurucu seçerseniz, OK tuşuna bastıktan sonra, lütfen parametreleri doldurun ve bu nesnenin nerede oluşturulmasını istiyorsanız, seçili kurucuyu oraya sürükleyin.
Bir Kurucu Seç
@@ -639,31 +989,37 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir.
Kontroller
- Nesne oluÅŸtur
+ Nesne OluÅŸtur
Uygulama Çalışma Dizini
+
+ ActiveX Dönüşüm Derlemeleri
+
Dizinler
- COM özelliklerini otomatik al
+ COM özelliklerini kendiliğinden al
+
+
+ Başlangıçta Çalışan COM Nesnelerini Al
DiÄŸer
- Taban nesne adlarını göster
+ Temel sınıf adlarını göster
Göster
- Temel sınıf kategorisindeki nesne değişkenlerini göster
+ Temel sınıf kategorisindeki nesne üyelerini göster
- Sadece Public üyeler
+ Sadece public üyeler
Kısa Bilgilendirme
@@ -678,7 +1034,7 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir.
Hepsini sil
- &Sil
+ Sil
Olay
@@ -690,30 +1046,33 @@ SharpDevelop bu bilgileri otomatik olarak toplayıp gönderebilir.
Olay Kaydı
- Çık
+ Artır
Herhangi bir olayı kayıt etmiyorsunuz.
-Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya sağ tuşa basabilir yada Eylem menüsünden olay kaydetmeyi aktifleştirebilirsiniz.
+Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya sağ tuşa basabilir yada Eylem menüsünden olay kaydetmeyi etkinleştirebilirsiniz.
Parametreler
+
+ Tüm Günlüğü Durdur
+
- Kaydetmeyi Kes
+ Kaydetmeyi Durdur
- Saat
+ Zaman
Tüm seviyeler
- Tümleşkeler/Türler
+ Derlemeler/Türler
- İçeren
+ İçerir
Bul
@@ -722,7 +1081,7 @@ Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya
İçinde Bul
- Bul:
+ Aranan:
Öğe
@@ -740,7 +1099,7 @@ Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya
Bakılıyor:
- Aranan
+ Benzer
Bulunamadı
@@ -767,7 +1126,7 @@ Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya
Nesne ağacında arama yaparken İsim yada Değerden en az birini seçin.
- {0} ağacından bir boğum seçmek zorundasınız; arama bu boğumdan başlayacak.
+ {0} ağacından bir düğüm seçmek zorundasınız; arama bu düğümden başlayacak.
Öğeyi Göster
@@ -785,26 +1144,29 @@ Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya
Kültür
- Global Bileşke İsmi
+ Genel Derleme İsmi
- &Aç
+ Aç
- Umumi Anahtar
+ Genel Simge Anahtarı
- Versiyon
+ Sürüm
- COM özelliklerini otomatik getir
+ COM özelliklerini kendiliğinden al
- Başlangıçta çalışan COM nesnelerini getir
+ Başlangıçta çalışan COM nesnelerini al
Paneller
+
+ Derleme Panelini Göster
+
Kontrol Panelini Göster
@@ -812,7 +1174,7 @@ Olayları kayıt etmek için, Nesneler panelinden bir nesne yada olay seçip, ya
GAC Panelini Göster
- Özelliği Getir
+ Özelliği al
Denetleyici herhangi bir ActiveX/COM nesnesini gösterebilir yada işletebilir.
@@ -823,10 +1185,10 @@ ActiveX/COM sekmesinden yüklü COM bileşenlerine göz atın.
Aç menüsünü kullanarak bir tür kütüphanesi yada kontrol dosyası açın.
-To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control to the object tree or design surface.
+Bir ActiveX / COM nesnesi oluşturmak / değiştirmek için, nesne ağacı veya tasarım yüzeyine, TürKütüphanesi/Kontrol içinden bir sınıf sürükleyin.
- Bu Diyaloğu göster
+ Bu iletişimi göster
BaÅŸlarken
@@ -835,10 +1197,10 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
Tasarım Yüzeyi Kontrolü
- Tasarım Kipi
+ Tasarım Modu
- Tümleşkeyi Kapat...
+ Derlemeyi Kapat...
Bul...
@@ -847,13 +1209,13 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
Nesne Ağacı
- Bileşke Aç...
+ Derleme Aç...
Tür İşleyiciler
- İşlevi Çağır
+ Yöntemi Çağır
Denetleyici
@@ -867,20 +1229,26 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
Parametreler
+
+ Üst Düzey Nesneler
+
DeÄŸer
+
+ Eylem
+
ActiveX Dosyaları
- Bileşke Dosyaları
+ Derleme Dosyaları
İzleme...
- &Dizinler...
+ Dizinler...
Nesne Ağacı...
@@ -889,7 +1257,7 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
Açmak için Dosya Seçin
- &Seçenekler
+ Seçenekler
Paneller
@@ -900,23 +1268,26 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
İzleme...
+
+ Tür Eylemcileri...
+
Kategoriler
- Üyelerin sayısı geçerse
+ Üye sayısını aştığında
- Sayıları hex olarak göster
+ Onaltılık tamsayılar
- Taban nesne kategorilerini göster
+ Temel sınıf kategorilerini göster
- Taban sınıf üyeleri
+ Temel sınıf üyeleri
- Taban nesne adları
+ Temel sınıf adları
Olaylar
@@ -934,16 +1305,19 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
Üyeleri Göster
- İşlevler
+ Yöntemler
- Taban sınıf kategorisindeki nesne üyelerini göster
+ Temel sınıf kategorisindeki nesne üyelerini göster
Nitelikler
- Nitelik/Olay eriÅŸim iÅŸlevleri
+ Özellik/Olay erişim yöntemleri
+
+
+ Sadece public üyeler
Çıktı
@@ -952,16 +1326,16 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
nesne seç
- (metinleri boÅŸluk ile ayr)
+ (metinleri boşluk ile ayır)
deÄŸer
- Çalışır COM bileşeni ekleme
+ Çalışan COM Nesneleri Ekleme
- Çalışan COM nesneleri eklernirken bekleyin.
+ Çalışan COM nesneleri eklenirken bekleyin.
{0} Bilgisi Alınıyor
@@ -970,25 +1344,25 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
Lütfen {0} bilgisi alınırken bekleyin
- Hatırlanan Bileşkeler Yükleniyor
+ Hatırlanan Derlemeler Yükleniyor
- Daha önceden açılan bileşkeleri yüklerken bekleyin.
+ Daha önceden açılan derlemeleri yüklerken bekleyin.
- Sistem kütüğü
+ Sistem kaydı
- Alanı Ata
+ Alanı Ayarla
- Nitelik Ata
+ Özelliği Ayarla
BileÅŸen Denetleyicisi
- İzleme Seviyesini Ata
+ İzleme Seviyesini Ayarla
İzleme Seviyesi
@@ -997,19 +1371,25 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
Ad
- Tür İşleyiciler, aşağıda işaretli sınıfların, gereksiz detaylarını gizleyip, daha uygun bir şekilde sunar.
+ Tür eylemcileri, aşağıda işaretli sınıfların, gereksiz detaylarını gizleyip, daha uygun bir şekilde sunar.
- Uygulamanın başlatılması bekleniyor. Eğer uygulama başlatılamazsa(yada beklemekten ayaklarınıza kara sular inerse), İptal tuşuna basarak iptal edebilirsiniz.
+ Uygulamanın başlatılması bekleniyor. Eğer uygulama başlatılamazsa(veya beklemekten sıkılırsanız), iptal tuşuna basarak iptal edebilirsiniz.
- Uygulamanın başlaması için bekleniyor
+ Uygulamanın Başlatılması Bekleniyor
+
+
+ Kod Kalite Analizi
+
+
+ Açık yönteme referans ekleyin; yeni yöntem eklemek için tab veya enter tuşuna tekrar basın.
- Parametre almayan anonim metot yerleÅŸtir.
+ Parametresiz anonim yöntem yerleştir.
- Parametre alan anonim metot yerleÅŸtir.
+ Parametreli anonim yöntem yerleştir.
SharpDevelop Hakkında
@@ -1018,16 +1398,16 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
Sürüm
- OluÅŸtur
+ Derleme
- ${License} lisansı altında dağıtılmıştır.
+ ${License} altında dağıtılmıştır.
Sürüm Bilgisi
- &Kopyala
+ Kopyala
Sürüm
@@ -1039,16 +1419,61 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
son projeler
- &Tümünü at
+ Tümünü at
- Tümünü &kaydet
+ Tümünü kaydet
- &Kaydet
+ Kaydet
+
+
+ Proje Yapılandırması Ekle
+
+
+ Proje Ortamı Ekle
+
+
+ Çözüm Yapılandırması Ekle
+
+
+ Çözüm Ortamı Ekle
+
+
+ Tüm yapılandırmaları/ortamları silemezsiniz.
+
+
+ '{0}' Gerçekten kaldırmak istiyor musunuz ?
+
+
+ Ayarları kopyala:
+
+
+ Tüm projelerin yapılandırmalarını oluştur
+
+
+ Adı çoğalt.
+
+
+ Proje Yapılandırmalarını Düzenle
+
+
+ Proje Ortamlarını Düzenle
+
+
+ Çözüm Yapılandırmalarını Düzenle
+
+
+ Çözüm Ortamlarını Düzenle
+
+
+ <BoÅŸ>
- Yeni ismi girin:
+ Yeni ad girin:
+
+
+ Ad geçersiz.
Git
@@ -1057,7 +1482,7 @@ To create/manipulate a ActiveX/COM object, drag a class within a TypeLib/Control
Satıra git
- Lütfen sıçramak için bir ifade girin.
+ Lütfen atlama yapmak için bir ifade girin.
Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Örneğin: "120", "MainClass", "Main.cs, 120".
@@ -1073,6 +1498,12 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
İtalik
+
+ Renk vurgulamayı dışa aktar
+
+
+ Renk vurgulaması al
+
DeÄŸer
@@ -1080,118 +1511,125 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Örnek metin
- Yeni dosyayı şu anki projede kullanmak istiyorsanız, dosyayı projeye eklemelisiniz.\nDosyayı ${CurrentProjectName} projesine eklemek istiyor musunuz?
+ Yeni dosyayı mevcut projede kullanmak istiyorsanız, dosyayı projeye eklemelisiniz.
+Yeni dosyayı, ${CurrentProjectName} projesine eklemek istiyor musunuz?
Proje içinde dosya oluştur
- Tek bir dosya oluÅŸtur
+ Bağımsız dosya oluştur
- Dosya projeye eklensin?
+ Projeye dosya eklensin mi?
- &Kategoriler:
+ Kategoriler:
Yeni Dosya
- &Dosya Adı
+ Dosya Adı
Öncelikle özellikleri doldur
- Bu dosyayı oluşturabilmek için öncelikle bazı özellik değerleri belirtmelisiniz.
+ Bu dosyayı oluşturabilmek için öncelikle bazı özellikler belirtmelisiniz.
+
+
+ Seçilen {0} proje dosyası salt okunur özellikte. Yeni dosya projeye eklenmeyecek.
- &Åžablonlar:
+ Åžablonlar:
+
+
+ Çözüm için dizin oluştur
Yeni Proje
- &Yer:
+ Konum:
- &Ad:
+ Ad:
Projenin oluşturulacağı yer
- &Kategoriler:
+ Kategoriler:
- Düzeni ifadeyi ayrıştırırken hata:
+ Normal ifadeyi ayrıştırırken hata:
Hepsini bul
- &Bul
+ Bul
Bul
- Sonrakini &bul
+ Sonrakini bul
- Bul:
+ Aranan:
- &Alt-dizinleri de ekle
+ Alt-klasörleri de ekle
- Bu dosya &türlerine bak:
+ Bu dosya türlerine bak:
bütün açık belgeler
- Åžu anki belge
+ mevcut belge
- Şu anki seçim
+ mevcut seçim
'{0}' dizini bulunamadı.
- Arama yapılacak dizini belirtiniz
+ Arama yapılacak dizini seç
- bütün proje
+ tüm proje
tüm çözüm
- Hepsine &yer imi koy
+ Tümünü yer imle
- Büyük küçük harf eşleştir
+ EÅŸleÅŸtir
Tüm kelimeyi eşleştir
- &Tümünü değiştir
+ Tümünü değiştir
- &Yerine Koy
+ DeÄŸiÅŸtir
DeÄŸiÅŸtir
- Yerine Konacak:
+ İle değiştir:
- &Burada Ara:
+ Buraya bak:
Kurallı ifadeler
@@ -1212,43 +1650,53 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Ara ve DeÄŸiÅŸtir
- &Kullan:
+ Kullan:
Projenin oluşturulacağı dizini seçin.
+
+ Çözüm Adı:
+
- &Åžablonlar:
+ Åžablonlar:
Arabellek Seçenekleri
- Yeni Grup &ekle
+ Yeni Grup ekle
- Tanımlama
+ Tanım
- Lütfen, dosya uzantıları listesini, noktalı virgül ile ayrılmış bir liste olarak girin(Örnek: .h;.c;.cpp)
+ Lütfen, dosya uzantılarını, noktalı virgül ile ayrılmış bir liste olarak girin.
+(Örnek: .h;.c;.cpp)
+
+
+ Uzantıları düzenle
- &Tanımlama
+ Tanım
Şablonu Düzenle
- &Åžablon
+ Åžablon
- &Uzantılar
+ Uzantılar
- Anahtar kelime haritalama
+ Anahtar kelime adresleme
+
+
+ Kod şablonu eklemek için Tab tuşuna basın.
- Grubu &kaldır
+ Grup kaldır
Åžablon
@@ -1259,23 +1707,32 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Yapılandırma
+
+ Yapılandırma Düzenleyici
+
+
+ <Düzenle>
+
- Platform
+ Ortam
+
+
+ Çözüm yapılandırması:
- &Argümanlar
+ Argümanlar
- &Komut
+ Komut
- Argümanlar için &sor
+ Argümanlar için sor
Çözüm dizini
- Çözüm dosyasının adı
+ Çözüm dosyası adı
Geçerli sütun
@@ -1287,22 +1744,22 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Geçerli metin
- &Nesne dizini
+ Öğe dizini
- Nesne Yolu
+ Öğe Yolu
- Hedef Yolu
+ Hedef Yol
- Nesne uzantısı
+ Öğe uzantısı
Öğe dosya adı
- &Proje dizini
+ Proje dizini
Proje dosya adı
@@ -1311,67 +1768,70 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
#Develop Başlangıç Dizini
- &Hedef dizin
+ Hedef dizin
Hedef uzantı
- Hedef Adı
+ Hedef Ad
- &Başlık
+ Başlık
- &Araçlar
+ Araçlar
- &Çıktı Penceresini kullan
+ Çıktı Penceresi Kullan
- &Çalışılan dizin
+ Çalışılan dizin
- Dışsal Araçlar
+ Harici Araçlar
Önbelleği temizle
+
+ Bir karakter eklendiğinde tamamlama listesini göster
+
- Kod tamamlama detayı ayarları
+ Kod tamamlama detay ayarları
- Aşağıdaki seçenekler dillere özgüdür. bazıları bazı programlama dillerinde yoktur.
+ Aşağıdaki seçenekler dile özgüdür, bazıları tüm programlama dillerinde kullanılamaz.
- Kod tamamlamayı tamamiyle kapatmak için aşağıdaki seçeneği kullanın:
+ Kod tamamlamayı tamamen kapatmak için aşağıdaki seçeneği kullanın:
Virgüle basıldığında ipucunu daha fazla bellek kullanarak yeniden aç
- nesneler
+ Öğeler
Kaydet
- En son kullanılan üyeleri önceden seç
+ Son kullanılan üyeleri öncelikli seç
- Sadece hata ayıklama durumunda
+ Sadece hata ayıklama modu
- İşlev çağrılarını yazarken ipucunu göster
+ Yöntem çağrılarını yazarken ipucunu göster
- anahtarkelimelerden sonra kod tamamlamayı tetikle
+ Anahtarkelimelerden sonra kod tamamlamayı çalıştır
- Fare ifadenin üstüne gelince ipucunu göster
+ Fare, ifadenin üstüne gelince ipucunu göster
- &Üyeler arasına boş satırlar ekle
+ Üyeler arasına boş satırlar ekle
Kod üretme seçenekleri
@@ -1380,31 +1840,70 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Yorum üretme seçenekleri
- &Else kapama paranteziyle aynı satırda
+ Else kapama paranteziyle aynı satırda
- &Ek yorumlar üret
+ Ek yorumlar üret
- &Dokümantasyon yorumlarını üret
+ Belgeleme yorumlarını üret
- Kod bloklarına aynı satırda &başla
+ Aynı satırda kod bloğu başlat
Kod Üretimi
- Tam tip adlarını &kullan
+ Tam tür adlarını kullan
Kodlama
+
+ Hata ayıklama
+
+
+ İstisnalar
+
+
+ Yakalanan istisnaları duraklat
+
+
+ Adımlama
+
+
+ Sembolsüz kod derleme
+
+
+ Adımlama için 'Just My Code' özelliğini kullan
+
+
+ Tüm özelliklerin üzerinde adımla
+
+
+ Ayıklayıcı nitelikleri ile işaretlenmiş kod üzerinden Adımla
+
+
+ Alan özelliklerine erişim üzerinden adımla
+
+
+ Sembolsüz kod üzerinden adımla
+
+
+ Tek satır özellikleri üzerinden Adımla
+
+
+ Semboller
+
+
+ Sembol ve kaynak kodu yolları:
+
- &Başlık
+ Başlık
- &Dil
+ Dil
Standart Başlıkları Düzenle
@@ -1413,16 +1912,22 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Genel
- Dışardan kaydedileni otomatik yükle
+ Kaydedildiyse kendiliğinden yüklerken değiştir
- &Her zaman yedek kopya oluÅŸtur
+ Kayıt için geçici dosyaları kullan
+
+
+ Varsayılan dosya kodlama:
+
+
+ Dosyalardaki harici değişiklikleri algıla
Yükle
- Bu belge için &kullanıcı-bazlı ayarları yükle
+ Bu belge için kullanıcı-bazlı ayarları yükle
Yükle/Kaydet
@@ -1431,10 +1936,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Kaydet
- Unix
+ Unix(LF)
+
+
+ Dosyaları silerken geridönüşüm kutusu kullan
- Windows
+ Windows(CRLF)
Biçim
@@ -1446,17 +1954,20 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Sözcük kaydır
- İnşâ ve Çalıştırma seçenekleri
+ Derleme ve Çalıştırma seçenekleri
- Proje yolu yanlış belirtilmiş.
+ Geçersiz proje yolu.
- Başlangıçta en son açılan çözümü yükle
+ Başlarken son açılan çözümü yükle
Projeler ve Çözümler
+
+ Paralel derlenecek proje sayısı:
+
Varsayılan proje konumu:
@@ -1467,28 +1978,46 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Ayarlar
- İnşa hata ile biterse hata sekmesini göster
+ Derleme hatayla biterse hata listesi göster
+
+
+ Çalıştırırken:
+
+
+ İlişkili olarak değiştirilmiş proje ve projeleri derle
+
+
+ Sadece deÄŸiÅŸtirilmiÅŸ projeleri derle
+
+
+ Derlenemedi
+
+
+ Bütün projeleri derle
+
+
+ Geçerli arabirim dili:
Dil seçimi için bir simgeye tıklayın.
- Kullanıcı Arabirim Dili
+ Arabirim Dili
- Tercih ettiğiniz &ambiyansı seçin:
+ Tercih ettiğiniz ortamı seçin:
- Proje gözcüsünde dosya &uzantılarını göster
+ Proje izleyicide dosya uzantılarını göster
- Durum çubuğunu &göster
+ Durum çubuğunu göster
- Araç Çubuğunu Göster.
+ Araç çubuğunu göster.
- Menü ve araç çubukları için mavi stili(Ofis 2003 stili) kullan
+ Menü ve araç çubukları için mavi stili(Ofis 2003 benzeri) kullan
Eğer mümkünse projenin ortamını tercih et
@@ -1503,40 +2032,46 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Yorum Etiketleri
- &Ad
+ Ad
Görev listesi
- &Simge listesi
+ Simge listesi
Davranış
- Düzeltme imi EOL arkasına &taşınabilsin
+ Düzeltme imi EOL arkasına taşınabilsin
- Sekmeleri boşluklara &dönüştür.
+ Sekmeleri boşluklara dönüştür.
+
+
+ "Tanıma Git" için Ctrl + Tıkla kullan
- Süslü ayraçları &otomatik olarak ekle
+ Küme parantezlerini kendiliğinden ekle
Bir şey seçilmediğinde bütün bir satırı kes yada kopyala
+
+ Sanal alanı etkinleştir
+
- Yazarken fare imlecini &gizle
+ Yazarken fare imlecini gizle
- &Girinti
+ Girinti
- &Girinti boyutu
+ Girinti boyutu
- Otomatik
+ KendiliÄŸinden
Hiçbiri
@@ -1545,7 +2080,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Akıllı
- &Fare tekerleği yönü
+ Fare tekerleği yönü
Normal
@@ -1560,25 +2095,31 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Sekmeler
- &Sekme boyutu
+ Sekme boyutu
- &Otomatik olarak ÅŸablon eklenmesi
+ KendiliÄŸinden ÅŸablon ekleme
+
+
+ Akıllı girinti kullan
Kod Tamamlama
- Yazıtipini örtüşmesiz olarak &oluştur
+ Yazıtipini kenaryumuşatmalı yap
+
+
+ İşaretçi Değiştirmeyi etkinleştir
- &Kod tamamlamayı etkinleştir
+ Kod tamamlamayı etkinleştir
- &Çifte arabelleklemeyi etkinleştir.
+ Çift arabelleklemeyi etkinleştir.
- &Karakter katlamayı etkinleştir.
+ Katlamayı etkinleştir.
Yazıtipi
@@ -1587,7 +2128,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Dosya kodlama
- &Kodlamayı seçin:
+ Kodlamayı seçin:
Boyut:
@@ -1599,13 +2140,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Fare tekeri ile yakınlaştırma
- &Çabuk SınıfTarayıcısı Panelini Göster
+ Çabuk SınıfTarayıcı Panelini Göster
Metin Yazıtipi:
- sütu&nda
+ sütunda
İmleçten Sonra
@@ -1613,23 +2154,32 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
İmleçten Önce
+
+ İmleç satırını göster
+
+
+ Canlandırmayı etkinleştir
+
- &EOL işaretleyicilerini göster
+ Satır sonu işaretçilerini göster
+
+
+ Sembolleri vurgula
- &EÅŸleÅŸen parantezleri vurgula
+ EÅŸleÅŸen parantezleri vurgula
- &Yatay cetveli göster
+ Yatay cetveli göster
- &Geçersiz satırları göster
+ Geçersiz satırları göster
- Satır &işaretleyicisi stili
+ Satır işaretçisi stili
- &Satır numaralarını göster
+ Satır numaralarını göster
Tam Satır
@@ -1638,34 +2188,40 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Hiçbiri
- İşaretleyiciler ve Cetveller
+ İşaretleyiciler
İşaretleyiciler ve Cetveller
+
+ Cetveller
+
+
+ Gizli tanımları (sadece parentezler) göster
+
- &Boşlukları göster
+ Boşlukları göster
- &Sekmeleri göster
+ Sekmeleri göster
- Hataların &altını çiz
+ Hataların altını çiz
- Sütun cetvelini &göster
+ Sütun cetvelini göster
- Anahtar kelimelerin otomatik düzeltimesine izin ver
+ Anahtar kelimelerin kendiliğinden düzeltilmesini etkinleştir
- end yapılarının otomatik yerleştirilesini aktifleştir
+ End yapılarının kendiliğinden yerleştirilmesini etkinleştir
- kod biçimlendirme
+ Kod biçimlendirme
- VB'e özel seçenekler
+ VB özel seçenekleri
Metin Düzenleyicisi
@@ -1686,7 +2242,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Windows Uygulaması
- Tümleşkenin oluşturulacağı dizini seçin.
+ Derlemenin oluşturulacağı dizini seçin.
Vurgu
@@ -1701,16 +2257,28 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Uygulama
- Uygulama &simgesi:
+ Uygulama simgesi:
- Assembly adı:
+ Derleme adı:
{0} geçerli bir simge dosyası değil.
+
+ Uygulama bildirimi
+
+
+ Bildirim uygulanamıyor
+
+
+ Bildirimi varsayılan yap
+
+
+ Bildirim dosyaları
+
- Çıktı ismi:
+ Çıktı adı:
Çıktı türü:
@@ -1719,16 +2287,16 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Proje dosyası:
- Proje dizini:
+ Proje klasörü:
Proje Bilgisi
- Kök isim boşluğu
+ Root ad alanı:
- Başlangıç nesnesi:
+ Başlangıç öğesi:
Win32 Kaynak Dosyası:
@@ -1740,13 +2308,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Otomatik
- Taban Çıktı Dizini:
+ Temel Ara Çıktı Dizini:
- Hata Ayıklama Bilgisi
+ Hata Ayıklama Bilgisi:
- DLL Taban Adresi:
+ DLL Temel Adresi:
Hatalar ve Uyarılar
@@ -1755,7 +2323,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Dosya Hizalaması:
- Tefrika tümleşkesi üret:
+ Serileştirilmiş derleme üret:
Ara Çıktı Yolu:
@@ -1773,13 +2341,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Çıktı Yolu:
- COM işbirlikteliği için kaydet
+ COM Çalışabilirliği İçin Kaydet
Uyarıları Yoksay:
- Hedef İşlemci
+ Hedef İşlemci:
Herhangi bir iÅŸlemci
@@ -1788,13 +2356,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Intel 64-bit Itanium iÅŸlemci
- AMD 64-bit iÅŸlemci
+ x86-64 iÅŸlemci
32-bit Intel-uyumlu iÅŸlemci
- Hedef Çatı:
+ Hedef Çalışma Çerçevesi:
Uyarıları hata gibi değerlendir
@@ -1806,25 +2374,25 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Hiçbiri
- Duruma özel Uyarılar:
+ Duruma Özel Uyarılar:
Uyarı Seviyesi:
- &XML belgeleme
+ XML belgeleme
- İnşâ Olayları
+ Derleme Olayları
- İnşa-sonrası komut satırı görevi:
+ Derleme-sonrası komut satırı olayı:
- İnşâ-öncesi komut satırı görevi:
+ Derleme-öncesi komut satırı olayı:
- İnşâ-sonrası görevini çalıştır:
+ Derleme-sonrası olayını çalıştır:
Derleme
@@ -1833,7 +2401,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Güvensiz koda izin ver
- Aritmetik taşmaları kontrol et
+ Aritmetik taşmayı/yetersizliği kontrol et
KoÅŸullu Derleme Sembolleri:
@@ -1842,10 +2410,10 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Genel
- mscorlib.dll dosyasını kaynak olarak gösterme
+ mscorlib.dll referansını reddet
- Kodu iyileÅŸtir
+ Kodu eniyile
Sayısal taşma kontrollerini kaldır
@@ -1854,13 +2422,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
VB Seçenekleri için varsayılan değerler:
- &Konfigurasyon
+ Yapılandırma
- Konfigurasyona özel
+ Özel yapılandırma
- Konfigurasyonu deÄŸiÅŸtirmek ÅŸu anki deÄŸerleri kaydedecektir. Devam edilsin mi?
+ Yapılandırmayı değiştirmek mevcut değerleri kaydeder. Devam edilsin mi?
Hata Ayıkla
@@ -1869,7 +2437,7 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Komut Satırı argümanları:
- Harekete BaÅŸla
+ Eyleme BaÅŸla
URL yi görüntüle:
@@ -1878,13 +2446,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Başlama Seçenekleri
- Dış program çalıştır:
+ Harici program çalıştır:
Başlangıç projesi
- &Çalışılan dizin:
+ Çalışılan dizin:
Tam hata ayıklama bilgisi
@@ -1896,31 +2464,31 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Sadece .pdb dosyaları
- Bu proje türü için yüklenmiş proje seçenekleri paneli yok.
+ Bu proje türü için yüklenmiş proje seçenekleri panelleri yok.
- Platform
+ Ortam
- Platforma özel
+ Ortama özel
Lütfen geçerli bir sayı giriniz.
- Imports
+ Dahil edilenler
- İthal Ekle
+ Dahil et
- İsimboşluğu:
+ Ad alanı:
- Çıkar
+ Dahil edilenleri kaldır
- Proje genelindeki Imports bildirimleri
+ Proje genelinde Dahil Edilenler
Yayınla
@@ -1935,13 +2503,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Daima
- İnşâ proje çıkışını güncellediğinde
+ Derlediğinde proje çıktısını güncelle
- Başarılı inşâda
+ Başarılı derlendi
- Dizin Seç
+ Klasör Seç
İmzalama
@@ -1950,13 +2518,13 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Åžifre DeÄŸiÅŸtir...
- Güçlü isim anahtarı dosyası seç:
+ Güçlü bir ad anahtar dosyası seç:
Tek Tıklamada imzalama
- Tek-Tıkla imzalama şu anda desteklenmiyor.
+ Tek Tıklamada imzalama şu anda desteklenmiyor.
Åžifreyi doÄŸrula:
@@ -1977,10 +2545,10 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Sadece Gecikme İmzası
- Gecikme imzalaması yapıldığında, proje çalışmaz yada üzerinde hata ayıklama yapılamaz
+ Gecikme imzalaması yapıldığında, proje çalışmaz yada üzerinde hata ayıklama yapılamaz.
- Bir anahtar adı girmek zorundasınız.
+ Bir anahtar adı girmeniz gerekiyor.
Anahtar dosyayı oluştururken bir hata oluştu.
@@ -1989,10 +2557,10 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Girilen ÅŸifreler uyuÅŸmuyor.
- Şifre en az 6 harf uzunluğunda olmalıdır.
+ Şifre en az 6 karakter uzunluğunda olmalıdır.
- Assembly'yi imzala
+ Derlemeyi imzala
sn.exe bulunamadı. .NET Framework SDK' nın bilgisayarınıza yüklü olduğundan emin olun.
@@ -2002,21 +2570,51 @@ Satır numaraları, sınıf yada dosya adları girebilirsiniz.
Bütün yapılandırma ayarlarının önündeki küçük tuşla, ayarın nerede saklanacağını seçebilirsiniz.
-Yapılandırmaya-özel, ayar, farklı yapılandırma seçenekleri(Hata Ayıklama/Yayım) için farklı değerler alabilmesi demektir.
-Ortama-özel, ayar, her bir ortam için farklı değer alabilir demektir.
-Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) içinde saklayabilirsiniz. böylelikle bütün geliştirmenler kaynak kontrol sistemlerinde herhangi bir çakışmaya neden olmaksızın farklı değerler kullanabilir.
+Özel yapılandırma, farklı yapılandırma seçenekleri(Hata Ayıklama/Yayınlama) için farklı değerlerle ayarlayabilmedir.
+Ortama özel, her bir ortam için farklı değer alabilen ayar demektir.
+Ayrıca bir ayarı proje dosyası yerine kullanıcı dosyası(.user-file) içinde saklayabilirsiniz; böylelikle bütün geliştiriciler kaynak kontrol sistemlerinde herhangi bir çakışmaya neden olmaksızın farklı değerler kullanabilir.
- .user dosyasında sakla
+ .user-file'de sakla
+
+
+ Sınıfa Arayüz Ekle
+
+
+ OluÅŸturulan Ad
+
+
+ Yorum Ekle
+
+
+ Arayüz Adı
+
+
+ Yeni Dosya Adı
+
+
+ Genel Kullanıcı Seç
+
+
+ Yeni sınıf oluştur:
+
+
+ Yararlanılabilir bir sınıf kaynak kodu olmadığı için yöntem doğrudan oluşturulamıyor. Yöntemin bir eklenti yöntemi olarak oluşturulabilmesi için statik bir sınıf seçiniz.
+
+
+ Yöntemi tanıtma
+
+
+ Mevcut sınıfı kullan:
- .NET Assembly Tarayıcısı
+ .NET Derleme Tarayıcısı
Referans Ekle
- Özel tümleşke versiyonu seç
+ Özel derleme sürümü seç
Referans Adı
@@ -2049,7 +2647,7 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
&Seç
- Tip
+ Tür
Sonlandır
@@ -2064,10 +2662,10 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
dosya
- Şu anki dosya br metin dosyası değil dolayısıyla sayılamaz.
+ Mevcut dosya bir metin dosyası değil ve sayılamaz.
- Sayılacak Yer
+ Sayım Yeri
Satırlar
@@ -2076,7 +2674,7 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Proje modunda olmalısınız
- &BaÅŸla
+ BaÅŸla
toplam
@@ -2084,8 +2682,11 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Sözcükler
+
+ SDK bin klasörlerinden herhangi birinde ${Executable} bulunamıyor.
+
- ${File} dosyası yüklememiyor. Dosya bulunamadı.
+ ${File} dosyası yüklenemiyor. Dosya bulunamadı.
Yükleme sırasında hata
@@ -2105,14 +2706,17 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Kaynak
+
+ Başarısız
+
- &Ekle
+ Ekle
< Geri
- &Gözat...
+ Gözat...
Gözat
@@ -2121,13 +2725,13 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
İptal
- &DeÄŸiÅŸtir
+ DeÄŸiÅŸtir
Konum seç
- &Kapat
+ Kapat
OluÅŸtur
@@ -2136,10 +2740,13 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Sil
- &Sil
+ Sil
+
+
+ Hiçbirini Seçme
- &Düzen
+ Düzenle
Hata
@@ -2156,8 +2763,23 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Tamamlandı
+
+ Klasör
+
+
+ Font Stili
+
+
+ Özel
+
+
+ Font seç
+
+
+ Altıçizili
+
- &Yardım
+ Yardım
ID
@@ -2181,16 +2803,16 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
tüm proje
- &Aşağıya Taşı
+ Aşağıya Taşı
- &Yukarıya Taşı
+ Yukarıya Taşı
- Uygulanamaz
+ N/A
- İsim
+ Ad
İleri >
@@ -2202,13 +2824,16 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Tamam
- &Aç
+ Aç
+
+
+ Seçenekler
Yol
- Lütfen ekleyin...
+ Lütfen bekleyin...
Önizleme
@@ -2216,17 +2841,26 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Soru
+
+ Saltokunur
+
Yenile
- &Kaldır
+ Kaldır
Yeniden Adlandır
+
+ DeÄŸiÅŸtir
+
- Yinele
+ Yeniden dene
+
+
+ Hepsini Seç
Küçük Simgeler
@@ -2250,7 +2884,7 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Tümüne Evet
- Dosya veya dizin adı zaten kullanımda, lütfen bir başka adı seçin.
+ Dosya veya dizin adı zaten kullanımda, lütfen farklı bir ad seçin.
Seçtiğiniz dosya adı kuraldışı karakterler içeriyor. Lütfen başka bir ad seçiniz.
@@ -2258,39 +2892,81 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Aç
+
+ Explorer'da Klasör Aç
+
Birlikte aç...
Program ekle
+
+ Ad Göster:
+
+
+ Program:
+
+
+ Bu dosya için varsayılan Windows uygulamasını kullan
+
+
+ Simge düzenleyici
+
+
+ Kaynak düzenleyici
+
Metin Düzenleyici
+
+ Metin düzenleyici (kodlama seçin)
+
Tümleşik Web Tarayıcısı
+
+ XML düzenleyici
+
+
+ Bu dosyayı açmak için kullanmak istediğiniz programı seçin:
+
Varsayılan
+
+ Birlikte Aç
+
+
+ Varsayılan Olarak Ayarla
+
Bütün dosyaları göster
+
+ {0}'a yeni kaynak dizisi ekle
+
<Yeni ekle>
- Bu ${Count} kaynak anahtarını dosyadan ve bun(lar)a bağlı yerelleştirilmiş kaynak dosyalarının tümünü silmek istediğinizden emin misiniz?
+ Kaynak dosyalarındaki ${Count} kaynak anahtarını ve tüm bağımlı yerelleştirilmiş kaynak dosyalarını kalıcı olarak silmek istediğinizden emin misiniz?
- "${FileName}" dosyasından "${Key}" kaynak anahtarını ve buna bağlı yerelleştirilmiş kaynak dosyalarını silmek istediğinizden emin misiniz?
+ "${FileName}" kaynak dosyasındaki "${Key}" kaynak anahtarını ve tüm bağımlı yerelleştirilmiş kaynak dosyalarını kalıcı olarak silmek istediğinizden emin misiniz?
- Metin kaynakı düzenle
+ Metin kaynağı düzenle
+
+
+ Bu isimde bir kaynak anahtarı zaten var!
Kaynak anahtarı boş olamaz!
+
+ '{0}' kaynak dosyası işlenirken bir hata oluştu.
+
Kayıp kaynak anahtarlarını bul
@@ -2304,10 +2980,10 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Kaynak anahtarı:
- "{0}" anahtarı "{1}" dosyasında bulunamadı.
+ "{0}" kaynak anahtarı "{1}" dosyasında bulunamadı.
- Kayıp kaynak anahtarlarına referans
+ Kayıp kaynak anahtarları referansları
${ResourceKey} 'e referanslar (${ResourceFileName} içindeki)
@@ -2316,7 +2992,10 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Bu kaynak anahtarının tanımı bulunamadı ve değiştirilemedi.
- Yeni kaynak adı girin:
+ Yeni kaynak anahtarı adı girin:
+
+
+ Seçilen kaynak türü 'string' değildir ve düzenlenemez.
Kaynağı ekle
@@ -2334,13 +3013,22 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
{0} içindeki kaynak:
- {0} cinsinden nesne:
+ {0} türünde öğe:
<Bilinmeyen>
+
+ ICSharpCode.Core ana kaynakları gizle
+
+
+ Seçildiğinde, ICSharpCode.Core ana uygulamasının kaynak dosyasında bulunan kaynak anahtarları listelenmez.
+
+
+ Çözümün tamamında bulunan kullanılmayan kaynak anahtarı sayısı.
+
- Kullanılmayan kaynak anahtarı
+ Kullanılmayan kaynak anahtarları
DeÄŸer
@@ -2348,6 +3036,9 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Kaynak deÄŸeri:
+
+ Tüm ad alanlarındaki öğeleri göstermek için Ctrl + Boşluğa basın
+
Boo Yorumlayıcısı
@@ -2355,7 +3046,7 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
FxCop bulunamadı. Lütfen SharpDevelop seçeneklerinden FxCop kurulum dizinini seçin.
- FxCop kayıt dosyası okunamadı
+ FxCop kayıt dosyası okunamadı:
Mono yüklü değil.
@@ -2369,32 +3060,38 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Kod Analizi
+
+ FxCop ile mevcut projeyi kontrol et
+
FxCop ile Kontrol Et
Seçtiğiniz dizin bütün bir FxCop kurulumu içermiyor.
+
+ FxCop yolunu seç
+
- FxCop aşağıdaki dizinde bulunmuşdur:
+ FxCop aşağıdaki dizinde bulundu:
- FxCop bulunamadı. FxCop 'ı yükleyin, 'FxCop Youlunu seç' i tıklayıp SharpDevelevop 'a nereye yüklediğinizi belirtin.
+ FxCop bulunamadı. FxCop 'ı yükleyin ve SharpDevelevop 'ta 'FxCop yolunu seç' i tıklayıp yükleme konumunu belirtin.
FxCop Yolu
- Kural tümleşkesi ekle/çıkar
+ Kural derlemesi ekle/çıkar
- FxCop bulunamadı - FxCop 'ı yüklediğinizden emin olun.
+ FxCop bulunamadı - FxCop 'ın yüklendiğinden emin olun.
- Kural tümleşkelerini içeren dizini seçin
+ Kural derlemelerini içeren dizini seçin
- Kod Analizini &etkinleştir(CODE_ANALYSIS sabitini tanımlar)
+ Kod Analizini Etkinleştir(CODE_ANALYSIS sabitini tanımlar)
Mevcut kurallar yükleniyor...
@@ -2403,13 +3100,13 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Derlerken Kod Analizini Çalıştır( CODE_ANALYSIS sabitini tanımlar )
- SharpDevelop seçeneklerinden FxCop a yol belirtebilirsiniz.
+ SharpDevelop seçeneklerinden FxCop yolunu belirtebilirsiniz.
Karışık
- Uyrarı yada Hata
+ Uyarı yada Hata
Kural
@@ -2417,6 +3114,9 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
FxCop çalışıyor
+
+ Mesajı önle
+
Kapsanmış Kod
@@ -2439,23 +3139,32 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Hiç kod kapsama dosyası üretilemedi:
- Kod kapsama renkleri
+ Kod Kapsama Renkleri
- Nesneleri &Goster:
+ Öğeleri Göster:
Öğe arkaplanı:
- Öğe önalanı
+ Öğe önplanı:
- AaBbCcDdYyZz
+ AaBbCcXxYyZz
+
+
+ Dışla
+
+
+ Dahil et
Kod kapsama çalıştırılıyor...
+
+ Kod Kapsamayı Göster
+
Kaynak Kodunu Göster
@@ -2463,22 +3172,61 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Ziyaret Sayısını Göster
- Kod Kapsamayı Ters çevir
+ Kod Kapsamaya Geç
- Tekrar Edilme Sayısı
+ Ziyaret Sayısı
Tanımlama
- Alınan Exception
+ İstisna yap
- Exception göster
+ İstisna göster
+
+
+ Ek seçenekler
+
+
+ Bağlantı sağlayıcı
+
+
+ Bağlantı ek dosyaları
+
+
+ Belirtilen .NET modülleri bağlantısı
+
+
+ Hata ayıklama bilgisi üret
+
+
+ Kütüphane dosyaları konumları
+
+
+ Gömülü .NET kaynak dosyası
+
+
+ Önişlemci
+
+
+ Takipeden önişlemci sembollerini tanımla
+
+
+ Başlık dosyaları yerleşimi
+
+
+ Tüm tanımlı önişlemci sembollerini tanımsız yap
+
+
+ Takipeden önişlemci sembollerini tanımsız yap
+
+
+ Sembol
- .NET Resource Dosyası(ikili)
+ .NET Kaynak Dosyası(ikili)
C# Kaynak Dosyası
@@ -2490,7 +3238,7 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
Proje
- .NET Resource Dosyası
+ .NET Kaynak Dosyası
SharpDevelop Çözümü
@@ -2502,12 +3250,12 @@ Ayrıca bir ayarı proje dosyası yerine .kullanıcı-dosyası(.user-file) için
XML Dokümanı
- NAnt bulunamadı '{0}'.
+ NAnt '{0}' bulunamıyor.
Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının yerini ayarlayın.
- NAnt inşâsı durduruldu.
+ NAnt derlemesi durduruldu.
Projede bir '.build' dosyası yok.
@@ -2516,10 +3264,10 @@ Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının ye
NAnt Çalıştırılıyor.
- NAnt 'ı durdurmak istediğinizden emin misiniz?
+ NAnt süreci sona erecek. Emin misiniz?
- İnşâ Dosyası Oluştur
+ Derleme Dosyası Oluştur
Tanıma Git
@@ -2531,7 +3279,7 @@ Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının ye
Argümanlar
- İnşa Dosyası Üretme
+ Derleme Dosyası Üretimi
Komut
@@ -2552,25 +3300,25 @@ Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının ye
Logoyu Göster
- detaylı çıktı
+ Detaylı
- NAnt özwlliklerini girin.
+ NAnt özelliklerini gir.
- İnşâ dosyalarını yeniden yükler.
+ Derleme dosyalarını yeniden yükle
- Seçili hedefi çalıştırır
+ Seçili hedefi çalıştır
- Şu anki inşayı durdurur
+ Mevcut derlemeyi durdur
- İşleyen bir süreç yok.
+ Çalışan bir süreç yok.
- Projeyi Temizle
+ Hedefi Temizle
Varsayılan Hedefi Çalıştır
@@ -2579,7 +3327,10 @@ Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının ye
Hedefi Çalıştır
- NAnt 'ı Durdur
+ NAnt'ı Durdur
+
+
+ Hata ayıklamak için baÅŸlangıç ​​projesi yok.
Unit Testleri
@@ -2609,27 +3360,57 @@ Lütfen SharpDevelop Seçeneklerinden NAnt çalıştırılabilir dosyasının ye
Daha fazla bilgi
- '{0}' dili için herhangi bir imza bulunamadı.
+ '{0}' dili için bir imza bulunamadı.
- Hiçbir ize rastlanmadı.
+ İmza bulunamadı.
PInvoke imzaları ekle...
+
+ C#'tan Python'a
+
+
+ VB.NET'ten Python'a
+
+
+ Python Konsolu
+
+
+ Python Dosyaları
+
+
+ Python Proje Dosyaları
+
+
+ Satırı Python Konsola Gönder
+
Python Konsoluna Gönder
+
+ '{0}' türü bulunamıyor. Bir derleme bilgisi eksik olabilir mi?
+
+
+ Seçilen eleman sınıfsız veya geçersiz bir üye, bu yüzden türetilmemiş semboller gösterilebilir.
+
+
+ İmleç konumu tanım türü bulunamadı.
+
+
+ Satırı Ruby Konsoluna Gönder
+
Ruby Konsoluna Gönder
- ${Path} altındaki ${FileNameWithoutPath} dosyası yüklenemiyor.
-Dosya varlığını ve izin durumunu kontrol et.
+ ${Path} yolundaki ${FileNameWithoutPath} dosyası yüklenemiyor.
+Dosya varlığını ve izinlerini kontrol edin.
- ${Path} altındaki ${FileNameWithoutPath} dosyası kaydedilemiyor.
-Başka bir dosya adı seçin veya dizinin var olduğundan ve o konuma dosya yazılmasına izniniz olduğundan emin olun.(belki yazma-koruma problemi olabilir?)
+ ${Path} yolundaki ${FileNameWithoutPath} dosyası kaydedilemiyor.
+Başka bir dosya adı seçin veya dizinin var olduğundan ve o konuma dosya yazmaya izniniz olduğundan emin olun.(belki yazma-koruma problemi olabilir?)
Tarayıcı
@@ -2638,32 +3419,32 @@ Başka bir dosya adı seçin veya dizinin var olduğundan ve o konuma dosya yaz
C# 'dan VB.NET'e
- Hata ayıklama yerleştirmesi
+ Hata ayıklama düzeni
- Varsayılan yerleştirme
+ Varsayılan düzen
<Düzenle>
- Düzen EKle
+ Düzeni ekle
- Kullanıcı tanımlı sayfa düzeni listesini düzenle:
+ Kullanıcı tanımlı düzenler listesini şekillendir:
- Tertipleri Düzenle
+ Düzenleri Şekillendir
- Düz yerleştirme
+ Plan düzeni
- <Varsayılana Sıfırla>
+ <Varsayılana ayarla>
- Sayfa düzeni yapılandırmasını sıfırlamak istediğinizden emin misiniz?
-Not: Bu özel düzenlemeleri etkilemez.
+ Yapılandırma düzenini sıfırlamak istediğinizden emin misiniz?
+Not: Bu işlem özel düzenlemelerinizi etkilemez.
Dönüştür
@@ -2675,76 +3456,80 @@ Not: Bu özel düzenlemeleri etkilemez.
Dönüştürme Sonuçları
- ${FileName} dosyasını çevirirken ${ErrorCount} hata.
+ ${FileName} dosyasını dönüştürürken ${ErrorCount} hata(ları).
- Önce kaynak kodundaki hataları düzeltin(sadece hatasız kodlar çevrilebilir).
+ Önce kaynak kodundaki hataları düzeltin(sadece hatasız kodlar dönüştürülebilir).
- ${FileName} çevrilmedi:
+ ${FileName} dönüştürülmedi:
- Parçalayıcı ${ErrorCount} adet hata buldu.
+ Çözümleyici ${ErrorCount} adet hata buldu.
- SharpDevelop Proje Çevirici
+ SharpDevelop Proje Dönüştürücü
- Kaynak Dizin
+ Kaynak Dizini
- {0} zaten var, çevrilemedi.
+ {0} zaten var, dönüştürülemedi.
Hedef dizin
- C# dan Boo ya
+ C#'tan Boo'ya
- VB.NET den Boo ya
+ VB.NET'ten Boo'ya
'${FileName}' dosyası açılamıyor. Geçerli bir çözüm veya proje dosyası değil.
- SharpDevelop '${SolutionName}' adlı çözümü yükledi, fakat çözüm, '${ProjectName}' isimli projeyi içermiyor.
+ SharpDevelop '${SolutionName}' çözümünü yükledi; fakat '${ProjectName}' projesini içermiyor.
+
+
+ '${ProjectName}' projesini '${SolutionName}'çözümüne ekle
'${ProjectName}' için yeni bir çözüm oluştur.
- YazdırılacakBelge oluşturulamadı
+ Belgeyazdır oluşturulamadı
- Bu isme sahip bir yazma-korumalı dosya belirtilen konumda zaten var.
+ Belirtilen konumda bu isimde bir yazma-korumalı dosya zaten var.
+
- Yüklü proje türünü işletebilecek bir mekanizma yok.
+ Yüklü proje türü için arkaplan yok.
- Proje dosyası bulunmuş olamaz.
+ Proje dosyası bulunamıyor.
- Kaynaklar
+ Referanslar
- Web hizmeti tanımı okunamadı. Url='{0}'
+ Web servisi tanımı okunamadı. Url='{0}'
- Çözüm Birimleri
+ Çözüm Öğeleri
Çözüm
- Bu dosya artık yok.
+ Dosya artık bulunamıyor.
Dosyayı yeniden yüklemek istediğinizden emin misiniz ? Tüm değişiklikler kaybedilecek.
- ${LanguageBinding} dil bağlaması ${FileName} dosyasını derleyemiyor.
+ ${LanguageBinding} dil bağlayıcısı ${FileName} dosyasını derleyemiyor.
Dosya kaydedildi
@@ -2755,17 +3540,20 @@ Not: Bu özel düzenlemeleri etkilemez.
Dosya Kaydedildi
+
+ Proje tarayıcı dosyasında gezinin
+
VB.NET 'den C# 'a
- (+${NumOverloads} aşırı yükleme)
+ (+${NumOverloads} taşmaları)
- ${CurrentMethodNumber} taneden ${NumberOfTotalMethods}.
+ ${NumberOfTotalMethods} ${CurrentMethodNumber} .
- ${File} dosyası harici olarak değiştirilmiş, yeniden yüklemek ister misiniz?
+ ${File} dosyası dışarıdan değiştirilmiş. Yeniden yüklemek ister misiniz?
Artan Arama:
@@ -2776,6 +3564,12 @@ Not: Bu özel düzenlemeleri etkilemez.
(dökümanın sonuna ulaşıldı)
+
+ Artan Ters Arama:
+
+
+ ${Filename} dosyasından ${Assembly} için kod tamamlama bilgisi yükleme hatası:
+
Devam Et
@@ -2786,25 +3580,25 @@ Not: Bu özel düzenlemeleri etkilemez.
SharpDevelop'u Kapat
- SharpDevelop 'da anlaşılamayan bir hata oluştu. Bu hatayı beklemiyorduk, bu hatayı SharpDevelop takımına ileterek bize SharpDevelop'ı geliştirmemizde yardım etmenizi isteriz.
+ SharpDevelop'ta bilinmeyen bir hata oluştu. Bu hatayı beklemiyorduk; hatayı SharpDevelop takımına ileterek SharpDevelop'u geliştirmemizde yardımcı olmanızı bekliyoruz.
- Hataları nasıl en iyi şekilde bildirebilirim: Takım üyeleri için gerekli soruları en aza indirebilmek ve SharpDeveleop'ın kullanıcıları tarafından tespit edilen hataların rapor ve takip edilebilmesi için web tabanlı bir forum kurduk. Hata raporlamada daha kolay kopyala-yapıştır için panoya kopyalanan mesaja ek olarak, sizden hatanın nasıl yeniden oluşturulabileceği konusunda mümkün olduğunca detaylı adım-adım anlatım sunmanızı istiyoruz.
+ Hata raporlarını en iyi şekilde nasıl bildirebilirsiniz: Takım üyeleri için gerekli soruları en aza indirebilmek ve SharpDeveleop kullanıcıları tarafından tespit edilen hataların raporlanması ve takibi için web tabanlı bir forum kurduk. Hata raporunu forum mesaj panosuna daha kolay kopyala-yapıştıra ek olarak, hatanın nasıl yeniden oluşturulabileceği konusunda mümkün olduğunca detaylı adım-adım anlatım sunmanızı istiyoruz.
- SharpDevelop dan çıkmak istediğinizden emin misiniz? Kaydeilmemiş değişiklikler kaybolacak!
+ SharpDevelop dan çıkmak istediğinizden emin misiniz? Kaydedilmemiş değişiklikler kaybedilecek!
Hatayı SharpDevelop Takımına bildir.
- SharpDevelop'ı herkes için daha iyi bir program olmasına yardım eden herkese teşekkürler!
+ SharpDevelop uygulamasının daha iyi olması için yardım eden herkese teşekkürler!
- Yönetilmeyen bir exception oluştu
+ Bilinmeyen istisna oluÅŸtu
- Form yüklenemiyor. Muhtemel sebep: Bileşenleri başlat işlevi elle değiştirilmiş.
+ Form yüklenemiyor. Muhtemel sebep: bileşen başlat yöntemi elle değiştirilmiş.
'${RootComponent}' bileşeni için kök tasarımcı oluşturulamadı.
@@ -2816,16 +3610,16 @@ Not: Bu özel düzenlemeleri etkilemez.
Tasarımcı yüklenirken hata:
- Tümleşke
+ Derleme
Konum
- Uzayalanı
+ Ad alanı
- E&klenilecek bileÅŸenler
+ Eklenilecek bileÅŸenler
Özel
@@ -2837,7 +3631,7 @@ Not: Bu özel düzenlemeleri etkilemez.
Lütfen geçerli bir dosya adı girin.
- Geçerli bir .NET tümleşkesinin dosya adını girin.
+ Lütfen geçerli bir .NET derlemesi dosya adı girin.
Sürüm
@@ -2846,16 +3640,16 @@ Not: Bu özel düzenlemeleri etkilemez.
GAC
- ${Name} tümleşkesi herhangi bir bileşen içermiyor.
+ ${Name} derlemesi herhangi bir bileşen içermiyor.
- &Dosya Adı
+ Dosya Adı
- BileÅŸenler &Ekle
+ BileÅŸenler Ekle
- Tümleşke
+ Derleme
Kategoriler
@@ -2864,40 +3658,61 @@ Not: Bu özel düzenlemeleri etkilemez.
Kenarçubuğunu Yapılandır
- İsimboşluğu
+ Ad alanı
- &Yeni
+ Yeni
- Bu kategoriyi çıkarmak istediğinizden emin misiniz?
+ Bu kategoriyi silmek istediÄŸinizden emin misiniz?
Bileşenleri Kaldır
- Kategoriden seçili bileşenleri çıkarmak istediğinizden emin misiniz?
+ Kategoriden seçili bileşenleri silmek istediğinizden emin misiniz?
Yeniden Adlandır
+
+ Dışardan al...
+
+
+ Yerel kaynak
+
+
+ Hayır
+
+
+ Önizleme
+
+
+ Proje kaynağı
+
+
+ Kaynak seç
+
Üretilmiş kod
- Kod görünümünde InitializeComponents işlevini sadeceokunabilir olarak işaretle
+ Saltokunur kod görünümünde BileşenleriBaşlat yöntemini işaretle
Genel
+
+ Visual Studio Stili Olay Eylemcileri Üret
+
Izgara Özellikleri
- &Yükseklik
+ Yükseklik
- Araç Şeritlerinin üstünde düzenlemeye izin ver
+ Araç çubuklarını düzenlemeyi etkinleştir
En iyileştirilmiş kod üretimini kullan
@@ -2906,34 +3721,52 @@ Not: Bu özel düzenlemeleri etkilemez.
Izgara Seçenekleri
- Özellikler tepisisi ayarları
+ Özellik doldurma ayarları
- Özellikleri alfabetik olarak sırala
+ Özellikleri alfabetik sırala
- Izgarayı &Göster
+ Izgarayı Göster
- Akıllı Etiketleri otomatik aç
+ Akıllı Etiketleri kendiliğinden aç
Akıllı Etiketleri Kullan
- Izgaraya Uydur
+ Çizgi Çek
- Hizalama Durumu
+ Hizalama Modu
- Izgaraya H&izalan
+ Izgaraya Hizala
- Izgaraya Uydur
+ Izgaraya Hizala
- &GeniÅŸlik
+ GeniÅŸlik
+
+
+ Yeni olay iÅŸleyicilerine "TODO" komutu ekle
+
+
+ Özellik atama (küçük sayıların özellikleri için hızlı, fakat büyük sayıların özellikleri için kötü sonuç)
+
+
+ Varsayılan yerelleştirme modeli
+
+
+ Mevcut değişmeyen formların yerelleştirme modelini terket
+
+
+ YerelleÅŸtirme Modeli
+
+
+ Özellik yansıması (birkaç özellik için çalışma zamanında yavaş,ama büyük sayıların özellikleri için daha iyi sonuçlar, bilhassa birçok varsayılan değer ile)
Windows Form Tasarımcısı
@@ -2942,7 +3775,7 @@ Not: Bu özel düzenlemeleri etkilemez.
Kategori Adı
- Zaten var, başka isim seçin.
+ Ad zaten var, başka bir tane seçin.
Yeni Kategori
@@ -2954,15 +3787,21 @@ Not: Bu özel düzenlemeleri etkilemez.
Bileşenleri Göster
- Kısır döngüye neden olacak bir bileşen eklemeye çalışıyorsunuz.
+ Bir sonsuz döngüye neden olacak bileşen eklemeye çalışıyorsunuz.
- Form Tasarımcısı için bileşen oluştururken hata( bileşen, kurucusunda bir hata oluşturdu).
+ Form Tasarımcısı için bileşen oluştururken istisna (bir bileşen, kurucuda bir istisna oluşturdu).
BU KAYNAK KODUNU ETKİLEMEZ.
+
+ Tasarımcı yüklenemedi. Sözdizimi hataları için kaynak kodunu ve tüm yararlanılabilir referansları kontrol edin.
+
+
+ Tasarımcı içeriği temizlemek için çalışırken bir veya daha fazla hata oluştu. Form/kontrol üzerinde bir özel / üçüncü parti bileşende bilinmeyen bir istisna olabilir.
+
Kenar çubuğu bileşen kütüphanesi yüklenemedi.
-Hiçbir Windows form bileşeni erişilemeyecek, lütfen kenar çubuğunu elle ayarlayın( bir kenar çubuğuna sağ tıklayın kategori->Kenar Çubuğu Özelleştir 'i seçin)
+Windows Forms bileşenleri yok, lütfen kenar çubuğunu elle ayarlayın( bir kenar çubuğuna sağ tıklayıp kategori->Kenar Çubuğu Özelleştir 'i seçin)
Özel Bileşenler
@@ -2992,13 +3831,13 @@ Hiçbir Windows form bileşeni erişilemeyecek, lütfen kenar çubuğunu elle ay
Git
- İsimboşluğu geçersiz karakterler içeriyor. Bir isimboşluğu sadece harf, rakam yada alttan-tire içerebilir.
+ Ad alanı geçersiz karakterler içeriyor. Bir ad alanı sadece harf, rakam yada alt-tire içerebilir.
- Referans adı geçersiz karakterler içeriyor.
+ Referans ad geçersiz karakterler içeriyor.
- İsimboşluğu:
+ Ad alanı:
Parametreler
@@ -3013,7 +3852,7 @@ Hiçbir Windows form bileşeni erişilemeyecek, lütfen kenar çubuğunu elle ay
Yenile
- Elde edilen URI
+ EriÅŸim URI
Servis
@@ -3028,25 +3867,34 @@ Hiçbir Windows form bileşeni erişilemeyecek, lütfen kenar çubuğunu elle ay
DeÄŸer
- Mevcut Web Hizmetleri
+ Yararlanılabilir Web Servisleri
BaÄŸla
+
+ Yönetilen
+
+
+ İşleme Ekle
+
Çıktı dizini oluşturulamıyor.
-Gerekli erişim hakkınız olduğundan emin olun.
+Erişim haklarınızı kontrol edin.
Geçersiz proje adı.
Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
- Geçersiz proje adı: proje adları '.' ile bitmez.
+ Geçersiz proje adı: proje adı '.' ile bitmez.
Geçersiz proje adı: proje adı harf ile başlamalıdır.
+
+ Proje konumu için geçerli bir yol belirtmeniz gerekir.
+
SharpDevelop ile ilişkilendirmek istediğiniz dosya türlerini seçin:
@@ -3054,16 +3902,16 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Dosya Türü İlişkileri
- Uygulama başlangıcında dosya türlerini ilişkilendir.
+ Uygulama başlarken dosya türlerini ilişkilendir.
- Büyük-Küçük harf duyarlı
+ Büyük-küçük harf duyarlı
Sıralama Seçenekleri
- Boşklukları yoksay
+ Boşluk sonlarını yoksay
Aynı satırları çıkar
@@ -3077,6 +3925,9 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Azalan
+
+ Araç bulunamadı
+
Kimlik Tanımlama
@@ -3084,7 +3935,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Alan:
- Lütfen belirtilen url ye erişebilmek için gerekli kimlik bilgilerini verin.
+ Lütfen belirtilen url'ye erişebilmek için gerekli kimlik bilgilerini verin.
Åžifre:
@@ -3095,59 +3946,83 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Kullanıcı adı:
+
+ Taslak
+
+
+ Taslak görünümü geçerli belge için mevcut değil.
+
Yükleniyor...
- &Sıfırla
+ Sıfırla
- Tanımlamayı &Göster
+ Tanımlamayı Göster
- Sıfırlama başarısız. Sebep: Başka bir özelliğin değişmesinden ötürü sıfırlama değeri şu an gerçersiz olabilir.
+ Sıfırlama başarısız. Sebep: Başka bir özelliğin değişmesinden ötürü sıfırlama değeri şu an geçersiz olabilir.
Ayrıştırılıyor
- İnşâ İşlemi
+ Derleme İşlemi
- O dosyanın inşa eylemi
+ O dosyanın derleme işlemi
Çıktı dizinine kopyala
- Dosyanın çıktı dizinine kopyalanıp kopyalanmayacağını belirtir.
+ Dosyanın, çıktı dizinine kopyalanıp kopyalanmayacağını belirtir.
Özel Araç
- Dosyayı çıktıya çeviren aletin adını belirler.
+ Dosyayı çıktıya dönüştüren aracı belirtir.
- Özel Alet İsimBoşluğu
+ Özel Araç Ad alanı
- Çıktısını yerleştiren isimboşluğu özel aracını belirtir.
+ Çıktıyı yerleştiren özel aracın ad alanını belirtir.
+
+
+ Dosyanın tam yolu.
+
+
+ Mantıksal Ad
+
+
+ Gömülü kaynak adı. Eğer boş bırakılırsa, kendiliğinden ad oluşturulur.
- DiÄŸer Adlar
+ Takma Adlar
+
+
+ Bir virgülle ayrılmış takma ad listesi. Eğer gerekiyorsa referans derleme ile çakışan sınıf ve ad alanı isimlerinde takma adlar kullanın, örneğin aynı derlemenin farklı sürümleri.
Kültür
- Bu referans tarafından desteklenen kültür
+ Referans tarafından desteklenen kültür
+
+
+ Gömülü birlikte çalışma türleri
+
+
+ Referans derlemede tanımlı COM çalışma türlerinin hedef derlemede gömülü olup olmadığını belirtir.
Yerel kopya
- Eğer true ise referans edilen tümleşke çıktı dizinine kopyalanır
+ Eğer doğru(true) ise; referans derleme, çıktı yoluna kopyalanır
(İsim)
@@ -3156,16 +4031,22 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Referansın adı
- Ortak Anahtar Simgesi
+ Ortak Anahtar İşareti
- Açık anahtar
+ Ortak anahtar iÅŸareti
+
+
+ Referans derleme
+
+
+ Yanlış(False) olarak ayarlanırsa, Bu referans yalnızca bir derleme bağımlılık isteği belirtir ve referans derleme yapılmaz.
- Duruma özel uyarlama
+ Özel Sürüm
- Referansın, tümleşkenin belirli bir sürümüne bağlı olup-olmadığını gösterir.
+ Bu referansın, derlemenin özel bir sürümüne bağlı olup olmadığını gösterir.
URL Davranışı
@@ -3177,16 +4058,16 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Sürüm
- Projenin büyük, küçük, yeniden gözden geçirme ve inşâ numaları
+ Referansın büyük, küçük, yeniden gözden geçirme ve derleme numaraları
Web Referans URL si
- Web refarns URL 'si
+ Web referans URL 'si
- ${combineLocation} dosyası zaten var, var olanın üstüne yazılsın mı?
+ ${combineLocation} çözüm dosyası zaten var, üstüne yazmak istiyor musunuz?
'${type}' türünde bir proje oluşturulamıyor.
@@ -3197,17 +4078,35 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
${projectLocation} proje dosyası zaten var, var olanın üstüne yazılsın mı?
+
+ ${fileNames} dosya(lar) zaten var, üzerine yazmak istiyor musunuz?
+
- Dosya zaten var
+ Dosya(lar) zaten var
- Yüklüyor ${Filename}...
+ ${Filename} yükleniyor...
+
+
+ Çözümü kapat
Eski çözümü açık tut
- Çözümü yenile
+ Çözümü yeniden yükle
+
+
+ Bu çözüm dışarıdan değiştirildi.
+
+
+ Seçilen projeleri dönüştür:
+
+
+ Seçilen çalışma çerçevesini değiştir:
+
+
+ Seçilen projenin sürümünü değiştir
Derleyici Sürümü
@@ -3219,11 +4118,23 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
<deÄŸiÅŸtirmeyin>
- Hedef Çatı
+ Hedef Çalışmaçerçevesi
Proje Yükseltmesi
+
+ '${ProjectName}' projesi MSBuild ${OldToolsVersion} hedefliyor, fakat bu sürüm yüklü değil.
+Bu projenin MSBuild ${NewToolsVersion} sürümüne yükseltilmesini istiyor musunuz?
+Proje yükseltme olmadan açılamaz.
+
+
+ MSBuild ${NewToolsVersion} sürümüne yükselt
+
+
+ Bu çözüm SharpDevelop önceki bir sürümü kullanılarak oluşturulmuş.
+Eğer yükseltmek isterseniz, yeni bir dil veya yeni çalışmaçerçevesi özelliklerini kullanabilirsiniz.
+
Şu anki ortam bulunamadı.
'Seçenekler->Görsel Biçim' e gidin ve şu anki dil ortamını değiştirin.
@@ -3232,7 +4143,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Olanların hepsini işaretle
- Olanların hepsini değiştir.
+ ${Count} deÄŸiÅŸimlerini yap.
Tüm Testler
@@ -3240,14 +4151,29 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Kod Kapsama
+
+ XML çıktı dosyası oluştur
+
+
+ Herbir testi etiketle
+
+
+ Gölge kopya
+
Logoyu göster
- İlerleme durmunu göster
+ İlerleme durumunu göster
+
+
+ Ayrı bir konu üzerinde testler çalıştır
+
+
+ Kod kapsama ile tüm testleri çalıştır
- Birimi test tepsisinde çalıştır
+ Birimi test ortamında çalıştır
Şu anki projedeki testleri çalıştır
@@ -3258,11 +4184,62 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Hata ayıklayıcı ile çalıştır
+
+ ${Name} test ediliyor...
+
+
+ Test
+
+
+ Ünite testleri çalıştırılamıyor.'{0}' dosyası bulunamıyor.
+
+
+ Web
+
+
+ Uygulama zaten var.
+
+
+ Uygulama / sanal dizin oluÅŸtur
+
+
+ Web sunucu seçeneklerini etkisizleştir
+
+
+ Yerel IIS veya IIS Express bulunamadı.
+
+
+ ASP.NET/IIS(Express) ({0}) çalışan işlemi bulunamadı.
+
+
+ Belirtilen harici program veya URL yok. Web sunucusunda Web sekmesi - Proje Özelliklerini kontrol edin.
+
+
+ Sunucu portu:
+
+
+ Proje Url:
+
+
+ Web Sunucusu
+
+
+ Hata ayıklayıcı işleme ekleme yapamadı.
+
+
+ IIS Express Web sunucusunu kullan
+
+
+ Yerel IIS Web sunucusunu kullan
+
+
+ Uygulama/sanal dizin oluÅŸturuldu.
+
- Uzantı Ekle
+ Uzantıları Ekle
- WiX Uzantıları Dosyaları
+ WiX Uzantı Dosyaları
WiX Kütüphane Dosyaları
@@ -3276,32 +4253,45 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Uzantılar
+
+ Kültürler:
+
- ICE'leri bastır
+ ICE'leri dışla:
Uyarılara hata muamelesi yap:
- WiX MSBuild uzantı yolu
+ WiX MSBuild uzantıları yolu:
- WiX hedefleri konumu:
+ WiX hedefleri yolu:
- WiX görevleri konumu:
+ WiX görevleri yolu:
- WiX konumu:
+ WiX araç yolu:
+
+
+ WiX DeÄŸiÅŸkenler:
Belgede, '{0}' numaralı diyalog bulunamadı.
+
+ Eklenti, şu formda olmalıdır:Sınıf,Çevirme
+
+Örneğin:
+
+Microsoft.Tools.WindowsInstallerXml.Extensions.NetFXCompiler, WixNetFxExtension
+
Kütüphane
- BaÄŸlama
+ Bağlantılama
Ad
@@ -3318,6 +4308,9 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Kur dosyaları bulunamadı. WiX dosyaları hata içeriyor.
+
+ Herhangi bir TARGETDIR dizini veya DirectoryRef öğesi bulunamıyor. Mevcut değil veya WiX belgesi WiX 3.0 için değildir veya alanadı "http://schemas.microsoft.com/wix/2006/wi" değildir.
+
'{0}' projesinde hiçbir WiX(.wxs) dosyası bulunamadı.
@@ -3334,7 +4327,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Önişleme
- WiX Uzantısı Ekle
+ WiX uzantısı Ekle
WiX Kütüphanesi Ekle
@@ -3342,14 +4335,17 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Yükleme Paketi
+
+ Modül Birleştirme
+
WiX Kütüphanesi
- Diyalogları Ayarla
+ İletişim Kutularını Ayarla
- '{0}' içinde '{1}' bulunamadı
+ '{1}' içinde '{0}' bulunamadı
Ekle...
@@ -3361,16 +4357,16 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Gerekli olan '{0}' özelliği kayıp.
- Wix belgesinde hiçbir kurulum diyaloğu yok. Lütfen imleçi diyalog elemanının içine hareket ettirin yada bir diyalog açmak için Kurulum Diyalogları penceresini kullanın.
+ Wix belgesinde kurulu bir iletişim kutusu yok. Lütfen imleci bir İletişim Kutusu elemanına hareket ettirin yada İletişim Kutularını Ayarla penceresini kullanın.
Yönetici Araçları
- Uygulama Verileri
+ Uygulama Verisi
- Uygulama Ortak Verisi
+ Ortak Uygulama Verisi
Ortak Dosyalar 64
@@ -3388,7 +4384,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Yazı tipleri
- Yerel Uygulama Verileri
+ Yerel Uygulama Verisi
Resimlerim
@@ -3403,13 +4399,13 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Program Dosyaları
- Program menüsü
+ Program Menüsü
Gönder
- Başlangıç Menüsü
+ Başlat Menüsü
Başlangıç
@@ -3445,7 +4441,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
WiX Yerelleştirme Dosyaları
- .NET Çatı Uzantısı
+ .NET Framework Uzantısı
Fark bulunamadı
@@ -3460,19 +4456,49 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
COM+ ve Mesaj Kuyruğu Uzantısı(pubca)
- WiX Hedef Dosyası
+ WiX Hedefler Dosyası
- WiX Görev Dosyası
+ WiX Görevler Dosyası
Visual Studio Uzantısı
+
+ Kopyala
+
+
+ Kes
+
+
+ Düzeylendir
+
+
+ Yapıştır
+
+
+ Özellikler
+
+
+ Tekrarla
+
+
+ Kaldır
+
+
+ Araçlar
+
+
+ Geri al
+
+
+ XAML görünümü
+
Özel:
- Özellik ekle
+ Nitelik Ekle
Özel:
@@ -3481,7 +4507,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Eleman Ekle
- XSLT &Belirle
+ XSLT Belirle
XSLT Stil Sayfası Belirle
@@ -3493,13 +4519,13 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
XPath Sonuçlarını Gizle
- XSLT &Aç
+ XSLT Aç
- XSL&T Çalıştır
+ XSLT Çalıştır
- XML Şemasını Seçin
+ XML Şeması Seç
XML 'yi DoÄŸrula
@@ -3514,7 +4540,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Şema notlarını göster
- XML Ayarları
+ XML Seçenekleri
XML Tamamlama
@@ -3535,10 +4561,10 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Åžemalar
- Åžema eklenemiyor. '{0}' isimboÅŸluÄŸu zaten var.
+ Şema eklenemiyor. '{0}' ad alanı zaten var.
- '{0}' şemasının hedef isimboşluğu yok.
+ '{0}' şemasının bir hedef ad alanı yok.
XML Şemaları
@@ -3549,11 +4575,29 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Değişiklikler kayıt edilemiyor.
+
+ Nitelik Ekle...
+
+
+ Yavru Açıklama Ekle
+
+
+ Yavru Eleman Ekle...
+
+
+ Yavru Metin Düğümü Ekle
+
+
+ Açıklamadan Sonra Ekle
+
+
+ Açıklamadan Önce Ekle
+
- -Dan Sonra Eleman Ekle...
+ -dan Sonra Eleman Ekle...
- -Dan Önce Eleman Ekle...
+ -dan Önce Eleman Ekle...
Metin Düğümünü Sonrasına Yerleştir
@@ -3568,16 +4612,16 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
XML Ağacı
- İsim boşluğu
+ Ad alanı
- İsim boşlukları
+ Ad alanları
- XPath sorgu sonucu 0 nesne bulundu.
+ XPath sorgusunda 0 öğe bulundu.
- Ön Ek
+ Önek
Sorgulama
@@ -3597,35 +4641,59 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
XSLT Çıktısı
+
+ ILSpy belirtilen konumda bulamadı ya da SharpDevelop'un erişim için yeterli hakları yok.
+
+
+ ILSpy yolu henüz belirtilmedi.
+
+
+ ILSpy aç
+
+
+ Bu özellik, ILSpy gerektirir. Henüz kurulu değilse, ücretsiz olarak indirebilirsiniz:
+
+
+ ILSpy.exe tam yolu:
+
+
+ ILSpy yolunu ayarla
+
- Dış araçlar kurulumu yüklemeniyor.
+ Dış araçlar yapılandırma dosyası yüklenemiyor.
- Şablon kurulum dosyası yüklenemiyor
+ Şablon yapılandırma dosyası yüklenemiyor
Proje şablonu yüklenirken hata oluştu
+
+ SharpDevelop kapatılmadan önce derleme bitirilmelidir.
+
+
+ Derleme iptal edildi.
+
- İnşâ Başarısız.
+ Derleme başarısız.
- İnşâ başarı ile tamamlandı.
+ Derleme başarılı oldu.
- İnşâ başladı.
+ Derleme başladı.
- ------ İnşâ başladı: Proje: ${Project} Konfigurasyon: ${Config} ------
+ ------ Derleme başladı: Proje: ${Project} Yapılandırma: ${Config} ------
- İnşâ Ediliyor
+ Derleniyor
Derleniyor
- COM birlikte-işerlik tümleşkesi inşâ ediliyor...
+ COM birlikte çalışma çevrimi derleniyor...
Çalıştır: ${Script}
@@ -3637,7 +4705,10 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Ana derleme yapılıyor...
- İnşâ tamamlandı -- ${Errors} hata, ${Warnings} uyarı
+ Derleme tamamlandı -- hata ${Errors}, uyarı ${Warnings}
+
+
+ ${Name} atlandı (SharpDevelop içinde değişiklik yapılmadı)
SharpDevelop
@@ -3645,6 +4716,18 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
DeÄŸiÅŸiklikleri iptal etmek istediÄŸinizden emin misiniz?
+
+ Yerel deÄŸiÅŸken
+
+
+ ad alanı
+
+
+ parametre
+
+
+ Aşırı yükleme
+
Geçerli değişiklikleri kaydetmek istiyor musunuz?
@@ -3657,17 +4740,26 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Hazır
+
+ Tampon belleklerdeki tüm sık kullanılanları sil.
+
Sık Kullanılanı Sil
- Tümünü etkin/pasif kıl
+ Tümü etkin/etkisiz
- Bir sonraki sık kullanılana git
+ Sonraki sık kullanılana git
- Bir önceki sık kullanılana git
+ Önceki sık kullanılana git
+
+
+ {0} @line {1}
+
+
+ Konum
Sık Kullanılanlar
@@ -3676,13 +4768,13 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Geri
- Temel tipler
+ Temel türler
Diğer Üyeleri Göster
- Gizli Üyeleri Göster
+ Private Üyeleri Göster
Proje Referanslarını Göster
@@ -3691,10 +4783,10 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Protected Üyeleri Göster
- Genel Üyeleri Göster
+ Public Üyeleri Göster
- Sınıf Görünümü Seçenekleri
+ Sınıf Görünüm Ayarları
Aramayı Temizle
@@ -3703,13 +4795,13 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Ara
- Türemiş tipler
+ Türemiş türler
İlet
- Hiçbir sonuç bulunamadı.
+ Arama sonucu olumsuz.
Sınıf Görünümü Arama
@@ -3718,13 +4810,13 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Sınıflar
- Tümüzü Temizle
+ Tümünü Temizle
- Çıktıyı göster:
+ Çıktısını göster:
- Metni Kaydir/ma
+ Sözcük Kaydırmaya Geç
DuraksamaNoktaları
@@ -3738,8 +4830,11 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Semboller olmadan bir işleve geçemezsiniz.
+
+ Hata ayıklama sembolleri olmadan bir işlevi değiştiremezsiniz. Ya semboller ile yeniden derleyin yada "Sembolsüz Tekrar Derle" seçeneğini etkinleştirin.
+
- [Dış İşlevler]
+ [Dış Yöntemler]
Fonksiyon deÄŸiÅŸtir
@@ -3747,6 +4842,9 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Dil
+
+ Modül
+
Argüman adlarını göster
@@ -3754,19 +4852,94 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Argüman değerlerini göster
- Dış işlevleri göster
+ Dış yöntemleri göster
+
+
+ Satır numarasını göster
+
+
+ Modül adlarını göster
+
+
+ Sor
+
+
+ Kesme
+
+
+ Kesme noktası
+
+
+ Kesme noktası vurgusu!
+
+
+ Kesme noktası vurgusu satır {1} de {0} .
+
+
+ Kesme noktası vurgusu satır {1}de {0} çünkü {2}
+
+
+ KoÅŸullu
+
+
+ KoÅŸul
+
+
+ Devam
+
+
+ Kesme noktası etkisiz
+
+
+ Kesme noktasını etkin
+
+
+ Sözdizimini kontrol et
+
+
+ Betik dili
+
+
+ Hata Ayıklayıcı Betiği Düzenle
+
+
+ Sınırla
+
+
+ İz
+
+
+ Konsol
+
+
+ Kesme
Devam
- Hatanın önü kesilemedi. Hatası ayıklanan program daha fazla devam edemez.
+ İstisnaya müdahale edilemedi. Hata ayıklaması yapılan program daha fazla devam edemez.
+
+
+ Yakalanan istisnaya müdahale edilemedi. Hata ayıklama sembolleri istisna kaynağı için mevcut olmayabilir.
+
+
+ İstisna Detaylarını Gizle
+
+
+ --- İç istisna yığını izlemesi sonu ---
+
+
+ {0}da
- {0} üzerinde {1} içinde : satır {2}
+ {1} içinde {0} üzerinde:satır {2}
- {0} istisnası hata ayıklama için atıldı:
+ {0} türü bir hata:
+
+
+ İstisna Detaylarını Göster
Durdur
@@ -3774,15 +4947,24 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
İstisna
+
+ Yakalanan istisna
+
+
+ Bilinmeyen istisna
+
- Hata Geçmişi
+ İstisna geçmişi
- Hata
+ İstisna
Zaman
+
+ Göster/Gizle Yakınlaştırma Kontrolü
+
Yerel
@@ -3790,10 +4972,10 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Yerel deÄŸiÅŸkenler
- Taban nesne
+ Temel sınıf
- Hata ayıklayıcı çalışırken değişkenlere göz atamazsınız.
+ Hata ayıklayıcı çalışırken değişkenleri inceleyemezsiniz.
{0} dan {1} e çevrilemez
@@ -3807,20 +4989,68 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Değeri panoya yapıştır
+
+ Ad
+
+
+ Public üyeler dışında
+
+
+ Public Static üyeler dışında
+
- Gizli üyeler
+ Private üyeler
- Gizli Durağan Üyeler
+ Private Static Üyeler
Hatanın tümünü göster...
- Değerleri onaltılık düzende göster
+ Değerleri onaltılık göster
- Durağan üyeler
+ Static üyeler
+
+
+ Tür
+
+
+ DeÄŸer
+
+
+ Hafıza
+
+
+ {0} adresi bulunamadı!
+
+
+ Ekran bayt boyutu:
+
+
+ Adrese atla:
+
+
+ DiÄŸer sanal adresler
+
+
+ Bellek adresleri eÅŸleÅŸtirilemedi!
+
+
+ Hata ayıklanamıyor veya işlem yürütülemiyor!
+
+
+ Önceki sanal adresler
+
+
+ {0} dan {1} e okunuyor - boyut {2}.
+
+
+ Mevcut adresleri yinele
+
+
+ {1} boyutlu {0} adresi okunamıyor.
Yüklü modüller
@@ -3828,30 +5058,51 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Adres
+
+ (dinamik)
+
- Bir Sembol Yüklenmedi.
+ Semboller yüklenmedi.
Semboller yüklendi.
+
+ (hafızada)
+
Sıra
- ProÄŸram
+ Program
Semboller
- Zaman Damgası
+ Zaman Ekleme
Sürüm
+
+ Nesne GrafiÄŸi
+
+
+ Paralel Yığınlar
+
+
+ İmleç çalıştır
+
Geçerli ifadeyi ayarla
+
+ Hata ayıklamayı durdurmak istiyor musunuz?
+
+
+ İşlemden ayırsın veya sonlandırsın mı?
+
Yürütme birimleri
@@ -3861,9 +5112,15 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Bir sonraki adıma geçemezsiniz çünkü; bir aktif işlev seçilmemiş
+
+ Mevcut hiçbir çerçeve ile bir iş parçacığını değiştiremezsiniz.
+
Hata ayıklayıcı çalışırken iş parçacıklarını değiştiremezsiniz.
+
+ Yararlanılabilir derlenmiş kod seçenekleri olmadan, derlenmiş kod parçacığını değiştiremezsiniz.
+
Dondur
@@ -3891,6 +5148,30 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
İş parçacığı değiştirme
+
+ Geçiş Yöntemini Göster
+
+
+ İzleme
+
+
+ İzleme Ekle
+
+
+ Izleme için bir tanım girin:
+
+
+ Geçersiz tanım: {0}
+
+
+ Yenile
+
+
+ Hepsini kaldır
+
+
+ İzlemeyi kaldır
+
Tanım Görünümü
@@ -3898,7 +5179,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Hatalar
- ${TaskService.Errors} Hata
+ ${TaskService.Errors} Hataları
Hataların listede gösterilip-gösterilmeyeceğini seçin
@@ -3910,7 +5191,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Mesajların listede gösterilip-gösterilmeyeceğini seçin
- ${TaskService.Warnings} Uyarı
+ ${TaskService.Warnings} Uyarıları
Uyarıların listede gösterilip-gösterilmeyeceğini seçin.
@@ -3945,11 +5226,17 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Yardım
+
+ Taslak
+
+
+ Bu belge için kullanılabilir bir taslak içeriği yoktur.
+
Çıktı
- İnşâ
+ Derle
Hata Ayıkla
@@ -3973,7 +5260,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Tümünü genişlet
- ${Count} dosya
+ ${Count} dosyalar
Düz
@@ -3997,7 +5284,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Dosya başına
- Arama listesi durumunu seç
+ Liste modu aramayı seç
Son aramaları göster
@@ -4012,49 +5299,49 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Araçlar
- Şu ankini çökert
+ Mevcudu daralt
- Şu ankini aç
+ Mevcudu geniÅŸlet
Sonuçları temizle
- Bütün hataları göster
+ Tüm hataları genişlet
- Yoksayılanları uzat
+ Tüm yoksayılanları genişlet
- Şu anki başarısızlıkları uzat
+ Mevcut hataları genişlet
- Şu an yoksayılanları göster
+ Mevcut yoksayılanı genişlet
Ağaç
- Doğrulama: hatalı
+ Doğrulama: başarısız
------ XML Doğrulanıyor ------
- Onaylama: başarılı
+ Doğrulama: başarılı
- Test tümleşkelerini kaldırır, otomatik yüklemeyi iptal eder.
+ Test derlemeleri yüklenemiyor, kendiliğinden yükleme iptal edildi.
Tanimlamaya &git
- Şu anki seçili projedeki NUnit 'e referans ekle
+ Mevcut seçili projedeki NUnit 'e referans ekle
- Test tümleşkelerini yeniden yükler
+ Test derlemelerini yeniden yükler
Bütün testleri çalıştır
@@ -4069,41 +5356,71 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Testleri durdur
- Test etmeyi etkinleştirmek için testleri çalıştır yada yenile 'ye tıklayın
+ Testleri çalıştıra tıkla yada Testi çalıştırmak için yenile
Yükleme hatası
- '${TestCase}' testi başarısız, çünkü: '${Message}'.
+ Test durumu '${TestCase}' başarısız.
- '${TestCase}' testi çalıştırılmadı.
+ Test durumu '${TestCase}' yürütülemedi.
- Tümleşke Yükle...
+ Derleme Yükle...
- Referans Edilmiş Tümleşkeleri Yükle
+ Referanslı Derlemeleri Yükle
- Standart Tümleşkeleri Yükle
+ Standart Derlemeleri Yükle
- &Kapat
+ Kapat
Bu hariç hepsini kapat
- K&aydet
+ Kaydet
- Farklı Ka&ydet...
+ Farklı Kaydet...
Dosya yolunu/adını kopyala
+
+ Explorer'da klasör içeriğini aç
+
+
+ Burada komut istemi aç
+
+
+ hedef çalışmaçerçevesini seçin
+
+
+ Taşınabilir Sınıf Kitaplığı Araçları bulunamadı.
+
+
+ .NET Taşınabilir AltSeti
+
+
+ İki veya daha fazla çerçevenin seçilmesi gerekir.
+
+
+ Seçili profil:
+
+
+ Taşınabilir Kitaplık Profili seç
+
+
+ Visual Studio yüklemeden Taşınabilir Sınıf Kitaplığı Araçları'nı yüklemek için,bilgisayarınıza dosyayı(PortableLibraryTools.exe)indirip kaydedin ve bir komut istemi penceresinde kurulum programını çalıştırın.Komut satırında /buildmachine anahtarı ekleyin.
+
+
+ Bütün düğümleri daralt
+
Var olan dosyaları ekle
@@ -4135,11 +5452,14 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Web Referansı Ekle
- İnşâ et
+ Derle
Temizle
+
+ Tümünü daralt
+
'${FileName}' dosyasını tamamen sil?
@@ -4152,38 +5472,56 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Projeden Dışla
+
+ Özel araçları çalıştır
+
+
+ Varolan klasör...
+
+
+ Hedef dizine klasörü kopyalamak istiyor musunuz?
+
- Var olan Öğe...
+ Varolan Öğe...
+
+
+ Öğe, Bağımlı Öğe Olarak Mevcut ...
- Var olan Proje...
+ Varolan Proje...
- NDoc ile belgelendirme inşâ et
+ XML açıklamalarından belgelendirme derle
- Projenin inşa ayarlarını xml döküman dosyası üret şeklinde değiştirmelisiniz.
+ Projenin derleme ayarlarını, bir xml belgeleme dosyası üret şeklinde değiştirmelisiniz.
Projeyi derlemelisiniz
- xml döküman dosyayı yok, projeyi tekrar derlemelisiniz.
+ xml döküman dosyası yok, projeyi derlemelisiniz.
+
+
+ XML açıklama belgeleri oluşturabilmek için 'Sandcastle Yardım Dosyası Derleyicisi'nin kurulu olması gerekir.
- Html İhraç
+ Html Dışa Aktar
Projeye dahil et
- Derleme
+ Derle
YerleÅŸtir
+
+ Yeni Bağımlı Öğe ...
+
- Y&eni Dizin
+ Yeni Klasör
Yeni Öğe...
@@ -4192,16 +5530,22 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Yeni Proje
- Yeni Çözüm Dizini
+ Yeni Çözüm Klasörü
+
+
+ Bu proje bir web projesi deÄŸil.
- &Aç
+ Aç
+
+
+ Çıktı Klasörü Aç
- Yeniden inşâ et
+ Yeniden derle
- Web Referansını Tazele
+ Web Referansını Yenile
Yeniden Adla&ndır
@@ -4209,11 +5553,17 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Projeyi Çalıştır
+
+ Projeyi Hata Ayıklamadan Çalıştır
+
Başlangıç Projesi olarak Ata
+
+ Tarayıcıda görüntüle
+
- Yeni Dizin
+ Yeni Klasör
{0} projesinden tüm web referanslarını silmek istiyor musunuz?
@@ -4222,19 +5572,19 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Tüm web referanslarını sil
- BileÅŸkeler (*.dll)|*.dll
+ Derlemeler (*.dll)|*.dll
- Tümleşke
+ Derleme
Sınıf adı
- Derleme
+ Derle
- Tümleşke oluştur
+ Derleme oluÅŸtur
ECMA betiÄŸi
@@ -4243,7 +5593,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Son
- Açıkca yakala
+ Açık yakala
Gruplar
@@ -4264,10 +5614,10 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Çok satırlı
- İsim boşluğu
+ Ad alanı
- Açıkca gözükür
+ Açıkça görünür
Düzenli ifade
@@ -4276,7 +5626,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
DeÄŸiÅŸtir
- DeÄŸiÅŸtirme metni
+ String deÄŸiÅŸtirme
Sonucu deÄŸiÅŸtir
@@ -4306,10 +5656,10 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Regex derlenemedi, çünkü:
- Regex oluşturma hatası oluştu, çünkü:
+ Regex oluşturma hatası, çünkü:
- Dosya başarılı bir biçimde olşturuldu:
+ Dosya başarılı bir biçimde oluşturuldu:
Lütfen geçerli bir dosya adı girin
@@ -4318,28 +5668,28 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Lütfen bir dosya adı girin
- EÅŸle
+ eÅŸle
eÅŸleÅŸenler
- Lütfen bir düzenli ifade girin
+ Lütfen düzenli bir ifade girin
- Rakam
+ Sayısal karakter
- Sayı olmayan karakter
+ Sayısal olmayan karakter
BoÅŸluk olmayan karakter
- Kelime benzeri harf deÄŸerleri
+ Sözcük olmayan karakter değeri
- Karnı-tok joker
+ Dolu yıldız
BoÅŸluk karakteri
@@ -4362,38 +5712,44 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Kaynak yüklenemiyor
+
+ Hata: Kaynak kodu üreteci "{0}" kaynak dosyasını atladı, çünkü oluşturulan sınıf mevcut sınıf "{1}" ile çakışıyor.
+
+
+ Kaynak kod üreteci: '{0}' kaynağı için hiçbir kaynak özelliği oluşturamıyor.
+
İçerik
- Dosyaları &ekle...
+ Dosyaları ekle...
- Metin giriÅŸi ekle
+ String giriÅŸi ekle
Kaynak adı kopyala
- &Yeniden adlandır
+ Yeniden adlandır
- Hex Kodu Göster
+ Onaltılı Yığın Olarak Göster
Tür
- Bu anahtar daha önceden tanımlandı! Lütfen başka birini seçin.
+ Bu anahtar daha önceden tanımlandı! Lütfen başka bir tane seçin.
Tüm dosyalar (*.*)
- Tümleşke dosyaları (*.exe, *.dll)
+ Çevirme dosyaları (*.exe, *.dll)
- Binary(ikili) dosyalar
+ İkili dosyalar
Boo Dosyaları
@@ -4411,13 +5767,13 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
C# Dosyaları (*.cs)
- CSharp Proje Dosyaları
+ C# Proje Dosyaları
İmleç dosyaları
- Çalıştırılabilir Dosyalar(*.exe;*.com;*.pif;*.bat;*.cmd)
+ Çalıştırılabilir Dosyalar (*.exe;*.com;*.pif;*.bat;*.cmd)
Simge Dosyaları (*.ico)
@@ -4432,10 +5788,10 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Resim dosyaları
- Anahtar dosyalar
+ Anahtar dosyaları
- NAnt İnşâ Dosyaları
+ NAnt Derleme Dosyaları
SharpDevelop 1.1 Proje Dosyaları (*.prjx)
@@ -4453,7 +5809,7 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Visual Basic Proje Dosyaları
- Xml Dosyaları (*.xml)
+ XML Dosyaları (*.xml)
XML Şema Dosyaları (*.xsd)
@@ -4470,41 +5826,65 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Adımlar
+
+ Akış eklendi!
+
+
+ ${Name} Temel sınıfları
+
Bu işlem yerine getirilemez çünkü kaynak kodlarınızda hata var:
- Eleman kullanıcı kodunda tanımlanmadığı için adlandırılamıyor.
+ Eleman kullanıcı kodunda tanımlanmadığı için adı değiştirilemiyor.
+
+
+ Düzeltme pozisyonunda eleman adı değiştirilemez.
${Name} 'den türeme sınıflar
+
+ Otomatik özelliği dönüştür
+
- Changed-event oluÅŸtur
+ DeÄŸiÅŸmiÅŸ olay oluÅŸtur
- Getirici oluÅŸtur
+ Alıcı oluştur
- OnEvent-iÅŸlevi oluÅŸtur
+ Olay üzerinde yöntemi oluştur
Özellik oluştur
- Åžu anki iÅŸlev
+ Mevcut yöntem
Tanımlama türü
+
+ Otomatik özelliği genişlet
+
+
+ Arayüzü Çıkar
+
+
+ Temel sınıfları bul
+
Türetilmiş sınıfları bul
+
+ Türetilmiş semboller bul
+
Referanslar bulunuyor...
- Aşırı yüklemeleri bul
+ Geçersiz kılmaları bul
Referansları bul
@@ -4513,37 +5893,46 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Referansları bul
- Taban sınıfa git
+ Temel sınıfa git
- Tabana git
+ Temele git
Özelliğe git
+
+ Soyut sınıf gerçekleştir
+
- Arayüz gerçekle
+ Arayüz gerçekleştir
Arayüz gerçekle(açıktan)
- Arayüz gerçekle (örtük)
+ Arayüz gerçekleştir (örtük)
- İsimler ssadece harf,rakam yada alttan tire içerebilir.
+ İsimler sadece harf,rakam yada alt tire içerebilir.
İsimler bir harf veya alt çizgi ile başlamalıdır.
- Bütün sayfalar parçalanana değin Bul referansları çalıştırılamaz.
+ Bütün dosyalar çözümlene kadar Bul referansları çalıştırılamaz.
Sınıfı '${FileName}' dosyasına taşı
+
+ ${Name} geçersiz kıl
+
+
+ ${Name} referansları
+
- Kullanılmayan import komutlarını kaldır
+ Kullanılmayan dahil edilmiş ifadeleri kaldır
Yeniden adlandır
@@ -4552,13 +5941,13 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Sınıfın yeni adını girin:
- &Yeniden adlandır
+ Yeniden adlandır
SharpDevelop {0} özelliğini {1} olarak yeniden adlandırsın mı?
- Dosya adını '${FileName}' olarak değiştir
+ Dosyayı '${FileName}' olarak değiştir
Üyenin yeni adını girin
@@ -4578,32 +5967,48 @@ Sadece harf,rakam, boÅŸluk, '.' yada '_' kullanabilirsiniz.
Lisanslar
+
+ Geçerli belge için herhangi bir araç yok.
+
XSL-T
- Bilinen bütün proje formatları
+ Bilinen tüm proje formatları
+
+
+ Bu SharpDevelop sürümü, Visual Studio .NET 2003 (veya öncesi) kullanılarak oluşturulan projeleri yükleyemiyor.
+Dönüşüm için SharpDevelop 3.2 sürümünü kullanmayı deneyin veya varolan kaynak kodu yeni bir proje dosyasına ekleyin.
+
+
+ {0} kaydedilemiyor:\n{1}
+
+
+ {0} çözüm dosyası kaydedilemiyor. Salt okunur olarak işaretlenmiş.
+
+
+ {0} kaydedilemiyor:\n{1}\n\nDosyanın yazılabilir olduğundan emin olun.
- Projede kaynak dosyaları vardı.
-SharpDevelop 2 kaynakları farklı bir biçimde derler: kaynak adı sadece dosya adı değildir; başında kök isim boşluğu ve dizin adıda vardır.
+ Projede kaynak dosyaları var.
+SharpDevelop 2 kaynakları farklı bir biçimde derler: kaynak adı sadece dosya adı değildir; başında root alanadı ve dizin adıda vardır.
Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
- Takip eden dosyalar yeniden adlandırılamadı/taşınamadı:
+ Takip eden dosyalar kendiliğinden yeniden adlandırılamadı/taşınamadı:
'{0}' geçerli bir çözüm dosyası değil.
- Microsoft {0} Çözüm dosyası biçimini okuyamıyor.
+ Microsoft Çözüm dosyası biçimi {0} okunamıyor.
Veritabanı
- SharpDevelop Raporlama
+ SharpDevelop Raporları
Alanı Kes
@@ -4618,13 +6023,13 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Gruplama/Sıralama
- Yapıştır Alanı
+ Alanı Yapıştır
Önizlemeyi Göster
- Görünür Kesim
+ Görünür Kısım
Temel Ayarlar
@@ -4633,31 +6038,31 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Tasarım
- AyrıntıKısmı
+ Ayrıntı Kısmı
- SayfaSonu
+ Sayfa Sonu
- SayfaBaşlığı
+ Sayfa Başlığı
- RaporAltBilgi
+ Rapor AltBilgi
- RaporBaşlığı
+ Rapor Başlığı
Raporu yazıcıya yolla
- SharpDevelop Rapor Sistemini çalıştırabilmek için en az bir(1) çalışır yazıcıya ihtiyacınız var.
+ SharpDevelop Raporlarını yürütmek için en az bir kurulu yazıcı olmalı.
Bu rapor 'SharpReport' ile oluşturulmamış.
- Dosya okunamadı, dosya bozuk (SharpReportFile 'ın biçimi bozuk)
+ Dosya okunamadı, dosya bozuk (SharpRaporDosyası'nın biçimi bozuk)
Mevcut Alanlar
@@ -4666,7 +6071,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Düğüm kaldır
- Sıralamayı ters-düz et
+ Sıralamayı tersine çevir
Düğümleri Kaldır
@@ -4692,23 +6097,32 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Rapor Üretici
+
+ Rapor Gösterici
+
İlk Sayfa
Son Sayfa
+
+ DiÄŸer
+
- OluÅŸturulan dosyalar
+ OluÅŸturulan sayfalar
Pdf Dosyası Oluştur
+
+ Önceki
+
Yakınlaştır
- Çember
+ Döngü
Raporlama - Kontroller
@@ -4717,7 +6131,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
VeriAlanı
- DataSatırı
+ VeriSatırı
Raporlama - Fonksiyonlar
@@ -4726,11 +6140,17 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
SayfaNo
- Sayfaların SayfaNumarası
+ Sayıların Sayfa Numarası
Bugün
+
+ Grup Altbilgisi
+
+
+ Grup Üstbilgisi
+
Resim
@@ -4743,23 +6163,26 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Dikdörtgen
+
+ Tablo
+
Etiket
- Taban ayarlar
+ Temel ayarlar
Rapor Türü
- Dosya adı
+ Dosya Adı
Grafik Birim
- Basit rapor ayarları
+ Temel rapor ayarları
Rapor Modeli
@@ -4768,25 +6191,43 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Form Sayfası
- Veri Çek
+ Veri Çekme
Verileri Bas
+
+ Rapor Adı
+
Rapor Türü
+
+ Grup Sütunu Seç
+
+
+ Gruplama
+
+
+ Liste Düzeni
+
+
+ Rapor Düzeni
+
+
+ Tablo Düzeni
+
- Veri Modelini Çek
+ Veri Modeli Çek
Komut Metni
- [Bu metni silip yerine geçerli bir SQL sorgusu girin]
+ [Bu metni silip yerine geçerli bir SQL String girin]
- İtme Veri Modeli
+ Veri Modeli Bas
Mevcut Alanlar
@@ -4798,31 +6239,31 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Sonuçları Kaydet (Şema ve Veriler)
- Sonuçları Kaydet(Şema(*.xsd) halinde)
+ Sonuçları Kaydet(Sadece şema)
Sorgu Sonucunu Göster
- Sekme &Ekle
+ Sekme Ekle
- Sekmeyi &Sil
+ Sekmeyi Sil
- "${TabHeader}" sekmesini gerçekten silmek istiyor musunuz(bu ayrıca sekmedeki bütün öğeleride silecektir)?
+ "${TabHeader}" sekmesini gerçekten silmek istiyor musunuz(ayrıca sekmedeki bütün öğelerde silinecektir)?
- Öğeyi &Sil
+ Öğeyi Sil
- "${TabItem}" yi gerçekten silmek istiyor musunuz?
+ "${TabItem}" öğesini gerçekten silmek istiyor musunuz?
- Sekmeyi &YenidenAdlandır
+ Sekmeyi Yeniden Adlandır
- Öğeyi &YenidenAdlandır
+ Öğeyi Yeniden Adlandır
Yazarları Göster
@@ -4831,13 +6272,13 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Yazarlar
- Değişiklikler Günlüğünü Göster
+ Günlüğü Göster
- DeğişimKaydı
+ Günlük
- Bizimle irtibat geçin
+ Bize Ulaşın
Yardım Aranıyor
@@ -4849,7 +6290,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Proje Seç
- Yer
+ Konum
DeÄŸiÅŸtirilmiÅŸ
@@ -4867,31 +6308,34 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Başlangıç Sayfası
- YER
+ INS
- ÜYZ
+ OVR
- sat ${Line} süt ${Column} ha ${Character}
+ satır ${Line} sütun ${Column} ${Character}
Çeşitli
- Kur
+ Kurulum
Windows Uygulamaları
- ConfigurationElement gerçeklemesi yapan sınıf.
+ Yapılandırma Elemanı Gerçekleştirme Sınıfı.
+
+
+ Yapılandırma Elemanı
- ConfigurationElementCollection 'den türeme sınıf.
+ Yapılandırma Eleman Koleksiyonundan türeme sınıf.
- Nesne Yığını Ayarları
+ Yapılandırma Elemanı Koleksiyonu
ConfigurationSection gerçeklemesi yapan sınıf
@@ -4911,8 +6355,14 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
BoÅŸ Dosya
+
+ Yeni bir istisna Sınıf oluştur.
+
+
+ İstisna
+
- Bir Gtk# uygulaması için bir pencere
+ Bir Gtk# uygulaması için pencere
Gtk# Penceresi
@@ -4930,7 +6380,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Boş bir HTML dosyası oluşturur.
- Boş bir arayüz tanımlaması.
+ Boş bir arayüz tanımlama.
Arayüz
@@ -4942,22 +6392,22 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Modül
- "İnşâ" hedefi boş olan bir MSBuild dosyası oluşturur.
+ Boş bir "Derleme" hedefi ile bir MSBuild dosyası oluşturur.
MSBuild dosyası
- "Benim" isim boşluğunu uzatan sınıf için bir şablon.
+ "My" ad alanını uzatan sınıf için bir şablon.
- "Benim" uzantılarım
+ "My" uzantılar
- Yeni bir NAnt inşâ dosyası oluşturur.
+ Yeni bir NAnt derleme dosyası oluşturur.
- NAnt inşâ dosyası
+ NAnt derleme dosyası
'#if TEST ... #endif' ekle
@@ -4972,10 +6422,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Eğer doğru ise, kur kodu üretilecek.
- Yok etme kodu ekle
+ Yıkma kodu ekle
- Eğer doğru ise, yok etme kodu üretilecek.
+ Eğer doğru ise, yıkma kodu üretilecek.
İçerik
@@ -4983,6 +6433,9 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Seçenekler
+
+ Uygulamanız son açılan dosyaları depolamak için Yapılandırma Koleksiyonunu kullanır.
+
Son açılan dosyalar
@@ -4990,10 +6443,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
boş bir kaynak dosyası oluşturur
- Kaynak dosyayı boşalt
+ Boş kaynak dosyası
- Bu sınıf sürekli nesnelere kolay erişimi tanımlar.
+ Bu sınıf kalıcı özelliklere kolay erişimi tanımlar.
Eklenti Seçenekleri
@@ -5008,31 +6461,31 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Bir #D seçenek paneli.
- Ayar Paneli
+ Seçenek Paneli
- Çeşitli olaylar için kullanılabilecek bir komut.
+ Çeşitli durumlar için kullanılabilecek bir komut.
Basit Komut
- Bir #D tepsi içeriği (örneğin #D kaşifleri).
+ Bir #D ortam içeriği (örneğin #D gözcüleri).
- BoÅŸ Tepsi
+ BoÅŸ Ortam
- Bir #D görünüm içeriği ( örneğin metin düzenleyici yada kaynak düzenleyici).
+ Bir #D görünüm içeriği ( örneğin metin düzenleyici veya kaynak düzenleyici).
Boş Görünüm
- 'Tek sınıf' türü bir sınıf
+ Singleton deseni izleyen bir sınıf.
- Tek Sınıf
+ Singleton Sınıf
Equals() ve GetHashCode() gerçeklemelerini içeren bir yapı belirlemesi.
@@ -5040,8 +6493,14 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Yapı
+
+ Equals() and GetHashCode()içeren bir yapı bildirimi uygulanır.
+
+
+ Yapı
+
- Metin dosyasını boşalt
+ Boş metin dosyası
Yeni bir metin dosyası oluşturur.
@@ -5059,10 +6518,16 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
ASP.NET Web Kontrolü
- WEb Sayfası: arkasında kod ile .aspx sayfası
+ Web Form: arka kod ile .aspx sayfası
- ASP.NET Web Sayfası
+ ASP.NET Web Form
+
+
+ Arka kod ile ASP.NET Web İşleyici Oluştur.
+
+
+ ASP.NET Web İşleyici
ASMX Web Servisi için Bileşen Çatısı
@@ -5107,10 +6572,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
WPF Penceresi
- WiX için boş parça dosyası
+ WiX için boş bölüm dosyası
- Boş WiX Parça Dosyası
+ Boş WiX Bölüm Dosyası
BoÅŸ bir kurulum penceresi oluÅŸturur.
@@ -5119,7 +6584,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
BoÅŸ Kurulum Penceresi
- Üzerine bazı kontroller olan kurulum penceresi oluşturur.
+ Üzerinde bazı varsayılan kontroller olan kurulum penceresi oluşturur.
Kur DiyaloÄŸu
@@ -5134,16 +6599,16 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
BoÅŸ bir kurulum projesi oluÅŸturur.
- BoÅŸ Kur Projesi
+ BoÅŸ Kurulum Projesi
- Uygulamanız için bir uyg.config dosyası oluşturur. Eğer bu proje çalıştırabilir ise MSBuild uygadı.exe.config olarak değiştirir.
+ Uygulamanız için bir uygulama.config dosyası oluşturulur. Eğer bu proje çalıştırabilir ise MSBuild uygulamaadı.exe.config olarak değiştirir.
- Uyg.Ayar Dosyası
+ Uyg.Config Dosyası
- XML dosyasını boşalt
+ Boş XML dosyası
Boş bir XML dosyası oluşturur.
@@ -5161,16 +6626,16 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
XML Kullanıcı Kontrolü
- Projeleri olmayan boş bir çözüm olşturur.
+ Projesiz boş bir çözüm oluşturur.
Boş çözüm
- Başka uygulamaların içinde kullanılabilen sınıflar oluşturan bir proje.
+ Başka uygulamalarda kullanılabilen sınıflar oluşturan bir proje.
- Sınıf Kütüphanesi
+ Sınıf Kitaplığı
Komut satırı uygulaması oluşturan proje.
@@ -5178,6 +6643,12 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Konsol Uygulaması
+
+ Yönetilmeyen(yerli) kodlu komut satırı uygulamasına sahip bir proje oluşturur.
+
+
+ Yönetilmeyen konsol projesi
+
Direct3D arayüzlü uygulama yapabilmek için bir proje.
@@ -5185,25 +6656,31 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Direct3D uygulaması
- BoÅŸ proje
+ BoÅŸ bir proje.
BoÅŸ Proje
- Glade# uygulaması oluşturan proje
+ Glade# uygulaması oluşturan bir proje
Glade# Uygulaması
- Gtk# uygulaması oluşturan proje.
+ Gtk# uygulaması oluşturan bir proje
Gtk# Uygulaması
+
+ Windows, Silverlight, Windows Phone ve Xbox kullanılabilir Kitaplığı.
+
+
+ Taşınabilir Sınıf Kitaplığı
+
- Windows Installer oluşturabilmek için bir proje
+ MSI Installer oluşturabilmek için bir Windows Installer projesi.
Kurulum Projesi
@@ -5226,6 +6703,12 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Araçlar menüsü girişi
+
+ Bir Silverlight uygulaması oluşturan bir proje.
+
+
+ Silverlight Uygulaması
+
Görev çubuğuna simge koyan bir uygulama oluşturan proje
@@ -5242,13 +6725,13 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
ASP.net web uygulaması
- ASP.NET Web sayfası projesi
+ ASP.net Web sayfası projesi
- ASP.NET Web Hizmeti oluÅŸturan bir proje.
+ ASP.NET Web Servisi oluÅŸturan bir proje.
- ASP.NET Web hizmeti
+ ASP.NET Web Servisi
Windows arayüzlü bir uygulama oluşturan proje.
@@ -5269,10 +6752,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
WPF Uygulaması
- Tek seyrüsefer sayfası olan basit bir WPF uygulaması oluşturur.
+ Tek gezinme sayfası olan basit bir WPF uygulaması oluşturur.
- WPF Seyrüsefer Uygulaması
+ WPF Gezinme Uygulaması
Rapor Sihirbazını kullanarak yeni rapor oluştur
@@ -5280,20 +6763,23 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Kenarçubuğu Yapılandır...
+
+ Analiz
+
- İnşâ
+ Derle
- İnşâyı İptal Et
+ Derlemeyi İptal Et
- İptal
+ Kesme
- ${CurrentProjectName} İnşa et
+ ${CurrentProjectName} Derle
- Çözümü İnşâ et
+ Çözümü Derle
${CurrentProjectName} Temizle
@@ -5302,19 +6788,19 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Çözümü Temizle
- Konfigürasyon/platform düzenle
+ Yapılandırmalar/platformlar düzenle
${CurrentProjectName} Yayınla
- Çözümü Yaınla
+ Çözümü Yayınla
- ${CurrentProjectName} Yeniden inÅŸa et
+ ${CurrentProjectName} Yeniden derle
- Çözümü Yeniden İnşâ et
+ Çözümü Yeniden Derle
Yapılandırmayı ayarla
@@ -5326,10 +6812,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Hata Ayıkla
- İşleme Katıl...
+ İşleme Ekle...
- Duraksa
+ Duraksat
Hata ayıklama işlemini duraksat
@@ -5338,13 +6824,16 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Hata ayıklamaya devam et
- İşlemin yürütmesine devam eder.
+ İşlemin yürütülmesine devam edilir.
Bırak
- Programın .NET Framework sürüm numarası bulunamadı. Programın yönetilen bileşke olup-olmadığını kontrol edin.
+ Programın .NET Framework sürüm numarası bulunamadı. Programın yönetilen derleme olup olmadığını kontrol edin.
+
+
+ İşleme eklenemiyor.
İşlem başlatılamıyor.
@@ -5353,7 +6842,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Hata ayıklama işlemi sürdüğünden eylem gerçekleştirilemedi.
- Çekirdek hata ayıklayıcısı aktif olduğundan SharpDevelop hata ayıklayıcısı başlatılamaz. Çekirdek hata ayıklayıcısını kapatmak için Boot.ini dosyasındaki "/debug"i kaldırın ve bilgisayarı yeniden başlatın.
+ Çekirdek hata ayıklayıcısı aktif olduğundan SharpDevelop hata ayıklayıcısı başlatılamaz. Çekirdek hata ayıklayıcısını kapatmak için Boot.ini dosyasındaki "/debug" anahtarını kaldırın ve bilgisayarı yeniden başlatın.
.NET Framework 1.0 a ait uygulamaların hata ayıklama işlemleri için destek verilmiyor.
@@ -5362,28 +6851,34 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Hata ayıklama safhasına geçmediğiniz için bu özelliği kullanamazsınız.
- İşleme ara verdiğiniz için bu komutunuz yerine getirilemiyor.
+ İşleme ara verdiğiniz için bu eylem gerçekleştirilemiyor.
- İşlem yürütülüyor olduğu için bu komutunuz yerine getirilemiyor.
+ İşlem yürütüldüğü için bu eylem gerçekleştirilemiyor.
+
+
+ Bütün kesme noktalarını kaldır
+
+
+ Önceki derlemeyi çalıştır
- Hata ayıklayıcı olmadan çalıştır
+ Hata ayıklamadan çalıştır
Programı normal olarak çalıştırır.
- İçeri atla
+ İçeri gir
İçeri gir
- Dışa atla
+ Dışarı çık
- Dışına Çık
+ Dışarı çık
Üstünden Atla
@@ -5395,28 +6890,28 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
İşlemi durdur
- Şu anki süreci durdurur ve hata ayıklamayı sona erdirir.
+ Mevcut süreci durdurur ve hata ayıklamayı sona erdirir.
- Durma İşareti
+ Kesme noktası İşareti
- &Düzen
+ Düzen
- &Kopyala
+ Kopyala
- Seçili kısmı panoya kopyala
+ Seçimi panoya kopyala
- &Kes
+ Kes
- Seçili kısmı panoya taşı
+ Seçimi panoya taşı
- &Sil
+ Sil
Sil
@@ -5431,10 +6926,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Bütün katlamaları tersine çevir
- Katlamayı ters çevir
+ Katlamayı tersine çevir
- &Biçimlendir
+ Biçimlendir
Büyük harfe çevir
@@ -5452,10 +6947,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Küçük Harfe
- Öndeki boşlukları kaldır
+ Öndeki Boşlukları Kaldır
- İzleyen Boşlukları Kaldır
+ Takipeden Boşlukları Kaldır
Satırları Sırala...
@@ -5473,76 +6968,79 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
YerleÅŸtir
- &Yapıştır
+ Yapıştır
Yorum olarak kopyala
- Metin olarak kopyala
+ String olarak kopyala
Panodan metni yapıştır
- &Yinele
+ Yinele
Son geri alma iÅŸlemini yinele
- Tümünü &Seç
+ Tümünü Seç
- &Geri al
+ Geri al
Son iÅŸlemi geri al
- &Sözcük Sayısı…
+ Sözcük Sayısı…
- &Dosya
+ Dosya
- Son izlenen dosyalar listesini sil
+ Son dosyaların listesini sil
- Açılan projeler geçmişini sil
+ Son projeler listesini sil
- &Kapat
+ Kapat
- &Dosya
+ Dosya
- &Çözüm
+ Çözüm
- Tüm Belgeleri Ka&pat
+ Tüm Belgeleri Kapat
- Çı&k
+ Çık
- &Yeni
+ Yeni
- &Dosya...
+ Dosya...
Yeni tampon aç
+
+ Proje...
+
Çözüm...
- &Aç
+ Aç
- &Dosya
+ Dosya
Tamponu disk'den aç
@@ -5554,58 +7052,61 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Proje/Çözüm Aç
- &Yazdır
+ Yazdır
Baskı Önizleme
- En son &Dosyalar
+ En son Dosyalar
- En Son P&rojeler
+ En Son Projeler
- Dosyayı &tekrar yükle
+ Dosyayı tekrar yükle
- &Kaydet
+ Kaydet
- Åžu anki tamponu kaydet
+ Mevcut tamponu kaydet
- Tümünü K&aydet
+ Tümünü Kaydet
- Şu anki açık bütün tamponları kaydet
+ Mevcut açık tüm tamponları kaydet
- Faklı Kaydet
+ Farklı Kaydet
+
+
+ Kodlama ile kaydet
- B&içim
+ Biçim
- &Hizala
+ Hizala
- Dipler
+ Alt kenarlar
- &Ortaya
+ Merkezler
- &Sola
+ Sol kenarlar
- SaÄŸa daya
+ SaÄŸ kenarlar
Izgaraya
- Yukarılar
+ Üst kenarlar
Ortalar
@@ -5614,10 +7115,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Formda ortala
- &Yatay
+ Yatay
- &Düşey
+ Düşey
Yatay BoÅŸluk
@@ -5626,7 +7127,7 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Öne Al
- &Kaldır
+ Kaldır
Azalt
@@ -5662,19 +7163,19 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Her ikiside
- &Yükseklik
+ Yükseklik
- &GeniÅŸlik
+ GeniÅŸlik
- Izgaraya uydur
+ Izgara ölçüsü
Büyük simgeleri göster
- &Özellikler
+ Özellikler
Sekme sırasını göster
@@ -5695,10 +7196,10 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
EÅŸitle
- &Yardım
+ Yardım
- &Hakkında...
+ Hakkında...
Yardım içeriği
@@ -5707,16 +7208,16 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Dinamik Yardım
- &GPL...
+ GPL...
- &BeniOku...
+ BeniOku...
Kodlama Tarzı Rehberi
- &Günün İpucu
+ Günün İpucu...
Yardım Konuları
@@ -5725,79 +7226,82 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Web
- Bir Öncekine Git
+ Geriye Git
- Seyrüsefer Geçmişini Temizle
+ Gezinti Geçmişini Temizle
- Bir Sonrakine Git
+ Sonrakine Git
- &Proje
+ Proje
Proje Seçenekleri
- Yeniden Düzenleme
+ Yeniden Düzenle
- Şu anki projei inşâ eder.
+ Mevcut projeyi derler.
+
+
+ Mevcut çözümdeki tüm projeleri derler.
- Etkin projeyi yada tamponu inşâ et(eğer bir proje açık değilse)(otomatik kayıt yapar)
+ Açık projeyi yada tamponu derle(eğer proje açık değilse)(kendiliğinden kayıt yapar)
- Projeyi inşâ edebilmek için hata ayıklayıcıyı durdurmanız gerekir. Hata ayıklamayı durdurmak istiyor musunuz?
+ Projeyi derleyebilmek için hata ayıklayıcıyı durdurmanız gerekir. Hata ayıklamayı durdurmak istiyor musunuz?
Hata Ayıklamayı Durdur
- &Çalıştır
+ Çalıştır
Derlenmiş exe 'yi çalıştır(yeniden derler)
- &Ara
+ Ara
- Bütün Yer İmlerini Temizle
+ Tüm Yer İmlerini Temizle
- Şu anki tampondaki bütün yer imlerini temizle
+ Mevcut tampondaki tüm yer imlerini temizler
- &Bul...
+ Bul...
- &Sonrakini Bul
+ Sonrakini Bul
- &Secili metnin sonraki eÅŸini bul
+ Sonraki seçimi bul
- Satır Numarasına Git...
+ Git...
- Denkleşen Küme İşaretine Git
+ EÅŸleÅŸen Paranteze Git
Artan Arama
- Bir sonraki yer imi
+ Sonraki yer imi
- Bir sonraki yer imine git
+ Sonraki yer imine git
- Bir Önceki Yer İmi
+ Önceki Yer İmi
- Bir önceki yer imine git
+ Önceki yer imine git
DeÄŸiÅŸtir...
@@ -5809,20 +7313,20 @@ Kaynak dosyaları buna göre yeniden adlandırıldı/taşındı.
Yer imlerini ters çevir
- Şu anki satıra yer imi koy/kaldır
+ Mevcut satıra yer imi koy/kaldır
- &Araçlar
+ Araçlar
- &Kodu çevir
+ Kodu çevir
- Bu araç için kullanılacak olan değişkenleri giriniz:
+ Araç argümanlarını giriniz:
- Harici program çalıştırma isteği başarısız oldu.
-Program:
+ Harici program çalıştırma başarısız.
+Başlatma hatası:
Çıkış Kodu:
@@ -5837,28 +7341,28 @@ Program:
Yeni GUID ekle
- &Seçenekler...
+ Seçenekler...
- Seri XML belgesi
+ Hızlı XML belgesi
- Düzenli İfadeler Alet kutusu
+ Düzenli İfadeler Araçseti
- &Görünüm
+ Görünüm
Hata Ayıklama
- &Tam ekran
+ Tam ekran
- Kur
+ Kurulum
- Diyaloglar
+ İletişim Kutuları
Dosyalar
@@ -5867,22 +7371,22 @@ Program:
Başlangıç sayfasını göster
- &Araçlar
+ Araçlar
- &Pencere
+ Pencere
- &Sonraki Pencere
+ Sonraki Pencere
- &Önceki Pencere
+ Önceki Pencere
- &Böl
+ Böl
- SharpDevelop Tarafından Oluşturulmuşdur.
+ SharpDevelop tarafından düzenlendi.
Tarih:
@@ -5897,16 +7401,16 @@ Program:
Kullanıcı:
- Ara Bellek Seçenekleri
+ Tampon Seçenekleri
Bölgeyi yorumla
- &Kopyala
+ Kopyala
- K&es
+ Kes
Dosya modu
@@ -5915,7 +7419,7 @@ Program:
Girinti
- &Yapıştır
+ Yapıştır
Yeniden Düzenleme
@@ -5924,7 +7428,6 @@ Program:
Bölgeyi yorumlama
- Bu kaynak kullanılmıyor. Bu kaynağın amacı, çeviri veritabanını kontrol etmektir. Bu yazıda bir satır sonu karakteri
-var.
+ Bu kaynak kullanılamıyor. Bu kaynağın amacı, çeviri veritabanını test etmektir. Bu yazıda bir satır sonu karakteri var.
\ No newline at end of file
diff --git a/data/templates/packages/Modernizr.1.7.nupkg b/data/templates/packages/Modernizr.1.7.nupkg
deleted file mode 100644
index df76835723..0000000000
Binary files a/data/templates/packages/Modernizr.1.7.nupkg and /dev/null differ
diff --git a/data/templates/packages/Modernizr.2.5.3.nupkg b/data/templates/packages/Modernizr.2.5.3.nupkg
new file mode 100644
index 0000000000..98ade6d191
Binary files /dev/null and b/data/templates/packages/Modernizr.2.5.3.nupkg differ
diff --git a/data/templates/packages/jQuery.1.6.1.nupkg b/data/templates/packages/jQuery.1.6.1.nupkg
deleted file mode 100644
index 7591b33c89..0000000000
Binary files a/data/templates/packages/jQuery.1.6.1.nupkg and /dev/null differ
diff --git a/data/templates/packages/jQuery.1.7.2.nupkg b/data/templates/packages/jQuery.1.7.2.nupkg
new file mode 100644
index 0000000000..033bae95d0
Binary files /dev/null and b/data/templates/packages/jQuery.1.7.2.nupkg differ
diff --git a/data/templates/project/CSharp/ConsoleProject.xpt b/data/templates/project/CSharp/ConsoleProject.xpt
index 9d86c7158b..e70d36a92d 100644
--- a/data/templates/project/CSharp/ConsoleProject.xpt
+++ b/data/templates/project/CSharp/ConsoleProject.xpt
@@ -17,7 +17,7 @@
-
+
diff --git a/data/templates/project/CSharp/FormsProject.xpt b/data/templates/project/CSharp/FormsProject.xpt
index da5aa5f0b1..cb5f940129 100644
--- a/data/templates/project/CSharp/FormsProject.xpt
+++ b/data/templates/project/CSharp/FormsProject.xpt
@@ -18,7 +18,7 @@
-
+
diff --git a/data/templates/project/CSharp/MvcRazorProject.xpt b/data/templates/project/CSharp/MvcRazorProject.xpt
index 37e610e87b..d517855fe8 100644
--- a/data/templates/project/CSharp/MvcRazorProject.xpt
+++ b/data/templates/project/CSharp/MvcRazorProject.xpt
@@ -273,8 +273,8 @@ Aliquam suscipit tellus vel nunc elementum fringilla.
@ViewBag.Title
-
-
+
+
@@ -300,8 +300,8 @@ Aliquam suscipit tellus vel nunc elementum fringilla.
-
-
+
+
]]>
diff --git a/data/templates/project/CSharp/MvcWebProject.xpt b/data/templates/project/CSharp/MvcWebProject.xpt
index bd14354e5e..93d614f7d1 100644
--- a/data/templates/project/CSharp/MvcWebProject.xpt
+++ b/data/templates/project/CSharp/MvcWebProject.xpt
@@ -280,8 +280,8 @@ namespace ${StandardNamespace}
" rel="stylesheet" type="text/css">
-
-
+
+
@@ -307,8 +307,8 @@ namespace ${StandardNamespace}
-
-
+
+
]]>
diff --git a/data/templates/project/CSharp/NotifyIcon.xpt b/data/templates/project/CSharp/NotifyIcon.xpt
index 96f8a8436f..728cc1eb76 100644
--- a/data/templates/project/CSharp/NotifyIcon.xpt
+++ b/data/templates/project/CSharp/NotifyIcon.xpt
@@ -18,7 +18,7 @@
-
+
diff --git a/data/templates/project/CSharp/PortableAssemblyInfo.cs b/data/templates/project/CSharp/PortableAssemblyInfo.cs
new file mode 100644
index 0000000000..f33ea31a7c
--- /dev/null
+++ b/data/templates/project/CSharp/PortableAssemblyInfo.cs
@@ -0,0 +1,27 @@
+#region Using directives
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+#endregion
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("${ProjectName}")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("${ProjectName}")]
+[assembly: AssemblyCopyright("Copyright ${DATE:yyyy}")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all the values or you can use the default the Revision and
+// Build Numbers by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.*")]
diff --git a/data/templates/project/CSharp/PortableLibrary.xpt b/data/templates/project/CSharp/PortableLibrary.xpt
new file mode 100644
index 0000000000..61a2c7f9f2
--- /dev/null
+++ b/data/templates/project/CSharp/PortableLibrary.xpt
@@ -0,0 +1,58 @@
+
+
+
+
+
+ ${res:Templates.Project.PortableLibrary.Name}
+ C#
+ C#.Project.Library
+ ${res:Templates.Project.PortableLibrary.Description}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Library
+ Properties
+ v4.0
+ Profile1
+
+
+
+ {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+
+
+
+
+
+
+
+
+
+
+ /// Description of MyClass.
+ ///
+ public class MyClass
+ {
+
+ }
+}]]>
+
+
+
+
diff --git a/data/templates/project/CSharp/Service.xpt b/data/templates/project/CSharp/Service.xpt
index 4b09ccbd58..f3c5c63ea1 100644
--- a/data/templates/project/CSharp/Service.xpt
+++ b/data/templates/project/CSharp/Service.xpt
@@ -19,7 +19,7 @@
-
+
diff --git a/data/templates/project/CSharp/WPFApplication.xpt b/data/templates/project/CSharp/WPFApplication.xpt
index 290e13a564..2f31f78e58 100644
--- a/data/templates/project/CSharp/WPFApplication.xpt
+++ b/data/templates/project/CSharp/WPFApplication.xpt
@@ -16,7 +16,7 @@
-
+
diff --git a/data/templates/project/CSharp/WPFNavigationApplication.xpt b/data/templates/project/CSharp/WPFNavigationApplication.xpt
index 10d399d9b1..ee79449a7c 100644
--- a/data/templates/project/CSharp/WPFNavigationApplication.xpt
+++ b/data/templates/project/CSharp/WPFNavigationApplication.xpt
@@ -16,7 +16,7 @@
-
+
diff --git a/data/templates/project/ComplexExample.xpt.test b/data/templates/project/ComplexExample.xpt.test
index d2545654e5..65cb7aab41 100644
--- a/data/templates/project/ComplexExample.xpt.test
+++ b/data/templates/project/ComplexExample.xpt.test
@@ -16,6 +16,8 @@
+
+
@@ -33,7 +35,17 @@
-
+
+
+
+
+
+
+
+
+
+
+
WinExe
@@ -123,11 +135,7 @@ End Class
-
-
-
-
-
+
diff --git a/data/templates/project/VB/ConsoleProject.xpt b/data/templates/project/VB/ConsoleProject.xpt
index 84efc781d8..ecf8df5a51 100644
--- a/data/templates/project/VB/ConsoleProject.xpt
+++ b/data/templates/project/VB/ConsoleProject.xpt
@@ -20,7 +20,7 @@
-
+
diff --git a/data/templates/project/VB/FormsProject.xpt b/data/templates/project/VB/FormsProject.xpt
index d155e0ea58..7ecdb77796 100644
--- a/data/templates/project/VB/FormsProject.xpt
+++ b/data/templates/project/VB/FormsProject.xpt
@@ -19,7 +19,7 @@
-
+
WinExe
Properties
diff --git a/data/templates/project/VB/MvcRazorProject.xpt b/data/templates/project/VB/MvcRazorProject.xpt
index bd94faf848..87ba3a7275 100644
--- a/data/templates/project/VB/MvcRazorProject.xpt
+++ b/data/templates/project/VB/MvcRazorProject.xpt
@@ -265,8 +265,8 @@ Aliquam suscipit tellus vel nunc elementum fringilla.
@ViewData("Title")
-
-
+
+
@@ -292,8 +292,8 @@ Aliquam suscipit tellus vel nunc elementum fringilla.
-
-
+
+
]]>
diff --git a/data/templates/project/VB/MvcWebProject.xpt b/data/templates/project/VB/MvcWebProject.xpt
index f472bafb05..5be3b65b5a 100644
--- a/data/templates/project/VB/MvcWebProject.xpt
+++ b/data/templates/project/VB/MvcWebProject.xpt
@@ -272,8 +272,8 @@ End Class
" rel="stylesheet" type="text/css">
-
-
+
+
@@ -299,8 +299,8 @@ End Class
-
-
+
+
]]>
diff --git a/data/templates/project/VB/NotifyIcon.xpt b/data/templates/project/VB/NotifyIcon.xpt
index 7fd00bbc6f..cd79b206b6 100644
--- a/data/templates/project/VB/NotifyIcon.xpt
+++ b/data/templates/project/VB/NotifyIcon.xpt
@@ -18,7 +18,7 @@
-
+
diff --git a/data/templates/project/VB/Service.xpt b/data/templates/project/VB/Service.xpt
index b6101d2692..6095f3a1c0 100644
--- a/data/templates/project/VB/Service.xpt
+++ b/data/templates/project/VB/Service.xpt
@@ -18,7 +18,7 @@
-
+
Exe
Properties
diff --git a/data/templates/project/VB/WPFApplication.xpt b/data/templates/project/VB/WPFApplication.xpt
index 17f5f1ad73..5cb8bf554c 100644
--- a/data/templates/project/VB/WPFApplication.xpt
+++ b/data/templates/project/VB/WPFApplication.xpt
@@ -16,7 +16,7 @@
-
+
diff --git a/data/templates/project/VB/WPFNavigationApplication.xpt b/data/templates/project/VB/WPFNavigationApplication.xpt
index c646f45b0a..643ffac041 100644
--- a/data/templates/project/VB/WPFNavigationApplication.xpt
+++ b/data/templates/project/VB/WPFNavigationApplication.xpt
@@ -16,7 +16,7 @@
-
+
diff --git a/samples/MSTest/MSTest.SharpDevelop.Tests/MSTest.SharpDevelop.Tests.csproj b/samples/MSTest/MSTest.SharpDevelop.Tests/MSTest.SharpDevelop.Tests.csproj
new file mode 100644
index 0000000000..8334f2708a
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop.Tests/MSTest.SharpDevelop.Tests.csproj
@@ -0,0 +1,69 @@
+
+
+
+ {51D56190-67B7-4A49-BA0A-24010460CCC6}
+ Debug
+ x86
+ Library
+ MSTest.SharpDevelop.Tests
+ MSTest.SharpDevelop.Tests
+ v4.0
+ Properties
+
+
+ x86
+
+
+ bin\Debug\
+ True
+ Full
+ False
+ True
+ DEBUG;TRACE
+
+
+ bin\Release\
+ False
+ None
+ True
+ False
+ TRACE
+
+
+
+ ..\..\..\bin\ICSharpCode.Core.dll
+
+
+ ..\..\..\bin\ICSharpCode.SharpDevelop.dll
+
+
+ ..\..\..\bin\ICSharpCode.SharpDevelop.Dom.dll
+
+
+ ..\..\..\src\Tools\NUnit\nunit.framework.dll
+
+
+ ..\..\..\src\Libraries\RhinoMocks\Rhino.Mocks.dll
+
+
+
+ 3.5
+
+
+
+ ..\..\..\AddIns\Analysis\UnitTesting\UnitTesting.dll
+
+
+
+
+
+
+
+
+
+ {8DF3A610-47F9-4448-B455-952BD57CB5CC}
+ MSTest.SharpDevelop
+
+
+
+
\ No newline at end of file
diff --git a/samples/MSTest/MSTest.SharpDevelop.Tests/MSTestFrameworkTests.cs b/samples/MSTest/MSTest.SharpDevelop.Tests/MSTestFrameworkTests.cs
new file mode 100644
index 0000000000..be70c9d48c
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop.Tests/MSTestFrameworkTests.cs
@@ -0,0 +1,338 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+
+using ICSharpCode.MSTest;
+using ICSharpCode.SharpDevelop.Dom;
+using ICSharpCode.SharpDevelop.Project;
+using ICSharpCode.UnitTesting;
+using NUnit.Framework;
+using Rhino.Mocks;
+
+namespace MSTest.SharpDevelop.Tests
+{
+ [TestFixture]
+ public class MSTestFrameworkTests
+ {
+ MSTestFramework testFramework;
+ IProject fakeProject;
+
+ [SetUp]
+ public void Init()
+ {
+ testFramework = new MSTestFramework();
+
+ fakeProject = MockRepository.GenerateStub();
+ fakeProject.Stub(p => p.SyncRoot).Return(fakeProject);
+ }
+
+ void AddReferencesToProject(params string[] referenceNames)
+ {
+ List projectItems = referenceNames
+ .Select(name => new ReferenceProjectItem(fakeProject, name) as ProjectItem)
+ .ToList();
+
+ AddItemsToProject(projectItems);
+ }
+
+ void AddItemsToProject(List projectItems)
+ {
+ fakeProject
+ .Stub(project => project.Items)
+ .Return(new ReadOnlyCollection(projectItems));
+ }
+
+ void AddFileAndReferenceToProject(string fileName, string reference)
+ {
+ var projectItems = new List();
+ projectItems.Add(new FileProjectItem(fakeProject, ItemType.Compile, fileName));
+ projectItems.Add(new ReferenceProjectItem(fakeProject, reference));
+
+ AddItemsToProject(projectItems);
+ }
+
+ void NoItemsInProject()
+ {
+ AddReferencesToProject();
+ }
+
+ IClass CreateClassWithoutAnyAttributes()
+ {
+ IClass fakeClass = MockRepository.GenerateStub();
+ AddAttributesToClass(fakeClass, new List());
+ return fakeClass;
+ }
+
+ void AddAttributesToClass(IClass fakeClass, List attributes)
+ {
+ fakeClass.Stub(c => c.Attributes).Return(attributes);
+ }
+
+ IClass CreateClassWithAttributes(params string[] attributeNames)
+ {
+ IClass fakeClass = MockRepository.GenerateStub();
+
+ List attributes = CreateAttributes(attributeNames);
+
+ AddAttributesToClass(fakeClass, attributes);
+
+ return fakeClass;
+ }
+
+ List CreateAttributes(params string[] attributeNames)
+ {
+ return attributeNames.Select(name => CreateAttribute(name)).ToList();
+ }
+
+ IAttribute CreateAttribute(string name)
+ {
+ IReturnType returnType = MockRepository.GenerateStub();
+ returnType.Stub(t => t.FullyQualifiedName).Return(name);
+
+ IAttribute attribute = MockRepository.GenerateStub();
+ attribute.Stub(a => a.AttributeType).Return(returnType);
+ return attribute;
+ }
+
+ void MakeClassAbstract(IClass fakeClass)
+ {
+ fakeClass.Stub(c => c.IsAbstract).Return(true);
+ }
+
+ IMethod CreateMethodWithoutAnyAttributes()
+ {
+ IMethod fakeMethod = MockRepository.GenerateStub();
+ AddAttributesToMethod(fakeMethod, new List());
+ return fakeMethod;
+ }
+
+ IMethod CreateMethodWithAttributes(params string[] attributeNames)
+ {
+ IMethod fakeMethod = MockRepository.GenerateStub();
+ List attributes = CreateAttributes(attributeNames);
+ AddAttributesToMethod(fakeMethod, attributes);
+ return fakeMethod;
+ }
+
+ void AddAttributesToMethod(IMethod method, List attributes)
+ {
+ method.Stub(m => m.Attributes).Return(attributes);
+ }
+
+ List GetTestMembersFor(IClass fakeClass)
+ {
+ return testFramework.GetTestMembersFor(fakeClass).ToList();
+ }
+
+ void AddMethodsToClass(IClass fakeClass, List methods)
+ {
+ fakeClass.Stub(c => c.Methods).Return(methods);
+ }
+
+ [Test]
+ public void IsTestProject_NullProject_ReturnsFalse()
+ {
+ bool result = testFramework.IsTestProject(null);
+
+ Assert.IsFalse(result);
+ }
+
+ [Test]
+ public void IsTestProject_ProjectWithMSTestAssemblyReference_ReturnsTrue()
+ {
+ AddReferencesToProject("System", "Microsoft.VisualStudio.QualityTools.UnitTestFramework");
+
+ bool result = testFramework.IsTestProject(fakeProject);
+
+ Assert.IsTrue(result);
+ }
+
+ [Test]
+ public void IsTestProject_ProjectWithoutMSTestAssemblyReference_ReturnsFalse()
+ {
+ NoItemsInProject();
+ bool result = testFramework.IsTestProject(fakeProject);
+
+ Assert.IsFalse(result);
+ }
+
+ [Test]
+ public void IsTestProject_ProjectWithMSTestAssemblyReferenceInUpperCase_ReturnsTrue()
+ {
+ AddReferencesToProject("MICROSOFT.VISUALSTUDIO.QUALITYTOOLS.UNITTESTFRAMEWORK");
+
+ bool result = testFramework.IsTestProject(fakeProject);
+
+ Assert.IsTrue(result);
+ }
+
+ [Test]
+ public void IsTestProject_ProjectWithMSTestAssemblyReferenceAndFileProjectItem_ReturnsTrue()
+ {
+ AddFileAndReferenceToProject("test.cs", "Microsoft.VisualStudio.QualityTools.UnitTestFramework");
+
+ bool result = testFramework.IsTestProject(fakeProject);
+
+ Assert.IsTrue(result);
+ }
+
+ [Test]
+ public void IsTestProject_ProjectWithMSTestAssemblyReferenceUsingFullName_ReturnsTrue()
+ {
+ AddReferencesToProject("Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=2.5.3.9345, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77");
+
+ bool result = testFramework.IsTestProject(fakeProject);
+
+ Assert.IsTrue(result);
+ }
+
+ [Test]
+ public void IsTestClass_ClassHasNoAttributes_ReturnsFalse()
+ {
+ IClass fakeClass = CreateClassWithoutAnyAttributes();
+
+ bool result = testFramework.IsTestClass(fakeClass);
+
+ Assert.IsFalse(result);
+ }
+
+ [Test]
+ public void IsTestClass_ClassHasTestFixtureAttributeMissingAttributePart_ReturnsTrue()
+ {
+ IClass fakeClass = CreateClassWithAttributes("TestClass");
+
+ bool result = testFramework.IsTestClass(fakeClass);
+
+ Assert.IsTrue(result);
+ }
+
+ [Test]
+ public void IsTestClass_ClassHasTestClassAttributeAndIsAbstract_ReturnsFalse()
+ {
+ IClass fakeClass = CreateClassWithAttributes("TestClass");
+ MakeClassAbstract(fakeClass);
+
+ bool result = testFramework.IsTestClass(fakeClass);
+
+ Assert.IsFalse(result);
+ }
+
+ [Test]
+ public void IsTestClass_ClassHasTestClassAttributeIncludingAttributePart_ReturnsTrue()
+ {
+ IClass fakeClass = CreateClassWithAttributes("TestClassAttribute");
+
+ bool result = testFramework.IsTestClass(fakeClass);
+
+ Assert.IsTrue(result);
+ }
+
+ [Test]
+ public void IsTestClass_ClassHasFullyQualifiedMSTestClassAttribute_ReturnsTrue()
+ {
+ IClass fakeClass = CreateClassWithAttributes("Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute");
+
+ bool result = testFramework.IsTestClass(fakeClass);
+
+ Assert.IsTrue(result);
+ }
+
+ [Test]
+ public void IsTestClass_ClassIsNull_ReturnsFalse()
+ {
+ bool result = testFramework.IsTestClass(null);
+
+ Assert.IsFalse(result);
+ }
+
+ [Test]
+ public void IsTestMember_MethodHasNoAttributes_ReturnsFalse()
+ {
+ IMethod method = CreateMethodWithoutAnyAttributes();
+
+ bool result = testFramework.IsTestMember(method);
+
+ Assert.IsFalse(result);
+ }
+
+ [Test]
+ public void IsTestMember_MethodHasTestMethodAttributeWithoutAttributePart_ReturnsTrue()
+ {
+ IMethod method = CreateMethodWithAttributes("TestMethod");
+
+ bool result = testFramework.IsTestMember(method);
+
+ Assert.IsTrue(result);
+ }
+
+ [Test]
+ public void IsTestMember_MethodHasTestMethodAttributeAttribute_ReturnsTrue()
+ {
+ IMethod method = CreateMethodWithAttributes("TestMethodAttribute");
+
+ bool result = testFramework.IsTestMember(method);
+
+ Assert.IsTrue(result);
+ }
+
+ [Test]
+ public void IsTestMember_MethodHasFullyQualifiedMSTestTestMethodAttribute_ReturnsTrue()
+ {
+ IMethod method = CreateMethodWithAttributes("Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute");
+
+ bool result = testFramework.IsTestMember(method);
+
+ Assert.IsTrue(result);
+ }
+
+ [Test]
+ public void IsTestMember_MethodIsNull_ReturnsFalse()
+ {
+ bool result = testFramework.IsTestMember(null);
+
+ Assert.IsFalse(result);
+ }
+
+ [Test]
+ public void IsTestMember_MemberNotMethod_ReturnsFalse()
+ {
+ IMember member = MockRepository.GenerateStub();
+
+ bool result = testFramework.IsTestMember(member);
+
+ Assert.IsFalse(result);
+ }
+
+ [Test]
+ public void GetTestMembersFor_ClassHasNoMethods_ReturnsFalse()
+ {
+ IClass fakeClass = CreateClassWithAttributes("TestClass");
+ AddMethodsToClass(fakeClass, new List());
+
+ List testMembers = GetTestMembersFor(fakeClass);
+
+ Assert.AreEqual(0, testMembers.Count);
+ }
+
+ [Test]
+ public void GetTestMembersFor_ClassHasTwoMethodsAndSecondOneIsTestMethod_ReturnsSecondTestMethodOnly()
+ {
+ IClass fakeClass = CreateClassWithAttributes("TestClass");
+
+ var methods = new List();
+ methods.Add(CreateMethodWithoutAnyAttributes());
+ IMethod testMethod = CreateMethodWithAttributes("TestMethod");
+ methods.Add(testMethod);
+ AddMethodsToClass(fakeClass, methods);
+
+ List testMembers = GetTestMembersFor(fakeClass);
+
+ Assert.AreEqual(1, testMembers.Count);
+ Assert.AreEqual(testMethod, testMembers[0].Member);
+ }
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop.Tests/MSTestResultsTests.cs b/samples/MSTest/MSTest.SharpDevelop.Tests/MSTestResultsTests.cs
new file mode 100644
index 0000000000..c5304011f6
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop.Tests/MSTestResultsTests.cs
@@ -0,0 +1,184 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Xml;
+using ICSharpCode.MSTest;
+using ICSharpCode.SharpDevelop.Dom;
+using ICSharpCode.UnitTesting;
+using NUnit.Framework;
+
+namespace MSTest.SharpDevelop.Tests
+{
+ [TestFixture]
+ public class MSTestResultsTests
+ {
+ MSTestResults testResults;
+
+ void CreateMSTestResults(string xml)
+ {
+ using (var reader = new XmlTextReader(new StringReader(xml))) {
+ testResults = new MSTestResults(reader);
+ }
+ }
+
+ void AssertTestResultsAreEqual(TestResult[] expectedResults)
+ {
+ List expectedResultsAsString = ConvertToStrings(expectedResults);
+ List actualResultsAsString = ConvertToStrings(testResults);
+ CollectionAssert.AreEqual(expectedResultsAsString, actualResultsAsString);
+ }
+
+ List ConvertToStrings(IEnumerable results)
+ {
+ return results.Select(
+ result => String.Format(
+ "Name: {0}, Result: {1}, Message: '{2}', StackTrace: '{3}', StackPosition: {4}",
+ result.Name,
+ result.ResultType,
+ result.Message,
+ result.StackTrace,
+ result.StackTraceFilePosition))
+ .ToList();
+ }
+
+ [Test]
+ public void Results_OneClassWithTwoPassingTestMethods_ReturnsTwoResults()
+ {
+ CreateMSTestResults(oneClassWithTwoPassingTestMethods);
+
+ var expectedResults = new TestResult[] {
+ new TestResult("FooTest.UnitTest1.TestMethod1") {
+ ResultType = TestResultType.Success
+ },
+ new TestResult("FooTest.UnitTest1.TestMethod2") {
+ ResultType = TestResultType.Success
+ },
+ };
+ AssertTestResultsAreEqual(expectedResults);
+ }
+
+ string oneClassWithTwoPassingTestMethods =
+
+@"
+
+
+ These are default test settings for a local test run.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+";
+
+ [Test]
+ public void Results_OneTestMethodThrowsException_ReturnsOneErrorResultWithStackTrace()
+ {
+ CreateMSTestResults(oneTestMethodThrowsException);
+
+ var expectedResults = new TestResult[] {
+ new TestResult("FooTest.UnitTest1.TestMethod1") {
+ ResultType = TestResultType.Failure,
+ Message = "System.ApplicationException: asdfafds",
+ StackTrace = " at FooTest.UnitTest1.TestMethod1() in d:\\projects\\FooTest\\UnitTest1.cs:line 21\r\n",
+ StackTraceFilePosition = new FilePosition(@"d:\projects\FooTest\UnitTest1.cs", 21, 1)
+ }
+ };
+ AssertTestResultsAreEqual(expectedResults);
+ }
+
+ string oneTestMethodThrowsException =
+
+@"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+";
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop.Tests/Properties/AssemblyInfo.cs b/samples/MSTest/MSTest.SharpDevelop.Tests/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000000..cdff605abd
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop.Tests/Properties/AssemblyInfo.cs
@@ -0,0 +1,31 @@
+#region Using directives
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+#endregion
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MSTest.SharpDevelop.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MSTest.SharpDevelop.Tests")]
+[assembly: AssemblyCopyright("Copyright 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// This sets the default COM visibility of types in the assembly to invisible.
+// If you need to expose a type to COM, use [ComVisible(true)] on that type.
+[assembly: ComVisible(false)]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all the values or you can use the default the Revision and
+// Build Numbers by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0")]
diff --git a/samples/MSTest/MSTest.SharpDevelop.sln b/samples/MSTest/MSTest.SharpDevelop.sln
new file mode 100644
index 0000000000..6166e73ff1
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop.sln
@@ -0,0 +1,24 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+# SharpDevelop 4.2.0.8749-Beta 2
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSTest.SharpDevelop", "MSTest.SharpDevelop\MSTest.SharpDevelop.csproj", "{8DF3A610-47F9-4448-B455-952BD57CB5CC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSTest.SharpDevelop.Tests", "MSTest.SharpDevelop.Tests\MSTest.SharpDevelop.Tests.csproj", "{51D56190-67B7-4A49-BA0A-24010460CCC6}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x86 = Debug|x86
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8DF3A610-47F9-4448-B455-952BD57CB5CC}.Debug|x86.Build.0 = Debug|x86
+ {8DF3A610-47F9-4448-B455-952BD57CB5CC}.Debug|x86.ActiveCfg = Debug|x86
+ {8DF3A610-47F9-4448-B455-952BD57CB5CC}.Release|x86.Build.0 = Release|x86
+ {8DF3A610-47F9-4448-B455-952BD57CB5CC}.Release|x86.ActiveCfg = Release|x86
+ {51D56190-67B7-4A49-BA0A-24010460CCC6}.Debug|x86.Build.0 = Debug|x86
+ {51D56190-67B7-4A49-BA0A-24010460CCC6}.Debug|x86.ActiveCfg = Debug|x86
+ {51D56190-67B7-4A49-BA0A-24010460CCC6}.Release|x86.Build.0 = Release|x86
+ {51D56190-67B7-4A49-BA0A-24010460CCC6}.Release|x86.ActiveCfg = Release|x86
+ EndGlobalSection
+EndGlobal
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTest.SharpDevelop.csproj b/samples/MSTest/MSTest.SharpDevelop/MSTest.SharpDevelop.csproj
new file mode 100644
index 0000000000..05165c7eb6
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTest.SharpDevelop.csproj
@@ -0,0 +1,103 @@
+
+
+
+ {8DF3A610-47F9-4448-B455-952BD57CB5CC}
+ Debug
+ x86
+ Library
+ ICSharpCode.MSTest
+ MSTest.SharpDevelop
+ v4.0
+ Properties
+ ..\..\..\AddIns\Samples\MSTest
+ False
+ False
+ 4
+ false
+
+
+ x86
+ False
+ Auto
+ 4194304
+ 4096
+
+
+ true
+ Full
+ False
+ True
+ DEBUG;TRACE
+
+
+ False
+ None
+ True
+ False
+ TRACE
+
+
+
+ ..\..\..\bin\ICSharpCode.Core.dll
+ False
+
+
+ ..\..\..\bin\ICSharpCode.Core.Presentation.dll
+ False
+
+
+ ..\..\..\bin\ICSharpCode.SharpDevelop.dll
+ False
+
+
+ ..\..\..\bin\ICSharpCode.SharpDevelop.Dom.dll
+ False
+
+
+ ..\..\..\bin\ICSharpCode.SharpDevelop.Widgets.dll
+ False
+
+
+
+
+
+ 3.5
+
+
+ 4.0
+
+
+
+ ..\..\..\AddIns\Analysis\UnitTesting\UnitTesting.dll
+ False
+
+
+
+
+
+
+
+
+
+
+ MSTestOptionsPanel.xaml
+ Code
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTest.addin b/samples/MSTest/MSTest.SharpDevelop/MSTest.addin
new file mode 100644
index 0000000000..3049a6c8d0
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTest.addin
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestApplication.cs b/samples/MSTest/MSTest.SharpDevelop/MSTestApplication.cs
new file mode 100644
index 0000000000..62e3985228
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestApplication.cs
@@ -0,0 +1,46 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Diagnostics;
+
+using ICSharpCode.UnitTesting;
+
+namespace ICSharpCode.MSTest
+{
+ public class MSTestApplication
+ {
+ SelectedTests selectedTests;
+ string resultsFileName;
+
+ public MSTestApplication(SelectedTests selectedTests, string resultsFileName)
+ {
+ this.selectedTests = selectedTests;
+ this.resultsFileName = resultsFileName;
+ GetProcessStartInfo();
+ }
+
+ void GetProcessStartInfo()
+ {
+ ProcessStartInfo = new ProcessStartInfo(MSTestOptions.MSTestPath, GetCommandLine());
+ }
+
+ string GetCommandLine()
+ {
+ var commandLine = new MSTestApplicationCommandLine();
+ commandLine.AppendQuoted("testcontainer", selectedTests.Project.OutputAssemblyFullPath);
+ commandLine.AppendQuoted("resultsfile", resultsFileName);
+ commandLine.Append("detail", "errorstacktrace");
+ if (selectedTests.NamespaceFilter != null) {
+ commandLine.Append("test", selectedTests.NamespaceFilter);
+ } else if (selectedTests.Member != null) {
+ commandLine.Append("test", selectedTests.Member.FullyQualifiedName);
+ } else if (selectedTests.Class != null) {
+ commandLine.Append("test", selectedTests.Class.FullyQualifiedName);
+ }
+ return commandLine.ToString();
+ }
+
+ public ProcessStartInfo ProcessStartInfo { get; private set; }
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestApplicationCommandLine.cs b/samples/MSTest/MSTest.SharpDevelop/MSTestApplicationCommandLine.cs
new file mode 100644
index 0000000000..669d88bba7
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestApplicationCommandLine.cs
@@ -0,0 +1,37 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Text;
+
+namespace ICSharpCode.MSTest
+{
+ public class MSTestApplicationCommandLine
+ {
+ StringBuilder commandLine = new StringBuilder();
+
+ public MSTestApplicationCommandLine()
+ {
+ }
+
+ public void Append(string argument, string value)
+ {
+ AppendFormat("/{0}:{1} ", argument, value);
+ }
+
+ public void AppendQuoted(string argument, string value)
+ {
+ AppendFormat("/{0}:\"{1}\" ", argument, value);
+ }
+
+ void AppendFormat(string format, string argument, string value)
+ {
+ commandLine.AppendFormat(format, argument, value);
+ }
+
+ public override string ToString()
+ {
+ return commandLine.ToString();
+ }
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestDebugger.cs b/samples/MSTest/MSTest.SharpDevelop/MSTestDebugger.cs
new file mode 100644
index 0000000000..aa4ad68eee
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestDebugger.cs
@@ -0,0 +1,134 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Diagnostics;
+using System.IO;
+
+using ICSharpCode.SharpDevelop.Debugging;
+using ICSharpCode.UnitTesting;
+
+namespace ICSharpCode.MSTest
+{
+ public class MSTestDebugger : TestRunnerBase
+ {
+ IUnitTestDebuggerService debuggerService;
+ IUnitTestMessageService messageService;
+ IDebugger debugger;
+ string resultsFileName;
+
+ public MSTestDebugger()
+ : this(
+ new UnitTestDebuggerService(),
+ new UnitTestMessageService())
+ {
+ }
+
+ public MSTestDebugger(
+ IUnitTestDebuggerService debuggerService,
+ IUnitTestMessageService messageService)
+ {
+ this.debuggerService = debuggerService;
+ this.messageService = messageService;
+ this.debugger = debuggerService.CurrentDebugger;
+ }
+
+ public override void Start(SelectedTests selectedTests)
+ {
+ ProcessStartInfo startInfo = GetProcessStartInfo(selectedTests);
+ if (IsDebuggerRunning) {
+ if (CanStopDebugging()) {
+ debugger.Stop();
+ Start(startInfo);
+ }
+ } else {
+ Start(startInfo);
+ }
+ }
+
+ protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests)
+ {
+ resultsFileName = new MSTestResultsFileName(selectedTests).FileName;
+ CreateDirectoryForResultsFile();
+ var mstestApplication = new MSTestApplication(selectedTests, resultsFileName);
+ return mstestApplication.ProcessStartInfo;
+ }
+
+ public bool IsDebuggerRunning {
+ get { return debuggerService.IsDebuggerLoaded && debugger.IsDebugging; }
+ }
+
+ bool CanStopDebugging()
+ {
+ string question = "${res:XML.MainMenu.RunMenu.Compile.StopDebuggingQuestion}";
+ string caption = "${res:XML.MainMenu.RunMenu.Compile.StopDebuggingTitle}";
+ return messageService.AskQuestion(question, caption);
+ }
+
+ void CreateDirectoryForResultsFile()
+ {
+ string path = Path.GetDirectoryName(resultsFileName);
+ if (!Directory.Exists(path)) {
+ Directory.CreateDirectory(path);
+ }
+ }
+
+ void Start(ProcessStartInfo startInfo)
+ {
+ StartDebugger(startInfo);
+ }
+
+ void StartDebugger(ProcessStartInfo startInfo)
+ {
+ LogCommandLine(startInfo);
+
+ bool running = false;
+ debugger.DebugStopped += DebugStopped;
+ try {
+ debugger.Start(startInfo);
+ running = true;
+ } finally {
+ if (!running) {
+ debugger.DebugStopped -= DebugStopped;
+ }
+ }
+ }
+
+ void DebugStopped(object source, EventArgs e)
+ {
+ debugger.DebugStopped -= DebugStopped;
+
+ if (File.Exists(resultsFileName)) {
+ var testResults = new MSTestResults(resultsFileName);
+ var workbench = new UnitTestWorkbench();
+ workbench.SafeThreadAsyncCall(() => UpdateTestResults(testResults));
+ } else {
+ messageService.ShowFormattedErrorMessage("Unable to find test results file: '{0}'.", resultsFileName);
+ OnAllTestsFinished(source, e);
+ }
+ }
+
+ void UpdateTestResults(MSTestResults testResults)
+ {
+ foreach (TestResult result in testResults) {
+ OnTestFinished(this, new TestFinishedEventArgs(result));
+ }
+ OnAllTestsFinished(this, new EventArgs());
+ }
+
+ public override void Stop()
+ {
+ if (debugger.IsDebugging) {
+ debugger.Stop();
+ }
+ }
+
+ public override void Dispose()
+ {
+ Stop();
+ try {
+ File.Delete(resultsFileName);
+ } catch { }
+ }
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestFramework.cs b/samples/MSTest/MSTest.SharpDevelop/MSTestFramework.cs
new file mode 100644
index 0000000000..50e7d4eb59
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestFramework.cs
@@ -0,0 +1,109 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using ICSharpCode.SharpDevelop.Dom;
+using ICSharpCode.SharpDevelop.Project;
+using ICSharpCode.UnitTesting;
+
+namespace ICSharpCode.MSTest
+{
+ public class MSTestFramework : ITestFramework
+ {
+ public bool IsBuildNeededBeforeTestRun {
+ get { return true; }
+ }
+
+ public bool IsTestMember(IMember member)
+ {
+ var method = member as IMethod;
+ if (method == null)
+ return false;
+
+ return IsTestMethod(method);
+ }
+
+ bool IsTestMethod(IMethod method)
+ {
+ foreach (IAttribute attribute in method.Attributes) {
+ if (IsMSTestMethodAttribute(attribute)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ bool IsMSTestMethodAttribute(IAttribute attribute)
+ {
+ return IsMSTestMethodAttribute(attribute.AttributeType.FullyQualifiedName);
+ }
+
+ bool IsMSTestMethodAttribute(string name)
+ {
+ return
+ name == "TestMethod" ||
+ name == "TestMethodAttribute" ||
+ name == "Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute";
+ }
+
+ public bool IsTestClass(IClass c)
+ {
+ if ((c == null) || (c.IsAbstract))
+ return false;
+
+ foreach (IAttribute attribute in c.Attributes) {
+ if (IsMSTestClassAttribute(attribute)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ bool IsMSTestClassAttribute(IAttribute attribute)
+ {
+ return IsMSTestClassAttribute(attribute.AttributeType.FullyQualifiedName);
+ }
+
+ bool IsMSTestClassAttribute(string name)
+ {
+ return
+ name == "TestClass" ||
+ name == "TestClassAttribute" ||
+ name == "Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute";
+ }
+
+ public bool IsTestProject(IProject project)
+ {
+ if (project == null)
+ return false;
+
+ foreach (ProjectItem item in project.Items) {
+ if (item.IsMSTestAssemblyReference()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public IEnumerable GetTestMembersFor(IClass c)
+ {
+ return c.Methods
+ .Where(IsTestMethod)
+ .Select(method => new TestMember(method));
+ }
+
+ public ITestRunner CreateTestRunner()
+ {
+ return new MSTestRunner();
+ }
+
+ public ITestRunner CreateTestDebugger()
+ {
+ return new MSTestDebugger();
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestOptions.cs b/samples/MSTest/MSTest.SharpDevelop/MSTestOptions.cs
new file mode 100644
index 0000000000..f60a73467b
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestOptions.cs
@@ -0,0 +1,26 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.IO;
+using ICSharpCode.Core;
+
+namespace ICSharpCode.MSTest
+{
+ public static class MSTestOptions
+ {
+ static Properties properties = PropertyService.Get("MSTestOptions", new Properties());
+
+ public static string MSTestPath {
+ get { return properties.Get("MSTestPath", GetDefaultMSTestPath()); }
+ set { properties.Set("MSTestPath", value); }
+ }
+
+ static string GetDefaultMSTestPath()
+ {
+ return Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
+ @"Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe");
+ }
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestOptionsPanel.xaml b/samples/MSTest/MSTest.SharpDevelop/MSTestOptionsPanel.xaml
new file mode 100644
index 0000000000..57da7506a1
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestOptionsPanel.xaml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestOptionsPanel.xaml.cs b/samples/MSTest/MSTest.SharpDevelop/MSTestOptionsPanel.xaml.cs
new file mode 100644
index 0000000000..e4fca61cf0
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestOptionsPanel.xaml.cs
@@ -0,0 +1,64 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.ComponentModel;
+using System.Windows.Controls;
+using System.Windows.Input;
+
+using ICSharpCode.SharpDevelop.Gui;
+using ICSharpCode.SharpDevelop.Widgets;
+using Microsoft.Win32;
+
+namespace ICSharpCode.MSTest
+{
+ public partial class MSTestOptionsPanel : OptionPanel, INotifyPropertyChanged
+ {
+ string msTestPath;
+ bool changed;
+
+ public MSTestOptionsPanel()
+ {
+ InitializeComponent();
+ BrowseCommand = new RelayCommand(Browse);
+ msTestPath = MSTestOptions.MSTestPath;
+ DataContext = this;
+ }
+
+ public ICommand BrowseCommand { get; private set; }
+
+ void Browse()
+ {
+ var dialog = new OpenFileDialog();
+ if (dialog.ShowDialog() ?? false) {
+ MSTestPath = dialog.FileName;
+ }
+ }
+
+ public string MSTestPath {
+ get { return msTestPath; }
+ set {
+ msTestPath = value;
+ changed = true;
+ OnPropertyChanged("MSTestPath");
+ }
+ }
+
+ public override bool SaveOptions()
+ {
+ if (changed) {
+ MSTestOptions.MSTestPath = msTestPath;
+ }
+ return true;
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ void OnPropertyChanged(string name)
+ {
+ if (PropertyChanged != null) {
+ PropertyChanged(this, new PropertyChangedEventArgs(name));
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestQualifiedClassName.cs b/samples/MSTest/MSTest.SharpDevelop/MSTestQualifiedClassName.cs
new file mode 100644
index 0000000000..5fa3fdc4ee
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestQualifiedClassName.cs
@@ -0,0 +1,31 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+
+namespace ICSharpCode.MSTest
+{
+ public class MSTestQualifiedClassName
+ {
+ public MSTestQualifiedClassName(string qualifiedClassName)
+ {
+ ClassName = GetClassName(qualifiedClassName);
+ }
+
+ string GetClassName(string qualifiedClassName)
+ {
+ int index = qualifiedClassName.IndexOf(',');
+ if (index > 0) {
+ return qualifiedClassName.Substring(0, index);
+ }
+ return qualifiedClassName;
+ }
+
+ public string ClassName { get; private set; }
+
+ public string GetQualifiedMethodName(string methodName)
+ {
+ return String.Format("{0}.{1}", ClassName, methodName);
+ }
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestResult.cs b/samples/MSTest/MSTest.SharpDevelop/MSTestResult.cs
new file mode 100644
index 0000000000..51674abe68
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestResult.cs
@@ -0,0 +1,93 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.IO;
+using ICSharpCode.SharpDevelop.Dom;
+using ICSharpCode.SharpDevelop.Gui;
+using ICSharpCode.UnitTesting;
+
+namespace ICSharpCode.MSTest
+{
+ public class MSTestResult
+ {
+ public MSTestResult(string id)
+ {
+ this.Id = id;
+ }
+
+ public string Id { get; private set; }
+ public string Name { get; private set; }
+ public TestResultType ResultType { get; private set; }
+ public string StackTrace { get; set; }
+ public string Message { get; set; }
+
+ public void UpdateTestName(string qualifiedClassName, string methodName)
+ {
+ UpdateTestName(new MSTestQualifiedClassName(qualifiedClassName), methodName);
+ }
+
+ public void UpdateTestName(MSTestQualifiedClassName qualifiedClassName, string methodName)
+ {
+ this.Name = qualifiedClassName.GetQualifiedMethodName(methodName);
+ }
+
+ public void UpdateResult(string result)
+ {
+ if (result == "Passed") {
+ this.ResultType = TestResultType.Success;
+ } else if (result == "Failed") {
+ this.ResultType = TestResultType.Failure;
+ }
+ }
+
+ public bool IsError {
+ get { return ResultType == TestResultType.Failure; }
+ }
+
+ public TestResult ToTestResult()
+ {
+ return new TestResult(Name) {
+ ResultType = ResultType,
+ Message = GetMessage(),
+ StackTrace = StackTrace,
+ StackTraceFilePosition = GetStackTraceFilePosition()
+ };
+ }
+
+ string GetMessage()
+ {
+ if (String.IsNullOrEmpty(Message))
+ return String.Empty;
+
+ int index = Message.IndexOf('\n');
+ if (index > 0) {
+ return Message.Substring(index + 1);
+ }
+ return Message;
+ }
+
+ FilePosition GetStackTraceFilePosition()
+ {
+ if (!String.IsNullOrEmpty(StackTrace)) {
+ return ParseFilePositionFromStackTrace();
+ }
+ return FilePosition.Empty;
+ }
+
+ FilePosition ParseFilePositionFromStackTrace()
+ {
+ FileLineReference fileLineRef = OutputTextLineParser.GetNUnitOutputFileLineReference(StackTrace, true);
+ if (fileLineRef != null) {
+ return CreateFilePosition(fileLineRef);
+ }
+ return FilePosition.Empty;
+ }
+
+ FilePosition CreateFilePosition(FileLineReference fileLineRef)
+ {
+ string fileName = Path.GetFullPath(fileLineRef.FileName);
+ return new FilePosition(fileName, fileLineRef.Line, fileLineRef.Column + 1);
+ }
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestResults.cs b/samples/MSTest/MSTest.SharpDevelop/MSTestResults.cs
new file mode 100644
index 0000000000..c02fff240d
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestResults.cs
@@ -0,0 +1,91 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Collections.Generic;
+using System.Xml;
+
+using ICSharpCode.UnitTesting;
+
+namespace ICSharpCode.MSTest
+{
+ public class MSTestResults : List
+ {
+ Dictionary testDefinitions = new Dictionary();
+
+ public MSTestResults(string fileName)
+ : this(new XmlTextReader(fileName))
+ {
+ }
+
+ public MSTestResults(XmlTextReader reader)
+ {
+ ReadResults(reader);
+ }
+
+ void ReadResults(XmlTextReader reader)
+ {
+ while (reader.Read()) {
+ switch (reader.NodeType) {
+ case XmlNodeType.Element:
+ if (reader.Name == "UnitTest") {
+ ReadUnitTest(reader);
+ } else if (reader.Name == "UnitTestResult") {
+ ReadUnitTestResult(reader);
+ }
+ break;
+ }
+ }
+ }
+
+ void ReadUnitTest(XmlTextReader reader)
+ {
+ var testResult = new MSTestResult(reader.GetAttribute("id"));
+ testDefinitions.Add(testResult.Id, testResult);
+
+ if (reader.ReadToDescendant("TestMethod")) {
+ testResult.UpdateTestName(reader.GetAttribute("className"), reader.GetAttribute("name"));
+ }
+ }
+
+ void ReadUnitTestResult(XmlTextReader reader)
+ {
+ string testId = reader.GetAttribute("testId");
+ MSTestResult testResult = FindTestResult(testId);
+ if (testResult != null) {
+ testResult.UpdateResult(reader.GetAttribute("outcome"));
+ if (testResult.IsError) {
+ ReadErrorInformation(testResult, reader);
+ }
+ Add(testResult.ToTestResult());
+ }
+ }
+
+ void ReadErrorInformation(MSTestResult testResult, XmlTextReader reader)
+ {
+ while (reader.Read()) {
+ switch (reader.NodeType) {
+ case XmlNodeType.EndElement:
+ if (reader.Name == "UnitTestResult") {
+ return;
+ }
+ break;
+ case XmlNodeType.Element:
+ if (reader.Name == "Message") {
+ testResult.Message = reader.ReadElementContentAsString();
+ } else if (reader.Name == "StackTrace") {
+ testResult.StackTrace = reader.ReadElementContentAsString();
+ }
+ break;
+ }
+ }
+ }
+
+ MSTestResult FindTestResult(string testId)
+ {
+ MSTestResult testResult = null;
+ testDefinitions.TryGetValue(testId, out testResult);
+ return testResult;
+ }
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestResultsFileName.cs b/samples/MSTest/MSTest.SharpDevelop/MSTestResultsFileName.cs
new file mode 100644
index 0000000000..51c1fdd1a3
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestResultsFileName.cs
@@ -0,0 +1,27 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.IO;
+using ICSharpCode.UnitTesting;
+
+namespace ICSharpCode.MSTest
+{
+ public class MSTestResultsFileName
+ {
+ public MSTestResultsFileName(SelectedTests selectedTests)
+ {
+ FileName = GetFileName(selectedTests);
+ }
+
+ public string FileName { get; private set; }
+
+ string GetFileName(SelectedTests selectedTests)
+ {
+ return Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
+ "Temp",
+ selectedTests.Project.Name + "-Results.trx");
+ }
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop/MSTestRunner.cs b/samples/MSTest/MSTest.SharpDevelop/MSTestRunner.cs
new file mode 100644
index 0000000000..a5fb6be9be
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/MSTestRunner.cs
@@ -0,0 +1,138 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Diagnostics;
+using System.IO;
+
+using ICSharpCode.SharpDevelop.Util;
+using ICSharpCode.UnitTesting;
+
+namespace ICSharpCode.MSTest
+{
+ public class MSTestRunner : TestRunnerBase
+ {
+ IUnitTestProcessRunner processRunner;
+ IFileSystem fileSystem;
+ IUnitTestMessageService messageService;
+ string resultsFileName;
+
+ public MSTestRunner()
+ : this(new UnitTestProcessRunner(),
+ new UnitTestFileService(),
+ new UnitTestMessageService())
+ {
+ }
+
+ public MSTestRunner(
+ IUnitTestProcessRunner processRunner,
+ IFileSystem fileSystem,
+ IUnitTestMessageService messageService)
+ {
+ this.processRunner = processRunner;
+ this.fileSystem = fileSystem;
+ this.messageService = messageService;
+
+ processRunner.LogStandardOutputAndError = false;
+ processRunner.OutputLineReceived += OutputLineReceived;
+ processRunner.ErrorLineReceived += OutputLineReceived;
+ processRunner.ProcessExited += ProcessRunnerExited;
+ }
+
+ void ProcessRunnerExited(object source, EventArgs e)
+ {
+ // Read all tests.
+ if (FileExists(resultsFileName)) {
+ var testResults = new MSTestResults(resultsFileName);
+ var workbench = new UnitTestWorkbench();
+ workbench.SafeThreadAsyncCall(() => UpdateTestResults(testResults));
+ } else {
+ messageService.ShowFormattedErrorMessage("Unable to find test results file: '{0}'.", resultsFileName);
+ OnAllTestsFinished(source, e);
+ }
+ }
+
+ void UpdateTestResults(MSTestResults testResults)
+ {
+ foreach (TestResult result in testResults) {
+ OnTestFinished(this, new TestFinishedEventArgs(result));
+ }
+ OnAllTestsFinished(this, new EventArgs());
+ }
+
+ void OutputLineReceived(object source, LineReceivedEventArgs e)
+ {
+ OnMessageReceived(e.Line);
+ }
+
+ public override void Start(SelectedTests selectedTests)
+ {
+ ProcessStartInfo startInfo = GetProcessStartInfo(selectedTests);
+ TryDeleteResultsFile();
+ Start(startInfo);
+ }
+
+ protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests)
+ {
+ resultsFileName = new MSTestResultsFileName(selectedTests).FileName;
+ CreateDirectoryForResultsFile();
+ var mstestApplication = new MSTestApplication(selectedTests, resultsFileName);
+ return mstestApplication.ProcessStartInfo;
+ }
+
+ void Start(ProcessStartInfo processStartInfo)
+ {
+ LogCommandLine(processStartInfo);
+
+ if (FileExists(processStartInfo.FileName)) {
+ processRunner.WorkingDirectory = processStartInfo.WorkingDirectory;
+ processRunner.Start(processStartInfo.FileName, processStartInfo.Arguments);
+ } else {
+ ShowApplicationDoesNotExistMessage(processStartInfo.FileName);
+ }
+ }
+
+ void CreateDirectoryForResultsFile()
+ {
+ string path = Path.GetDirectoryName(resultsFileName);
+ if (!Directory.Exists(path)) {
+ Directory.CreateDirectory(path);
+ }
+ }
+
+ bool FileExists(string fileName)
+ {
+ return fileSystem.FileExists(fileName);
+ }
+
+ void ShowApplicationDoesNotExistMessage(string fileName)
+ {
+ string resourceString = "${res:ICSharpCode.UnitTesting.TestRunnerNotFoundMessageFormat}";
+ messageService.ShowFormattedErrorMessage(resourceString, fileName);
+ }
+
+ public override void Stop()
+ {
+ processRunner.Kill();
+ }
+
+ public override void Dispose()
+ {
+ processRunner.ErrorLineReceived -= OutputLineReceived;
+ processRunner.OutputLineReceived -= OutputLineReceived;
+ processRunner.ProcessExited -= ProcessRunnerExited;
+
+ TryDeleteResultsFile();
+ }
+
+ void TryDeleteResultsFile()
+ {
+ try {
+ Console.WriteLine("Deleting results file: " + resultsFileName);
+ File.Delete(resultsFileName);
+ } catch (Exception ex) {
+ Console.WriteLine(ex.Message);
+ }
+ }
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop/ProjectItemExtensions.cs b/samples/MSTest/MSTest.SharpDevelop/ProjectItemExtensions.cs
new file mode 100644
index 0000000000..c88914e902
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/ProjectItemExtensions.cs
@@ -0,0 +1,28 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using ICSharpCode.SharpDevelop.Project;
+
+namespace ICSharpCode.MSTest
+{
+ public static class ProjectItemExtensions
+ {
+ public static bool IsMSTestAssemblyReference(this ProjectItem item)
+ {
+ var referenceItem = item as ReferenceProjectItem;
+ if (referenceItem == null)
+ return false;
+
+ return IsMSTestAssemblyReference(referenceItem);
+ }
+
+ public static bool IsMSTestAssemblyReference(this ReferenceProjectItem item)
+ {
+ return String.Equals(
+ item.ShortName,
+ "Microsoft.VisualStudio.QualityTools.UnitTestFramework",
+ StringComparison.OrdinalIgnoreCase);
+ }
+ }
+}
diff --git a/samples/MSTest/MSTest.SharpDevelop/Properties/AssemblyInfo.cs b/samples/MSTest/MSTest.SharpDevelop/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000000..8ab66e9a48
--- /dev/null
+++ b/samples/MSTest/MSTest.SharpDevelop/Properties/AssemblyInfo.cs
@@ -0,0 +1,31 @@
+#region Using directives
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+#endregion
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MSTest.SharpDevelop")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MSTest.SharpDevelop")]
+[assembly: AssemblyCopyright("Copyright 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// This sets the default COM visibility of types in the assembly to invisible.
+// If you need to expose a type to COM, use [ComVisible(true)] on that type.
+[assembly: ComVisible(false)]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all the values or you can use the default the Revision and
+// Build Numbers by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0")]
diff --git a/src/AddIns/Analysis/CodeCoverage/Test/Testing/CodeCoverageTestRunnerTests.cs b/src/AddIns/Analysis/CodeCoverage/Test/Testing/CodeCoverageTestRunnerTests.cs
index 416c25431c..a0f2da9c78 100644
--- a/src/AddIns/Analysis/CodeCoverage/Test/Testing/CodeCoverageTestRunnerTests.cs
+++ b/src/AddIns/Analysis/CodeCoverage/Test/Testing/CodeCoverageTestRunnerTests.cs
@@ -118,7 +118,7 @@ namespace ICSharpCode.CodeCoverage.Tests.Testing
string expectedCommandLine =
"--target \"d:\\sharpdevelop\\bin\\Tools\\NUnit\\nunit-console-x86.exe\" " +
"--target-work-dir \"c:\\projects\\MyTests\\bin\\Debug\" " +
- "--target-args \"\\\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\\\" /results=\\\"d:\\temp\\results.txt\\\"\" " +
+ "--target-args \"\\\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\\\" /noxml /results=\\\"d:\\temp\\results.txt\\\"\" " +
"--output \"c:\\projects\\MyTests\\PartCover\\coverage.xml\" " +
"--include [MyTests]*";
@@ -218,7 +218,7 @@ namespace ICSharpCode.CodeCoverage.Tests.Testing
"\"d:\\sharpdevelop\\bin\\Tools\\PartCover\\PartCover.exe\" " +
"--target \"d:\\sharpdevelop\\bin\\Tools\\NUnit\\nunit-console-x86.exe\" " +
"--target-work-dir \"c:\\projects\\MyTests\\bin\\Debug\" " +
- "--target-args \"\\\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\\\"\" " +
+ "--target-args \"\\\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\\\" /noxml\" " +
"--output \"c:\\projects\\MyTests\\PartCover\\coverage.xml\" " +
"--include [*]*";
}
diff --git a/src/AddIns/Analysis/CodeCoverage/Test/Testing/PartCoverApplicationTests.cs b/src/AddIns/Analysis/CodeCoverage/Test/Testing/PartCoverApplicationTests.cs
index b4e2ecdc85..1f4c628ef4 100644
--- a/src/AddIns/Analysis/CodeCoverage/Test/Testing/PartCoverApplicationTests.cs
+++ b/src/AddIns/Analysis/CodeCoverage/Test/Testing/PartCoverApplicationTests.cs
@@ -133,7 +133,7 @@ namespace ICSharpCode.CodeCoverage.Tests.Testing
string expectedCommandLine =
"--target \"d:\\sharpdevelop\\bin\\Tools\\NUnit\\nunit-console-x86.exe\" " +
"--target-work-dir \"c:\\projects\\MyTests\\bin\\Debug\" " +
- "--target-args \"\\\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\\\"\" " +
+ "--target-args \"\\\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\\\" /noxml\" " +
"--output \"c:\\projects\\MyTests\\PartCover\\coverage.xml\" " +
"--include [*]*";
@@ -157,7 +157,7 @@ namespace ICSharpCode.CodeCoverage.Tests.Testing
string expectedCommandLine =
"--target \"d:\\sharpdevelop\\bin\\Tools\\NUnit\\nunit-console-x86.exe\" " +
"--target-work-dir \"c:\\projects\\MyTests\\bin\\Debug\" " +
- "--target-args \"\\\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\\\"\" " +
+ "--target-args \"\\\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\\\" /noxml\" " +
"--output \"c:\\projects\\MyTests\\PartCover\\coverage.xml\" " +
"--include [MyTests]* " +
"--include [MoreTests]* " +
diff --git a/src/AddIns/Analysis/UnitTesting/Src/NUnitConsoleCommandLine.cs b/src/AddIns/Analysis/UnitTesting/Src/NUnitConsoleApplication.cs
similarity index 96%
rename from src/AddIns/Analysis/UnitTesting/Src/NUnitConsoleCommandLine.cs
rename to src/AddIns/Analysis/UnitTesting/Src/NUnitConsoleApplication.cs
index f6ff76fb75..5eb4586197 100644
--- a/src/AddIns/Analysis/UnitTesting/Src/NUnitConsoleCommandLine.cs
+++ b/src/AddIns/Analysis/UnitTesting/Src/NUnitConsoleApplication.cs
@@ -51,6 +51,7 @@ namespace ICSharpCode.UnitTesting
NoDots = options.NoDots;
Labels = options.Labels;
ShadowCopy = !options.NoShadow;
+ NoXmlOutputFile = !options.CreateXmlOutputFile;
if (options.CreateXmlOutputFile) {
GenerateXmlOutputFileName();
@@ -121,6 +122,11 @@ namespace ICSharpCode.UnitTesting
///
public string XmlOutputFile;
+ ///
+ /// Use /noxml.
+ ///
+ public bool NoXmlOutputFile = true;
+
///
/// Fixture to test. Null = test all fixtures.
///
@@ -195,7 +201,9 @@ namespace ICSharpCode.UnitTesting
b.Append(" /labels");
if (NoDots)
b.Append(" /nodots");
- if (XmlOutputFile != null) {
+ if (NoXmlOutputFile) {
+ b.Append(" /noxml");
+ } else if (XmlOutputFile != null) {
b.Append(" /xml=\"");
b.Append(XmlOutputFile);
b.Append('"');
diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleCommandLineTests.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleCommandLineTests.cs
index cfebc1c133..93f237a0bd 100644
--- a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleCommandLineTests.cs
+++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleCommandLineTests.cs
@@ -32,6 +32,7 @@ namespace UnitTesting.Tests.Frameworks
NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests);
app.NoLogo = false;
app.ShadowCopy = true;
+ app.NoXmlOutputFile = false;
app.Results = @"C:\results.txt";
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /results=\"C:\\results.txt\"";
@@ -45,6 +46,7 @@ namespace UnitTesting.Tests.Frameworks
NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests);
app.NoLogo = true;
app.ShadowCopy = true;
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nologo";
Assert.AreEqual(expectedCommandLine, app.GetArguments());
@@ -57,6 +59,7 @@ namespace UnitTesting.Tests.Frameworks
NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests);
app.NoLogo = false;
app.ShadowCopy = false;
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /noshadow";
Assert.AreEqual(expectedCommandLine, app.GetArguments());
@@ -70,6 +73,7 @@ namespace UnitTesting.Tests.Frameworks
app.NoLogo = false;
app.ShadowCopy = true;
app.NoThread = true;
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nothread";
Assert.AreEqual(expectedCommandLine, app.GetArguments());
@@ -83,6 +87,7 @@ namespace UnitTesting.Tests.Frameworks
app.NoLogo = false;
app.ShadowCopy = true;
app.NoDots = true;
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nodots";
Assert.AreEqual(expectedCommandLine, app.GetArguments());
@@ -96,6 +101,7 @@ namespace UnitTesting.Tests.Frameworks
app.NoLogo = false;
app.ShadowCopy = true;
app.Labels = true;
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /labels";
Assert.AreEqual(expectedCommandLine, app.GetArguments());
@@ -109,6 +115,7 @@ namespace UnitTesting.Tests.Frameworks
app.NoLogo = false;
app.ShadowCopy = true;
app.Fixture = "TestFixture";
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture\"";
Assert.AreEqual(expectedCommandLine, app.GetArguments());
@@ -122,6 +129,7 @@ namespace UnitTesting.Tests.Frameworks
app.NoLogo = false;
app.ShadowCopy = true;
app.NamespaceFilter = "TestFixture";
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture\"";
Assert.AreEqual(expectedCommandLine, app.GetArguments());
@@ -135,11 +143,26 @@ namespace UnitTesting.Tests.Frameworks
app.NoLogo = false;
app.ShadowCopy = true;
app.XmlOutputFile = @"C:\NUnit.xml";
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /xml=\"C:\\NUnit.xml\"";
Assert.AreEqual(expectedCommandLine, app.GetArguments());
}
+ [Test]
+ public void NoXmlWhenXmlOutputFileSpecified()
+ {
+ SelectedTests selectedTests = new SelectedTests(project);
+ NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests);
+ app.NoLogo = false;
+ app.ShadowCopy = true;
+ app.XmlOutputFile = @"C:\NUnit.xml";
+ app.NoXmlOutputFile = true;
+
+ string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /noxml";
+ Assert.AreEqual(expectedCommandLine, app.GetArguments());
+ }
+
[Test]
public void TestMethod()
{
@@ -149,6 +172,7 @@ namespace UnitTesting.Tests.Frameworks
app.ShadowCopy = true;
app.Fixture = "TestFixture";
app.Test = "Test";
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture.Test\"";
Assert.AreEqual(expectedCommandLine, app.GetArguments());
@@ -163,6 +187,7 @@ namespace UnitTesting.Tests.Frameworks
NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests);
app.NoLogo = false;
app.ShadowCopy = true;
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture.Test\"";
Assert.AreEqual(expectedCommandLine, app.GetArguments());
@@ -175,6 +200,7 @@ namespace UnitTesting.Tests.Frameworks
NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests);
app.NoLogo = false;
app.ShadowCopy = true;
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"Project.MyTests\"";
Assert.AreEqual(expectedCommandLine, app.GetArguments());
@@ -187,6 +213,7 @@ namespace UnitTesting.Tests.Frameworks
NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests);
app.NoLogo = true;
app.ShadowCopy = true;
+ app.NoXmlOutputFile = false;
FileUtility.ApplicationRootPath = @"C:\SharpDevelop";
@@ -211,6 +238,7 @@ namespace UnitTesting.Tests.Frameworks
app.NoLogo = false;
app.ShadowCopy = true;
app.Results = @"C:\results.txt";
+ app.NoXmlOutputFile = false;
string expectedCommandLine =
"\"C:\\Projects\\MyTests\\MyTests.dll\" " +
@@ -235,6 +263,7 @@ namespace UnitTesting.Tests.Frameworks
NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests);
app.NoLogo = false;
app.ShadowCopy = true;
+ app.NoXmlOutputFile = false;
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" " +
"/run=\"MyTests.TestFixture+InnerTest\"";
diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleProcessStartInfoTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleProcessStartInfoTestFixture.cs
index a63fad5c3a..8902702f73 100644
--- a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleProcessStartInfoTestFixture.cs
+++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleProcessStartInfoTestFixture.cs
@@ -50,7 +50,7 @@ namespace UnitTesting.Tests.Frameworks
public void CommandLineArgumentsAreNUnitConsoleExeCommandLineArguments()
{
string expectedCommandLine =
- "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\"";
+ "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\" /noxml";
Assert.AreEqual(expectedCommandLine, info.Arguments);
}
diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsForMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsForMethodTestFixture.cs
index a8edcd6ccf..d604124e99 100644
--- a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsForMethodTestFixture.cs
+++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsForMethodTestFixture.cs
@@ -173,7 +173,7 @@ namespace UnitTesting.Tests.Tree
StartNUnitTestRunner();
string expectedArgs =
- "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\" " +
+ "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\" /noxml " +
"/results=\"c:\\temp\\tmp66.tmp\" " +
"/run=\"MyTests.MyTestClass.MyTestMethod\"";
Assert.AreEqual(expectedArgs, context.MockProcessRunner.CommandArgumentsPassedToStartMethod);
diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsWithDebuggerTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsWithDebuggerTestFixture.cs
index 19ccf38875..2bea660cd7 100644
--- a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsWithDebuggerTestFixture.cs
+++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsWithDebuggerTestFixture.cs
@@ -57,7 +57,7 @@ namespace UnitTesting.Tests.Tree
StartTestDebugger();
string expectedArguments =
"\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\" " +
- "/noshadow " +
+ "/noshadow /noxml " +
"/results=\"c:\\temp\\tmp66.tmp\" " +
"/run=\"MyTests.MyTestClass.MyTestMethod\"";
@@ -167,7 +167,7 @@ namespace UnitTesting.Tests.Tree
string commandLine = "\"C:\\SharpDevelop\\bin\\Tools\\NUnit\\nunit-console-x86.exe\" " +
"\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\" " +
- "/noshadow " +
+ "/noshadow /noxml " +
"/results=\"c:\\temp\\tmp66.tmp\" " +
"/run=\"MyTests.MyTestClass.MyTestMethod\"";
Assert.AreEqual(commandLine, message);
diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestInPadCommandTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestInPadCommandTestFixture.cs
index dbb49a143e..e008a885e4 100644
--- a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestInPadCommandTestFixture.cs
+++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestInPadCommandTestFixture.cs
@@ -79,7 +79,7 @@ namespace UnitTesting.Tests.Tree
{
runCommand.Run();
buildProject.FireBuildCompleteEvent();
- string expectedArgs = "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\"";
+ string expectedArgs = "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\" /noxml";
Assert.AreEqual(expectedArgs, processRunner.CommandArgumentsPassedToStartMethod);
}
diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixture.cs
index 6babf3d975..6aa2a63386 100644
--- a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixture.cs
+++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixture.cs
@@ -34,7 +34,7 @@ namespace UnitTesting.Tests.Tree
public void DebuggerStartsUnitTestApplicationWithCorrectCommandLineArguments()
{
string expectedArguments =
- "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\"";
+ "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\" /noxml";
string actualArguments = debuggerService.MockDebugger.ProcessStartInfo.Arguments;
Assert.AreEqual(expectedArguments, actualArguments);
@@ -54,7 +54,7 @@ namespace UnitTesting.Tests.Tree
{
string expectedText =
"\"D:\\SharpDevelop\\bin\\Tools\\NUnit\\nunit-console-x86.exe\" " +
- "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\"\r\n";
+ "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\" /noxml\r\n";
string actualText = context.UnitTestCategory.Text;
Assert.AreEqual(expectedText, actualText);
diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockCSharpProject.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockCSharpProject.cs
index 2be850a964..a0dac8a7cd 100644
--- a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockCSharpProject.cs
+++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockCSharpProject.cs
@@ -21,6 +21,7 @@ namespace UnitTesting.Tests.Utils
: base(new ProjectCreateInformation {
Solution = solution,
ProjectName = name,
+ Platform = "x86",
TargetFramework = TargetFramework.Net40Client,
OutputProjectFileName = "c:\\projects\\" + name + "\\" + name + ".csproj"
})
diff --git a/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj b/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj
index bdf1445c65..77590cce8d 100644
--- a/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj
+++ b/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj
@@ -126,7 +126,7 @@
Component
-
+
diff --git a/src/AddIns/BackendBindings/AspNet.Mvc/Project/AspNet.Mvc.csproj b/src/AddIns/BackendBindings/AspNet.Mvc/Project/AspNet.Mvc.csproj
index 5fdddc6f26..34524f74cd 100644
--- a/src/AddIns/BackendBindings/AspNet.Mvc/Project/AspNet.Mvc.csproj
+++ b/src/AddIns/BackendBindings/AspNet.Mvc/Project/AspNet.Mvc.csproj
@@ -231,7 +231,6 @@
-
diff --git a/src/AddIns/BackendBindings/AspNet.Mvc/Project/Src/ViewInBrowser.cs b/src/AddIns/BackendBindings/AspNet.Mvc/Project/Src/ViewInBrowser.cs
deleted file mode 100644
index 4a89a3e636..0000000000
--- a/src/AddIns/BackendBindings/AspNet.Mvc/Project/Src/ViewInBrowser.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-//// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
-//// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
-//
-//using System;
-//using System.IO;
-//using System.Linq;
-//
-//using ICSharpCode.Core;
-//using ICSharpCode.SharpDevelop.Gui.OptionPanels;
-//using ICSharpCode.SharpDevelop.Project;
-//using ICSharpCode.SharpDevelop.Project.Commands;
-//
-//namespace ICSharpCode.AspNet.Mvc
-//{
-// public class ViewInBrowser : AbstractMenuCommand
-// {
-// public override void Run()
-// {
-// var node = ProjectBrowserPad.Instance.SelectedNode as FileNode;
-// if (node == null) {
-// return;
-// }
-//
-// var project = ProjectService.CurrentProject as CompilableProject;
-// if (project == null) {
-// return;
-// }
-//
-// if (!project.IsWebProject) {
-// MessageService.ShowError("${res:ProjectComponent.ContextMenu.NotAWebProject}");
-// return;
-// }
-//
-// if (!WebProjectService.IsIISOrIISExpressInstalled) {
-// MessageService.ShowError("${res:ICSharpCode.WebProjectOptionsPanel.IISNotFound}");
-// return;
-// }
-//
-// string fileName = node.FileName;
-//
-//// // set project options
-//// project.StartAction = StartAction.StartURL;
-//// string directoryName = Path.GetDirectoryName(project.FileName) + "\\";
-//// project.StartUrl = fileName.Replace(directoryName, "/").Replace("\\", "/");
-//
-// // set web server options
-// string projectName = project.Name;
-// WebProjectOptions existingOptions = WebProjectsOptions.Instance.GetWebProjectOptions(projectName);
-//
-// var options = new WebProjectOptions {
-// Data = new WebProjectDebugData {
-// WebServer = WebProjectService.IsIISExpressInstalled ? WebServer.IISExpress : WebServer.IIS,
-// Port = (existingOptions != null && existingOptions.Data != null) ? existingOptions.Data.Port : "8080", //TODO: port collision detection
-// ProjectUrl = string.Format("{0}/{1}", WebBehavior.LocalHost, project.Name)
-// },
-// ProjectName = projectName
-// };
-//
-// if (options.Data.WebServer == WebServer.IISExpress) {
-// options.Data.ProjectUrl = string.Format(
-// @"{0}:{1}/{2}", WebBehavior.LocalHost, options.Data.Port, projectName);
-// }
-//
-// WebProjectsOptions.Instance.SetWebProjectOptions(projectName, options);
-//
-// // create virtual directory
-// string error = WebProjectService.CreateVirtualDirectory(
-// options.Data.WebServer,
-// projectName,
-// Path.GetDirectoryName(ProjectService.CurrentProject.FileName));
-// LoggingService.Info(error ?? string.Empty);
-//
-// // RunProject
-// new RunProject().Run();
-// }
-// }
-//}
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs
index a22de46ed0..461fbb2633 100644
--- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs
+++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs
@@ -46,8 +46,7 @@ namespace CSharpBinding
Init();
}
- public const string DefaultTargetsFile = @"$(MSBuildBinPath)\Microsoft.CSharp.Targets";
- public const string ExtendedTargetsFile = @"$(SharpDevelopBinPath)\SharpDevelop.Build.CSharp.targets";
+ public const string DefaultTargetsFile = @"$(MSBuildToolsPath)\Microsoft.CSharp.targets";
public CSharpProject(ProjectCreateInformation info)
: base(info)
@@ -80,13 +79,35 @@ namespace CSharpBinding
}
}
+ protected override ProjectBehavior CreateDefaultBehavior()
+ {
+ return new CSharpProjectBehavior(this, base.CreateDefaultBehavior());
+ }
+ }
+
+ public class CSharpProjectBehavior : ProjectBehavior
+ {
+ public CSharpProjectBehavior(CSharpProject project, ProjectBehavior next = null)
+ : base(project, next)
+ {
+
+ }
+
+ public override ItemType GetDefaultItemType(string fileName)
+ {
+ if (string.Equals(Path.GetExtension(fileName), ".cs", StringComparison.OrdinalIgnoreCase))
+ return ItemType.Compile;
+ else
+ return base.GetDefaultItemType(fileName);
+ }
+
static readonly CompilerVersion msbuild20 = new CompilerVersion(new Version(2, 0), "C# 2.0");
static readonly CompilerVersion msbuild35 = new CompilerVersion(new Version(3, 5), "C# 3.0");
static readonly CompilerVersion msbuild40 = new CompilerVersion(new Version(4, 0), DotnetDetection.IsDotnet45Installed() ? "C# 5.0" : "C# 4.0");
public override CompilerVersion CurrentCompilerVersion {
get {
- switch (MinimumSolutionVersion) {
+ switch (Project.MinimumSolutionVersion) {
case Solution.SolutionVersionVS2005:
return msbuild20;
case Solution.SolutionVersionVS2008:
@@ -110,65 +131,5 @@ namespace CSharpBinding
versions.Add(msbuild40);
return versions;
}
-
- /*
- protected override void AddOrRemoveExtensions()
- {
- // Test if SharpDevelop-Build extensions are required
- bool needExtensions = false;
-
- foreach (var p in GetAllProperties("TargetFrameworkVersion")) {
- if (p.IsImported == false) {
- if (p.Value.StartsWith("CF")) {
- needExtensions = true;
- }
- }
- }
-
- foreach (Microsoft.Build.BuildEngine.Import import in MSBuildProject.Imports) {
- if (needExtensions) {
- if (DefaultTargetsFile.Equals(import.ProjectPath, StringComparison.OrdinalIgnoreCase)) {
- //import.ProjectPath = extendedTargets;
- MSBuildInternals.SetImportProjectPath(this, import, ExtendedTargetsFile);
- // Workaround for SD2-1490. It would be better if the project browser could refresh itself
- // when necessary.
- ProjectBrowserPad.Instance.ProjectBrowserControl.RefreshView();
- break;
- }
- } else {
- if (ExtendedTargetsFile.Equals(import.ProjectPath, StringComparison.OrdinalIgnoreCase)) {
- //import.ProjectPath = defaultTargets;
- MSBuildInternals.SetImportProjectPath(this, import, DefaultTargetsFile);
- // Workaround for SD2-1490. It would be better if the project browser could refresh itself
- // when necessary.
- ProjectBrowserPad.Instance.ProjectBrowserControl.RefreshView();
- break;
- }
- }
- }
- }
- */
-
- protected override ProjectBehavior CreateDefaultBehavior()
- {
- return new CSharpProjectBehavior(this, base.CreateDefaultBehavior());
- }
- }
-
- public class CSharpProjectBehavior : ProjectBehavior
- {
- public CSharpProjectBehavior(CSharpProject project, ProjectBehavior next = null)
- : base(project, next)
- {
-
- }
-
- public override ItemType GetDefaultItemType(string fileName)
- {
- if (string.Equals(Path.GetExtension(fileName), ".cs", StringComparison.OrdinalIgnoreCase))
- return ItemType.Compile;
- else
- return base.GetDefaultItemType(fileName);
- }
}
}
diff --git a/src/AddIns/BackendBindings/CSharpBinding/Tests/MockTextEditor.cs b/src/AddIns/BackendBindings/CSharpBinding/Tests/MockTextEditor.cs
index 057d507595..a28a70942c 100644
--- a/src/AddIns/BackendBindings/CSharpBinding/Tests/MockTextEditor.cs
+++ b/src/AddIns/BackendBindings/CSharpBinding/Tests/MockTextEditor.cs
@@ -31,7 +31,7 @@ namespace CSharpBinding.Tests
pc = new DefaultProjectContent();
pc.ReferencedContents.Add(AssemblyParserService.DefaultProjectContentRegistry.Mscorlib);
- this.TextEditor.TextArea.TextView.Services.AddService(typeof(ISyntaxHighlighter), new AvalonEditSyntaxHighlighterAdapter(this.TextEditor));
+// this.TextEditor.TextArea.TextView.Services.AddService(typeof(ISyntaxHighlighter), new AvalonEditSyntaxHighlighterAdapter(this.TextEditor));
this.TextEditor.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("C#");
}
diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonComponentWalker.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonComponentWalker.cs
index 74395e322a..56fea8db0d 100644
--- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonComponentWalker.cs
+++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonComponentWalker.cs
@@ -165,7 +165,7 @@ namespace ICSharpCode.PythonBinding
MemberExpression eventExpression = node.Left as MemberExpression;
string eventName = eventExpression.Name.ToString();
- PythonControlFieldExpression field = PythonControlFieldExpression.Create(eventExpression);
+ fieldExpression = PythonControlFieldExpression.Create(eventExpression);
MemberExpression eventHandlerExpression = node.Right as MemberExpression;
string eventHandlerName = eventHandlerExpression.Name.ToString();
diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonResolverContext.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonResolverContext.cs
index c98cdfe6f3..c8f6129d3e 100644
--- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonResolverContext.cs
+++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonResolverContext.cs
@@ -4,6 +4,8 @@
using System;
using System.Collections;
using System.Collections.Generic;
+
+using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.PythonBinding
@@ -118,7 +120,7 @@ namespace ICSharpCode.PythonBinding
public bool PartialNamespaceExistsInProjectReferences(string name)
{
- foreach (IProjectContent referencedContent in projectContent.ReferencedContents) {
+ foreach (IProjectContent referencedContent in projectContent.ThreadSafeGetReferencedContents()) {
if (PartialNamespaceExists(referencedContent, name)) {
return true;
}
diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadFormWithButtonFollowedByTimerTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadFormWithButtonFollowedByTimerTestFixture.cs
new file mode 100644
index 0000000000..6ba6b96b49
--- /dev/null
+++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadFormWithButtonFollowedByTimerTestFixture.cs
@@ -0,0 +1,108 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.IO;
+using System.Windows.Forms;
+
+using ICSharpCode.PythonBinding;
+using ICSharpCode.Scripting.Tests.Utils;
+using NUnit.Framework;
+using PythonBinding.Tests.Utils;
+
+namespace PythonBinding.Tests.Designer
+{
+ ///
+ /// Fix ArgumentNullException when form has a button followed by a timer and the
+ /// first timer statement is the setting of the event handler.
+ ///
+ [TestFixture]
+ public class LoadFormWithButtonFollowedByTimerTestFixture : LoadFormTestFixtureBase
+ {
+ MockPropertyDescriptor mockTickPropertyDescriptor;
+
+ public override string PythonCode {
+ get {
+ return
+ "import System.Drawing\r\n" +
+ "import System.Windows.Forms\r\n" +
+ "\r\n" +
+ "from System.Drawing import *\r\n" +
+ "from System.Windows.Forms import *\r\n" +
+ "\r\n" +
+ "class MainForm(Form):\r\n" +
+ " def __init__(self):\r\n" +
+ " self.InitializeComponent()\r\n" +
+ "\r\n" +
+ " def InitializeComponent(self):\r\n" +
+ " self._components = System.ComponentModel.Container()\r\n" +
+ " self._button1 = System.Windows.Forms.Button()\r\n" +
+ " self._timer1 = System.Windows.Forms.Timer(self._components)\r\n" +
+ " self.SuspendLayout()\r\n" +
+ " # \r\n" +
+ " # button1\r\n" +
+ " # \r\n" +
+ " self._button1.Location = System.Drawing.Point(37, 29)\r\n" +
+ " self._button1.Name = \"button1\"\r\n" +
+ " self._button1.Size = System.Drawing.Size(75, 23)\r\n" +
+ " self._button1.TabIndex = 0\r\n" +
+ " self._button1.Text = \"button1\"\r\n" +
+ " self._button1.UseVisualStyleBackColor = True\r\n" +
+ " # \r\n" +
+ " # timer1\r\n" +
+ " # \r\n" +
+ " self._timer1.Tick += self.Timer1Tick\r\n" +
+ " # \r\n" +
+ " # MainForm\r\n" +
+ " # \r\n" +
+ " self.ClientSize = System.Drawing.Size(284, 264)\r\n" +
+ " self.Controls.Add(self._button1)\r\n" +
+ " self.Name = \"MainForm\"\r\n" +
+ " self.Text = \"PyWinTest\"\r\n" +
+ " self.ResumeLayout(False)\r\n" +
+ "\r\n" +
+ "\r\n" +
+ " def Timer1Tick(self, sender, e):\r\n" +
+ " pass";
+ }
+ }
+
+ public override void BeforeSetUpFixture()
+ {
+ mockTickPropertyDescriptor = new MockPropertyDescriptor("Tick", null, false);
+ ComponentCreator.SetEventPropertyDescriptor(mockTickPropertyDescriptor);
+ }
+
+ [Test]
+ public void EventDescriptorUsedToGetEventProperty()
+ {
+ Assert.IsNotNull(ComponentCreator.EventDescriptorPassedToGetEventProperty);
+ }
+
+ [Test]
+ public void EventDescriptorNameUsedToGetEventPropertyIsTick()
+ {
+ Assert.AreEqual("Tick", ComponentCreator.EventDescriptorPassedToGetEventProperty.Name);
+ }
+
+ [Test]
+ public void GetPropertyValueSetForTimer()
+ {
+ string value = mockTickPropertyDescriptor.GetValue(null) as String;
+ Assert.AreEqual("Timer1Tick", value);
+ }
+
+ [Test]
+ public void GetComponentUsedWhenSettingTickHandler()
+ {
+ IComponent expectedComponent = ComponentCreator.GetComponent("timer1");
+
+ object component = mockTickPropertyDescriptor.GetSetValueComponent();
+
+ Assert.AreEqual(expectedComponent, component);
+ }
+ }
+}
diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj b/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj
index 3ab64c6e51..1d3876c6fe 100644
--- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj
+++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj
@@ -265,6 +265,7 @@
+
diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs
index 4a751e7d6e..3cf7d13709 100644
--- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs
+++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs
@@ -143,7 +143,7 @@ namespace ICSharpCode.VBNetBinding
InsertDocumentationComments(editor, lineNr, cursorOffset);
}
- if (ch == '\n' && lineAboveText != null) {
+ if (ch == '\n' && lineAbove != null) {
if (LanguageUtils.IsInsideDocumentationComment(editor, lineAbove, lineAbove.EndOffset)) {
editor.Document.Insert(cursorOffset, "''' ");
return;
@@ -410,7 +410,7 @@ namespace ICSharpCode.VBNetBinding
while ((currentToken = lexer.NextToken()).Kind != Tokens.EOF) {
if (prevToken == null)
prevToken = currentToken;
- if (IsBlockStart(lexer, currentToken, prevToken)) {
+ if (IsBlockStart(lexer, currentToken, prevToken) && !IsAutomaticPropertyWithDefaultValue(lexer, currentToken, prevToken)) {
if ((tokens.Count > 0 && tokens.Peek().Kind != Tokens.Interface) || IsDeclaration(currentToken.Kind))
tokens.Push(currentToken);
}
@@ -438,6 +438,30 @@ namespace ICSharpCode.VBNetBinding
return false;
}
+ static bool IsAutomaticPropertyWithDefaultValue(ILexer lexer, Token currentToken, Token prevToken)
+ {
+ if (currentToken.Kind != Tokens.Property)
+ return false;
+ lexer.StartPeek();
+
+ int parenthesesNesting = 0;
+
+ // look for parameter list, = or EOL
+ Token t;
+ while ((t = lexer.Peek()).Kind != Tokens.EOF) {
+ if (t.Kind == Tokens.OpenParenthesis)
+ parenthesesNesting++;
+ if (t.Kind == Tokens.CloseParenthesis)
+ parenthesesNesting--;
+ if (parenthesesNesting == 0 && t.Kind == Tokens.Assign)
+ return true;
+ if (t.Kind == Tokens.EOL)
+ return false;
+ }
+
+ return false;
+ }
+
static Token GetClosestMissing(List missingEnds, VBStatement statement, ITextEditor editor, int lineNr)
{
Token closest = null;
@@ -612,7 +636,7 @@ namespace ICSharpCode.VBNetBinding
Indent(editor, indentation, new string(' ', endColumn - startColumn - 1));
}
- if (!inInterface && !isMustOverride && !isDeclare && !isDelegate) {
+ if (!inInterface && !isMustOverride && !isDeclare && !isDelegate && !IsAutomaticPropertyWithDefaultValue(lexer, currentToken, prevToken)) {
Indent(editor, indentation);
if (currentToken.Kind == Tokens.Select)
@@ -808,22 +832,14 @@ namespace ICSharpCode.VBNetBinding
internal static bool IsBlockEnd(Token current, Token prev)
{
- if (current.Kind == Tokens.Next) {
- if (prev.Kind == Tokens.Resume)
- return false;
- else
- return true;
- }
+ if (current.Kind == Tokens.Next)
+ return prev.Kind == Tokens.EOL || prev.Kind == Tokens.Colon;
if (current.Kind == Tokens.Loop)
- return true;
+ return prev.Kind == Tokens.EOL || prev.Kind == Tokens.Colon;
- if (blockTokens.Contains(current.Kind)) {
- if (prev.Kind == Tokens.End)
- return true;
- else
- return false;
- }
+ if (blockTokens.Contains(current.Kind))
+ return prev.Kind == Tokens.End;
return IsSpecialCase(current, prev);
}
diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/ProjectImports.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/ProjectImports.cs
index f189be0d58..766ef099d3 100644
--- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/ProjectImports.cs
+++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/ProjectImports.cs
@@ -35,7 +35,7 @@ namespace ICSharpCode.VBNetBinding.OptionPanels
}
IProjectContent projectContent = ParserService.GetProjectContent(project);
- foreach(IProjectContent refProjectContent in projectContent.ReferencedContents) {
+ foreach(IProjectContent refProjectContent in projectContent.ThreadSafeGetReferencedContents()) {
AddNamespaces(refProjectContent);
}
diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs
index 334d1ebe1f..9a2de37c59 100644
--- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs
+++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs
@@ -49,8 +49,7 @@ namespace ICSharpCode.VBNetBinding
InitVB();
}
- public const string DefaultTargetsFile = @"$(MSBuildBinPath)\Microsoft.VisualBasic.Targets";
- public const string ExtendedTargetsFile = @"$(SharpDevelopBinPath)\SharpDevelop.Build.VisualBasic.targets";
+ public const string DefaultTargetsFile = @"$(MSBuildToolsPath)\Microsoft.VisualBasic.targets";
public VBNetProject(ProjectCreateInformation info)
: base(info)
@@ -108,43 +107,6 @@ namespace ICSharpCode.VBNetBinding
}
}
- /*
- protected override void AddOrRemoveExtensions()
- {
- // Test if SharpDevelop-Build extensions are required
- bool needExtensions = false;
-
- foreach (var p in GetAllProperties("TargetFrameworkVersion")) {
- if (p.IsImported == false) {
- if (p.Value.StartsWith("CF")) {
- needExtensions = true;
- }
- }
- }
-
- foreach (Microsoft.Build.BuildEngine.Import import in MSBuildProject.Imports) {
- if (needExtensions) {
- if (DefaultTargetsFile.Equals(import.ProjectPath, StringComparison.OrdinalIgnoreCase)) {
- //import.ProjectPath = extendedTargets;
- MSBuildInternals.SetImportProjectPath(this, import, ExtendedTargetsFile);
- // Workaround for SD2-1490. It would be better if the project browser could refresh itself
- // when necessary.
- ProjectBrowserPad.Instance.ProjectBrowserControl.RefreshView();
- break;
- }
- } else {
- if (ExtendedTargetsFile.Equals(import.ProjectPath, StringComparison.OrdinalIgnoreCase)) {
- //import.ProjectPath = defaultTargets;
- MSBuildInternals.SetImportProjectPath(this, import, DefaultTargetsFile);
- // Workaround for SD2-1490. It would be better if the project browser could refresh itself
- // when necessary.
- ProjectBrowserPad.Instance.ProjectBrowserControl.RefreshView();
- break;
- }
- }
- }
- }*/
-
public Nullable OptionInfer {
get { return GetValue("OptionInfer", false); }
}
diff --git a/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/EndSubTests.cs b/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/EndSubTests.cs
index 01d104c1b8..fd3624b556 100644
--- a/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/EndSubTests.cs
+++ b/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/EndSubTests.cs
@@ -173,5 +173,52 @@ namespace ICSharpCode.VBNetBinding.Tests
RunTest(code, cursorOffset, expectedCode, expectedOffset, '\n');
}
+
+ [Test]
+ public void AutomaticPropertyWithInitializer()
+ {
+ string code = "Public Class Foo\r\n" +
+ "\tPublic Property Bar As Boolean = True\r\n" +
+ "\r\n" + // This extra new line is required. This is the new line just entered by the user.
+ "End Class";
+
+ string bar = "= True\r\n";
+ int cursorOffset = code.IndexOf(bar) + bar.Length;
+
+ string expectedCode = "Public Class Foo\r\n" +
+ "\tPublic Property Bar As Boolean = True\r\n" +
+ "\t\r\n" +
+ "End Class";
+
+ int expectedOffset = ("Public Class Foo\r\n" +
+ "\tPublic Property Bar As Boolean = True\r\n" +
+ "\t").Length;
+
+ RunTest(code, cursorOffset, expectedCode, expectedOffset, '\n');
+ }
+
+ [Test]
+ public void StandardProperty()
+ {
+ string code = "Public Class Foo\r\n" +
+ "\tPublic Property Bar As Boolean\r\n" +
+ "\r\n" + // This extra new line is required. This is the new line just entered by the user.
+ "End Class";
+
+ string bar = "As Boolean\r\n";
+ int cursorOffset = code.IndexOf(bar) + bar.Length;
+
+ string expectedCode = "Public Class Foo\r\n" +
+ "\tPublic Property Bar As Boolean\r\n" +
+ "\t\t\r\n" +
+ "\tEnd Property\r\n" +
+ "End Class";
+
+ int expectedOffset = ("Public Class Foo\r\n" +
+ "\tPublic Property Bar As Boolean\r\n" +
+ "\t\t").Length;
+
+ RunTest(code, cursorOffset, expectedCode, expectedOffset, '\n');
+ }
}
}
diff --git a/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs b/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs
index 9bf3974b77..da07315820 100644
--- a/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs
+++ b/src/AddIns/BackendBindings/VBNetBinding/Test/FormattingStrategy/IndentationTests.cs
@@ -524,6 +524,54 @@ End Module";
RunFormatTest(code, expected);
}
+ [Test]
+ public void ForNextOneLine()
+ {
+ string expected = @"Module Core
+ Sub Main
+ Dim a = 1
+ For i = 0 To 10 : Console.WriteLine(i) : Next
+ Dim b = 2
+ End Sub
+End Module";
+
+ string code = @"Module Core
+Sub Main
+Dim a = 1
+For i = 0 To 10 : Console.WriteLine(i) : Next
+Dim b = 2
+End Sub
+End Module";
+
+ RunFormatTest(code, expected);
+ }
+
+ [Test]
+ public void RandomNext()
+ {
+ string expected = @"Module Core
+ Public Function GetRandomNumber( _
+ Optional ByVal Low As Integer = 1, _
+ Optional ByVal High As Integer = 100) As Integer
+ ' Returns a random number,
+ ' between the optional Low and High parameters
+ Return objRandom.Next(Low, High + 1)
+ End Function
+End Module";
+
+ string code = @"Module Core
+Public Function GetRandomNumber( _
+Optional ByVal Low As Integer = 1, _
+Optional ByVal High As Integer = 100) As Integer
+' Returns a random number,
+' between the optional Low and High parameters
+Return objRandom.Next(Low, High + 1)
+End Function
+End Module";
+
+ RunFormatTest(code, expected);
+ }
+
void RunFormatTest(string code, string expectedCode)
{
AvalonEditTextEditorAdapter editor = new AvalonEditTextEditorAdapter(new TextEditor());
diff --git a/src/AddIns/BackendBindings/VBNetBinding/Test/MockTextEditor.cs b/src/AddIns/BackendBindings/VBNetBinding/Test/MockTextEditor.cs
index 72ebc330fb..616eebbb0d 100644
--- a/src/AddIns/BackendBindings/VBNetBinding/Test/MockTextEditor.cs
+++ b/src/AddIns/BackendBindings/VBNetBinding/Test/MockTextEditor.cs
@@ -49,7 +49,7 @@ namespace ICSharpCode.VBNetBinding.Tests
}
}
- this.TextEditor.TextArea.TextView.Services.AddService(typeof(ISyntaxHighlighter), new AvalonEditSyntaxHighlighterAdapter(this.TextEditor));
+// this.TextEditor.TextArea.TextView.Services.AddService(typeof(ISyntaxHighlighter), new AvalonEditSyntaxHighlighterAdapter(this.TextEditor));
this.TextEditor.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("VBNet");
new VBNetLanguageBinding().Attach(this);
diff --git a/src/AddIns/BackendBindings/XamlBinding/XamlBinding.Tests/MockTextEditor.cs b/src/AddIns/BackendBindings/XamlBinding/XamlBinding.Tests/MockTextEditor.cs
index 2f59a61e1f..d583271b93 100644
--- a/src/AddIns/BackendBindings/XamlBinding/XamlBinding.Tests/MockTextEditor.cs
+++ b/src/AddIns/BackendBindings/XamlBinding/XamlBinding.Tests/MockTextEditor.cs
@@ -51,7 +51,7 @@ namespace ICSharpCode.XamlBinding.Tests
}
}
- this.TextEditor.TextArea.TextView.Services.AddService(typeof(ISyntaxHighlighter), new AvalonEditSyntaxHighlighterAdapter(this.TextEditor));
+// this.TextEditor.TextArea.TextView.Services.AddService(typeof(ISyntaxHighlighter), new AvalonEditSyntaxHighlighterAdapter(this.TextEditor));
this.TextEditor.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("XML");
new XamlLanguageBinding().Attach(this);
diff --git a/src/AddIns/BackendBindings/XamlBinding/XamlBinding/CompletionDataHelper.cs b/src/AddIns/BackendBindings/XamlBinding/XamlBinding/CompletionDataHelper.cs
index 6aec28a8c5..6ab91827e8 100644
--- a/src/AddIns/BackendBindings/XamlBinding/XamlBinding/CompletionDataHelper.cs
+++ b/src/AddIns/BackendBindings/XamlBinding/XamlBinding/CompletionDataHelper.cs
@@ -311,7 +311,7 @@ namespace ICSharpCode.XamlBinding
{
List list = new List();
- foreach (IProjectContent content in projectContent.ReferencedContents) {
+ foreach (IProjectContent content in projectContent.ThreadSafeGetReferencedContents()) {
foreach (IAttribute att in content.GetAssemblyAttributes()) {
if (att.PositionalArguments.Count == 2
&& att.AttributeType.FullyQualifiedName == "System.Windows.Markup.XmlnsDefinitionAttribute") {
diff --git a/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompilationUnit.cs b/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompilationUnit.cs
index 7ac7da7d53..dbba1cbb8b 100644
--- a/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompilationUnit.cs
+++ b/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompilationUnit.cs
@@ -2,10 +2,12 @@
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
-using System.Linq;
-using ICSharpCode.SharpDevelop.Dom;
using System.Collections;
using System.Collections.Generic;
+using System.Linq;
+
+using ICSharpCode.SharpDevelop;
+using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.XamlBinding
{
@@ -81,7 +83,7 @@ namespace ICSharpCode.XamlBinding
IReturnType type = FindTypeInAssembly(pc, xmlNamespace, className);
if (type != null)
return type;
- foreach (IProjectContent p in pc.ReferencedContents) {
+ foreach (IProjectContent p in pc.ThreadSafeGetReferencedContents()) {
type = FindTypeInAssembly(p, xmlNamespace, className);
if (type != null)
return type;
@@ -117,7 +119,7 @@ namespace ICSharpCode.XamlBinding
else {
var list = new List();
AddNamespaceMembersInAssembly(pc, xmlNamespace, list);
- foreach (IProjectContent p in pc.ReferencedContents) {
+ foreach (IProjectContent p in pc.ThreadSafeGetReferencedContents()) {
AddNamespaceMembersInAssembly(p, xmlNamespace, list);
}
return list.OfType();
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs
index 2525612d69..72199e81bd 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs
@@ -40,5 +40,26 @@ namespace ICSharpCode.SharpDevelop.Services
// Properties for the DebuggeeExceptionForm
public FormWindowState DebuggeeExceptionWindowState { get; set; }
+
+ ///
+ /// Used to update status of some debugger properties while debugger is running.
+ ///
+ internal static void ResetStatus(Action resetStatus)
+ {
+ Process proc = WindowsDebugger.CurrentProcess;
+ // debug session is running
+ if (proc != null) {
+ bool wasPausedNow = false;
+ // if it is not paused, break execution
+ if (!proc.IsPaused) {
+ proc.Break();
+ wasPausedNow = true;
+ }
+ resetStatus(proc);
+ // continue if it was not paused before
+ if (wasPausedNow)
+ proc.AsyncContinue();
+ }
+ }
}
}
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml.cs b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml.cs
index f467805274..dd878773cf 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml.cs
@@ -50,19 +50,7 @@ namespace Debugger.AddIn.Options
public override bool SaveOptions()
{
bool result = base.SaveOptions();
- Process proc = WindowsDebugger.CurrentProcess;
- // debug session is running
- if (proc != null) {
- bool wasPausedNow = false;
- // if it is not paused, break execution
- if (!proc.IsPaused) {
- proc.Break();
- wasPausedNow = true;
- }
- proc.Debugger.ResetJustMyCodeStatus();
- // continue if it was not paused before
- if (wasPausedNow) proc.AsyncContinue();
- }
+ DebuggingOptions.ResetStatus(proc => proc.Debugger.ResetJustMyCodeStatus());
return result;
}
}
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingSymbolsPanel.cs b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingSymbolsPanel.cs
index 8abeb8e487..2e0329b2a6 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingSymbolsPanel.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingSymbolsPanel.cs
@@ -30,11 +30,11 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
public override bool StorePanelContents()
{
DebuggingOptions.Instance.SymbolsSearchPaths = pathList.GetList();
- Process proc = WindowsDebugger.CurrentProcess;
- if (proc != null) {
- proc.Debugger.ReloadModuleSymbols();
- proc.Debugger.ResetJustMyCodeStatus();
- }
+ DebuggingOptions.ResetStatus(
+ proc => {
+ proc.Debugger.ReloadModuleSymbols();
+ proc.Debugger.ResetJustMyCodeStatus();
+ });
return true;
}
}
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingSymbolsPanel.resx b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingSymbolsPanel.resx
index 7080a7d118..1af7de150c 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingSymbolsPanel.resx
+++ b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingSymbolsPanel.resx
@@ -112,9 +112,9 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
\ No newline at end of file
diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/WatchPad.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/WatchPad.cs
index 159ac265dc..761cf7aadb 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/Pads/WatchPad.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/WatchPad.cs
@@ -46,12 +46,6 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
this.tree.ShowRoot = false;
this.tree.View = (GridView)res["variableGridView"];
this.tree.ContextMenu = MenuService.CreateContextMenu(this, "/SharpDevelop/Pads/WatchPad/ContextMenu");
- this.tree.KeyUp += delegate(object sender, KeyEventArgs e) {
- if (e.Key == Key.Delete) {
- RemoveWatchCommand cmd = new RemoveWatchCommand { Owner = this };
- cmd.Run();
- }
- };
this.tree.MouseDoubleClick += delegate(object sender, MouseButtonEventArgs e) {
if (this.tree.SelectedItem == null) {
AddWatchCommand cmd = new AddWatchCommand { Owner = this };
@@ -103,6 +97,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
} catch (GetValueException e) {
node = new TreeNode("Icons.16x16.Error", name, e.Message, string.Empty, null);
}
+ node.CanDelete = true;
node.CanSetName = true;
node.PropertyChanged += (s, e) => { if (e.PropertyName == "Name") WindowsDebugger.RefreshPads(); };
return node.ToSharpTreeNode();
diff --git a/src/AddIns/Debugger/Debugger.AddIn/TreeModel/SharpTreeNodeAdapter.cs b/src/AddIns/Debugger/Debugger.AddIn/TreeModel/SharpTreeNodeAdapter.cs
index c49c09a947..2aed8dd6e5 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/TreeModel/SharpTreeNodeAdapter.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/TreeModel/SharpTreeNodeAdapter.cs
@@ -35,6 +35,16 @@ namespace Debugger.AddIn.Pads.Controls
get { return this.Node.GetChildren != null; }
}
+ public override bool CanDelete()
+ {
+ return this.Node.CanDelete;
+ }
+
+ public override void Delete()
+ {
+ Parent.Children.Remove(this);
+ }
+
protected override void LoadChildren()
{
if (this.Node.GetChildren != null) {
diff --git a/src/AddIns/Debugger/Debugger.AddIn/TreeModel/TreeNode.cs b/src/AddIns/Debugger/Debugger.AddIn/TreeModel/TreeNode.cs
index de334bb9c4..40f5195451 100644
--- a/src/AddIns/Debugger/Debugger.AddIn/TreeModel/TreeNode.cs
+++ b/src/AddIns/Debugger/Debugger.AddIn/TreeModel/TreeNode.cs
@@ -25,7 +25,9 @@ namespace Debugger.AddIn.TreeModel
string name;
string value;
string type;
-
+
+ public bool CanDelete { get; set; }
+
public IImage Image {
get {
OnPropertyRead("Image");
diff --git a/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs b/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs
index 36eaaf1d05..75162c8d2f 100644
--- a/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs
+++ b/src/AddIns/Debugger/Debugger.Core/IDStringProvider.cs
@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
+using Debugger.MetaData;
namespace Debugger
{
@@ -42,7 +43,11 @@ namespace Debugger
MethodInfo mr = (MethodInfo)member;
if (mr.IsGenericMethod) {
b.Append("``");
- b.Append(mr.GetGenericArguments().Length);
+ // DebugMethodInfo does not implement GetGenericArguments
+ if (mr is DebugMethodInfo)
+ b.Append(((DebugMethodInfo)mr).GenericParameterCount);
+ else
+ b.Append(mr.GetGenericArguments().Length);
}
parameters = mr.GetParameters();
if (mr.Name == "op_Implicit" || mr.Name == "op_Explicit") {
@@ -73,7 +78,7 @@ namespace Debugger
return;
}
if (type.IsGenericType) {
- AppendTypeNameWithArguments(b, type.GetElementType(), type.GetGenericArguments());
+ AppendTypeNameWithArguments(b, type, type.GetGenericArguments());
} else if (type.HasElementType) {
AppendTypeName(b, type.GetElementType());
if (type.IsArray) {
diff --git a/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs b/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs
index 82f71006e3..a598cfbdd9 100644
--- a/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs
+++ b/src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs
@@ -447,7 +447,7 @@ namespace Debugger
public void ExitThread(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread)
{
- Thread thread = process.TryGetThread(pThread);
+ Thread thread = process.GetThread(pThread);
// ICorDebugThread is still not dead and can be used for some operations
if (thread != null) {
diff --git a/src/AddIns/Debugger/Debugger.Core/MetaData/DebugMethodInfo.cs b/src/AddIns/Debugger/Debugger.Core/MetaData/DebugMethodInfo.cs
index 38a8c9aff0..fe9d8b716f 100644
--- a/src/AddIns/Debugger/Debugger.Core/MetaData/DebugMethodInfo.cs
+++ b/src/AddIns/Debugger/Debugger.Core/MetaData/DebugMethodInfo.cs
@@ -185,6 +185,13 @@ namespace Debugger.MetaData
get { return this.MethodDefSig.GenericParameterCount > 0; }
}
+ ///
+ /// Gets the number of generic parameters on this method.
+ ///
+ public int GenericParameterCount {
+ get { return this.MethodDefSig.GenericParameterCount; }
+ }
+
///
public override RuntimeMethodHandle MethodHandle {
get { throw new NotSupportedException(); }
diff --git a/src/AddIns/Debugger/Debugger.Core/Process.cs b/src/AddIns/Debugger/Debugger.Core/Process.cs
index 4ba91fa22e..c6c879ed11 100644
--- a/src/AddIns/Debugger/Debugger.Core/Process.cs
+++ b/src/AddIns/Debugger/Debugger.Core/Process.cs
@@ -191,7 +191,8 @@ namespace Debugger
throw new DebuggerException("Eval not found for given ICorDebugEval");
}
- public Module GetModule(string filename) {
+ public Module GetModule(string filename)
+ {
foreach(Module module in this.Modules) {
if (module.Name == filename) {
return module;
@@ -200,7 +201,8 @@ namespace Debugger
throw new DebuggerException("Module \"" + filename + "\" is not in collection");
}
- internal Module GetModule(ICorDebugModule corModule) {
+ internal Module GetModule(ICorDebugModule corModule)
+ {
foreach(Module module in this.Modules) {
if (module.CorModule == corModule) {
return module;
@@ -209,22 +211,18 @@ namespace Debugger
throw new DebuggerException("Module is not in collection");
}
- internal Thread GetThread(ICorDebugThread corThread) {
- foreach(Thread thread in this.Threads) {
- if (thread.CorThread == corThread) {
- return thread;
- }
- }
- throw new DebuggerException("Thread is not in collection");
- }
-
- internal Thread TryGetThread(ICorDebugThread corThread) {
+ internal Thread GetThread(ICorDebugThread corThread)
+ {
foreach(Thread thread in this.Threads) {
if (thread.CorThread == corThread) {
return thread;
}
}
- return null;
+ // Sometimes, the thread is not reported for some unkown reason
+ TraceMessage("Thread not found in collection");
+ Thread newThread = new Thread(this, corThread);
+ this.threads.Add(newThread);
+ return newThread;
}
/// Read the specified amount of memory at the given memory address
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj
index 87cde8b6bd..a57f66e918 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj
@@ -64,6 +64,9 @@
+
+ 3.5
+
3.0
@@ -72,6 +75,7 @@
+
@@ -241,7 +245,6 @@
-
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditSyntaxHighlighterAdapter.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/AvalonEditSyntaxHighlighterAdapter.cs
similarity index 71%
rename from src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditSyntaxHighlighterAdapter.cs
rename to src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/AvalonEditSyntaxHighlighterAdapter.cs
index 772f6536f1..dedbc04857 100644
--- a/src/Main/Base/Project/Src/Editor/AvalonEdit/AvalonEditSyntaxHighlighterAdapter.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/AvalonEditSyntaxHighlighterAdapter.cs
@@ -3,12 +3,15 @@
using System;
using System.Collections.Generic;
+using System.Drawing;
using System.Linq;
+using System.Windows;
using ICSharpCode.AvalonEdit;
using ICSharpCode.AvalonEdit.Highlighting;
+using ICSharpCode.SharpDevelop.Editor;
-namespace ICSharpCode.SharpDevelop.Editor.AvalonEdit
+namespace ICSharpCode.AvalonEdit.AddIn
{
public class AvalonEditSyntaxHighlighterAdapter : ISyntaxHighlighter
{
@@ -35,5 +38,16 @@ namespace ICSharpCode.SharpDevelop.Editor.AvalonEdit
return Enumerable.Empty();
}
}
+
+ public HighlightingColor GetNamedColor(string name)
+ {
+ TextEditor editor = textEditor.GetService(typeof(TextEditor)) as TextEditor;
+ if (editor == null)
+ return null;
+ var highlighting = editor.SyntaxHighlighting;
+ if (highlighting == null)
+ return null;
+ return CustomizableHighlightingColorizer.CustomizeColor(name, CustomizedHighlightingColor.FetchCustomizations(highlighting.Name));
+ }
}
}
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/AvalonEditViewContent.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/AvalonEditViewContent.cs
index 25b4989d99..c5be104c46 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/AvalonEditViewContent.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/AvalonEditViewContent.cs
@@ -275,7 +275,8 @@ namespace ICSharpCode.AvalonEdit.AddIn
{
if (trackedFeature != null)
trackedFeature.EndTracking();
- this.PrimaryFile.IsDirtyChanged -= PrimaryFile_IsDirtyChanged;
+ if (PrimaryFile != null)
+ this.PrimaryFile.IsDirtyChanged -= PrimaryFile_IsDirtyChanged;
base.Dispose();
BookmarksDetach();
codeEditor.Dispose();
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChangeMarkerMargin.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChangeMarkerMargin.cs
index 600cba254f..fbf2af3dc1 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChangeMarkerMargin.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChangeMarkerMargin.cs
@@ -39,11 +39,39 @@ namespace ICSharpCode.AvalonEdit.AddIn
{
if (!disposed) {
changeWatcher.ChangeOccurred -= ChangeOccurred;
- changeWatcher.Dispose();
disposed = true;
}
}
+ #region Brushes
+ public static readonly DependencyProperty AddedLineBrushProperty =
+ DependencyProperty.Register("AddedLineBrush", typeof(Brush), typeof(ChangeMarkerMargin),
+ new FrameworkPropertyMetadata(Brushes.LightGreen));
+
+ public Brush AddedLineBrush {
+ get { return (Brush)GetValue(AddedLineBrushProperty); }
+ set { SetValue(AddedLineBrushProperty, value); }
+ }
+
+ public static readonly DependencyProperty ChangedLineBrushProperty =
+ DependencyProperty.Register("ChangedLineBrush", typeof(Brush), typeof(ChangeMarkerMargin),
+ new FrameworkPropertyMetadata(Brushes.LightBlue));
+
+ public Brush ChangedLineBrush {
+ get { return (Brush)GetValue(ChangedLineBrushProperty); }
+ set { SetValue(ChangedLineBrushProperty, value); }
+ }
+
+ public static readonly DependencyProperty UnsavedLineBrushProperty =
+ DependencyProperty.Register("UnsavedLineBrush", typeof(Brush), typeof(ChangeMarkerMargin),
+ new FrameworkPropertyMetadata(Brushes.Yellow));
+
+ public Brush UnsavedLineBrush {
+ get { return (Brush)GetValue(UnsavedLineBrushProperty); }
+ set { SetValue(UnsavedLineBrushProperty, value); }
+ }
+ #endregion
+
protected override void OnRender(DrawingContext drawingContext)
{
Size renderSize = this.RenderSize;
@@ -53,7 +81,7 @@ namespace ICSharpCode.AvalonEdit.AddIn
var zeroLineInfo = changeWatcher.GetChange(0);
foreach (VisualLine line in textView.VisualLines) {
- Rect rect = new Rect(0, line.VisualTop - textView.ScrollOffset.Y, 5, line.Height);
+ Rect rect = new Rect(0, line.VisualTop - textView.ScrollOffset.Y - 1, 5, line.Height + 2);
LineChangeInfo info = changeWatcher.GetChange(line.FirstDocumentLine.LineNumber);
@@ -65,14 +93,14 @@ namespace ICSharpCode.AvalonEdit.AddIn
case ChangeType.None:
break;
case ChangeType.Added:
- drawingContext.DrawRectangle(Brushes.LightGreen, null, rect);
+ drawingContext.DrawRectangle(AddedLineBrush, null, rect);
break;
case ChangeType.Deleted:
case ChangeType.Modified:
- drawingContext.DrawRectangle(Brushes.LightBlue, null, rect);
+ drawingContext.DrawRectangle(ChangedLineBrush, null, rect);
break;
case ChangeType.Unsaved:
- drawingContext.DrawRectangle(Brushes.Yellow, null, rect);
+ drawingContext.DrawRectangle(UnsavedLineBrush, null, rect);
break;
default:
throw new Exception("Invalid value for ChangeType");
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs
index c821cccfa5..34930797e0 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs
@@ -33,20 +33,11 @@ using ICSharpCode.SharpDevelop.Widgets.MyersDiff;
namespace ICSharpCode.AvalonEdit.AddIn
{
- public interface ICodeEditor
- {
- TextDocument Document { get; }
-
- void Redraw(ISegment segment, DispatcherPriority priority);
-
- event EventHandler DocumentChanged;
- }
-
///
/// Integrates AvalonEdit with SharpDevelop.
/// Also provides support for Split-View (showing two AvalonEdit instances using the same TextDocument)
///
- public class CodeEditor : Grid, IDisposable, ICodeEditor
+ public class CodeEditor : Grid, IDisposable
{
const string contextMenuPath = "/SharpDevelop/ViewContent/AvalonEdit/ContextMenu";
@@ -153,9 +144,9 @@ namespace ICSharpCode.AvalonEdit.AddIn
ParserService.ParseInformationUpdated += ParserServiceParseInformationUpdated;
this.FlowDirection = FlowDirection.LeftToRight; // code editing is always left-to-right
+ this.document = new TextDocument();
this.CommandBindings.Add(new CommandBinding(SharpDevelopRoutedCommands.SplitView, OnSplitView));
-
- textMarkerService = new TextMarkerService(this);
+ textMarkerService = new TextMarkerService(document);
iconBarManager = new IconBarManager();
if (CodeEditorOptions.Instance.EnableChangeMarkerMargin) {
changeWatcher = new DefaultChangeWatcher();
@@ -165,9 +156,6 @@ namespace ICSharpCode.AvalonEdit.AddIn
Debug.Assert(primaryTextEditorAdapter != null);
activeTextEditor = primaryTextEditor;
- this.Document = primaryTextEditor.Document;
- primaryTextEditor.SetBinding(TextEditor.DocumentProperty, new Binding("Document") { Source = this });
-
this.ColumnDefinitions.Add(new ColumnDefinition());
this.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
this.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star), MinHeight = minRowHeight });
@@ -189,6 +177,8 @@ namespace ICSharpCode.AvalonEdit.AddIn
primaryTextEditor.UpdateCustomizedHighlighting();
if (secondaryTextEditor != null)
secondaryTextEditor.UpdateCustomizedHighlighting();
+ foreach (var bookmark in BookmarkManager.GetBookmarks(fileName).OfType())
+ bookmark.SetMarker();
}
///
@@ -199,6 +189,7 @@ namespace ICSharpCode.AvalonEdit.AddIn
CodeEditorView codeEditorView = new CodeEditorView();
CodeEditorAdapter adapter = new CodeEditorAdapter(this, codeEditorView);
codeEditorView.Adapter = adapter;
+ codeEditorView.Document = document;
TextView textView = codeEditorView.TextArea.TextView;
textView.Services.AddService(typeof(ITextEditor), adapter);
textView.Services.AddService(typeof(CodeEditor), this);
@@ -313,11 +304,29 @@ namespace ICSharpCode.AvalonEdit.AddIn
NewLineConsistencyCheck.StartConsistencyCheck(this);
}
+ bool documentFirstLoad = true;
+ bool clearUndoStackOnSwitch = true;
+
+ ///
+ /// Gets/Sets whether to clear the undo stack when reloading the document.
+ /// The default is true.
+ /// http://community.sharpdevelop.net/forums/t/15816.aspx
+ ///
+ public bool ClearUndoStackOnSwitch {
+ get { return clearUndoStackOnSwitch; }
+ set { clearUndoStackOnSwitch = value; }
+ }
+
void ReloadDocument(TextDocument document, string newContent)
{
var diff = new MyersDiffAlgorithm(new StringSequence(document.Text), new StringSequence(newContent));
document.Replace(0, document.TextLength, newContent, diff.GetEdits().ToOffsetChangeMap());
- document.UndoStack.ClearAll();
+
+ if (this.ClearUndoStackOnSwitch || documentFirstLoad)
+ document.UndoStack.ClearAll();
+
+ if (documentFirstLoad)
+ documentFirstLoad = false;
}
public event EventHandler LoadedFileContent;
@@ -340,8 +349,6 @@ namespace ICSharpCode.AvalonEdit.AddIn
secondaryTextEditorAdapter = (CodeEditorAdapter)secondaryTextEditor.TextArea.GetService(typeof(ITextEditor));
Debug.Assert(primaryTextEditorAdapter != null);
- secondaryTextEditor.SetBinding(TextEditor.DocumentProperty,
- new Binding(TextEditor.DocumentProperty.Name) { Source = primaryTextEditor });
secondaryTextEditor.SetBinding(TextEditor.IsReadOnlyProperty,
new Binding(TextEditor.IsReadOnlyProperty.Name) { Source = primaryTextEditor });
secondaryTextEditor.SyntaxHighlighting = primaryTextEditor.SyntaxHighlighting;
@@ -610,6 +617,8 @@ namespace ICSharpCode.AvalonEdit.AddIn
if (errorPainter != null)
errorPainter.Dispose();
+ if (changeWatcher != null)
+ changeWatcher.Dispose();
this.Document = null;
DisposeTextEditor(primaryTextEditor);
if (secondaryTextEditor != null)
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs
index b0044b4805..a29689a22a 100755
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs
@@ -14,6 +14,7 @@ using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Documents;
using System.Windows.Input;
+using System.Windows.Media;
using System.Windows.Threading;
using ICSharpCode.AvalonEdit.AddIn.Options;
@@ -24,6 +25,7 @@ using ICSharpCode.AvalonEdit.Folding;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Rendering;
using ICSharpCode.SharpDevelop;
+using ICSharpCode.SharpDevelop.Bookmarks;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Editor;
using ICSharpCode.SharpDevelop.Editor.AvalonEdit;
@@ -87,13 +89,17 @@ namespace ICSharpCode.AvalonEdit.AddIn
protected override void OnOptionChanged(PropertyChangedEventArgs e)
{
base.OnOptionChanged(e);
- if (e.PropertyName == "HighlightBrackets")
- HighlightBrackets(null, e);
- else if (e.PropertyName == "EnableFolding")
- UpdateParseInformationForFolding();
- else if (e.PropertyName == "HighlightSymbol") {
- if (this.caretReferencesRenderer != null)
- this.caretReferencesRenderer.ClearHighlight();
+ switch (e.PropertyName) {
+ case "HighlightBrackets":
+ HighlightBrackets(null, e);
+ break;
+ case "EnableFolding":
+ UpdateParseInformationForFolding();
+ break;
+ case "HighlightSymbol":
+ if (this.caretReferencesRenderer != null)
+ this.caretReferencesRenderer.ClearHighlight();
+ break;
}
}
@@ -540,18 +546,13 @@ namespace ICSharpCode.AvalonEdit.AddIn
string language = this.SyntaxHighlighting != null ? this.SyntaxHighlighting.Name : null;
CustomizableHighlightingColorizer.ApplyCustomizationsToDefaultElements(this, FetchCustomizations(language));
BracketHighlightRenderer.ApplyCustomizationsToRendering(this.bracketRenderer, FetchCustomizations(language));
- HighlightingOptions.ApplyToFolding(this, FetchCustomizations(language));
+ HighlightingOptions.ApplyToRendering(this, FetchCustomizations(language));
this.TextArea.TextView.Redraw(); // manually redraw if default elements didn't change but customized highlightings did
}
static IEnumerable FetchCustomizations(string languageName)
{
- // Access CustomizedHighlightingColor.ActiveColors within enumerator so that always the latest version is used.
- // Using CustomizedHighlightingColor.ActiveColors.Where(...) would not work correctly!
- foreach (CustomizedHighlightingColor color in CustomizedHighlightingColor.ActiveColors) {
- if (color.Language == null || color.Language == languageName)
- yield return color;
- }
+ return CustomizedHighlightingColor.FetchCustomizations(languageName);
}
}
}
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Commands/FoldingCommands.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Commands/FoldingCommands.cs
index 6ee83c1c44..5d777028ac 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Commands/FoldingCommands.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Commands/FoldingCommands.cs
@@ -16,14 +16,14 @@ namespace ICSharpCode.AvalonEdit.AddIn.Commands
{
ITextEditorProvider provider = WorkbenchSingleton.Workbench.ActiveViewContent as ITextEditorProvider;
ITextEditor editor = provider.TextEditor;
- ParserFoldingStrategy strategy = editor.GetService(typeof(ParserFoldingStrategy)) as ParserFoldingStrategy;
+ FoldingManager foldingManager = editor.GetService(typeof(FoldingManager)) as FoldingManager;
- if (strategy != null) {
+ if (foldingManager != null) {
// look for folding on this line:
- FoldingSection folding = strategy.FoldingManager.GetNextFolding(editor.Document.PositionToOffset(editor.Caret.Line, 1));
+ FoldingSection folding = foldingManager.GetNextFolding(editor.Document.PositionToOffset(editor.Caret.Line, 1));
if (folding == null || editor.Document.GetLineForOffset(folding.StartOffset).LineNumber != editor.Caret.Line) {
// no folding found on current line: find innermost folding containing the caret
- folding = strategy.FoldingManager.GetFoldingsContaining(editor.Caret.Offset).LastOrDefault();
+ folding = foldingManager.GetFoldingsContaining(editor.Caret.Offset).LastOrDefault();
}
if (folding != null) {
folding.IsFolded = !folding.IsFolded;
@@ -38,17 +38,17 @@ namespace ICSharpCode.AvalonEdit.AddIn.Commands
{
ITextEditorProvider provider = WorkbenchSingleton.Workbench.ActiveViewContent as ITextEditorProvider;
ITextEditor editor = provider.TextEditor;
- ParserFoldingStrategy strategy = editor.GetService(typeof(ParserFoldingStrategy)) as ParserFoldingStrategy;
+ FoldingManager foldingManager = editor.GetService(typeof(FoldingManager)) as FoldingManager;
- if (strategy != null) {
+ if (foldingManager != null) {
bool doFold = true;
- foreach (FoldingSection fm in strategy.FoldingManager.AllFoldings) {
+ foreach (FoldingSection fm in foldingManager.AllFoldings) {
if (fm.IsFolded) {
doFold = false;
break;
}
}
- foreach (FoldingSection fm in strategy.FoldingManager.AllFoldings) {
+ foreach (FoldingSection fm in foldingManager.AllFoldings) {
fm.IsFolded = doFold;
}
}
@@ -61,10 +61,10 @@ namespace ICSharpCode.AvalonEdit.AddIn.Commands
{
ITextEditorProvider provider = WorkbenchSingleton.Workbench.ActiveViewContent as ITextEditorProvider;
ITextEditor editor = provider.TextEditor;
- ParserFoldingStrategy strategy = editor.GetService(typeof(ParserFoldingStrategy)) as ParserFoldingStrategy;
+ FoldingManager foldingManager = editor.GetService(typeof(FoldingManager)) as FoldingManager;
- if (strategy != null) {
- foreach (FoldingSection fm in strategy.FoldingManager.AllFoldings) {
+ if (foldingManager != null) {
+ foreach (FoldingSection fm in foldingManager.AllFoldings) {
fm.IsFolded = ParserFoldingStrategy.IsDefinition(fm);
}
}
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizableHighlightingColorizer.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizableHighlightingColorizer.cs
index 22f99bdb23..7cd9817fa0 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizableHighlightingColorizer.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizableHighlightingColorizer.cs
@@ -12,6 +12,9 @@ using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Rendering;
+using ICSharpCode.SharpDevelop.Bookmarks;
+using ICSharpCode.SharpDevelop.Debugging;
+using ICSharpCode.SharpDevelop.Project.Commands;
namespace ICSharpCode.AvalonEdit.AddIn
{
@@ -24,6 +27,10 @@ namespace ICSharpCode.AvalonEdit.AddIn
public const string SelectedText = "Selected text";
public const string NonPrintableCharacters = "Non-printable characters";
public const string LineNumbers = "Line numbers";
+ public const string LinkText = "Link text";
+ public const string BreakpointMarker = "Breakpoint";
+ public const string InstructionPointerMarker = "Current statement";
+ public const string ColumnRuler = "Column ruler";
public static void ApplyCustomizationsToDefaultElements(TextEditor textEditor, IEnumerable customizations)
{
@@ -34,6 +41,9 @@ namespace ICSharpCode.AvalonEdit.AddIn
textEditor.TextArea.ClearValue(TextArea.SelectionBrushProperty);
textEditor.TextArea.ClearValue(TextArea.SelectionForegroundProperty);
textEditor.TextArea.TextView.ClearValue(TextView.NonPrintableCharacterBrushProperty);
+ textEditor.TextArea.TextView.ClearValue(TextView.LinkTextForegroundBrushProperty);
+ textEditor.TextArea.TextView.ClearValue(TextView.LinkTextBackgroundBrushProperty);
+ textEditor.TextArea.TextView.ClearValue(TextView.ColumnRulerPenProperty);
// 'assigned' flags are used so that the first matching customization wins.
// This is necessary because more specific customizations come first in the list
@@ -42,6 +52,9 @@ namespace ICSharpCode.AvalonEdit.AddIn
bool assignedSelectedText = false;
bool assignedNonPrintableCharacter = false;
bool assignedLineNumbers = false;
+ bool assignedLinkText = false;
+ bool assignedColumnRulerColor = false;
+
foreach (CustomizedHighlightingColor color in customizations) {
switch (color.Name) {
case DefaultTextAndBackground:
@@ -88,6 +101,22 @@ namespace ICSharpCode.AvalonEdit.AddIn
if (color.Foreground != null)
textEditor.LineNumbersForeground = CreateFrozenBrush(color.Foreground.Value);
break;
+ case LinkText:
+ if (assignedLinkText)
+ continue;
+ assignedLinkText = true;
+ if (color.Foreground != null)
+ textEditor.TextArea.TextView.LinkTextForegroundBrush = CreateFrozenBrush(color.Foreground.Value);
+ if (color.Background != null)
+ textEditor.TextArea.TextView.LinkTextBackgroundBrush = CreateFrozenBrush(color.Background.Value);
+ break;
+ case ColumnRuler:
+ if (assignedColumnRulerColor)
+ continue;
+ assignedColumnRulerColor = true;
+ if (color.Foreground != null)
+ textEditor.TextArea.TextView.ColumnRulerPen = CreateFrozenPen(color.Foreground.Value);
+ break;
}
}
}
@@ -132,36 +161,42 @@ namespace ICSharpCode.AvalonEdit.AddIn
{
HighlightedLine line = baseHighlighter.HighlightLine(lineNumber);
foreach (HighlightedSection section in line.Sections) {
- section.Color = CustomizeColor(section.Color);
+ section.Color = CustomizeColor(section.Color, customizations);
}
return line;
}
-
- HighlightingColor CustomizeColor(HighlightingColor color)
- {
- if (color == null || color.Name == null)
- return color;
- foreach (CustomizedHighlightingColor customization in customizations) {
- if (customization.Name == color.Name) {
- return new HighlightingColor {
- Name = color.Name,
- Background = CreateBrush(customization.Background),
- Foreground = CreateBrush(customization.Foreground),
- FontWeight = customization.Bold ? FontWeights.Bold : FontWeights.Normal,
- FontStyle = customization.Italic ? FontStyles.Italic : FontStyles.Normal
- };
- }
- }
+
+ }
+
+ internal static HighlightingColor CustomizeColor(HighlightingColor color, IEnumerable customizations)
+ {
+ if (color == null || color.Name == null)
return color;
+ return CustomizeColor(color.Name, customizations) ?? color;
+ }
+
+ internal static HighlightingColor CustomizeColor(string name, IEnumerable customizations)
+ {
+ foreach (CustomizedHighlightingColor customization in customizations) {
+ if (customization.Name == name) {
+ return new HighlightingColor {
+ Name = name,
+ Background = CreateBrush(customization.Background),
+ Foreground = CreateBrush(customization.Foreground),
+ FontWeight = customization.Bold ? FontWeights.Bold : FontWeights.Normal,
+ FontStyle = customization.Italic ? FontStyles.Italic : FontStyles.Normal
+ };
+ }
}
-
- static HighlightingBrush CreateBrush(Color? color)
- {
- if (color == null)
- return null;
- else
- return new CustomizedBrush(color.Value);
- }
+ return null;
+ }
+
+ static HighlightingBrush CreateBrush(Color? color)
+ {
+ if (color == null)
+ return null;
+ else
+ return new CustomizedBrush(color.Value);
}
sealed class CustomizedBrush : HighlightingBrush
@@ -190,5 +225,12 @@ namespace ICSharpCode.AvalonEdit.AddIn
brush.Freeze();
return brush;
}
+
+ static Pen CreateFrozenPen(Color color)
+ {
+ Pen pen = new Pen(CreateFrozenBrush(color), 1);
+ pen.Freeze();
+ return pen;
+ }
}
}
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizedHighlightingColor.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizedHighlightingColor.cs
index c6847319d8..686a108278 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizedHighlightingColor.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizedHighlightingColor.cs
@@ -63,6 +63,16 @@ namespace ICSharpCode.AvalonEdit.AddIn
}
}
+ public static IEnumerable FetchCustomizations(string languageName)
+ {
+ // Access CustomizedHighlightingColor.ActiveColors within enumerator so that always the latest version is used.
+ // Using CustomizedHighlightingColor.ActiveColors.Where(...) would not work correctly!
+ foreach (CustomizedHighlightingColor color in CustomizedHighlightingColor.ActiveColors) {
+ if (color.Language == null || color.Language == languageName)
+ yield return color;
+ }
+ }
+
///
/// Occurs when the set of customized highlighting colors was changed.
///
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/DefaultChangeWatcher.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/DefaultChangeWatcher.cs
index 8e139caac6..8529a90b53 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/DefaultChangeWatcher.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/DefaultChangeWatcher.cs
@@ -197,8 +197,10 @@ namespace ICSharpCode.AvalonEdit.AddIn
if (!disposed) {
if (watcher != null)
watcher.Dispose();
- this.textDocument.LineTrackers.Remove(this);
- this.textDocument.UndoStack.PropertyChanged -= UndoStackPropertyChanged;
+ if (this.textDocument != null) {
+ this.textDocument.LineTrackers.Remove(this);
+ this.textDocument.UndoStack.PropertyChanged -= UndoStackPropertyChanged;
+ }
disposed = true;
}
}
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/CodeEditorOptions.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/CodeEditorOptions.cs
index 547217bb2d..70f3ea8cde 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/CodeEditorOptions.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/CodeEditorOptions.cs
@@ -245,7 +245,7 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
}
int ITextEditorOptions.VerticalRulerColumn {
- get { return 120; }
+ get { return ColumnRulerPosition; }
}
}
}
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml
index f8ab41dd0c..0fec4ce0d4 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml
@@ -1,45 +1,62 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml.cs
index e6a5fea194..5d5892aaf3 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/HighlightingOptions.xaml.cs
@@ -5,22 +5,28 @@ using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
+using System.Globalization;
using System.IO;
using System.Linq;
+using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Xml;
-
+using System.Xml.Linq;
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Folding;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
using ICSharpCode.AvalonEdit.Rendering;
+using ICSharpCode.Core;
+using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Bookmarks;
+using ICSharpCode.SharpDevelop.Debugging;
using ICSharpCode.SharpDevelop.Editor;
using ICSharpCode.SharpDevelop.Editor.AvalonEdit;
using ICSharpCode.SharpDevelop.Gui;
+using Microsoft.Win32;
namespace ICSharpCode.AvalonEdit.AddIn.Options
{
@@ -33,18 +39,22 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
InitializeComponent();
textEditor.Document.UndoStack.SizeLimit = 0;
- textEditor.Options = CodeEditorOptions.Instance;
+ CodeEditorOptions.Instance.BindToTextEditor(textEditor);
+ textEditor.Options = new TextEditorOptions(CodeEditorOptions.Instance);
bracketHighlighter = new BracketHighlightRenderer(textEditor.TextArea.TextView);
foldingManager = FoldingManager.Install(textEditor.TextArea);
- CodeEditorOptions.Instance.BindToTextEditor(textEditor);
+ textMarkerService = new TextMarkerService(textEditor.Document);
+ textEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService);
+ textEditor.TextArea.TextView.LineTransformers.Add(textMarkerService);
+ textEditor.TextArea.TextView.Services.AddService(typeof(ITextMarkerService), textMarkerService);
}
BracketHighlightRenderer bracketHighlighter;
FoldingManager foldingManager;
+ TextMarkerService textMarkerService;
+ ITextMarker marker;
List customizationList;
- #region Folding
- // TODO : probably move this to a separate class!
public const string FoldingControls = "Folding controls";
public const string FoldingSelectedControls = "Selected folding controls";
public const string FoldingTextMarkers = "Folding markers";
@@ -56,7 +66,7 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
return brush;
}
- public static void ApplyToFolding(TextEditor editor, IEnumerable customisations)
+ public static void ApplyToRendering(TextEditor editor, IEnumerable customisations)
{
bool assignedFoldingMarker = false, assignedSelectedFoldingControls = false, assignedFoldingTextMarkers = false;
@@ -67,6 +77,16 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
FoldingElementGenerator.TextBrush = FoldingElementGenerator.DefaultTextBrush;
+ bool assignedErrorColor = false;
+ bool assignedWarningColor = false;
+ bool assignedMessageColor = false;
+
+ foreach (var instance in ErrorPainter.Instances) {
+ instance.ErrorColor = Colors.Red;
+ instance.WarningColor = Colors.Orange;
+ instance.MessageColor = Colors.Blue;
+ }
+
foreach (CustomizedHighlightingColor color in customisations) {
switch (color.Name) {
case FoldingControls:
@@ -74,18 +94,22 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
continue;
assignedFoldingMarker = true;
if (color.Foreground != null)
- editor.SetValue(FoldingMargin.FoldingMarkerBrushProperty, CreateFrozenBrush(color.Foreground.Value));
+ editor.SetValue(FoldingMargin.FoldingMarkerBrushProperty,
+ CreateFrozenBrush(color.Foreground.Value));
if (color.Background != null)
- editor.SetValue(FoldingMargin.FoldingMarkerBackgroundBrushProperty, CreateFrozenBrush(color.Background.Value));
+ editor.SetValue(FoldingMargin.FoldingMarkerBackgroundBrushProperty,
+ CreateFrozenBrush(color.Background.Value));
break;
case FoldingSelectedControls:
if (assignedSelectedFoldingControls)
continue;
assignedSelectedFoldingControls = true;
if (color.Foreground != null)
- editor.SetValue(FoldingMargin.SelectedFoldingMarkerBrushProperty, CreateFrozenBrush(color.Foreground.Value));
+ editor.SetValue(FoldingMargin.SelectedFoldingMarkerBrushProperty,
+ CreateFrozenBrush(color.Foreground.Value));
if (color.Background != null)
- editor.SetValue(FoldingMargin.SelectedFoldingMarkerBackgroundBrushProperty, CreateFrozenBrush(color.Background.Value));
+ editor.SetValue(FoldingMargin.SelectedFoldingMarkerBackgroundBrushProperty,
+ CreateFrozenBrush(color.Background.Value));
break;
case FoldingTextMarkers:
if (assignedFoldingTextMarkers)
@@ -94,10 +118,39 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
if (color.Foreground != null)
FoldingElementGenerator.TextBrush = CreateFrozenBrush(color.Foreground.Value);
break;
+ case ErrorPainter.ErrorColorName:
+ if (assignedErrorColor)
+ continue;
+ assignedErrorColor = true;
+ if (color.Foreground != null) {
+ foreach (var instance in ErrorPainter.Instances) {
+ instance.ErrorColor = color.Foreground.Value;
+ }
+ }
+ break;
+ case ErrorPainter.WarningColorName:
+ if (assignedWarningColor)
+ continue;
+ assignedWarningColor = true;
+ if (color.Foreground != null) {
+ foreach (var instance in ErrorPainter.Instances) {
+ instance.WarningColor = color.Foreground.Value;
+ }
+ }
+ break;
+ case ErrorPainter.MessageColorName:
+ if (assignedMessageColor)
+ continue;
+ assignedMessageColor = true;
+ if (color.Foreground != null) {
+ foreach (var instance in ErrorPainter.Instances) {
+ instance.MessageColor = color.Foreground.Value;
+ }
+ }
+ break;
}
}
}
- #endregion
XshdSyntaxDefinition LoadBuiltinXshd(string name)
{
@@ -130,6 +183,8 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
}
customizationList = CustomizedHighlightingColor.LoadColors();
+ CreateDefaultEntries(null, out defaultText, defaultEntries);
+
languageComboBox.Items.Clear();
languageComboBox.Items.Add(new XshdSyntaxDefinition { Name = "All languages" });
foreach (XshdSyntaxDefinition def in allSyntaxDefinitions)
@@ -144,7 +199,9 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
XshdSyntaxDefinition xshd = (XshdSyntaxDefinition)languageComboBox.SelectedItem;
if (xshd != null) {
IHighlightingItem defaultText;
- CreateDefaultEntries(languageComboBox.SelectedIndex == 0 ? null : xshd.Name, out defaultText);
+ List list = new List();
+ CreateDefaultEntries(languageComboBox.SelectedIndex == 0 ? null : xshd.Name, out defaultText, list);
+ listBox.Items.AddRange(list);
if (languageComboBox.SelectedIndex > 0) {
// Create entries for all customizable colors in the syntax highlighting definition
@@ -168,18 +225,16 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
}
}
- void CreateDefaultEntries(string language, out IHighlightingItem defaultText)
+ void CreateDefaultEntries(string language, out IHighlightingItem defaultText, IList items)
{
// Create entry for "default text/background"
defaultText = new SimpleHighlightingItem(CustomizableHighlightingColorizer.DefaultTextAndBackground, ta => ta.Document.Text = "Normal text") {
Foreground = SystemColors.WindowTextColor,
Background = SystemColors.WindowColor
};
- defaultText = new CustomizedHighlightingItem(customizationList, defaultText, null, canSetFont: false);
- if (language != null)
- defaultText = new CustomizedHighlightingItem(customizationList, defaultText, language, canSetFont: false);
+ defaultText = new CustomizedHighlightingItem(customizationList, defaultText, language, canSetFont: false);
defaultText.PropertyChanged += item_PropertyChanged;
- listBox.Items.Add(defaultText);
+ items.Add(defaultText);
// Create entry for "Selected text"
IHighlightingItem selectedText = new SimpleHighlightingItem(
@@ -192,11 +247,9 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
Foreground = SystemColors.HighlightTextColor,
Background = SystemColors.HighlightColor
};
- selectedText = new CustomizedHighlightingItem(customizationList, selectedText, null, canSetFont: false);
- if (language != null)
- selectedText = new CustomizedHighlightingItem(customizationList, selectedText, language, canSetFont: false);
+ selectedText = new CustomizedHighlightingItem(customizationList, selectedText, language, canSetFont: false);
selectedText.PropertyChanged += item_PropertyChanged;
- listBox.Items.Add(selectedText);
+ items.Add(selectedText);
// Create entry for "Non-printable characters"
IHighlightingItem nonPrintChars = new SimpleHighlightingItem(
@@ -207,11 +260,9 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
{
Foreground = Colors.LightGray
};
- nonPrintChars = new CustomizedHighlightingItem(customizationList, nonPrintChars, null, canSetFont: false, canSetBackground: false);
- if (language != null)
- nonPrintChars = new CustomizedHighlightingItem(customizationList, nonPrintChars, language, canSetFont: false);
+ nonPrintChars = new CustomizedHighlightingItem(customizationList, nonPrintChars, language, canSetFont: false, canSetBackground: false);
nonPrintChars.PropertyChanged += item_PropertyChanged;
- listBox.Items.Add(nonPrintChars);
+ items.Add(nonPrintChars);
// Create entry for "Line numbers"
IHighlightingItem lineNumbers = new SimpleHighlightingItem(
@@ -225,11 +276,9 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
{
Foreground = Colors.Gray
};
- lineNumbers = new CustomizedHighlightingItem(customizationList, lineNumbers, null, canSetFont: false, canSetBackground: false);
- if (language != null)
- lineNumbers = new CustomizedHighlightingItem(customizationList, lineNumbers, language, canSetFont: false);
+ lineNumbers = new CustomizedHighlightingItem(customizationList, lineNumbers, language, canSetFont: false, canSetBackground: false);
lineNumbers.PropertyChanged += item_PropertyChanged;
- listBox.Items.Add(lineNumbers);
+ items.Add(lineNumbers);
// Create entry for "Bracket highlight"
IHighlightingItem bracketHighlight = new SimpleHighlightingItem(
@@ -247,11 +296,9 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
Foreground = BracketHighlightRenderer.DefaultBorder,
Background = BracketHighlightRenderer.DefaultBackground
};
- bracketHighlight = new CustomizedHighlightingItem(customizationList, bracketHighlight, null, canSetFont: false);
- if (language != null)
- bracketHighlight = new CustomizedHighlightingItem(customizationList, bracketHighlight, language, canSetFont: false);
+ bracketHighlight = new CustomizedHighlightingItem(customizationList, bracketHighlight, language, canSetFont: false);
bracketHighlight.PropertyChanged += item_PropertyChanged;
- listBox.Items.Add(bracketHighlight);
+ items.Add(bracketHighlight);
// Create entry for "Folding controls"
IHighlightingItem foldingControls = new SimpleHighlightingItem(
@@ -266,11 +313,9 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
Foreground = Colors.Gray,
Background = Colors.White
};
- foldingControls = new CustomizedHighlightingItem(customizationList, foldingControls, null, canSetFont: false);
- if (language != null)
- foldingControls = new CustomizedHighlightingItem(customizationList, foldingControls, language, canSetFont: false);
+ foldingControls = new CustomizedHighlightingItem(customizationList, foldingControls, language, canSetFont: false);
foldingControls.PropertyChanged += item_PropertyChanged;
- listBox.Items.Add(foldingControls);
+ items.Add(foldingControls);
// Create entry for "Selected folding controls"
IHighlightingItem selectedFoldingControls = new SimpleHighlightingItem(
@@ -285,11 +330,9 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
Foreground = Colors.Black,
Background = Colors.White
};
- selectedFoldingControls = new CustomizedHighlightingItem(customizationList, selectedFoldingControls, null, canSetFont: false);
- if (language != null)
- selectedFoldingControls = new CustomizedHighlightingItem(customizationList, selectedFoldingControls, language, canSetFont: false);
+ selectedFoldingControls = new CustomizedHighlightingItem(customizationList, selectedFoldingControls, language, canSetFont: false);
selectedFoldingControls.PropertyChanged += item_PropertyChanged;
- listBox.Items.Add(selectedFoldingControls);
+ items.Add(selectedFoldingControls);
// Create entry for "Folding text markers"
IHighlightingItem foldingTextMarker = new SimpleHighlightingItem(
@@ -303,14 +346,106 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
{
Foreground = Colors.Gray
};
- foldingTextMarker = new CustomizedHighlightingItem(customizationList, foldingTextMarker, null, canSetFont: false, canSetBackground: false);
- if (language != null)
- foldingControls = new CustomizedHighlightingItem(customizationList, foldingTextMarker, language, canSetFont: false, canSetBackground: false);
+ foldingTextMarker = new CustomizedHighlightingItem(customizationList, foldingTextMarker, language, canSetFont: false, canSetBackground: false);
foldingTextMarker.PropertyChanged += item_PropertyChanged;
- listBox.Items.Add(foldingTextMarker);
+ items.Add(foldingTextMarker);
+
+ IHighlightingItem linkText = new SimpleHighlightingItem(
+ CustomizableHighlightingColorizer.LinkText,
+ ta => {
+ ta.Document.Text = "http://icsharpcode.net" + Environment.NewLine + "me@example.com";
+ })
+ {
+ Foreground = Colors.Blue,
+ Background = Colors.Transparent
+ };
+ linkText = new CustomizedHighlightingItem(customizationList, linkText, language, canSetFont: false);
+ linkText.PropertyChanged += item_PropertyChanged;
+ items.Add(linkText);
+
+ IHighlightingItem errorMarker = new SimpleHighlightingItem(
+ ErrorPainter.ErrorColorName,
+ ta => {
+ ta.Document.Text = "some error";
+ marker = textMarkerService.Create(0, 5);
+ })
+ {
+ Foreground = Colors.Red
+ };
+ errorMarker = new CustomizedHighlightingItem(customizationList, errorMarker, language, canSetFont: false, canSetBackground: false);
+ errorMarker.PropertyChanged += item_PropertyChanged;
+ items.Add(errorMarker);
+
+ IHighlightingItem warningMarker = new SimpleHighlightingItem(
+ ErrorPainter.WarningColorName,
+ ta => {
+ ta.Document.Text = "some warning";
+ marker = textMarkerService.Create(0, 5);
+ })
+ {
+ Foreground = Colors.Orange
+ };
+ warningMarker = new CustomizedHighlightingItem(customizationList, warningMarker, language, canSetFont: false, canSetBackground: false);
+ warningMarker.PropertyChanged += item_PropertyChanged;
+ items.Add(warningMarker);
+
+ IHighlightingItem messageMarker = new SimpleHighlightingItem(
+ ErrorPainter.MessageColorName,
+ ta => {
+ ta.Document.Text = "some message";
+ marker = textMarkerService.Create(0, 5);
+ })
+ {
+ Foreground = Colors.Blue
+ };
+ messageMarker = new CustomizedHighlightingItem(customizationList, messageMarker, language, canSetFont: false, canSetBackground: false);
+ messageMarker.PropertyChanged += item_PropertyChanged;
+ items.Add(messageMarker);
+
+ IHighlightingItem breakpointMarker = new SimpleHighlightingItem(
+ BreakpointBookmark.BreakpointMarker,
+ ta => {
+ ta.Document.Text = "some code with a breakpoint";
+ marker = textMarkerService.Create(0, ta.Document.TextLength);
+ })
+ {
+ Background = BreakpointBookmark.DefaultBackground,
+ Foreground = BreakpointBookmark.DefaultForeground
+ };
+ breakpointMarker = new CustomizedHighlightingItem(customizationList, breakpointMarker, language, canSetFont: false);
+ breakpointMarker.PropertyChanged += item_PropertyChanged;
+ items.Add(breakpointMarker);
+
+ IHighlightingItem currentStatementMarker = new SimpleHighlightingItem(
+ CurrentLineBookmark.Name,
+ ta => {
+ ta.Document.Text = "current statement line";
+ marker = textMarkerService.Create(0, ta.Document.TextLength);
+ })
+ {
+ Background = CurrentLineBookmark.DefaultBackground,
+ Foreground = CurrentLineBookmark.DefaultForeground
+ };
+ currentStatementMarker = new CustomizedHighlightingItem(customizationList, currentStatementMarker, language, canSetFont: false);
+ currentStatementMarker.PropertyChanged += item_PropertyChanged;
+ items.Add(currentStatementMarker);
+
+ IHighlightingItem columnRuler = new SimpleHighlightingItem(
+ CustomizableHighlightingColorizer.ColumnRuler,
+ ta => {
+ ta.Document.Text = "some line with a lot of text";
+ ta.TextView.Options.ColumnRulerPosition = 15;
+ ta.TextView.Options.ShowColumnRuler = true;
+ })
+ {
+ Foreground = Colors.LightGray
+ };
+ columnRuler = new CustomizedHighlightingItem(customizationList, columnRuler, language, canSetFont: false, canSetBackground: false);
+ columnRuler.PropertyChanged += item_PropertyChanged;
+ items.Add(columnRuler);
}
- void item_PropertyChanged(object sender, PropertyChangedEventArgs e)
+ void item_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
UpdatePreview();
}
@@ -341,10 +476,12 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
if (xshd != null) {
var customizationsForCurrentLanguage = customizationList.Where(c => c.Language == null || c.Language == xshd.Name);
CustomizableHighlightingColorizer.ApplyCustomizationsToDefaultElements(textEditor, customizationsForCurrentLanguage);
- ApplyToFolding(textEditor, customizationsForCurrentLanguage);
+ ApplyToRendering(textEditor, customizationsForCurrentLanguage);
var item = (IHighlightingItem)listBox.SelectedItem;
TextView textView = textEditor.TextArea.TextView;
foldingManager.Clear();
+ textMarkerService.RemoveAll(m => true);
+ marker = null;
textView.LineTransformers.Remove(colorizer);
colorizer = null;
if (item != null) {
@@ -355,8 +492,298 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options
textEditor.Select(0, 0);
bracketHighlighter.SetHighlight(null);
item.ShowExample(textEditor.TextArea);
+ if (marker != null) {
+ switch (item.Name) {
+ case ErrorPainter.ErrorColorName:
+ case ErrorPainter.WarningColorName:
+ case ErrorPainter.MessageColorName:
+ marker.MarkerType = TextMarkerType.SquigglyUnderline;
+ marker.ForegroundColor = item.Foreground;
+ marker.BackgroundColor = item.Background;
+ break;
+ default:
+ marker.MarkerType = TextMarkerType.None;
+ marker.ForegroundColor = item.Foreground;
+ marker.BackgroundColor = item.Background;
+ break;
+ }
+ }
}
}
}
+
+ void ImportButtonClick(object sender, RoutedEventArgs e)
+ {
+ OpenFileDialog dialog = new OpenFileDialog {
+ Filter = @"All known settings|*.vssettings;*.sdsettings|Visual Studio settings (*.vssettings)|*.vssettings|SharpDevelop settings (*.sdsettings)|*.sdsettings",
+ CheckFileExists = true
+ };
+ if (dialog.ShowDialog() != true)
+ return;
+ switch (Path.GetExtension(dialog.FileName).ToUpperInvariant()) {
+ case ".VSSETTINGS":
+ LoadVSSettings(XDocument.Load(dialog.FileName));
+ break;
+ case ".SDSETTINGS":
+ LoadSDSettings(XDocument.Load(dialog.FileName));
+ break;
+ }
+ }
+ #region VSSettings
+ void LoadVSSettings(XDocument document)
+ {
+ XElement[] items;
+ if (!CheckVersionAndFindCategory(document, out items) || items == null) {
+ Core.MessageService.ShowError("Settings version not supported!");
+ return;
+ }
+ bool? replaceCustomizations = null;
+ foreach (var item in items) {
+ string key = item.Attribute("Name").Value;
+ var entry = ParseEntry(item);
+ foreach (var sdKey in mapping[key]) {
+ IHighlightingItem color;
+ if (FindSDColor(sdKey, out color)) {
+ if (color.IsCustomized) {
+ if (!replaceCustomizations.HasValue) {
+ replaceCustomizations =
+ MessageService.AskQuestion("There are already one or more existing customizations. " +
+ "Do you want to replace them with the imported values? " +
+ "Colors that are not yet customized will be imported anyway.");
+ }
+ if (replaceCustomizations == false)
+ continue;
+ }
+ color.Bold = entry.Item3;
+ color.Foreground = entry.Item1;
+ color.Background = entry.Item2;
+ }
+ }
+ }
+ }
+
+ readonly List defaultEntries = new List();
+ IHighlightingItem defaultText;
+
+ bool FindSDColor(string sdKey, out IHighlightingItem item)
+ {
+ string language = null;
+ int dot = sdKey.IndexOf('.');
+ if (dot > 0) {
+ language = sdKey.Substring(0, dot);
+ sdKey = sdKey.Substring(dot + 1);
+ }
+ if ((language == null && languageComboBox.SelectedIndex == 0)
+ || (language == ((XshdSyntaxDefinition)languageComboBox.SelectedItem).Name)) {
+ item = listBox.Items.OfType().FirstOrDefault(i => i.Name == sdKey);
+ } else if (language == null) {
+ item = defaultEntries.FirstOrDefault(i => i.Name == sdKey);
+ } else {
+ var def = allSyntaxDefinitions.FirstOrDefault(d => d.Name == language);
+ var highlighting = HighlightingManager.Instance.GetDefinition(language);
+ item = null;
+ if (def != null && highlighting != null) {
+ var color = def.Elements.OfType().FirstOrDefault(i => i.Name == sdKey);
+ if (color != null) {
+ item = new NamedColorHighlightingItem(defaultText, color) { ParentDefinition = highlighting };
+ item = new CustomizedHighlightingItem(customizationList, item, language);
+ }
+ }
+ }
+ return item != null;
+ }
+
+ // VS => SD
+ static readonly MultiDictionary mapping = new MultiDictionary(StringComparer.Ordinal) {
+ { "Brace Matching (Rectangle)", BracketHighlightRenderer.BracketHighlight },
+ { "Collapsible Text", FoldingTextMarkers },
+ { "Comment", "XML.Comment" },
+ { "Comment", "VBNET.Comment" },
+ { "Comment", "C#.Comment" },
+ { "Compiler Error", ErrorPainter.ErrorColorName },
+ { "CSS Comment", "CSS.Comment" },
+ { "CSS Keyword", "" },
+ { "CSS Property Name", "" },
+ { "CSS Property Value", "" },
+ { "CSS Selector", "" },
+ { "CSS String Value", "" },
+ { "Excluded Code", "" },
+ { "HTML Attribute Value", "" },
+ { "HTML Attribute", "" },
+ { "HTML Comment", "" },
+ { "HTML Element Name", "" },
+ { "HTML Entity", "" },
+ { "HTML Operator", "" },
+ { "HTML Server-Side Script", "" },
+ { "HTML Tag Delimiter", "" },
+ { "Identifier", "" },
+ { "Inactive Selected Text", "" },
+ { "Indicator Margin", "" },
+ { "Keyword", "C#.ThisOrBaseReference" },
+ { "Keyword", "C#.NullOrValueKeywords" },
+ { "Keyword", "C#.Keywords" },
+ { "Keyword", "C#.GotoKeywords" },
+ { "Keyword", "C#.ContextKeywords" },
+ { "Keyword", "C#.ExceptionKeywords" },
+ { "Keyword", "C#.CheckedKeyword" },
+ { "Keyword", "C#.UnsafeKeywords" },
+ { "Keyword", "C#.OperatorKeywords" },
+ { "Keyword", "C#.ParameterModifiers" },
+ { "Keyword", "C#.Modifiers" },
+ { "Keyword", "C#.Visibility" },
+ { "Keyword", "C#.NamespaceKeywords" },
+ { "Keyword", "C#.GetSetAddRemove" },
+ { "Keyword", "C#.TrueFalse" },
+ { "Keyword", "C#.TypeKeywords" },
+ { "Keyword", "VBNET.DateLiteral" },
+ { "Keyword", "VBNET.Preprocessor" },
+ { "Keyword", "VBNET.DataTypes" },
+ { "Keyword", "VBNET.Operators" },
+ { "Keyword", "VBNET.Constants" },
+ { "Keyword", "VBNET.Keywords" },
+ { "Keyword", "VBNET.FunctionKeywords" },
+ { "Keyword", "VBNET.ContextKeywords" },
+ { "Line Numbers", CustomizableHighlightingColorizer.LineNumbers },
+ { "MarkerFormatDefinition/HighlightedReference", "" },
+ { "Number", "C#.NumberLiteral" },
+ { "Operator", "C#.Punctuation" },
+ { "outlining.collapsehintadornment", "" },
+ { "outlining.square", FoldingControls },
+ { "outlining.square", FoldingSelectedControls },
+ { "outlining.verticalrule", "" },
+ { "Plain Text", "" },
+ { "Plain Text", CustomizableHighlightingColorizer.DefaultTextAndBackground },
+ { "Preprocessor Keyword", "" },
+ { "Preprocessor Keyword", "C#.Preprocessor" },
+ { "Razor Code", "" },
+ { "Script Comment", "" },
+ { "Script Identifier", "" },
+ { "Script Keyword", "" },
+ { "Script Number", "" },
+ { "Script Operator", "" },
+ { "Script String", "" },
+ { "Selected Text", "" },
+ { "Selected Text", CustomizableHighlightingColorizer.SelectedText },
+ { "String", "VBNET.String" },
+ { "String", "C#.String" },
+ { "String(C# @ Verbatim)", "" },
+ { "Syntax Error", "" },
+ { "urlformat", CustomizableHighlightingColorizer.LinkText },
+ { "User Types", "" },
+ { "User Types(Delegates)", "" },
+ { "User Types(Enums)", "" },
+ { "User Types(Interfaces)", "" },
+ { "User Types(Value types)", "" },
+ { "Warning", ErrorPainter.WarningColorName },
+ { "XAML Attribute Quotes", "" },
+ { "XAML Attribute Value", "" },
+ { "XAML Attribute", "" },
+ { "XAML CData Section", "" },
+ { "XAML Comment", "" },
+ { "XAML Delimiter", "" },
+ { "XAML Markup Extension Class", "" },
+ { "XAML Markup Extension Parameter Name", "" },
+ { "XAML Markup Extension Parameter Value", "" },
+ { "XAML Name", "" },
+ { "XAML Text", "" },
+ { "XML Attribute Quotes", "" },
+ { "XML Attribute Value", "XML." },
+ { "XML Attribute", "" },
+ { "XML CData Section", "" },
+ { "XML Comment", "" },
+ { "XML Delimiter", "" },
+ { "XML Doc Comment", "" },
+ { "XML Doc Tag", "" },
+ { "XML Name", "" },
+ { "XML Text", "" },
+ };
+
+ Tuple ParseEntry(XElement element)
+ {
+ Color fore = Colors.Transparent;
+ Color back = Colors.Transparent;
+ bool isBold = false;
+
+ var attribute = element.Attribute("Foreground");
+ if (attribute != null)
+ fore = ParseColor(attribute.Value);
+ attribute = element.Attribute("Background");
+ if (attribute != null)
+ back = ParseColor(attribute.Value);
+ attribute = element.Attribute("BoldFont");
+ if (attribute != null)
+ isBold = attribute.Value == "Yes";
+
+ return Tuple.Create(fore, back, isBold);
+ }
+
+ Color ParseColor(string s)
+ {
+ if (string.IsNullOrWhiteSpace(s))
+ return Colors.Transparent;
+ if (s.StartsWith("0x", StringComparison.OrdinalIgnoreCase))
+ s = s.Substring(2);
+ if (s.Substring(0, 2) == "02")
+ return Colors.Transparent;
+ try {
+ byte b = byte.Parse(s.Substring(2, 2), NumberStyles.HexNumber);
+ byte g = byte.Parse(s.Substring(4, 2), NumberStyles.HexNumber);
+ byte r = byte.Parse(s.Substring(6, 2), NumberStyles.HexNumber);
+ return Color.FromRgb(r, g, b);
+ } catch (FormatException) {
+ return Colors.Transparent;
+ }
+ }
+
+ bool CheckVersionAndFindCategory(XDocument document, out XElement[] categoryItems)
+ {
+ categoryItems = null;
+ var node = document.Root;
+ var appID = document.Root.Element("ApplicationIdentity");
+ var category = document.Root.Descendants("Category").FirstOrDefault(e => e.Attribute("GUID") != null && e.Attribute("GUID").Value == "{A27B4E24-A735-4D1D-B8E7-9716E1E3D8E0}");
+ if (category != null)
+ categoryItems = category.Descendants("Item").ToArray();
+ if (node.Name != "UserSettings" || appID == null || category == null)
+ return false;
+ return appID.Attribute("version") != null && appID.Attribute("version").Value == "10.0";
+ }
+ #endregion
+
+ #region SDSettings
+ void LoadSDSettings(XDocument document)
+ {
+ var version = document.Root.Attribute("version");
+ if (version != null && version.Value != Properties.CurrentVersion.ToString()) {
+ Core.MessageService.ShowError("Settings version not supported!");
+ return;
+ }
+ var p = Properties.Load(document.CreateReader());
+ customizationList = p.Get("CustomizedHighlightingRules", new List());
+ LanguageComboBox_SelectionChanged(null, null);
+ }
+ #endregion
+
+ void ExportButtonClick(object sender, RoutedEventArgs e)
+ {
+ SaveFileDialog dialog = new SaveFileDialog {
+ Filter = @"SharpDevelop settings (*.sdsettings)|*.sdsettings",
+ };
+ if (dialog.ShowDialog() != true)
+ return;
+ Save(dialog.FileName);
+ }
+
+ void Save(string fileName)
+ {
+ Properties p = new Properties();
+ p.Set("CustomizedHighlightingRules", customizationList);
+ using (XmlTextWriter writer = new XmlTextWriter(fileName, Encoding.UTF8)) {
+ writer.Formatting = Formatting.Indented;
+ writer.WriteStartElement("Properties");
+ writer.WriteAttributeString("version", Properties.CurrentVersion.ToString());
+ p.WriteProperties(writer);
+ writer.WriteEndElement();
+ }
+ }
}
}
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/TextViewOptions.xaml b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/TextViewOptions.xaml
index 7308c0a67f..3e97ec3bb9 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/TextViewOptions.xaml
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/TextViewOptions.xaml
@@ -29,5 +29,22 @@
Content="{core:Localize Dialog.Options.IDEOptions.TextEditor.Markers.EnableAnimationsCheckBox}" />
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.xaml b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.xaml
index c17d8f8748..049069b662 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.xaml
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/QuickClassBrowser.xaml
@@ -6,7 +6,7 @@
-
+
diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/TextMarkerService.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/TextMarkerService.cs
index 8a4c5bb7a7..e53a62bef7 100644
--- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/TextMarkerService.cs
+++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/TextMarkerService.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Windows;
using System.Windows.Media;
@@ -18,42 +19,26 @@ namespace ICSharpCode.AvalonEdit.AddIn
///
/// Handles the text markers for a code editor.
///
- public sealed class TextMarkerService : DocumentColorizingTransformer, IBackgroundRenderer, ITextMarkerService
+ public sealed class TextMarkerService : DocumentColorizingTransformer, IBackgroundRenderer, ITextMarkerService, ITextViewConnect
{
- readonly ICodeEditor codeEditor;
TextSegmentCollection markers;
+ TextDocument document;
- public TextMarkerService(ICodeEditor codeEditor)
+ public TextMarkerService(TextDocument document)
{
- if (codeEditor == null)
- throw new ArgumentNullException("codeEditor");
- this.codeEditor = codeEditor;
- codeEditor.DocumentChanged += codeEditor_DocumentChanged;
- codeEditor_DocumentChanged(null, null);
+ if (document == null)
+ throw new ArgumentNullException("document");
+ this.document = document;
+ this.markers = new TextSegmentCollection(document);
}
- #region Document Changed - recreate marker collection
- void codeEditor_DocumentChanged(object sender, EventArgs e)
- {
- if (markers != null) {
- foreach (TextMarker m in markers.ToArray()) {
- m.Delete();
- }
- }
- if (codeEditor.Document == null)
- markers = null;
- else
- markers = new TextSegmentCollection(codeEditor.Document);
- }
- #endregion
-
#region ITextMarkerService
public ITextMarker Create(int startOffset, int length)
{
if (markers == null)
throw new InvalidOperationException("Cannot create a marker when not attached to a document");
- int textLength = codeEditor.Document.TextLength;
+ int textLength = document.TextLength;
if (startOffset < 0 || startOffset > textLength)
throw new ArgumentOutOfRangeException("startOffset", startOffset, "Value must be between 0 and " + textLength);
if (length < 0 || startOffset + length > textLength)
@@ -105,7 +90,9 @@ namespace ICSharpCode.AvalonEdit.AddIn
///
internal void Redraw(ISegment segment)
{
- codeEditor.Redraw(segment, DispatcherPriority.Normal);
+ foreach (var view in textViews) {
+ view.Redraw(segment, DispatcherPriority.Normal);
+ }
}
#endregion
@@ -206,6 +193,26 @@ namespace ICSharpCode.AvalonEdit.AddIn
yield return new Point(start.X + i * offset, start.Y - ((i + 1) % 2 == 0 ? offset : 0));
}
#endregion
+
+ #region ITextViewConnect
+ readonly List textViews = new List();
+
+ void ITextViewConnect.AddToTextView(TextView textView)
+ {
+ if (textView != null && !textViews.Contains(textView)) {
+ Debug.Assert(textView.Document == document);
+ textViews.Add(textView);
+ }
+ }
+
+ void ITextViewConnect.RemoveFromTextView(TextView textView)
+ {
+ if (textView != null) {
+ Debug.Assert(textView.Document == document);
+ textViews.Remove(textView);
+ }
+ }
+ #endregion
}
public sealed class TextMarker : TextSegment, ITextMarker
diff --git a/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core/IO/EntityModelCodeGenerator.cs b/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core/IO/EntityModelCodeGenerator.cs
index 1a62dcee99..8d2c8dbd33 100644
--- a/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core/IO/EntityModelCodeGenerator.cs
+++ b/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core/IO/EntityModelCodeGenerator.cs
@@ -1,51 +1,67 @@
-#region Usings
-
-using System;
+using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using ICSharpCode.SharpDevelop.Project;
using System.Data.Entity.Design;
-using System.CodeDom;
using System.Data.Metadata.Edm;
-using System.Xml.Linq;
using System.IO;
+using System.Xml.Linq;
-#endregion
+using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Data.EDMDesigner.Core.IO
{
- public class EntityModelCodeGenerator : IO, ICustomTool
- {
- #region ICustomTool Member
-
- public void GenerateCode(FileProjectItem item, CustomToolContext context)
- {
- LanguageOption languageToGenerateCode = LanguageOption.GenerateCSharpCode;
-
- if (item.Project.Language != "C#")
- languageToGenerateCode = LanguageOption.GenerateVBCode;
-
- XDocument edmxDocument = XDocument.Load(item.FileName);
- XElement conceptualModelsElement = EDMXIO.ReadSection(edmxDocument, EDMXIO.EDMXSection.CSDL);
-
- if (conceptualModelsElement == null)
- throw new ArgumentException("Input file is not a valid EDMX file.");
-
- XDocument csdlDocument = new XDocument(new XDeclaration("1.0", "utf-8", null), conceptualModelsElement.Element(XName.Get("Schema", csdlNamespace.NamespaceName)));
-
- string tempFileName = IO.GetTempFilenameWithExtension("csdl");
- csdlDocument.Save(tempFileName);
+ public class EntityModelCodeGenerator : IO, ICustomTool
+ {
+ public void GenerateCode(FileProjectItem item, CustomToolContext context)
+ {
+ XElement schema = GetModelSchema(item);
+ XDocument csdlDocument = CreateCsdlDocument(schema);
+
+ string tempFileName = IO.GetTempFilenameWithExtension("csdl");
+ csdlDocument.Save(tempFileName);
- string outputFileName = context.GetOutputFileName(item, "Designer");
+ LanguageOption languageToGenerateCode = GetLanguageOption(item);
+ string outputFileName = context.GetOutputFileName(item, "Designer");
- EntityCodeGenerator entityCodeGenerator = new EntityCodeGenerator(languageToGenerateCode);
- IList edmSchemaErrors = entityCodeGenerator.GenerateCode(tempFileName, outputFileName);
- File.Delete(tempFileName);
-
- context.EnsureOutputFileIsInProject(item, outputFileName);
- }
+ EntityCodeGenerator entityCodeGenerator = new EntityCodeGenerator(languageToGenerateCode);
+ AddNamespaceMapping(entityCodeGenerator, schema, context.OutputNamespace);
+ IList edmSchemaErrors = entityCodeGenerator.GenerateCode(tempFileName, outputFileName);
+ File.Delete(tempFileName);
+
+ context.EnsureOutputFileIsInProject(item, outputFileName);
+ }
+
+ XElement GetModelSchema(FileProjectItem item)
+ {
+ XDocument edmxDocument = XDocument.Load(item.FileName);
+ XElement conceptualModelsElement = EDMXIO.ReadSection(edmxDocument, EDMXIO.EDMXSection.CSDL);
+ if (conceptualModelsElement == null)
+ throw new ArgumentException("Input file is not a valid EDMX file.");
- #endregion
- }
+ return conceptualModelsElement.Element(XName.Get("Schema", csdlNamespace.NamespaceName));
+ }
+
+ XDocument CreateCsdlDocument(XElement schema)
+ {
+ return new XDocument(new XDeclaration("1.0", "utf-8", null), schema);
+ }
+
+ LanguageOption GetLanguageOption(FileProjectItem item)
+ {
+ if (item.Project.Language != "C#")
+ return LanguageOption.GenerateVBCode;
+ return LanguageOption.GenerateCSharpCode;
+ }
+
+ void AddNamespaceMapping(EntityCodeGenerator entityCodeGenerator, XElement schema, string outputNamespace)
+ {
+ if (!String.IsNullOrEmpty(outputNamespace))
+ AddNamespaceMapping(entityCodeGenerator, schema.Attribute(XName.Get("Namespace")), outputNamespace);
+ }
+
+ void AddNamespaceMapping(EntityCodeGenerator entityCodeGenerator, XAttribute edmNamespace, string outputNamespace)
+ {
+ if (edmNamespace != null)
+ entityCodeGenerator.EdmToObjectNamespaceMap.Add(edmNamespace.Value, outputNamespace);
+ }
+ }
}
diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs
index c656b83996..6c60742d5b 100644
--- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs
+++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs
@@ -317,7 +317,7 @@ namespace ICSharpCode.FormsDesigner
/// code that is not supported in a previous version of .NET. (3.5 and below)
/// Currently it fixes:
/// - remove calls to ISupportInitialize.BeginInit/EndInit, if the interface is not implemented by the type in the target framework.
- ///
+ ///
/// When adding new workarounds make sure that the code does not remove too much code!
void RemoveUnsupportedCode(CodeTypeDeclaration formClass, CodeMemberMethod initializeComponent)
{
@@ -337,15 +337,11 @@ namespace ICSharpCode.FormsDesigner
foreach (var stmt in initializeComponent.Statements.OfType().Where(ces => ces.Expression is CodeMethodInvokeExpression)) {
CodeMethodInvokeExpression invocation = (CodeMethodInvokeExpression)stmt.Expression;
- if (invocation.Method.TargetObject is CodeCastExpression) {
- CodeCastExpression expr = (CodeCastExpression)invocation.Method.TargetObject;
- CodeFieldReferenceExpression fieldRef = (CodeFieldReferenceExpression)expr.Expression;
- if (!(fieldRef.TargetObject is CodeThisReferenceExpression))
- continue;
+ CodeCastExpression expr = invocation.Method.TargetObject as CodeCastExpression;
+ if (expr != null) {
if (expr.TargetType.BaseType != "System.ComponentModel.ISupportInitialize")
continue;
- CodeMemberField field = formClass.Members.OfType().First(f => this.formClass.ProjectContent.Language.NameComparer.Equals(fieldRef.FieldName, f.Name));
- IClass fieldType = this.formClass.ProjectContent.GetClass(field.Type.BaseType, 0);
+ var fieldType = GetTypeOfControl(expr.Expression, initializeComponent, formClass);
if (fieldType == null)
continue;
if (!fieldType.IsTypeInInheritanceTree(iSupportInitializeInterface))
@@ -358,6 +354,31 @@ namespace ICSharpCode.FormsDesigner
}
}
+ ///
+ /// Tries to find the type of the expression.
+ ///
+ IClass GetTypeOfControl(CodeExpression expression, CodeMemberMethod initializeComponentMethod, CodeTypeDeclaration formTypeDeclaration)
+ {
+ StringComparer comparer = formClass.ProjectContent.Language.NameComparer;
+ if (expression is CodeVariableReferenceExpression) {
+ string name = ((CodeVariableReferenceExpression)expression).VariableName;
+ var decl = initializeComponentMethod.Statements.OfType().Single(v => comparer.Equals(v.Name, name));
+ return formClass.ProjectContent.GetClass(decl.Type.BaseType, 0);
+ }
+ if (expression is CodeFieldReferenceExpression && ((CodeFieldReferenceExpression)expression).TargetObject is CodeThisReferenceExpression) {
+ string name = ((CodeFieldReferenceExpression)expression).FieldName;
+ var decl = formTypeDeclaration.Members.OfType().FirstOrDefault(f => comparer.Equals(name, f.Name));
+ if (decl != null)
+ return formClass.ProjectContent.GetClass(decl.Type.BaseType, 0);
+ var field = formClass.DefaultReturnType.GetFields()
+ .First(f => comparer.Equals(f.Name, name));
+ if (field.ReturnType == null)
+ return null;
+ return field.ReturnType.GetUnderlyingClass();
+ }
+ return null;
+ }
+
///
/// Compares the SharpDevelop.Dom field declaration oldField to
/// the CodeDom field declaration newField.
diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs
index 29ea7692cc..d4218544ce 100644
--- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs
+++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs
@@ -159,6 +159,9 @@ namespace ICSharpCode.FormsDesigner
{
LoggingService.Debug("Forms designer: Load " + file.FileName + "; inMasterLoadOperation=" + this.inMasterLoadOperation);
+ if (this.typeResolutionService != null)
+ this.typeResolutionService.ClearCaches();
+
if (inMasterLoadOperation) {
if (this.sourceCodeStorage.ContainsFile(file)) {
diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/ResourceStore.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/ResourceStore.cs
index 4e34fd61b8..30de41c535 100644
--- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/ResourceStore.cs
+++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/ResourceStore.cs
@@ -37,7 +37,7 @@ namespace ICSharpCode.FormsDesigner.Services
{
ResourceStorage storage;
if (!resources.TryGetValue(culture.Name, out storage)) {
- storage = resources[culture.Name] = new ResourceStorage(culture.Name);
+ storage = resources[culture.Name] = new ResourceStorage(culture.Name, viewContent.PrimaryFileName);
string fileName = CalcResourceFileName(viewContent.PrimaryFileName, culture.Name);
CreateOpenedFileForStorage(storage, fileName, File.Exists(fileName));
}
@@ -108,12 +108,14 @@ namespace ICSharpCode.FormsDesigner.Services
IResourceWriter writer;
byte[] buffer;
readonly string cultureName;
+ string parentDesignerSourceFileName;
internal OpenedFile OpenedFile;
internal bool IsNewFile;
- public ResourceStorage(string cultureName)
+ public ResourceStorage(string cultureName, string parentDesignerSourceFileName)
{
this.cultureName = cultureName;
+ this.parentDesignerSourceFileName = parentDesignerSourceFileName;
}
public void Dispose()
@@ -204,7 +206,7 @@ namespace ICSharpCode.FormsDesigner.Services
public IResourceWriter GetWriter()
{
this.stream = new MemoryStream();
- this.writer = CreateResourceWriter(this.stream, GetResourceType(OpenedFile.FileName));
+ this.writer = CreateResourceWriter(this.stream, GetResourceType(OpenedFile.FileName), parentDesignerSourceFileName);
return this.writer;
}
@@ -335,12 +337,12 @@ namespace ICSharpCode.FormsDesigner.Services
return new ResXResourceReader(stream);
}
- internal static IResourceWriter CreateResourceWriter(Stream stream, ResourceType type)
+ internal static IResourceWriter CreateResourceWriter(Stream stream, ResourceType type, string parentDesignerSourceFileName)
{
if (type == ResourceType.Resources) {
return new ResourceWriter(stream);
}
- return new ResXResourceWriter(stream);
+ return new ResXResourceWriter(stream, t => ResXConverter.ConvertTypeName(t, parentDesignerSourceFileName));
}
internal static ResourceType GetResourceType(string fileName)
diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs
index 7862e938c0..837e3757f0 100644
--- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs
+++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs
@@ -122,9 +122,13 @@ namespace ICSharpCode.FormsDesigner.Services
if (!projectContentsCurrentlyLoadingAssembly.Add(pc))
return null;
+ Assembly sdAssembly;
+ if (IsSharpDevelopAssembly(pc, out sdAssembly))
+ return sdAssembly;
+
try {
// load dependencies of current assembly
- foreach (IProjectContent rpc in pc.ReferencedContents) {
+ foreach (IProjectContent rpc in pc.ThreadSafeGetReferencedContents()) {
if (rpc is ParseProjectContent) {
LoadAssembly(rpc);
} else if (rpc is ReflectionProjectContent) {
@@ -151,6 +155,20 @@ namespace ICSharpCode.FormsDesigner.Services
}
}
+ readonly string sharpDevelopRoot = Directory.GetParent(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)).FullName;
+
+ bool IsSharpDevelopAssembly(IProjectContent pc, out Assembly assembly)
+ {
+ assembly = null;
+ foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) {
+ if (!asm.IsDynamic && asm.Location.StartsWith(sharpDevelopRoot, StringComparison.OrdinalIgnoreCase) && pc.AssemblyName == asm.GetName().Name) {
+ assembly = asm;
+ return true;
+ }
+ }
+ return false;
+ }
+
static string GetHash(string fileName)
{
return Path.GetFileName(fileName).ToLowerInvariant() + File.GetLastWriteTimeUtc(fileName).Ticks.ToString();
@@ -343,6 +361,19 @@ namespace ICSharpCode.FormsDesigner.Services
return GetType(name, throwOnError, false);
}
+ #if DEBUG
+ int count = 0;
+ #endif
+
+ Dictionary typeCache = new Dictionary(StringComparer.Ordinal);
+ Dictionary typeCacheIgnoreCase = new Dictionary(StringComparer.OrdinalIgnoreCase);
+
+ public void ClearCaches()
+ {
+ typeCacheIgnoreCase.Clear();
+ typeCache.Clear();
+ }
+
public Type GetType(string name, bool throwOnError, bool ignoreCase)
{
if (name == null || name.Length == 0) {
@@ -351,9 +382,19 @@ namespace ICSharpCode.FormsDesigner.Services
if (IgnoreType(name)) {
return null;
}
+ if (ignoreCase) {
+ Type cachedType;
+ if (typeCacheIgnoreCase.TryGetValue(name, out cachedType))
+ return cachedType;
+ } else {
+ Type cachedType;
+ if (typeCache.TryGetValue(name, out cachedType))
+ return cachedType;
+ }
#if DEBUG
if (!name.StartsWith("System.")) {
- LoggingService.Debug("TypeResolutionService: Looking for " + name);
+ count++;
+ LoggingService.Debug(count + " TypeResolutionService: Looking for " + name);
}
#endif
try {
@@ -418,6 +459,7 @@ namespace ICSharpCode.FormsDesigner.Services
try {
Type t = asm.GetType(name, false);
if (t != null) {
+ AddToCache(name, t, ignoreCase);
return t;
}
} catch (FileNotFoundException) {
@@ -431,7 +473,7 @@ namespace ICSharpCode.FormsDesigner.Services
if (throwOnError && type == null)
throw new TypeLoadException(name + " not found by TypeResolutionService");
-
+ AddToCache(name, type, ignoreCase);
return type;
} catch (Exception e) {
LoggingService.Error(e);
@@ -439,6 +481,17 @@ namespace ICSharpCode.FormsDesigner.Services
return null;
}
+ void AddToCache(string name, Type type, bool ignoreCase)
+ {
+ if (type == null)
+ return;
+ if (ignoreCase) {
+ typeCacheIgnoreCase.Add(name, type);
+ } else {
+ typeCache.Add(name, type);
+ }
+ }
+
public void ReferenceAssembly(AssemblyName name)
{
ICSharpCode.Core.LoggingService.Warn("TODO: Add Assembly reference : " + name);
diff --git a/src/AddIns/DisplayBindings/ILSpyAddIn/ViewContent/CodeView.cs b/src/AddIns/DisplayBindings/ILSpyAddIn/ViewContent/CodeView.cs
index 47cab50f77..e5c89b553b 100644
--- a/src/AddIns/DisplayBindings/ILSpyAddIn/ViewContent/CodeView.cs
+++ b/src/AddIns/DisplayBindings/ILSpyAddIn/ViewContent/CodeView.cs
@@ -36,7 +36,7 @@ namespace ICSharpCode.ILSpyAddIn.ViewContent
///
/// Equivalent to AE.AddIn CodeEditor, but without editing capabilities.
///
- class CodeView : Grid, IDisposable, ICodeEditor, IPositionable
+ class CodeView : Grid, IDisposable, IPositionable
{
public event EventHandler DocumentChanged;
@@ -59,7 +59,7 @@ namespace ICSharpCode.ILSpyAddIn.ViewContent
this.adapter.TextEditor.TextArea.TextView.VisualLinesChanged += delegate { iconMargin.InvalidateVisual(); };
// add marker service
- this.textMarkerService = new TextMarkerService(this);
+ this.textMarkerService = new TextMarkerService(adapter.TextEditor.Document);
this.adapter.TextEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService);
this.adapter.TextEditor.TextArea.TextView.LineTransformers.Add(textMarkerService);
this.adapter.TextEditor.TextArea.TextView.Services.AddService(typeof(ITextMarkerService), textMarkerService);
diff --git a/src/AddIns/DisplayBindings/ResourceEditor/Project/Src/ResourceEdit/ResourceList.cs b/src/AddIns/DisplayBindings/ResourceEditor/Project/Src/ResourceEdit/ResourceList.cs
index 738a5ebc85..7c6d199542 100644
--- a/src/AddIns/DisplayBindings/ResourceEditor/Project/Src/ResourceEdit/ResourceList.cs
+++ b/src/AddIns/DisplayBindings/ResourceEditor/Project/Src/ResourceEdit/ResourceList.cs
@@ -8,9 +8,9 @@ using System.Drawing.Printing;
using System.IO;
using System.Resources;
using System.Windows.Forms;
-
using ICSharpCode.Core;
using ICSharpCode.Core.WinForms;
+using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.SharpDevelop.Widgets.ListViewSorting;
namespace ResourceEditor
@@ -174,7 +174,7 @@ namespace ResourceEditor
// write XML resource
case ".resx":
- ResXResourceWriter rxw = new ResXResourceWriter(stream);
+ ResXResourceWriter rxw = new ResXResourceWriter(stream, t => ResXConverter.ConvertTypeName(t, filename));
foreach (KeyValuePair entry in resources) {
if (entry.Value != null) {
ResourceItem item = entry.Value;
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/IdeChooseClassService.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/IdeChooseClassService.cs
index 7714a4b85b..1c575877da 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/IdeChooseClassService.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/IdeChooseClassService.cs
@@ -43,7 +43,7 @@ namespace ICSharpCode.WpfDesign.AddIn
var pc = ParserService.CurrentProjectContent;
var a = GetAssembly(pc);
if (a != null) yield return a;
- foreach (var r in pc.ReferencedContents) {
+ foreach (var r in pc.ThreadSafeGetReferencedContents()) {
a = GetAssembly(r);
if (a != null) yield return a;
}
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/MyTypeFinder.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/MyTypeFinder.cs
index 507b8215d6..82a6b0f8a8 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/MyTypeFinder.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/MyTypeFinder.cs
@@ -52,7 +52,7 @@ namespace ICSharpCode.WpfDesign.AddIn
Assembly FindAssemblyInProjectReferences(IProjectContent pc, string name)
{
- foreach (IProjectContent referencedProjectContent in pc.ReferencedContents) {
+ foreach (IProjectContent referencedProjectContent in pc.ThreadSafeGetReferencedContents()) {
if (name == referencedProjectContent.AssemblyName) {
return this.typeResolutionService.LoadAssembly(referencedProjectContent);
}
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs
index 7914efbefa..44952fcbca 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs
@@ -60,6 +60,7 @@ namespace ICSharpCode.WpfDesign.AddIn
protected override void LoadInternal(OpenedFile file, System.IO.Stream stream)
{
+ wasChangedInDesigner = false;
Debug.Assert(file == this.PrimaryFile);
_stream = new MemoryStream();
@@ -108,10 +109,11 @@ namespace ICSharpCode.WpfDesign.AddIn
}
private MemoryStream _stream;
+ bool wasChangedInDesigner;
protected override void SaveInternal(OpenedFile file, System.IO.Stream stream)
{
- if (IsDirty && designer.DesignContext != null) {
+ if (wasChangedInDesigner && designer.DesignContext != null) {
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.IndentChars = EditorControlService.GlobalOptions.IndentationString;
@@ -120,12 +122,10 @@ namespace ICSharpCode.WpfDesign.AddIn
designer.SaveDesigner(xmlWriter);
}
} else {
- if (_stream.CanRead) {
- _stream.Position = 0;
- using (var reader = new StreamReader(_stream)) {
- using (var writer = new StreamWriter(stream)) {
- writer.Write(reader.ReadToEnd());
- }
+ _stream.Position = 0;
+ using (var reader = new StreamReader(new UnclosableStream(_stream))) {
+ using (var writer = new StreamWriter(stream)) {
+ writer.Write(reader.ReadToEnd());
}
}
}
@@ -153,6 +153,7 @@ namespace ICSharpCode.WpfDesign.AddIn
void OnUndoStackChanged(object sender, EventArgs e)
{
+ wasChangedInDesigner = true;
this.PrimaryFile.MakeDirty();
}
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SelectedElementRectangleExtension.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SelectedElementRectangleExtension.cs
index aedc0809d3..8d6a4643b5 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SelectedElementRectangleExtension.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SelectedElementRectangleExtension.cs
@@ -23,18 +23,18 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
public SelectedElementRectangleExtension()
{
Rectangle selectionRect = new Rectangle();
- selectionRect.SnapsToDevicePixels = true;
- selectionRect.Stroke = new SolidColorBrush(Color.FromRgb(0x47, 0x47, 0x47));
- selectionRect.StrokeThickness = 1.5;
- selectionRect.IsHitTestVisible = false;
+ selectionRect.SnapsToDevicePixels = true;
+ selectionRect.Stroke = new SolidColorBrush(Color.FromRgb(0x47, 0x47, 0x47));
+ selectionRect.StrokeThickness = 1.5;
+ selectionRect.IsHitTestVisible = false;
- RelativePlacement placement = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Stretch);
- placement.XOffset = -1;
- placement.YOffset = -1;
- placement.WidthOffset = 2;
- placement.HeightOffset = 2;
+ RelativePlacement placement = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Stretch);
+ placement.XOffset = -1;
+ placement.YOffset = -1;
+ placement.WidthOffset = 2;
+ placement.HeightOffset = 2;
- this.AddAdorners(placement, selectionRect);
+ this.AddAdorners(placement, selectionRect);
}
}
}
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SizeDisplayExtension.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SizeDisplayExtension.cs
index 25c59064a0..4ebe80bfb7 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SizeDisplayExtension.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SizeDisplayExtension.cs
@@ -17,40 +17,40 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
///
/// Display Height/Width on the primary selection
///
- [ExtensionFor(typeof(UIElement))]
- class SizeDisplayExtension : PrimarySelectionAdornerProvider
- {
- HeightDisplay _heightDisplay;
- WidthDisplay _widthDisplay;
-
- public HeightDisplay HeightDisplay{
- get { return _heightDisplay; }
- }
-
- public WidthDisplay WidthDisplay{
- get { return _widthDisplay; }
- }
-
- protected override void OnInitialized()
- {
- base.OnInitialized();
- if (this.ExtendedItem != null)
- {
- RelativePlacement placementHeight = new RelativePlacement(HorizontalAlignment.Right, VerticalAlignment.Stretch);
- placementHeight.XOffset = 10;
- _heightDisplay = new HeightDisplay();
- _heightDisplay.DataContext = this.ExtendedItem.Component;
+ [ExtensionFor(typeof(UIElement))]
+ class SizeDisplayExtension : PrimarySelectionAdornerProvider
+ {
+ HeightDisplay _heightDisplay;
+ WidthDisplay _widthDisplay;
+
+ public HeightDisplay HeightDisplay{
+ get { return _heightDisplay; }
+ }
+
+ public WidthDisplay WidthDisplay{
+ get { return _widthDisplay; }
+ }
+
+ protected override void OnInitialized()
+ {
+ base.OnInitialized();
+ if (this.ExtendedItem != null)
+ {
+ RelativePlacement placementHeight = new RelativePlacement(HorizontalAlignment.Right, VerticalAlignment.Stretch);
+ placementHeight.XOffset = 10;
+ _heightDisplay = new HeightDisplay();
+ _heightDisplay.DataContext = this.ExtendedItem.Component;
- RelativePlacement placementWidth = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Bottom);
- placementWidth.YOffset = 10;
- _widthDisplay = new WidthDisplay();
- _widthDisplay.DataContext = this.ExtendedItem.Component;
+ RelativePlacement placementWidth = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Bottom);
+ placementWidth.YOffset = 10;
+ _widthDisplay = new WidthDisplay();
+ _widthDisplay.DataContext = this.ExtendedItem.Component;
- this.AddAdorners(placementHeight, _heightDisplay);
- this.AddAdorners(placementWidth, _widthDisplay);
- _heightDisplay.Visibility=Visibility.Hidden;
- _widthDisplay.Visibility=Visibility.Hidden;
- }
- }
- }
+ this.AddAdorners(placementHeight, _heightDisplay);
+ this.AddAdorners(placementWidth, _widthDisplay);
+ _heightDisplay.Visibility=Visibility.Hidden;
+ _widthDisplay.Visibility=Visibility.Hidden;
+ }
+ }
+ }
}
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs
index acd92c6e0a..88f5094d0d 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/StackPanelPlacementSupport.cs
@@ -18,156 +18,157 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
/// Provides for .
///
[ExtensionFor(typeof (StackPanel), OverrideExtension = typeof (DefaultPlacementBehavior))]
- public class StackPanelPlacementSupport : DefaultPlacementBehavior
- {
- private StackPanel _stackPanel;
- private AdornerPanel _adornerPanel;
- private Rectangle _rectangle = new Rectangle(); // Draws a rectangle to indicate the position of insertion.
- private readonly List _rects = new List(); // Contains the Rect of all the children of StackPanel.
-
-
- private bool _isItemGettingResized; // Indicates whether any children is getting resized.
- private int _indexToInsert; // Postion where to insert the element.
+ public class StackPanelPlacementSupport : DefaultPlacementBehavior
+ {
+ private StackPanel _stackPanel;
+ private AdornerPanel _adornerPanel;
+ private Rectangle _rectangle = new Rectangle(); // Draws a rectangle to indicate the position of insertion.
+ private readonly List _rects = new List(); // Contains the Rect of all the children of StackPanel.
+
+
+ private bool _isItemGettingResized; // Indicates whether any children is getting resized.
+ private int _indexToInsert; // Postion where to insert the element.
- protected override void OnInitialized()
- {
- base.OnInitialized();
- _stackPanel = this.ExtendedItem.View as StackPanel;
- var children = this.ExtendedItem.ContentProperty.CollectionElements;
- foreach (var child in children) {
- Point p = child.View.TranslatePoint(new Point(0, 0), this.ExtendedItem.View);
- _rects.Add(new Rect(p, child.View.RenderSize));
- }
- }
+ protected override void OnInitialized()
+ {
+ base.OnInitialized();
+ _stackPanel = this.ExtendedItem.View as StackPanel;
+ var children = this.ExtendedItem.ContentProperty.CollectionElements;
+ foreach (var child in children) {
+ Point p = child.View.TranslatePoint(new Point(0, 0), this.ExtendedItem.View);
+ _rects.Add(new Rect(p, child.View.RenderSize));
+ }
+ }
- public override void BeginPlacement(PlacementOperation operation)
- {
- base.BeginPlacement(operation);
- if (_rects.Count > 0)
- _rects.Clear();
-
- /* Add Rect of all children to _rects */
- var children = this.ExtendedItem.ContentProperty.CollectionElements;
- foreach (var child in children) {
- Point p = child.View.TranslatePoint(new Point(0, 0), this.ExtendedItem.View);
- _rects.Add(new Rect(p, child.View.RenderSize));
- }
- if (_adornerPanel != null && this.ExtendedItem.Services.DesignPanel.Adorners.Contains(_adornerPanel))
- this.ExtendedItem.Services.DesignPanel.Adorners.Remove(_adornerPanel);
-
- /* Place the Rectangle */
- _adornerPanel = new AdornerPanel();
- _rectangle = new Rectangle();
- _adornerPanel.SetAdornedElement(this.ExtendedItem.View, this.ExtendedItem);
- _adornerPanel.Children.Add(_rectangle);
- this.ExtendedItem.Services.DesignPanel.Adorners.Add(_adornerPanel);
- }
+ public override void BeginPlacement(PlacementOperation operation)
+ {
+ base.BeginPlacement(operation);
+ if (_rects.Count > 0)
+ _rects.Clear();
+
+ /* Add Rect of all children to _rects */
+ var children = this.ExtendedItem.ContentProperty.CollectionElements;
+ foreach (var child in children) {
+ Point p = child.View.TranslatePoint(new Point(0, 0), this.ExtendedItem.View);
+ _rects.Add(new Rect(p, child.View.RenderSize));
+ }
+ if (_adornerPanel != null && this.ExtendedItem.Services.DesignPanel.Adorners.Contains(_adornerPanel))
+ this.ExtendedItem.Services.DesignPanel.Adorners.Remove(_adornerPanel);
+
+ /* Place the Rectangle */
+ _adornerPanel = new AdornerPanel();
+ _rectangle = new Rectangle();
+ _adornerPanel.SetAdornedElement(this.ExtendedItem.View, this.ExtendedItem);
+ _adornerPanel.Children.Add(_rectangle);
+ this.ExtendedItem.Services.DesignPanel.Adorners.Add(_adornerPanel);
+ }
- public override void EndPlacement(PlacementOperation operation)
- {
- base.EndPlacement(operation);
- if (_adornerPanel != null && this.ExtendedItem.Services.DesignPanel.Adorners.Contains(_adornerPanel))
- this.ExtendedItem.Services.DesignPanel.Adorners.Remove(_adornerPanel);
- }
+ public override void EndPlacement(PlacementOperation operation)
+ {
+ base.EndPlacement(operation);
+ if (_adornerPanel != null && this.ExtendedItem.Services.DesignPanel.Adorners.Contains(_adornerPanel))
+ this.ExtendedItem.Services.DesignPanel.Adorners.Remove(_adornerPanel);
+ }
- public override void EnterContainer(PlacementOperation operation)
- {
- base.EnterContainer(operation);
- foreach (var info in operation.PlacedItems) {
- info.Item.Properties[FrameworkElement.MarginProperty].Reset();
- info.Item.Properties[FrameworkElement.HorizontalAlignmentProperty].Reset();
- info.Item.Properties[FrameworkElement.VerticalAlignmentProperty].Reset();
- }
- _rectangle.Visibility = Visibility.Visible;
- }
+ public override void EnterContainer(PlacementOperation operation)
+ {
+ base.EnterContainer(operation);
+ foreach (var info in operation.PlacedItems) {
+ info.Item.Properties[FrameworkElement.MarginProperty].Reset();
+ info.Item.Properties[FrameworkElement.HorizontalAlignmentProperty].Reset();
+ info.Item.Properties[FrameworkElement.VerticalAlignmentProperty].Reset();
+ }
+ _rectangle.Visibility = Visibility.Visible;
+ }
- public override void LeaveContainer(PlacementOperation operation)
- {
- base.LeaveContainer(operation);
- /* Hide the rectangle in case switching to the other container
- * otherwise it will show up intersecting with the container */
- _rectangle.Visibility = Visibility.Hidden;
- }
+ public override void LeaveContainer(PlacementOperation operation)
+ {
+ base.LeaveContainer(operation);
+ /* Hide the rectangle in case switching to the other container
+ * otherwise it will show up intersecting with the container */
+ _rectangle.Visibility = Visibility.Hidden;
+ }
- public override void SetPosition(PlacementInformation info)
- {
- base.SetPosition(info);
+ public override void SetPosition(PlacementInformation info)
+ {
+ base.SetPosition(info);
- var resizeExtensions = info.Item.Extensions.OfType();
- if (resizeExtensions != null && resizeExtensions.Count() != 0) {
- var resizeExtension = resizeExtensions.First();
- _isItemGettingResized = resizeExtension.IsResizing;
- }
+ var resizeExtensions = info.Item.Extensions.OfType();
+ if (resizeExtensions != null && resizeExtensions.Count() != 0) {
+ var resizeExtension = resizeExtensions.First();
+ _isItemGettingResized = resizeExtension.IsResizing;
+ }
- if (_stackPanel != null && !_isItemGettingResized) {
- if (_stackPanel.Orientation == Orientation.Vertical) {
- var offset = FindHorizontalRectanglePlacementOffset(info.Bounds);
- DrawHorizontalRectangle(offset);
- } else {
- var offset = FindVerticalRectanglePlacementOffset(info.Bounds);
- DrawVerticalRectangle(offset);
- }
+ if (_stackPanel != null && !_isItemGettingResized) {
+ if (_stackPanel.Orientation == Orientation.Vertical) {
+ var offset = FindHorizontalRectanglePlacementOffset(info.Bounds);
+ DrawHorizontalRectangle(offset);
+ } else {
+ var offset = FindVerticalRectanglePlacementOffset(info.Bounds);
+ DrawVerticalRectangle(offset);
+ }
- ChangePostionTo(info.Item.View, _indexToInsert);
- }
- }
+ ChangePositionTo(info.Item, _indexToInsert);
+ }
+ }
- private void ChangePostionTo(UIElement element, int index)
- {
- int elementIndex = 0;
- if (_stackPanel.Children.Contains(element))
- elementIndex = _stackPanel.Children.IndexOf(element);
- if (index > elementIndex)
- index--;
- _stackPanel.Children.Remove(element);
- _stackPanel.Children.Insert(index, element);
- }
-
- private double FindHorizontalRectanglePlacementOffset(Rect rect)
- {
- _rects.Sort((r1, r2) => r1.Top.CompareTo(r2.Top));
- var itemCenter = (rect.Top + rect.Bottom)/2;
- for (int i = 0; i < _rects.Count; i++) {
- var rectCenter = (_rects[i].Top + _rects[i].Bottom)/2;
- if (rectCenter >= itemCenter) {
- _indexToInsert = i;
- return _rects[i].Top;
- }
- }
- _indexToInsert = _rects.Count;
- return _rects.Count > 0 ? _rects.Last().Bottom : 0;
- }
-
- private double FindVerticalRectanglePlacementOffset(Rect rect)
- {
- _rects.Sort((r1, r2) => r1.Left.CompareTo(r2.Left));
- var itemCenter = (rect.Left + rect.Right)/2;
- for (int i = 0; i < _rects.Count; i++) {
- var rectCenter = (_rects[i].Left + _rects[i].Top)/2;
- if (rectCenter >= itemCenter) {
- _indexToInsert = i;
- return _rects[i].Left;
- }
- }
- _indexToInsert = _rects.Count;
- return _rects.Count > 0 ? _rects.Last().Right : 0;
- }
-
- private void DrawHorizontalRectangle(double offset)
- {
- _rectangle.Height = 2;
- _rectangle.Fill = Brushes.Black;
- var placement = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Top) {YOffset = offset};
- AdornerPanel.SetPlacement(_rectangle, placement);
- }
-
- private void DrawVerticalRectangle(double offset)
- {
- _rectangle.Width = 2;
- _rectangle.Fill = Brushes.Black;
- var placement = new RelativePlacement(HorizontalAlignment.Left, VerticalAlignment.Stretch) {XOffset = offset};
- AdornerPanel.SetPlacement(_rectangle, placement);
- }
- }
+ private void ChangePositionTo(DesignItem element, int index)
+ {
+ if (this.ExtendedItem.ContentProperty == null || !this.ExtendedItem.ContentProperty.IsCollection)
+ return;
+ var elements = this.ExtendedItem.ContentProperty.CollectionElements;
+ int elementIndex = elements.IndexOf(element);
+ if (elementIndex >= 0 && index > elementIndex)
+ index--;
+ elements.Remove(element);
+ elements.Insert(index, element);
+ }
+
+ private double FindHorizontalRectanglePlacementOffset(Rect rect)
+ {
+ _rects.Sort((r1, r2) => r1.Top.CompareTo(r2.Top));
+ var itemCenter = (rect.Top + rect.Bottom)/2;
+ for (int i = 0; i < _rects.Count; i++) {
+ var rectCenter = (_rects[i].Top + _rects[i].Bottom)/2;
+ if (rectCenter >= itemCenter) {
+ _indexToInsert = i;
+ return _rects[i].Top;
+ }
+ }
+ _indexToInsert = _rects.Count;
+ return _rects.Count > 0 ? _rects.Last().Bottom : 0;
+ }
+
+ private double FindVerticalRectanglePlacementOffset(Rect rect)
+ {
+ _rects.Sort((r1, r2) => r1.Left.CompareTo(r2.Left));
+ var itemCenter = (rect.Left + rect.Right)/2;
+ for (int i = 0; i < _rects.Count; i++) {
+ var rectCenter = (_rects[i].Left + _rects[i].Top)/2;
+ if (rectCenter >= itemCenter) {
+ _indexToInsert = i;
+ return _rects[i].Left;
+ }
+ }
+ _indexToInsert = _rects.Count;
+ return _rects.Count > 0 ? _rects.Last().Right : 0;
+ }
+
+ private void DrawHorizontalRectangle(double offset)
+ {
+ _rectangle.Height = 2;
+ _rectangle.Fill = Brushes.Black;
+ var placement = new RelativePlacement(HorizontalAlignment.Stretch, VerticalAlignment.Top) {YOffset = offset};
+ AdornerPanel.SetPlacement(_rectangle, placement);
+ }
+
+ private void DrawVerticalRectangle(double offset)
+ {
+ _rectangle.Width = 2;
+ _rectangle.Fill = Brushes.Black;
+ var placement = new RelativePlacement(HorizontalAlignment.Left, VerticalAlignment.Stretch) {XOffset = offset};
+ AdornerPanel.SetPlacement(_rectangle, placement);
+ }
+ }
}
diff --git a/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlFormattingStrategy.cs b/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlFormattingStrategy.cs
index 038ae9e753..af16946d5f 100644
--- a/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlFormattingStrategy.cs
+++ b/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlFormattingStrategy.cs
@@ -149,12 +149,7 @@ namespace ICSharpCode.XmlEditor
else
newText = currentIndentation + lineText.Trim();
- if (newText != lineText) {
- int extraCharsToBeAddedAtStartedOfLine = newText.Length - lineText.Length;
- document.Replace(line.Offset, line.Length, newText);
- Location caretPosition = document.OffsetToPosition(line.Offset + extraCharsToBeAddedAtStartedOfLine);
- editor.Caret.Position = caretPosition;
- }
+ document.SmartReplaceLine(line, newText);
nextLine++;
}
if (r.LineNumber > end)
diff --git a/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlTreeViewContainerControl.cs b/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlTreeViewContainerControl.cs
index a9d5668e5d..80c563eb32 100644
--- a/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlTreeViewContainerControl.cs
+++ b/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlTreeViewContainerControl.cs
@@ -200,7 +200,7 @@ namespace ICSharpCode.XmlEditor
/// comment node currently on display.
///
public string TextContent {
- get { return textBox.Text; }
+ get { return textBox.Text.Replace("\n", "\r\n"); }
set { textBox.Text = value; }
}
@@ -740,6 +740,7 @@ namespace ICSharpCode.XmlEditor
//
this.textBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox.Location = new System.Drawing.Point(0, 0);
+ this.textBox.Multiline = true;
this.textBox.Name = "textBox";
this.textBox.Size = new System.Drawing.Size(375, 326);
this.textBox.TabIndex = 2;
diff --git a/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs b/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs
index 25babe21fc..ced4b57923 100644
--- a/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs
+++ b/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs
@@ -141,8 +141,9 @@ namespace ICSharpCode.XmlEditor
{
if (editor == null) return false;
try {
- XmlDocument Document = new XmlDocument();
- Document.LoadXml(editor.Document.Text);
+ XmlDocument document = new XmlDocument();
+ document.XmlResolver = null;
+ document.LoadXml(editor.Document.Text);
return true;
} catch (XmlException ex) {
AddTask(editor.FileName, ex.Message, ex.LinePosition, ex.LineNumber, TaskType.Error);
diff --git a/src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin b/src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin
index 16abeb4a3c..53572dfc49 100644
--- a/src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin
+++ b/src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin
@@ -24,7 +24,7 @@
@@ -55,7 +55,7 @@
+ extensions=".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;.xshd;.wxs;.wxi;.wxl;.proj;.csproj;.vbproj;.ilproj;.build;.xfrm;.targets;.xpt;.xft;.map;.wsdl;.disco;.nuspec;.booproj;.fsproj;.pyproj;.rbproj;.vcxproj;.wixproj;.ps1xml" />
@@ -68,7 +68,7 @@
diff --git a/src/AddIns/DisplayBindings/XmlEditor/Test/Editor/IndentChildElementEndTagAfterNewLineTypedTestFixture.cs b/src/AddIns/DisplayBindings/XmlEditor/Test/Editor/IndentChildElementEndTagAfterNewLineTypedTestFixture.cs
index ed03ffc9f4..88cdd2f33f 100644
--- a/src/AddIns/DisplayBindings/XmlEditor/Test/Editor/IndentChildElementEndTagAfterNewLineTypedTestFixture.cs
+++ b/src/AddIns/DisplayBindings/XmlEditor/Test/Editor/IndentChildElementEndTagAfterNewLineTypedTestFixture.cs
@@ -71,14 +71,5 @@ namespace XmlEditor.Tests.Editor
Assert.AreEqual(expectedText, textDocument.Text);
}
-
- [Test]
- public void CursorIsJustBeforeChildEndElementEndTagAfterIndent()
- {
- int line = 3;
- int column = 2;
- Location expectedLocation = new Location(column, line);
- Assert.AreEqual(expectedLocation, textEditor.Caret.Position);
- }
}
}
diff --git a/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit.Sample/AvalonEdit.Sample.4.1.0.8000.nupkg b/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit.Sample/AvalonEdit.Sample.4.1.0.8000.nupkg
deleted file mode 100644
index 6e29f74289..0000000000
Binary files a/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit.Sample/AvalonEdit.Sample.4.1.0.8000.nupkg and /dev/null differ
diff --git a/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit.Sample/AvalonEdit.Sample.nuspec b/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit.Sample/AvalonEdit.Sample.nuspec
index e000423510..71e2f88146 100644
--- a/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit.Sample/AvalonEdit.Sample.nuspec
+++ b/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit.Sample/AvalonEdit.Sample.nuspec
@@ -2,7 +2,7 @@
AvalonEdit.Sample
- 4.1.0.8000
+ 4.2.0.8783
Daniel Grunwald
SharpDevelop
http://www.opensource.org/licenses/mit-license.php
@@ -16,7 +16,7 @@ StartupUri="/Samples/AvalonEdit/Window1.xaml"
Sample code for AvalonEdit the WPF-based text editor used in SharpDevelop 4.0.
en-US
-
+
diff --git a/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit/AvalonEdit.4.1.0.8000.nupkg b/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit/AvalonEdit.4.1.0.8000.nupkg
deleted file mode 100644
index 2c307fee6c..0000000000
Binary files a/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit/AvalonEdit.4.1.0.8000.nupkg and /dev/null differ
diff --git a/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit/AvalonEdit.4.1.0.8000.symbols.nupkg b/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit/AvalonEdit.4.1.0.8000.symbols.nupkg
deleted file mode 100644
index f753371459..0000000000
Binary files a/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit/AvalonEdit.4.1.0.8000.symbols.nupkg and /dev/null differ
diff --git a/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit/AvalonEdit.nuspec b/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit/AvalonEdit.nuspec
index 933dab9b9d..ccd43f3278 100644
--- a/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit/AvalonEdit.nuspec
+++ b/src/AddIns/Misc/PackageManagement/Packages/AvalonEdit/AvalonEdit.nuspec
@@ -2,7 +2,7 @@
AvalonEdit
- 4.1.0.8000
+ 4.2.0.8783
Daniel Grunwald
SharpDevelop
http://www.opensource.org/licenses/lgpl-2.1.php
diff --git a/src/AddIns/Misc/PackageManagement/Project/PackageManagement.csproj b/src/AddIns/Misc/PackageManagement/Project/PackageManagement.csproj
index ab37b7482a..467ef85879 100644
--- a/src/AddIns/Misc/PackageManagement/Project/PackageManagement.csproj
+++ b/src/AddIns/Misc/PackageManagement/Project/PackageManagement.csproj
@@ -70,6 +70,7 @@
+
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/AvailablePackagesViewModel.cs b/src/AddIns/Misc/PackageManagement/Project/Src/AvailablePackagesViewModel.cs
index d5be42c56c..86876e3a68 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/AvailablePackagesViewModel.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/AvailablePackagesViewModel.cs
@@ -43,13 +43,9 @@ namespace ICSharpCode.PackageManagement
protected override IEnumerable GetFilteredPackagesBeforePagingResults(IQueryable allPackages)
{
- IEnumerable filteredPackages = base.GetFilteredPackagesBeforePagingResults(allPackages);
- return GetDistinctPackagesById(filteredPackages);
- }
-
- IEnumerable GetDistinctPackagesById(IEnumerable allPackages)
- {
- return allPackages.DistinctLast(PackageEqualityComparer.Id);
+ return base.GetFilteredPackagesBeforePagingResults(allPackages)
+ .Where(package => package.IsReleaseVersion())
+ .DistinctLast(PackageEqualityComparer.Id);
}
}
}
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/ConfigSettingsFileSystem.cs b/src/AddIns/Misc/PackageManagement/Project/Src/ConfigSettingsFileSystem.cs
new file mode 100644
index 0000000000..daccf7b809
--- /dev/null
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/ConfigSettingsFileSystem.cs
@@ -0,0 +1,24 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.IO;
+using ICSharpCode.SharpDevelop.Project;
+using NuGet;
+
+namespace ICSharpCode.PackageManagement
+{
+ public class ConfigSettingsFileSystem : PhysicalFileSystem
+ {
+ ConfigSettingsFileSystem(string root)
+ : base(root)
+ {
+ }
+
+ public static ConfigSettingsFileSystem CreateConfigSettingsFileSystem(Solution solution)
+ {
+ string configSettingsFolder = Path.Combine(solution.Directory, ".nuget");
+ return new ConfigSettingsFileSystem(configSettingsFolder);
+ }
+ }
+}
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/Design/FakeProjectSystem.cs b/src/AddIns/Misc/PackageManagement/Project/Src/Design/FakeProjectSystem.cs
index 72cd36e734..761a699bf9 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/Design/FakeProjectSystem.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/Design/FakeProjectSystem.cs
@@ -54,5 +54,7 @@ namespace ICSharpCode.PackageManagement.Design
{
throw new NotImplementedException();
}
+
+ public bool IsBindingRedirectSupported { get; set; }
}
}
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/Design/FakeSettings.cs b/src/AddIns/Misc/PackageManagement/Project/Src/Design/FakeSettings.cs
index a480329bff..84afc7bf54 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/Design/FakeSettings.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/Design/FakeSettings.cs
@@ -118,5 +118,15 @@ namespace ICSharpCode.PackageManagement.Design
AddFakePackageSource(packageSource);
}
}
+
+ public IList> GetNestedValues(string section, string key)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void SetNestedValues(string section, string key, IList> values)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/EnvDTE/DTE.cs b/src/AddIns/Misc/PackageManagement/Project/Src/EnvDTE/DTE.cs
index b190eb47e9..e2205ee818 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/EnvDTE/DTE.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/EnvDTE/DTE.cs
@@ -29,6 +29,10 @@ namespace ICSharpCode.PackageManagement.EnvDTE
ItemOperations = new ItemOperations(fileService);
}
+ public string Version {
+ get { return "10.0"; }
+ }
+
public Solution Solution {
get {
if (IsSolutionOpen) {
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/ISharpDevelopPackageRepositoryFactory.cs b/src/AddIns/Misc/PackageManagement/Project/Src/ISharpDevelopPackageRepositoryFactory.cs
index 58d6c938aa..19029c8030 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/ISharpDevelopPackageRepositoryFactory.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/ISharpDevelopPackageRepositoryFactory.cs
@@ -11,7 +11,8 @@ namespace ICSharpCode.PackageManagement
{
ISharedPackageRepository CreateSharedRepository(
IPackagePathResolver pathResolver,
- IFileSystem fileSystem);
+ IFileSystem fileSystem,
+ IFileSystem configSettingsFileSystem);
IRecentPackageRepository CreateRecentPackageRepository(
IList recentPackages,
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/PackageManagementOptions.cs b/src/AddIns/Misc/PackageManagement/Project/Src/PackageManagementOptions.cs
index bd587c46f1..25772f88ab 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/PackageManagementOptions.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/PackageManagementOptions.cs
@@ -26,7 +26,7 @@ namespace ICSharpCode.PackageManagement
}
public PackageManagementOptions(Properties properties)
- : this(properties, Settings.DefaultSettings)
+ : this(properties, Settings.LoadDefaultSettings())
{
}
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/PackageReferenceFileNameForProject.cs b/src/AddIns/Misc/PackageManagement/Project/Src/PackageReferenceFileNameForProject.cs
index de26abddc7..84d7c3fe7b 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/PackageReferenceFileNameForProject.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/PackageReferenceFileNameForProject.cs
@@ -17,7 +17,7 @@ namespace ICSharpCode.PackageManagement
void GetFileNameForProject(IProject project)
{
- FileName = Path.Combine(project.Directory, PackageReferenceRepository.PackageReferenceFile);
+ FileName = Path.Combine(project.Directory, Constants.PackageReferenceFile);
}
public string FileName { get; private set; }
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/PackageRepositoryCache.cs b/src/AddIns/Misc/PackageManagement/Project/Src/PackageRepositoryCache.cs
index ed44642528..be95abfacb 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/PackageRepositoryCache.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/PackageRepositoryCache.cs
@@ -62,9 +62,9 @@ namespace ICSharpCode.PackageManagement
return repository;
}
- public ISharedPackageRepository CreateSharedRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem)
+ public ISharedPackageRepository CreateSharedRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem, IFileSystem configSettingsFileSystem)
{
- return factory.CreateSharedRepository(pathResolver, fileSystem);
+ return factory.CreateSharedRepository(pathResolver, fileSystem, configSettingsFileSystem);
}
public IPackageRepository CreateAggregateRepository()
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/ProjectTemplatePackageRepositoryCache.cs b/src/AddIns/Misc/PackageManagement/Project/Src/ProjectTemplatePackageRepositoryCache.cs
index 72c3aed9c1..cb827da187 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/ProjectTemplatePackageRepositoryCache.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/ProjectTemplatePackageRepositoryCache.cs
@@ -46,7 +46,7 @@ namespace ICSharpCode.PackageManagement
}
}
- public ISharedPackageRepository CreateSharedRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem)
+ public ISharedPackageRepository CreateSharedRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem, IFileSystem configSettingsFileSystem)
{
throw new NotImplementedException();
}
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopPackageManagerFactory.cs b/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopPackageManagerFactory.cs
index 736783326b..97b65f0366 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopPackageManagerFactory.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopPackageManagerFactory.cs
@@ -55,10 +55,5 @@ namespace ICSharpCode.PackageManagement
{
return projectSystemFactory.CreateProjectSystem(project);
}
-
- ISharedPackageRepository CreateSharedRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem)
- {
- return packageRepositoryFactory.CreateSharedRepository(pathResolver, fileSystem);
- }
}
}
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopPackageRepositoryFactory.cs b/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopPackageRepositoryFactory.cs
index 7f41647dda..043e85e8c4 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopPackageRepositoryFactory.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopPackageRepositoryFactory.cs
@@ -23,9 +23,10 @@ namespace ICSharpCode.PackageManagement
public ISharedPackageRepository CreateSharedRepository(
IPackagePathResolver pathResolver,
- IFileSystem fileSystem)
+ IFileSystem fileSystem,
+ IFileSystem configSettingsFileSystem)
{
- return new SharedPackageRepository(pathResolver, fileSystem);
+ return new SharedPackageRepository(pathResolver, fileSystem, configSettingsFileSystem);
}
public IRecentPackageRepository CreateRecentPackageRepository(
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopProjectSystem.cs b/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopProjectSystem.cs
index b7e0047d20..e6a387c059 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopProjectSystem.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/SharpDevelopProjectSystem.cs
@@ -40,6 +40,8 @@ namespace ICSharpCode.PackageManagement
return directory + @"\";
}
+ public bool IsBindingRedirectSupported { get; set; }
+
public FrameworkName TargetFramework {
get { return GetTargetFramework(); }
}
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/SolutionPackageRepository.cs b/src/AddIns/Misc/PackageManagement/Project/Src/SolutionPackageRepository.cs
index 9773d016a2..482f3d7887 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/SolutionPackageRepository.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/SolutionPackageRepository.cs
@@ -35,7 +35,7 @@ namespace ICSharpCode.PackageManagement
repositoryPath = new SolutionPackageRepositoryPath(solution, options);
CreatePackagePathResolver();
CreateFileSystem();
- CreateRepository();
+ CreateRepository(ConfigSettingsFileSystem.CreateConfigSettingsFileSystem(solution));
}
void CreatePackagePathResolver()
@@ -48,9 +48,9 @@ namespace ICSharpCode.PackageManagement
fileSystem = new PhysicalFileSystem(repositoryPath.PackageRepositoryPath);
}
- void CreateRepository()
+ void CreateRepository(ConfigSettingsFileSystem configSettingsFileSystem)
{
- repository = repositoryFactory.CreateSharedRepository(packagePathResolver, fileSystem);
+ repository = repositoryFactory.CreateSharedRepository(packagePathResolver, fileSystem, configSettingsFileSystem);
}
public ISharedPackageRepository Repository {
diff --git a/src/AddIns/Misc/PackageManagement/Project/Src/UpdatedPackages.cs b/src/AddIns/Misc/PackageManagement/Project/Src/UpdatedPackages.cs
index 3f9c367266..c958019c84 100644
--- a/src/AddIns/Misc/PackageManagement/Project/Src/UpdatedPackages.cs
+++ b/src/AddIns/Misc/PackageManagement/Project/Src/UpdatedPackages.cs
@@ -53,7 +53,7 @@ namespace ICSharpCode.PackageManagement
IEnumerable GetUpdatedPackages(IPackageRepository sourceRepository, IQueryable localPackages)
{
- return sourceRepository.GetUpdates(localPackages, false);
+ return sourceRepository.GetUpdates(localPackages, false, false);
}
}
}
diff --git a/src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.Cmdlets.dll-Help.xml b/src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.Cmdlets.dll-Help.xml
index 9468c01b73..43b81a1a78 100644
--- a/src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.Cmdlets.dll-Help.xml
+++ b/src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.Cmdlets.dll-Help.xml
@@ -420,6 +420,10 @@ Returns a list of recently installed packages.
RemoveDependencies
+
+ ProjectName
+ string
+
Force
@@ -457,6 +461,12 @@ Returns a list of recently installed packages.
string
+
+ Force
+
+ Forces an uninstall of the package even if another package depends on it.
+
+
Version
@@ -707,124 +717,6 @@ available in the feed, the -Safe flag updates the package to 1.0.2.
-
-
-
-
-
- New-Package
-
-
- Creates a package.
-
- New
- Package
-
-
-
-
- Creates a new package when supplied with a Nuspec package specification file.
-
-
-
-
-
- New-Package
-
- ProjectName
- string
-
-
- SpecFileName
- string
-
-
- TargetFile
- string
-
-
- NoClobber
-
-
-
-
-
-
-
- ProjectName
-
- Specifies the project containing the NuSpec file to use when creating the package. If omitted, the current project selected in the console is used.
-
- string
-
-
- SpecFileName
-
- Specifies the NuSpec file used to create the package. If omitted, the NuSpec file within the current project is used if there is only one such file.
-
- string
-
-
- TargetFile
-
- Specifes the full name of the output NuPkg file.
-
- string
-
-
- NoClobber
-
- If specified, the target file is not overwritten.
-
-
-
-
-
-
- ---------- EXAMPLE 1 ----------
- PM> New-Package
-
-
-Description
-------------------------------------------------------------------
-Creates a new package based on the current project using a Nuspec file within the project if only one such file is found.
-
-
-
-
-
-
-
- ---------- EXAMPLE 2 ----------
- PM> New-Package -Project MyProjectName -SpecFileName MyPackage.nuspec
-
-
-Description
-------------------------------------------------------------------
-Creates a new package from the specified project, MyProjectName using the specified Nuspec file, MyPackage.nuspec.
-
-
-
-
-
-
-
-
-
-
- Online version:
- http://docs.nuget.org/
-
-
- New-Package
-
-
-
-
-
(() => CompleteReadPackagesTask());
Assert.AreEqual("Test", ex.Message);
}
+
+ [Test]
+ public void ReadPackages_RepositoryHasPrereleaseAndReleasePackage_HasReleasePackageOnly()
+ {
+ CreateViewModel();
+
+ var releasePackage = new FakePackage("Test", "1.0.0.0");
+ var prereleasePackage = new FakePackage("Test", "1.1.0-alpha");
+
+ var packages = new FakePackage[] {
+ releasePackage, prereleasePackage
+ };
+
+ registeredPackageRepositories.FakeActiveRepository.FakePackages.AddRange(packages);
+
+ viewModel.ReadPackages();
+ CompleteReadPackagesTask();
+
+ var expectedPackages = new FakePackage[] {
+ releasePackage
+ };
+
+ PackageCollectionAssert.AreEqual(expectedPackages, viewModel.PackageViewModels);
+ }
}
}
diff --git a/src/AddIns/Misc/PackageManagement/Test/Src/EnvDTE/DTETests.cs b/src/AddIns/Misc/PackageManagement/Test/Src/EnvDTE/DTETests.cs
index b93e25ef91..bf21b84213 100644
--- a/src/AddIns/Misc/PackageManagement/Test/Src/EnvDTE/DTETests.cs
+++ b/src/AddIns/Misc/PackageManagement/Test/Src/EnvDTE/DTETests.cs
@@ -137,5 +137,15 @@ namespace PackageManagement.Tests.EnvDTE
Assert.AreEqual("ProjectA", name);
}
+
+ [Test]
+ public void Version_CheckVersion_Returns10()
+ {
+ CreateDTE();
+
+ string version = dte.Version;
+
+ Assert.AreEqual("10.0", version);
+ }
}
}
diff --git a/src/AddIns/Misc/PackageManagement/Test/Src/Helpers/FakePackageRepositoryFactory.cs b/src/AddIns/Misc/PackageManagement/Test/Src/Helpers/FakePackageRepositoryFactory.cs
index f8b44f9a5e..150c963d83 100644
--- a/src/AddIns/Misc/PackageManagement/Test/Src/Helpers/FakePackageRepositoryFactory.cs
+++ b/src/AddIns/Misc/PackageManagement/Test/Src/Helpers/FakePackageRepositoryFactory.cs
@@ -37,12 +37,14 @@ namespace PackageManagement.Tests.Helpers
public IPackagePathResolver PathResolverPassedToCreateSharedRepository;
public IFileSystem FileSystemPassedToCreateSharedRepository;
+ public IFileSystem ConfigSettingsFileSystemPassedToCreateSharedRepository;
public FakeSharedPackageRepository FakeSharedRepository = new FakeSharedPackageRepository();
- public ISharedPackageRepository CreateSharedRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem)
+ public ISharedPackageRepository CreateSharedRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem, IFileSystem configSettingsFileSystem)
{
PathResolverPassedToCreateSharedRepository = pathResolver;
FileSystemPassedToCreateSharedRepository = fileSystem;
+ ConfigSettingsFileSystemPassedToCreateSharedRepository = configSettingsFileSystem;
return FakeSharedRepository;
}
diff --git a/src/AddIns/Misc/PackageManagement/Test/Src/PackageRepositoryCacheTests.cs b/src/AddIns/Misc/PackageManagement/Test/Src/PackageRepositoryCacheTests.cs
index 0614083b6a..f9044d8a61 100644
--- a/src/AddIns/Misc/PackageManagement/Test/Src/PackageRepositoryCacheTests.cs
+++ b/src/AddIns/Misc/PackageManagement/Test/Src/PackageRepositoryCacheTests.cs
@@ -112,7 +112,7 @@ namespace PackageManagement.Tests
public void CreateSharedRepository_MethodCalled_ReturnsSharedPackageRepository()
{
CreateCache();
- ISharedPackageRepository repository = cache.CreateSharedRepository(null, null);
+ ISharedPackageRepository repository = cache.CreateSharedRepository(null, null, null);
Assert.IsNotNull(repository);
}
@@ -121,7 +121,7 @@ namespace PackageManagement.Tests
{
CreateCache();
FakePackagePathResolver resolver = new FakePackagePathResolver();
- cache.CreateSharedRepository(resolver, null);
+ cache.CreateSharedRepository(resolver, null, null);
Assert.AreEqual(resolver, fakePackageRepositoryFactory.PathResolverPassedToCreateSharedRepository);
}
@@ -131,11 +131,21 @@ namespace PackageManagement.Tests
{
CreateCache();
FakeFileSystem fileSystem = new FakeFileSystem();
- cache.CreateSharedRepository(null, fileSystem);
+ cache.CreateSharedRepository(null, fileSystem, null);
Assert.AreEqual(fileSystem, fakePackageRepositoryFactory.FileSystemPassedToCreateSharedRepository);
}
+ [Test]
+ public void CreatedSharedRepository_ConfigSettingsFileSystemPassed_FileSystemUsedToCreatedSharedRepository()
+ {
+ CreateCache();
+ FakeFileSystem fileSystem = new FakeFileSystem();
+ cache.CreateSharedRepository(null, null, fileSystem);
+
+ Assert.AreEqual(fileSystem, fakePackageRepositoryFactory.ConfigSettingsFileSystemPassedToCreateSharedRepository);
+ }
+
[Test]
public void CreateAggregatePackageRepository_TwoRegisteredPackageRepositories_ReturnsAggregateRepositoryFromFactory()
{
diff --git a/src/AddIns/Misc/PackageManagement/Test/Src/Scripting/RunPackageScriptsActionTests.cs b/src/AddIns/Misc/PackageManagement/Test/Src/Scripting/RunPackageScriptsActionTests.cs
index b43a4da6e5..aa487146b3 100644
--- a/src/AddIns/Misc/PackageManagement/Test/Src/Scripting/RunPackageScriptsActionTests.cs
+++ b/src/AddIns/Misc/PackageManagement/Test/Src/Scripting/RunPackageScriptsActionTests.cs
@@ -46,8 +46,7 @@ namespace PackageManagement.Tests.Scripting
PackageOperationEventArgs CreatePackageOperationEventArgs(FakePackage package, string installPath)
{
- string targetPath = @"d:\projects\myproject\packages\target";
- return new PackageOperationEventArgs(package, null, targetPath, installPath);
+ return new PackageOperationEventArgs(package, null, installPath);
}
[Test]
diff --git a/src/AddIns/Misc/PackageManagement/Test/Src/SolutionPackageRepositoryTests.cs b/src/AddIns/Misc/PackageManagement/Test/Src/SolutionPackageRepositoryTests.cs
index e2b95f89d4..9f36efa3af 100644
--- a/src/AddIns/Misc/PackageManagement/Test/Src/SolutionPackageRepositoryTests.cs
+++ b/src/AddIns/Misc/PackageManagement/Test/Src/SolutionPackageRepositoryTests.cs
@@ -120,13 +120,10 @@ namespace PackageManagement.Tests
}
[Test]
- public void GetPackagesByDependencyOrder_OnePackageInSharedRepository_SharedRepositoryCreatedWithFileSystemForSolutionPackagesFolder()
+ public void Constructor_CreateInstance_SharedRepositoryCreatedWithFileSystemForSolutionPackagesFolder()
{
CreateSolution(@"d:\projects\myproject\myproject.sln");
CreateRepository(solution);
- FakePackage package = AddPackageToSharedRepository("Test");
-
- List actualPackages = repository.GetPackagesByDependencyOrder().ToList();
IFileSystem fileSystem = fakeRepositoryFactory.FileSystemPassedToCreateSharedRepository;
string rootPath = fileSystem.Root;
@@ -136,6 +133,20 @@ namespace PackageManagement.Tests
Assert.AreEqual(expectedRootPath, rootPath);
}
+ [Test]
+ public void Constructor_CreateInstance_SharedRepositoryCreatedWithConfigSettingsFileSystemForSolutionNuGetFolder()
+ {
+ CreateSolution(@"d:\projects\myproject\myproject.sln");
+ CreateRepository(solution);
+
+ IFileSystem fileSystem = fakeRepositoryFactory.ConfigSettingsFileSystemPassedToCreateSharedRepository;
+ string rootPath = fileSystem.Root;
+
+ string expectedRootPath = @"d:\projects\myproject\.nuget";
+
+ Assert.AreEqual(expectedRootPath, rootPath);
+ }
+
[Test]
public void GetPackagesByDependencyOrder_TwoPackagesInSharedRepositoryFirstPackageDependsOnSecond_ReturnsSecondPackageFirst()
{
diff --git a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/DataManager/TableStragy/TableDataManagerFixture.cs b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/DataManager/TableStragy/TableDataManagerFixture.cs
index daab1ec216..0e30a33341 100644
--- a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/DataManager/TableStragy/TableDataManagerFixture.cs
+++ b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/DataManager/TableStragy/TableDataManagerFixture.cs
@@ -320,8 +320,8 @@ namespace ICSharpCode.Reports.Core.Test.DataManager.TableStrategy
{
if (this.table != null) {
- this.table = null;
this.table.Dispose();
+ this.table = null;
}
}
diff --git a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/ReportingLanguage/IntegrationTests/AggregateFunctionsFixture.cs b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/ReportingLanguage/IntegrationTests/AggregateFunctionsFixture.cs
index 19a229c839..e3ca3e4a51 100644
--- a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/ReportingLanguage/IntegrationTests/AggregateFunctionsFixture.cs
+++ b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Test/ICSharpCode.Reports.Core.Test/ReportingLanguage/IntegrationTests/AggregateFunctionsFixture.cs
@@ -15,7 +15,7 @@ namespace ICSharpCode.Reports.Core.Test.ReportingLanguage.IntegrationTests
{
[TestFixture]
-// [SetCulture("de-DE")]
+ [SetCulture("en-US")]
public class AggregateFunctionsFromTableFixture
{
@@ -107,7 +107,7 @@ namespace ICSharpCode.Reports.Core.Test.ReportingLanguage.IntegrationTests
const string expression = "=max(amount)";
//var s = this.evaluator.Evaluate(expression);
Assert.That(this.evaluator.Evaluate(expression),
- Is.EqualTo("400,5"));
+ Is.EqualTo("400.5"));
}
diff --git a/src/AddIns/Misc/SearchAndReplace/Project/Engine/SearchManager.cs b/src/AddIns/Misc/SearchAndReplace/Project/Engine/SearchManager.cs
index c687a855e0..445f89693b 100644
--- a/src/AddIns/Misc/SearchAndReplace/Project/Engine/SearchManager.cs
+++ b/src/AddIns/Misc/SearchAndReplace/Project/Engine/SearchManager.cs
@@ -5,9 +5,9 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
-
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Highlighting;
@@ -31,21 +31,64 @@ namespace SearchAndReplace
public static IObservable FindAllParallel(ISearchStrategy strategy, SearchLocation location, IProgressMonitor progressMonitor)
{
currentSearchRegion = null;
- ParseableFileContentFinder fileFinder = new ParseableFileContentFinder();
+ SearchableFileContentFinder fileFinder = new SearchableFileContentFinder();
return new SearchRun(strategy, fileFinder, location.GenerateFileList(), progressMonitor) { Target = location.Target, Selection = location.Selection };
}
public static IEnumerable FindAll(ISearchStrategy strategy, SearchLocation location, IProgressMonitor progressMonitor)
{
currentSearchRegion = null;
- ParseableFileContentFinder fileFinder = new ParseableFileContentFinder();
+ SearchableFileContentFinder fileFinder = new SearchableFileContentFinder();
return new SearchRun(strategy, fileFinder, location.GenerateFileList(), progressMonitor) { Target = location.Target, Selection = location.Selection }.GetResults();
}
+ class SearchableFileContentFinder
+ {
+ FileName[] viewContentFileNamesCollection = WorkbenchSingleton.SafeThreadFunction(() => FileService.OpenedFiles.Select(f => f.FileName).ToArray());
+
+ static ITextBuffer ReadFile(FileName fileName)
+ {
+ OpenedFile openedFile = FileService.GetOpenedFile(fileName);
+ if (openedFile == null)
+ return null;
+ IFileDocumentProvider provider = FileService.GetOpenFile(fileName) as IFileDocumentProvider;
+ if (provider == null)
+ return null;
+ IDocument doc = provider.GetDocumentForFile(openedFile);
+ if (doc == null)
+ return null;
+ return doc.CreateSnapshot();
+ }
+
+ public ITextBuffer Create(FileName fileName)
+ {
+ try {
+ foreach (FileName name in viewContentFileNamesCollection) {
+ if (FileUtility.IsEqualFileName(name, fileName)) {
+ ITextBuffer buffer = WorkbenchSingleton.SafeThreadFunction(ReadFile, fileName);
+ if (buffer != null)
+ return buffer;
+ }
+ }
+ using (Stream stream = new FileStream(fileName, FileMode.Open, FileAccess.Read)) {
+ if (MimeTypeDetection.FindMimeType(stream).StartsWith("text/")) {
+ stream.Position = 0;
+ return new StringTextBuffer(ICSharpCode.AvalonEdit.Utils.FileReader.ReadFileContent(stream, Encoding.Default));
+ }
+ }
+ return null;
+ } catch (IOException) {
+ return null;
+ } catch (UnauthorizedAccessException) {
+ return null;
+ }
+ }
+ }
+
class SearchRun : IObservable, IDisposable
{
ISearchStrategy strategy;
- ParseableFileContentFinder fileFinder;
+ SearchableFileContentFinder fileFinder;
IEnumerable fileList;
IProgressMonitor monitor;
CancellationTokenSource cts;
@@ -54,7 +97,7 @@ namespace SearchAndReplace
public ISegment Selection { get; set; }
- public SearchRun(ISearchStrategy strategy, ParseableFileContentFinder fileFinder, IEnumerable fileList, IProgressMonitor monitor)
+ public SearchRun(ISearchStrategy strategy, SearchableFileContentFinder fileFinder, IEnumerable fileList, IProgressMonitor monitor)
{
this.strategy = strategy;
this.fileFinder = fileFinder;
@@ -151,8 +194,6 @@ namespace SearchAndReplace
ThrowIfCancellationRequested();
- if (!MimeTypeDetection.FindMimeType(buffer).StartsWith("text/", StringComparison.Ordinal))
- return null;
var source = DocumentUtilitites.GetTextSource(buffer);
TextDocument document = null;
DocumentHighlighter highlighter = null;
@@ -213,7 +254,7 @@ namespace SearchAndReplace
public SearchResultMatch FindNext()
{
// Setup search inside current or first file.
- ParseableFileContentFinder finder = new ParseableFileContentFinder();
+ SearchableFileContentFinder finder = new SearchableFileContentFinder();
int index = GetCurrentFileIndex();
int i = 0;
int searchOffset = 0;
diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/ContextActions/AddUsing.cs b/src/AddIns/Misc/SharpRefactoring/Project/Src/ContextActions/AddUsing.cs
index 7c4a1dd317..b119c4b4f6 100644
--- a/src/AddIns/Misc/SharpRefactoring/Project/Src/ContextActions/AddUsing.cs
+++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/ContextActions/AddUsing.cs
@@ -48,7 +48,7 @@ namespace SharpRefactoring.ContextActions
IProjectContent pc = context.ProjectContent;
SearchAllExtensionMethodsWithName(results, pc, rr.CallName);
- foreach (IProjectContent content in pc.ReferencedContents)
+ foreach (IProjectContent content in pc.ThreadSafeGetReferencedContents())
SearchAllExtensionMethodsWithName(results, content, rr.CallName);
foreach (IClass c in results) {
@@ -99,7 +99,7 @@ namespace SharpRefactoring.ContextActions
public string Search(UnknownMethodResolveResult rr, IProjectContent pc, List results)
{
SearchAttributesWithName(results, pc, rr.CallName);
- foreach (IProjectContent content in pc.ReferencedContents)
+ foreach (IProjectContent content in pc.ThreadSafeGetReferencedContents())
SearchAttributesWithName(results, content, rr.CallName);
return rr.CallName;
}
@@ -107,7 +107,7 @@ namespace SharpRefactoring.ContextActions
public string Search(UnknownIdentifierResolveResult rr, IProjectContent pc, List results)
{
SearchAttributesWithName(results, pc, rr.Identifier);
- foreach (IProjectContent content in pc.ReferencedContents)
+ foreach (IProjectContent content in pc.ThreadSafeGetReferencedContents())
SearchAttributesWithName(results, content, rr.Identifier);
return rr.Identifier;
}
diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/MenuItemFactories/ResolveAttribute.cs b/src/AddIns/Misc/SharpRefactoring/Project/Src/MenuItemFactories/ResolveAttribute.cs
index 9c1e6aa7f3..2578f994b5 100644
--- a/src/AddIns/Misc/SharpRefactoring/Project/Src/MenuItemFactories/ResolveAttribute.cs
+++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/MenuItemFactories/ResolveAttribute.cs
@@ -42,7 +42,7 @@ namespace SharpRefactoring
var rr = context.ResolveResult as UnknownMethodResolveResult;
SearchAttributesWithName(results, pc, rr.CallName);
- foreach (IProjectContent content in pc.ReferencedContents)
+ foreach (IProjectContent content in pc.ThreadSafeGetReferencedContents())
SearchAttributesWithName(results, content, rr.CallName);
name = rr.CallName;
@@ -52,7 +52,7 @@ namespace SharpRefactoring
var rr = context.ResolveResult as UnknownIdentifierResolveResult;
SearchAttributesWithName(results, pc, rr.Identifier);
- foreach (IProjectContent content in pc.ReferencedContents)
+ foreach (IProjectContent content in pc.ThreadSafeGetReferencedContents())
SearchAttributesWithName(results, content, rr.Identifier);
name = rr.Identifier;
diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/MenuItemFactories/ResolveExtensionMethod.cs b/src/AddIns/Misc/SharpRefactoring/Project/Src/MenuItemFactories/ResolveExtensionMethod.cs
index 24cdadfdf2..c37a3afe72 100644
--- a/src/AddIns/Misc/SharpRefactoring/Project/Src/MenuItemFactories/ResolveExtensionMethod.cs
+++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/MenuItemFactories/ResolveExtensionMethod.cs
@@ -38,7 +38,7 @@ namespace SharpRefactoring
SearchAllExtensionMethodsWithName(results, context.ProjectContent, rr.CallName);
- foreach (IProjectContent content in context.ProjectContent.ReferencedContents)
+ foreach (IProjectContent content in context.ProjectContent.ThreadSafeGetReferencedContents())
SearchAllExtensionMethodsWithName(results, content, rr.CallName);
if (!results.Any())
diff --git a/src/AddIns/Misc/SharpRefactoring/Test/MockTextEditor.cs b/src/AddIns/Misc/SharpRefactoring/Test/MockTextEditor.cs
index a58ddf5414..d730583c68 100644
--- a/src/AddIns/Misc/SharpRefactoring/Test/MockTextEditor.cs
+++ b/src/AddIns/Misc/SharpRefactoring/Test/MockTextEditor.cs
@@ -32,7 +32,7 @@ namespace SharpRefactoring.Tests
pc = new DefaultProjectContent();
pc.ReferencedContents.Add(AssemblyParserService.DefaultProjectContentRegistry.Mscorlib);
- this.TextEditor.TextArea.TextView.Services.AddService(typeof(ISyntaxHighlighter), new AvalonEditSyntaxHighlighterAdapter(this.TextEditor));
+// this.TextEditor.TextArea.TextView.Services.AddService(typeof(ISyntaxHighlighter), new AvalonEditSyntaxHighlighterAdapter(this.TextEditor));
this.TextEditor.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("C#");
}
diff --git a/src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/AnalyticsMonitor.cs b/src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/AnalyticsMonitor.cs
index dcd0637930..0d47ff46e0 100644
--- a/src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/AnalyticsMonitor.cs
+++ b/src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/AnalyticsMonitor.cs
@@ -50,6 +50,8 @@ namespace ICSharpCode.UsageDataCollector
static void AsyncEnableDisable()
{
+ if (System.Diagnostics.Debugger.IsAttached)
+ return;
if (Enabled) {
Instance.OpenSession();
} else {
@@ -242,6 +244,8 @@ namespace ICSharpCode.UsageDataCollector
{
public override void Run()
{
+ if (System.Diagnostics.Debugger.IsAttached)
+ return;
if (AnalyticsMonitor.Enabled)
AnalyticsMonitor.Instance.OpenSession();
}
diff --git a/src/AddIns/VersionControl/SubversionAddIn/Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs b/src/AddIns/VersionControl/SubversionAddIn/Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs
index 82fc0b3e7f..8aa35d033e 100644
--- a/src/AddIns/VersionControl/SubversionAddIn/Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs
+++ b/src/AddIns/VersionControl/SubversionAddIn/Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs
@@ -192,7 +192,12 @@ namespace ICSharpCode.Svn
}
}
- return client.SingleStatus(fileName).TextStatus;
+ try {
+ return client.SingleStatus(fileName).TextStatus;
+ } catch (SvnClientException ex) {
+ LoggingService.Warn(ex);
+ return StatusKind.None;
+ }
}
}
diff --git a/src/Libraries/AvalonDock/AvalonDock/DockingManager.cs b/src/Libraries/AvalonDock/AvalonDock/DockingManager.cs
index 45a393e3fa..b65cdc147d 100644
--- a/src/Libraries/AvalonDock/AvalonDock/DockingManager.cs
+++ b/src/Libraries/AvalonDock/AvalonDock/DockingManager.cs
@@ -2636,6 +2636,15 @@ namespace AvalonDock
//_flyoutWindow.KeepWindowOpen();
return;
}
+
+ // David: This sometimes seems to be null when hovering over auto-hide pad.
+ // It only seems to occur in specific circumstances - whether the pad is the
+ // "selected" one in the set seems important. Having no open document might have effect?
+ // I have only managed to reliablely reproduce it in stand-alone application.
+ if (content.ContainerPane == null)
+ {
+ return;
+ }
//hide previous window
HideFlyoutWindow();
diff --git a/src/Libraries/AvalonDock/AvalonDock/DocumentTabPanel.cs b/src/Libraries/AvalonDock/AvalonDock/DocumentTabPanel.cs
index b4ed1cf282..86c963cc92 100644
--- a/src/Libraries/AvalonDock/AvalonDock/DocumentTabPanel.cs
+++ b/src/Libraries/AvalonDock/AvalonDock/DocumentTabPanel.cs
@@ -65,6 +65,10 @@ namespace AvalonDock
foreach (ManagedContent child in Children)
{
+ // David: Sometimes happened when closing document tab by middle clicking. Really difficult to reproduce.
+ if (child == null)
+ continue;
+
Panel.SetZIndex(child, Selector.GetIsSelected(child) ? 1 : -i);
i++;
child.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
@@ -81,6 +85,10 @@ namespace AvalonDock
bool skipAllOthers = false;
foreach (ManagedContent doc in Children)
{
+ // David: Sometimes happened when closing document tab by middle clicking. Really difficult to reproduce.
+ if (doc == null)
+ continue;
+
if (skipAllOthers || offset + doc.DesiredSize.Width > finalSize.Width)
{
SetIsHeaderVisible(doc, false);
diff --git a/src/Libraries/AvalonEdit/Documentation/ICSharpCode.AvalonEdit.shfbproj b/src/Libraries/AvalonEdit/Documentation/ICSharpCode.AvalonEdit.shfbproj
index ad51dbd9a2..88c48fea83 100644
--- a/src/Libraries/AvalonEdit/Documentation/ICSharpCode.AvalonEdit.shfbproj
+++ b/src/Libraries/AvalonEdit/Documentation/ICSharpCode.AvalonEdit.shfbproj
@@ -33,26 +33,26 @@
.NET 4.0.30319
AvalonEdit
- Copyright 2008-2011, Daniel Grunwald
+ Copyright 2008-2012, Daniel Grunwald
Prototype
- 4.1.0.0
+ 4.2.0.0
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
{@HelpFormatOutputPaths}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Libraries/AvalonEdit/Documentation/Welcome.aml b/src/Libraries/AvalonEdit/Documentation/Welcome.aml
index a384c467d6..243e435bb0 100644
--- a/src/Libraries/AvalonEdit/Documentation/Welcome.aml
+++ b/src/Libraries/AvalonEdit/Documentation/Welcome.aml
@@ -41,13 +41,13 @@
System requirements
- AvalonEdit requires the
+ There are two versions of AvalonEdit - the normal one requires
- .NET Framework 3.5 SP1
- http://www.microsoft.com/downloads/details.aspx?FamilyID=ab99342f-5d1a-413d-8319-81da479ab0d7&DisplayLang=en
+ .NET Framework 4.0
+ http://msdn.microsoft.com/en-us/library/w0x726c2.aspx
_blank
- .
- For compiling AvalonEdit inside Visual Studio 2008, VS08 SP1 is required.
+ or higher; but we also offer a modified version for .NET 3.5 SP1.
+ For compiling AvalonEdit, you will need a C# 4.0 compiler (SharpDevelop 4.x or Visual Studio 2010).
AvalonEdit requires FullTrust and will not run as XBAP.
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/Caret.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/Caret.cs
index 5c6999c1fd..c82f906040 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/Caret.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/Caret.cs
@@ -22,6 +22,7 @@ namespace ICSharpCode.AvalonEdit.Editing
{
readonly TextArea textArea;
readonly TextView textView;
+ readonly ImeSupport ime;
readonly CaretLayer caretAdorner;
bool visible;
@@ -30,6 +31,7 @@ namespace ICSharpCode.AvalonEdit.Editing
this.textArea = textArea;
this.textView = textArea.TextView;
position = new TextViewPosition(1, 1, 0);
+ ime = new ImeSupport(textArea);
caretAdorner = new CaretLayer(textView);
textView.InsertLayer(caretAdorner, KnownLayer.Caret, LayerInsertionPosition.Replace);
@@ -434,6 +436,7 @@ namespace ICSharpCode.AvalonEdit.Editing
} else {
caretAdorner.Hide();
}
+ ime.UpdateCompositionWindow();
}
}
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/CaretNavigationCommandHandler.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/CaretNavigationCommandHandler.cs
index 036e57f59d..210878a229 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/CaretNavigationCommandHandler.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/CaretNavigationCommandHandler.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
+using System.Linq;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Input;
@@ -41,21 +42,28 @@ namespace ICSharpCode.AvalonEdit.Editing
const ModifierKeys None = ModifierKeys.None;
const ModifierKeys Ctrl = ModifierKeys.Control;
const ModifierKeys Shift = ModifierKeys.Shift;
+ const ModifierKeys Alt = ModifierKeys.Alt;
AddBinding(EditingCommands.MoveLeftByCharacter, None, Key.Left, OnMoveCaret(CaretMovementType.CharLeft));
AddBinding(EditingCommands.SelectLeftByCharacter, Shift, Key.Left, OnMoveCaretExtendSelection(CaretMovementType.CharLeft));
+ AddBinding(RectangleSelection.BoxSelectLeftByCharacter, Alt | Shift, Key.Left, OnMoveCaretBoxSelection(CaretMovementType.CharLeft));
AddBinding(EditingCommands.MoveRightByCharacter, None, Key.Right, OnMoveCaret(CaretMovementType.CharRight));
AddBinding(EditingCommands.SelectRightByCharacter, Shift, Key.Right, OnMoveCaretExtendSelection(CaretMovementType.CharRight));
+ AddBinding(RectangleSelection.BoxSelectRightByCharacter, Alt | Shift, Key.Right, OnMoveCaretBoxSelection(CaretMovementType.CharRight));
AddBinding(EditingCommands.MoveLeftByWord, Ctrl, Key.Left, OnMoveCaret(CaretMovementType.WordLeft));
AddBinding(EditingCommands.SelectLeftByWord, Ctrl | Shift, Key.Left, OnMoveCaretExtendSelection(CaretMovementType.WordLeft));
+ AddBinding(RectangleSelection.BoxSelectLeftByWord, Ctrl | Alt | Shift, Key.Left, OnMoveCaretBoxSelection(CaretMovementType.WordLeft));
AddBinding(EditingCommands.MoveRightByWord, Ctrl, Key.Right, OnMoveCaret(CaretMovementType.WordRight));
AddBinding(EditingCommands.SelectRightByWord, Ctrl | Shift, Key.Right, OnMoveCaretExtendSelection(CaretMovementType.WordRight));
+ AddBinding(RectangleSelection.BoxSelectRightByWord, Ctrl | Alt | Shift, Key.Right, OnMoveCaretBoxSelection(CaretMovementType.WordRight));
AddBinding(EditingCommands.MoveUpByLine, None, Key.Up, OnMoveCaret(CaretMovementType.LineUp));
AddBinding(EditingCommands.SelectUpByLine, Shift, Key.Up, OnMoveCaretExtendSelection(CaretMovementType.LineUp));
+ AddBinding(RectangleSelection.BoxSelectUpByLine, Alt | Shift, Key.Up, OnMoveCaretBoxSelection(CaretMovementType.LineUp));
AddBinding(EditingCommands.MoveDownByLine, None, Key.Down, OnMoveCaret(CaretMovementType.LineDown));
AddBinding(EditingCommands.SelectDownByLine, Shift, Key.Down, OnMoveCaretExtendSelection(CaretMovementType.LineDown));
+ AddBinding(RectangleSelection.BoxSelectDownByLine, Alt | Shift, Key.Down, OnMoveCaretBoxSelection(CaretMovementType.LineDown));
AddBinding(EditingCommands.MoveDownByPage, None, Key.PageDown, OnMoveCaret(CaretMovementType.PageDown));
AddBinding(EditingCommands.SelectDownByPage, Shift, Key.PageDown, OnMoveCaretExtendSelection(CaretMovementType.PageDown));
@@ -64,8 +72,10 @@ namespace ICSharpCode.AvalonEdit.Editing
AddBinding(EditingCommands.MoveToLineStart, None, Key.Home, OnMoveCaret(CaretMovementType.LineStart));
AddBinding(EditingCommands.SelectToLineStart, Shift, Key.Home, OnMoveCaretExtendSelection(CaretMovementType.LineStart));
+ AddBinding(RectangleSelection.BoxSelectToLineStart, Alt | Shift, Key.Home, OnMoveCaretBoxSelection(CaretMovementType.LineStart));
AddBinding(EditingCommands.MoveToLineEnd, None, Key.End, OnMoveCaret(CaretMovementType.LineEnd));
AddBinding(EditingCommands.SelectToLineEnd, Shift, Key.End, OnMoveCaretExtendSelection(CaretMovementType.LineEnd));
+ AddBinding(RectangleSelection.BoxSelectToLineEnd, Alt | Shift, Key.End, OnMoveCaretBoxSelection(CaretMovementType.LineEnd));
AddBinding(EditingCommands.MoveToDocumentStart, Ctrl, Key.Home, OnMoveCaret(CaretMovementType.DocumentStart));
AddBinding(EditingCommands.SelectToDocumentStart, Ctrl | Shift, Key.Home, OnMoveCaretExtendSelection(CaretMovementType.DocumentStart));
@@ -135,6 +145,31 @@ namespace ICSharpCode.AvalonEdit.Editing
};
}
+ static ExecutedRoutedEventHandler OnMoveCaretBoxSelection(CaretMovementType direction)
+ {
+ return (target, args) => {
+ TextArea textArea = GetTextArea(target);
+ if (textArea != null && textArea.Document != null) {
+ args.Handled = true;
+ // First, convert the selection into a rectangle selection
+ // (this is required so that virtual space gets enabled for the caret movement)
+ if (textArea.Options.EnableRectangularSelection && !(textArea.Selection is RectangleSelection)) {
+ if (textArea.Selection.IsEmpty) {
+ textArea.Selection = new RectangleSelection(textArea, textArea.Caret.Position, textArea.Caret.Position);
+ } else {
+ // Convert normal selection to rectangle selection
+ textArea.Selection = new RectangleSelection(textArea, textArea.Selection.StartPosition, textArea.Caret.Position);
+ }
+ }
+ // Now move the caret and extend the selection
+ TextViewPosition oldPosition = textArea.Caret.Position;
+ MoveCaret(textArea, direction);
+ textArea.Selection = textArea.Selection.StartSelectionOrSetEndpoint(oldPosition, textArea.Caret.Position);
+ textArea.Caret.BringCaretToView();
+ }
+ };
+ }
+
#region Caret movement
static void MoveCaret(TextArea textArea, CaretMovementType direction)
{
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/EmptySelection.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/EmptySelection.cs
index 15b17252e4..989be43469 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/EmptySelection.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/EmptySelection.cs
@@ -20,6 +20,14 @@ namespace ICSharpCode.AvalonEdit.Editing
return this;
}
+ public override TextViewPosition StartPosition {
+ get { return new TextViewPosition(TextLocation.Empty); }
+ }
+
+ public override TextViewPosition EndPosition {
+ get { return new TextViewPosition(TextLocation.Empty); }
+ }
+
public override ISegment SurroundingSegment {
get { return null; }
}
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/ImeNativeWrapper.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/ImeNativeWrapper.cs
new file mode 100644
index 0000000000..1e81993239
--- /dev/null
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/ImeNativeWrapper.cs
@@ -0,0 +1,178 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Security;
+using System.Windows;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Media;
+using System.Windows.Media.TextFormatting;
+
+using ICSharpCode.AvalonEdit;
+using ICSharpCode.AvalonEdit.Document;
+using ICSharpCode.AvalonEdit.Rendering;
+using ICSharpCode.AvalonEdit.Utils;
+using Draw = System.Drawing;
+
+namespace ICSharpCode.AvalonEdit.Editing
+{
+ ///
+ /// Native API required for IME support.
+ ///
+ static class ImeNativeWrapper
+ {
+ [StructLayout(LayoutKind.Sequential)]
+ struct CompositionForm
+ {
+ public int dwStyle;
+ public POINT ptCurrentPos;
+ public RECT rcArea;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ struct POINT
+ {
+ public int x;
+ public int y;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ struct RECT
+ {
+ public int left;
+ public int top;
+ public int right;
+ public int bottom;
+ }
+
+ [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
+ class LOGFONT
+ {
+ public int lfHeight = 0;
+ public int lfWidth = 0;
+ public int lfEscapement = 0;
+ public int lfOrientation = 0;
+ public int lfWeight = 0;
+ public byte lfItalic = 0;
+ public byte lfUnderline = 0;
+ public byte lfStrikeOut = 0;
+ public byte lfCharSet = 0;
+ public byte lfOutPrecision = 0;
+ public byte lfClipPrecision = 0;
+ public byte lfQuality = 0;
+ public byte lfPitchAndFamily = 0;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst=32)] public string lfFaceName = null;
+ }
+
+ const int CPS_CANCEL = 0x4;
+ const int NI_COMPOSITIONSTR = 0x15;
+ const int GCS_COMPSTR = 0x0008;
+
+ public const int WM_IME_COMPOSITION = 0x10F;
+ public const int WM_INPUTLANGCHANGE = 0x51;
+
+ [DllImport("imm32.dll")]
+ static extern IntPtr ImmAssociateContext(IntPtr hWnd, IntPtr hIMC);
+ [DllImport("imm32.dll")]
+ static extern IntPtr ImmGetContext(IntPtr hWnd);
+ [DllImport("imm32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ static extern bool ImmNotifyIME(IntPtr hIMC, int dwAction, int dwIndex, int dwValue = 0);
+ [DllImport("imm32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ static extern bool ImmReleaseContext(IntPtr hWnd, IntPtr hIMC);
+ [DllImport("imm32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ static extern bool ImmSetCompositionWindow(IntPtr hIMC, ref CompositionForm form);
+ [DllImport("imm32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ static extern bool ImmSetCompositionFont(IntPtr hIMC, ref LOGFONT font);
+ [DllImport("imm32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ static extern bool ImmGetCompositionFont(IntPtr hIMC, out LOGFONT font);
+
+ public static IntPtr AssociateContext(HwndSource source, IntPtr hIMC)
+ {
+ if (source == null)
+ throw new ArgumentNullException("source");
+ return ImmAssociateContext(source.Handle, hIMC);
+ }
+
+ public static bool NotifyIme(IntPtr hIMC)
+ {
+ return ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_CANCEL);
+ }
+
+ public static IntPtr GetContext(HwndSource source)
+ {
+ if (source == null)
+ return IntPtr.Zero;
+ return ImmGetContext(source.Handle);
+ }
+
+ public static bool ReleaseContext(HwndSource source, IntPtr hIMC)
+ {
+ return source != null && hIMC != IntPtr.Zero && ImmReleaseContext(source.Handle, hIMC);
+ }
+
+ public static bool SetCompositionWindow(HwndSource source, IntPtr hIMC, TextArea textArea)
+ {
+ if (textArea == null)
+ throw new ArgumentNullException("textArea");
+ Rect textViewBounds = textArea.TextView.GetBounds();
+ Rect characterBounds = textArea.TextView.GetCharacterBounds(textArea.Caret.Position, source);
+ if (source != null) {
+ Matrix transformToDevice = source.CompositionTarget.TransformToDevice;
+ textViewBounds.Transform(transformToDevice);
+ characterBounds.Transform(transformToDevice);
+ }
+ CompositionForm form = new CompositionForm();
+ form.dwStyle = 0x0020;
+ form.ptCurrentPos.x = (int)Math.Max(characterBounds.Left, textViewBounds.Left);
+ form.ptCurrentPos.y = (int)Math.Max(characterBounds.Top, textViewBounds.Top);
+ form.rcArea.left = (int)textViewBounds.Left;
+ form.rcArea.top = (int)textViewBounds.Top;
+ form.rcArea.right = (int)textViewBounds.Right;
+ form.rcArea.bottom = (int)textViewBounds.Bottom;
+ return ImmSetCompositionWindow(hIMC, ref form);
+ }
+
+ public static bool SetCompositionFont(HwndSource source, IntPtr hIMC, TextArea textArea)
+ {
+ if (textArea == null)
+ throw new ArgumentNullException("textArea");
+// LOGFONT font = new LOGFONT();
+// ImmGetCompositionFont(hIMC, out font);
+ return false;
+ }
+
+ static Rect GetBounds(this TextView textView)
+ {
+ Point location = textView.TranslatePoint(new Point(0,0), textView);
+ return new Rect(location, new Size(textView.ActualWidth, textView.ActualHeight));
+ }
+
+ static readonly Rect EMPTY_RECT = new Rect(0, 0, 0, 0);
+
+ static Rect GetCharacterBounds(this TextView textView, TextViewPosition pos, HwndSource source)
+ {
+ VisualLine vl = textView.GetVisualLine(pos.Line);
+ if (vl == null) return EMPTY_RECT;
+ TextLine line = vl.GetTextLine(pos.VisualColumn);
+ double offset = vl.GetTextLineVisualYPosition(line, VisualYPosition.LineTop) - textView.ScrollOffset.Y;
+ Rect r = line.GetTextBounds(pos.VisualColumn, 1).First().Rectangle;
+ r.Offset(-textView.ScrollOffset.X, offset);
+ // this may happen during layout changes in AvalonDock, so we just return an empty rectangle
+ // in those cases. It should be refreshed immediately.
+ if (!source.RootVisual.IsAncestorOf(textView)) return EMPTY_RECT;
+ Point pointOnRootVisual = textView.TransformToAncestor(source.RootVisual).Transform(r.Location);
+ Point pointOnHwnd = pointOnRootVisual.TransformToDevice(source.RootVisual);
+ r.Location = pointOnHwnd;
+ return r;
+ }
+ }
+}
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/ImeSupport.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/ImeSupport.cs
new file mode 100644
index 0000000000..7ac241efb6
--- /dev/null
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/ImeSupport.cs
@@ -0,0 +1,126 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Security;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Interop;
+using System.Windows.Media;
+using System.Windows.Media.TextFormatting;
+using ICSharpCode.AvalonEdit;
+using ICSharpCode.AvalonEdit.Document;
+using ICSharpCode.AvalonEdit.Rendering;
+
+namespace ICSharpCode.AvalonEdit.Editing
+{
+ class ImeSupport : IDisposable
+ {
+ TextArea textArea;
+ IntPtr currentContext;
+ IntPtr previousContext;
+ HwndSource hwndSource;
+
+ public ImeSupport(TextArea textArea)
+ {
+ if (textArea == null)
+ throw new ArgumentNullException("textArea");
+ this.textArea = textArea;
+ InputMethod.SetIsInputMethodSuspended(this.textArea, true);
+ textArea.GotKeyboardFocus += TextAreaGotKeyboardFocus;
+ textArea.LostKeyboardFocus += TextAreaLostKeyboardFocus;
+ textArea.OptionChanged += TextAreaOptionChanged;
+ currentContext = IntPtr.Zero;
+ previousContext = IntPtr.Zero;
+ }
+
+ void TextAreaOptionChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == "EnableImeSupport" && textArea.IsKeyboardFocusWithin) {
+ CreateContext();
+ }
+ }
+
+ public void Dispose()
+ {
+ if (textArea != null) {
+ textArea.GotKeyboardFocus -= TextAreaGotKeyboardFocus;
+ textArea.LostKeyboardFocus -= TextAreaLostKeyboardFocus;
+ textArea.OptionChanged -= TextAreaOptionChanged;
+ textArea = null;
+ }
+ ClearContext();
+ }
+
+ void ClearContext()
+ {
+ if (hwndSource != null) {
+ hwndSource.RemoveHook(WndProc);
+ ImeNativeWrapper.AssociateContext(hwndSource, previousContext);
+ previousContext = IntPtr.Zero;
+ ImeNativeWrapper.ReleaseContext(hwndSource, currentContext);
+ hwndSource = null;
+ currentContext = IntPtr.Zero;
+ }
+ }
+
+ void TextAreaGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
+ {
+ if (this.textArea == null)
+ return;
+ if (e.OriginalSource != this.textArea)
+ return;
+ CreateContext();
+ }
+
+ void CreateContext()
+ {
+ if (this.textArea == null)
+ return;
+ if (!textArea.Options.EnableImeSupport)
+ return;
+ hwndSource = (HwndSource)PresentationSource.FromVisual(this.textArea);
+ if (hwndSource != null) {
+ currentContext = ImeNativeWrapper.GetContext(hwndSource);
+ previousContext = ImeNativeWrapper.AssociateContext(hwndSource, currentContext);
+// ImeNativeWrapper.SetCompositionFont(hwndSource, currentContext, textArea);
+ hwndSource.AddHook(WndProc);
+ }
+ }
+
+ void TextAreaLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
+ {
+ if (e.OriginalSource != this.textArea)
+ return;
+ if (currentContext != IntPtr.Zero)
+ ImeNativeWrapper.NotifyIme(currentContext);
+ ClearContext();
+ }
+
+ IntPtr WndProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
+ {
+ switch (msg) {
+ case ImeNativeWrapper.WM_INPUTLANGCHANGE:
+ ClearContext();
+ CreateContext();
+ break;
+ case ImeNativeWrapper.WM_IME_COMPOSITION:
+ UpdateCompositionWindow();
+ break;
+ }
+ return IntPtr.Zero;
+ }
+
+ public void UpdateCompositionWindow()
+ {
+ if (currentContext != IntPtr.Zero && textArea != null) {
+ ImeNativeWrapper.SetCompositionWindow(hwndSource, currentContext, textArea);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/RectangleSelection.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/RectangleSelection.cs
index 733b178e34..9851b11b13 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/RectangleSelection.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/RectangleSelection.cs
@@ -7,8 +7,9 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Windows;
+using System.Windows.Documents;
+using System.Windows.Input;
using System.Windows.Media.TextFormatting;
-
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Rendering;
using ICSharpCode.AvalonEdit.Utils;
@@ -20,20 +21,70 @@ namespace ICSharpCode.AvalonEdit.Editing
///
public sealed class RectangleSelection : Selection
{
+ #region Commands
+ ///
+ /// Expands the selection left by one character, creating a rectangular selection.
+ /// Key gesture: Alt+Shift+Left
+ ///
+ public static readonly RoutedUICommand BoxSelectLeftByCharacter = Command("BoxSelectLeftByCharacter");
+
+ ///
+ /// Expands the selection right by one character, creating a rectangular selection.
+ /// Key gesture: Alt+Shift+Right
+ ///
+ public static readonly RoutedUICommand BoxSelectRightByCharacter = Command("BoxSelectRightByCharacter");
+
+ ///
+ /// Expands the selection left by one word, creating a rectangular selection.
+ /// Key gesture: Ctrl+Alt+Shift+Left
+ ///
+ public static readonly RoutedUICommand BoxSelectLeftByWord = Command("BoxSelectLeftByWord");
+
+ ///
+ /// Expands the selection left by one word, creating a rectangular selection.
+ /// Key gesture: Ctrl+Alt+Shift+Right
+ ///
+ public static readonly RoutedUICommand BoxSelectRightByWord = Command("BoxSelectRightByWord");
+
+ ///
+ /// Expands the selection up by one line, creating a rectangular selection.
+ /// Key gesture: Alt+Shift+Up
+ ///
+ public static readonly RoutedUICommand BoxSelectUpByLine = Command("BoxSelectUpByLine");
+
+ ///
+ /// Expands the selection up by one line, creating a rectangular selection.
+ /// Key gesture: Alt+Shift+Down
+ ///
+ public static readonly RoutedUICommand BoxSelectDownByLine = Command("BoxSelectDownByLine");
+
+ ///
+ /// Expands the selection to the start of the line, creating a rectangular selection.
+ /// Key gesture: Alt+Shift+Home
+ ///
+ public static readonly RoutedUICommand BoxSelectToLineStart = Command("BoxSelectToLineStart");
+
+ ///
+ /// Expands the selection to the end of the line, creating a rectangular selection.
+ /// Key gesture: Alt+Shift+End
+ ///
+ public static readonly RoutedUICommand BoxSelectToLineEnd = Command("BoxSelectToLineEnd");
+
+ static RoutedUICommand Command(string name)
+ {
+ return new RoutedUICommand(name, name, typeof(RectangleSelection));
+ }
+ #endregion
+
TextDocument document;
readonly int startLine, endLine;
readonly double startXPos, endXPos;
readonly int topLeftOffset, bottomRightOffset;
+ readonly TextViewPosition start, end;
readonly List segments = new List();
- void InitDocument()
- {
- document = textArea.Document;
- if (document == null)
- throw ThrowUtil.NoDocumentAssigned();
- }
-
+ #region Constructors
///
/// Creates a new rectangular selection.
///
@@ -48,6 +99,9 @@ namespace ICSharpCode.AvalonEdit.Editing
CalculateSegments();
this.topLeftOffset = this.segments.First().StartOffset;
this.bottomRightOffset = this.segments.Last().EndOffset;
+
+ this.start = start;
+ this.end = end;
}
private RectangleSelection(TextArea textArea, int startLine, double startXPos, TextViewPosition end)
@@ -61,6 +115,9 @@ namespace ICSharpCode.AvalonEdit.Editing
CalculateSegments();
this.topLeftOffset = this.segments.First().StartOffset;
this.bottomRightOffset = this.segments.Last().EndOffset;
+
+ this.start = GetStart();
+ this.end = end;
}
private RectangleSelection(TextArea textArea, TextViewPosition start, int endLine, double endXPos)
@@ -74,6 +131,16 @@ namespace ICSharpCode.AvalonEdit.Editing
CalculateSegments();
this.topLeftOffset = this.segments.First().StartOffset;
this.bottomRightOffset = this.segments.Last().EndOffset;
+
+ this.start = start;
+ this.end = GetEnd();
+ }
+
+ void InitDocument()
+ {
+ document = textArea.Document;
+ if (document == null)
+ throw ThrowUtil.NoDocumentAssigned();
}
static double GetXPos(TextArea textArea, TextViewPosition pos)
@@ -85,11 +152,43 @@ namespace ICSharpCode.AvalonEdit.Editing
return visualLine.GetTextLineVisualXPosition(textLine, vc);
}
- int GetVisualColumnFromXPos(int line, double xPos)
+ void CalculateSegments()
{
- var vl = textArea.TextView.GetOrConstructVisualLine(textArea.Document.GetLineByNumber(line));
- return vl.GetVisualColumn(new Point(xPos, 0), true);
+ DocumentLine nextLine = document.GetLineByNumber(Math.Min(startLine, endLine));
+ do {
+ VisualLine vl = textArea.TextView.GetOrConstructVisualLine(nextLine);
+ int startVC = vl.GetVisualColumn(new Point(startXPos, 0), true);
+ int endVC = vl.GetVisualColumn(new Point(endXPos, 0), true);
+
+ int baseOffset = vl.FirstDocumentLine.Offset;
+ int startOffset = baseOffset + vl.GetRelativeOffset(startVC);
+ int endOffset = baseOffset + vl.GetRelativeOffset(endVC);
+ segments.Add(new SelectionSegment(startOffset, startVC, endOffset, endVC));
+
+ nextLine = vl.LastDocumentLine.NextLine;
+ } while (nextLine != null && nextLine.LineNumber <= Math.Max(startLine, endLine));
+ }
+
+ TextViewPosition GetStart()
+ {
+ SelectionSegment segment = (startLine < endLine ? segments.First() : segments.Last());
+ if (startXPos < endXPos) {
+ return new TextViewPosition(document.GetLocation(segment.StartOffset), segment.StartVisualColumn);
+ } else {
+ return new TextViewPosition(document.GetLocation(segment.EndOffset), segment.EndVisualColumn);
+ }
+ }
+
+ TextViewPosition GetEnd()
+ {
+ SelectionSegment segment = (startLine < endLine ? segments.Last() : segments.First());
+ if (startXPos < endXPos) {
+ return new TextViewPosition(document.GetLocation(segment.EndOffset), segment.EndVisualColumn);
+ } else {
+ return new TextViewPosition(document.GetLocation(segment.StartOffset), segment.StartVisualColumn);
+ }
}
+ #endregion
///
public override string GetText()
@@ -133,22 +232,14 @@ namespace ICSharpCode.AvalonEdit.Editing
get { return segments; }
}
+ ///
+ public override TextViewPosition StartPosition {
+ get { return start; }
+ }
- void CalculateSegments()
- {
- DocumentLine nextLine = document.GetLineByNumber(Math.Min(startLine, endLine));
- do {
- VisualLine vl = textArea.TextView.GetOrConstructVisualLine(nextLine);
- int startVC = vl.GetVisualColumn(new Point(startXPos, 0), true);
- int endVC = vl.GetVisualColumn(new Point(endXPos, 0), true);
-
- int baseOffset = vl.FirstDocumentLine.Offset;
- int startOffset = baseOffset + vl.GetRelativeOffset(startVC);
- int endOffset = baseOffset + vl.GetRelativeOffset(endVC);
- segments.Add(new SelectionSegment(startOffset, startVC, endOffset, endVC));
-
- nextLine = vl.LastDocumentLine.NextLine;
- } while (nextLine != null && nextLine.LineNumber <= Math.Max(startLine, endLine));
+ ///
+ public override TextViewPosition EndPosition {
+ get { return end; }
}
///
@@ -173,6 +264,12 @@ namespace ICSharpCode.AvalonEdit.Editing
return new RectangleSelection(textArea, startLine, startXPos, endPosition);
}
+ int GetVisualColumnFromXPos(int line, double xPos)
+ {
+ var vl = textArea.TextView.GetOrConstructVisualLine(textArea.Document.GetLineByNumber(line));
+ return vl.GetVisualColumn(new Point(xPos, 0), true);
+ }
+
///
public override Selection UpdateOnDocumentChange(DocumentChangeEventArgs e)
{
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/Selection.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/Selection.cs
index ed30ab1ddd..005d8e5237 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/Selection.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/Selection.cs
@@ -63,6 +63,16 @@ namespace ICSharpCode.AvalonEdit.Editing
this.textArea = textArea;
}
+ ///
+ /// Gets the start position of the selection.
+ ///
+ public abstract TextViewPosition StartPosition { get; }
+
+ ///
+ /// Gets the end position of the selection.
+ ///
+ public abstract TextViewPosition EndPosition { get; }
+
///
/// Gets the selected text segments.
///
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/SimpleSelection.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/SimpleSelection.cs
index 879445dc05..5e8db07024 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/SimpleSelection.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/SimpleSelection.cs
@@ -71,18 +71,12 @@ namespace ICSharpCode.AvalonEdit.Editing
}
}
- ///
- /// Gets the start offset.
- ///
- public int StartOffset {
- get { return startOffset; }
+ public override TextViewPosition StartPosition {
+ get { return start; }
}
- ///
- /// Gets the end offset.
- ///
- public int EndOffset {
- get { return endOffset; }
+ public override TextViewPosition EndPosition {
+ get { return end; }
}
///
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/TextArea.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/TextArea.cs
index 3f5b4448d4..c74cebb683 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/TextArea.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/TextArea.cs
@@ -806,11 +806,13 @@ namespace ICSharpCode.AvalonEdit.Editing
//Debug.WriteLine("TextInput: Text='" + e.Text + "' SystemText='" + e.SystemText + "' ControlText='" + e.ControlText + "'");
base.OnTextInput(e);
if (!e.Handled && this.Document != null) {
- if (string.IsNullOrEmpty(e.Text) || e.Text == "\x1b") {
+ if (string.IsNullOrEmpty(e.Text) || e.Text == "\x1b" || e.Text == "\b") {
// ASCII 0x1b = ESC.
// WPF produces a TextInput event with that old ASCII control char
// when Escape is pressed. We'll just ignore it.
+ // A deadkey followed by backspace causes a textinput event for the BS character.
+
// Similarly, some shortcuts like Alt+Space produce an empty TextInput event.
// We have to ignore those (not handle them) to keep the shortcut working.
return;
@@ -846,7 +848,7 @@ namespace ICSharpCode.AvalonEdit.Editing
throw ThrowUtil.NoDocumentAssigned();
OnTextEntering(e);
if (!e.Handled) {
- if (e.Text == "\n" || e.Text == "\r\n")
+ if (e.Text == "\n" || e.Text == "\r" || e.Text == "\r\n")
ReplaceSelectionWithNewLine();
else
ReplaceSelectionWithText(e.Text);
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Folding/FoldingMargin.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Folding/FoldingMargin.cs
index f5466e8f12..e9945b3ab5 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Folding/FoldingMargin.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Folding/FoldingMargin.cs
@@ -3,12 +3,12 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.TextFormatting;
-
using ICSharpCode.AvalonEdit.Editing;
using ICSharpCode.AvalonEdit.Rendering;
using ICSharpCode.AvalonEdit.Utils;
@@ -92,10 +92,16 @@ namespace ICSharpCode.AvalonEdit.Folding
static void OnUpdateBrushes(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
+ FoldingMargin m = null;
+ if (d is FoldingMargin)
+ m = (FoldingMargin)d;
+ else if (d is TextEditor)
+ m = ((TextEditor)d).TextArea.LeftMargins.FirstOrDefault(c => c is FoldingMargin) as FoldingMargin;
+ if (m == null) return;
if (e.Property.Name == FoldingMarkerBrushProperty.Name)
- foldingControlPen = MakeFrozenPen((Brush)e.NewValue);
+ m.foldingControlPen = MakeFrozenPen((Brush)e.NewValue);
if (e.Property.Name == SelectedFoldingMarkerBrushProperty.Name)
- selectedFoldingControlPen = MakeFrozenPen((Brush)e.NewValue);
+ m.selectedFoldingControlPen = MakeFrozenPen((Brush)e.NewValue);
}
#endregion
@@ -181,8 +187,8 @@ namespace ICSharpCode.AvalonEdit.Folding
return markers[index];
}
- static Pen foldingControlPen = MakeFrozenPen((Brush)FoldingMarkerBrushProperty.DefaultMetadata.DefaultValue);
- static Pen selectedFoldingControlPen = MakeFrozenPen((Brush)SelectedFoldingMarkerBrushProperty.DefaultMetadata.DefaultValue);
+ Pen foldingControlPen = MakeFrozenPen((Brush)FoldingMarkerBrushProperty.DefaultMetadata.DefaultValue);
+ Pen selectedFoldingControlPen = MakeFrozenPen((Brush)SelectedFoldingMarkerBrushProperty.DefaultMetadata.DefaultValue);
static Pen MakeFrozenPen(Brush brush)
{
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/DocumentHighlighter.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/DocumentHighlighter.cs
index 8a201fad36..34025e59b9 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/DocumentHighlighter.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/DocumentHighlighter.cs
@@ -282,11 +282,14 @@ namespace ICSharpCode.AvalonEdit.Highlighting
Debug.Assert(position == firstMatch.Index);
if (firstMatch == endSpanMatch) {
- PopColor(); // pop SpanColor
HighlightingSpan poppedSpan = spanStack.Peek();
+ if (!poppedSpan.SpanColorIncludesEnd)
+ PopColor(); // pop SpanColor
PushColor(poppedSpan.EndColor);
position = firstMatch.Index + firstMatch.Length;
PopColor(); // pop EndColor
+ if (poppedSpan.SpanColorIncludesEnd)
+ PopColor(); // pop SpanColor
spanStack = spanStack.Pop();
currentRuleSet = this.CurrentRuleSet;
//FreeMatchArray(matches);
@@ -312,10 +315,13 @@ namespace ICSharpCode.AvalonEdit.Highlighting
currentRuleSet = this.CurrentRuleSet;
storedMatchArrays.Push(matches);
matches = AllocateMatchArray(currentRuleSet.Spans.Count);
+ if (newSpan.SpanColorIncludesStart)
+ PushColor(newSpan.SpanColor);
PushColor(newSpan.StartColor);
position = firstMatch.Index + firstMatch.Length;
PopColor();
- PushColor(newSpan.SpanColor);
+ if (!newSpan.SpanColorIncludesStart)
+ PushColor(newSpan.SpanColor);
}
endSpanMatch = null;
}
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/HighlightingSpan.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/HighlightingSpan.cs
index 4b2f71322b..b9552e5bbb 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/HighlightingSpan.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/HighlightingSpan.cs
@@ -43,6 +43,18 @@ namespace ICSharpCode.AvalonEdit.Highlighting
///
public HighlightingColor EndColor { get; set; }
+ ///
+ /// Gets/Sets whether the span color includes the start.
+ /// The default is false.
+ ///
+ public bool SpanColorIncludesStart { get; set; }
+
+ ///
+ /// Gets/Sets whether the span color includes the end.
+ /// The default is false.
+ ///
+ public bool SpanColorIncludesEnd { get; set; }
+
///
public override string ToString()
{
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/CSharp-Mode.xshd b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/CSharp-Mode.xshd
index ba860b7048..5c56d04118 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/CSharp-Mode.xshd
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/CSharp-Mode.xshd
@@ -43,7 +43,7 @@
\#
-
+
(define|undef|if|elif|else|endif|line)\b
@@ -97,7 +97,7 @@
- @"
+ @"
"
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/PowerShell.xshd b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/PowerShell.xshd
new file mode 100644
index 0000000000..ee6fec4c8d
--- /dev/null
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/PowerShell.xshd
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \#
+
+
+
+ <\#
+ \#>
+
+
+
+ "
+ "
+
+
+
+
+
+
+
+ '
+ '
+
+
+
+
+
+
+
+ @"
+ "@
+
+
+
+
+
+
+
+ while
+ param
+ end
+ define
+ else
+ from
+ foreach
+ var
+ dynamicparam
+ filter
+ dp
+ until
+ for
+ exit
+ switch
+ process
+ begin
+ elseif
+ if
+ in
+ data
+ class
+ using
+ function
+
+
+
+ catch
+ finally
+ throw
+ trap
+ try
+
+
+
+ break
+ continue
+ return
+
+
+
+ class
+
+
+
+ -not
+ -band
+ -bor
+ -replace
+ -ireplace
+ -creplace
+ -and
+ -or
+ -is
+ -isnot
+ -as
+ -lt
+ -le
+ -gt
+ -ge
+ -eq
+ -ne
+ -contains
+ -notcontains
+ -like
+ -notlike
+ -match
+ -notmatch
+
+
+
+ \$[\d\w_]+
+
+
+
+ [\w]+-[\w]+
+
+
+
+
+ \b0[xX][0-9a-fA-F]+ # hex number
+ |
+ ( \b\d+(\.[0-9]+)? #number with optional floating point
+ | \.[0-9]+ #or just starting with floating point
+ )
+ ([eE][+-]?[0-9]+)? # optional exponent
+
+
+
+ [?,.;()\[\]{}+\-/%*<>^+~!|&]+
+
+
+
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/Resources.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/Resources.cs
index 594417e04b..07827576cb 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/Resources.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/Resources.cs
@@ -33,13 +33,14 @@ namespace ICSharpCode.AvalonEdit.Highlighting
hlm.RegisterHighlighting("C++", new[] { ".c", ".h", ".cc", ".cpp" , ".hpp" }, "CPP-Mode.xshd");
hlm.RegisterHighlighting("Java", new[] { ".java" }, "Java-Mode.xshd");
hlm.RegisterHighlighting("Patch", new[] { ".patch", ".diff" }, "Patch-Mode.xshd");
+ hlm.RegisterHighlighting("PowerShell", new[] { ".ps1", ".psm1", ".psd1" }, "PowerShell.xshd");
hlm.RegisterHighlighting("PHP", new[] { ".php" }, "PHP-Mode.xshd");
hlm.RegisterHighlighting("TeX", new[] { ".tex" }, "Tex-Mode.xshd");
hlm.RegisterHighlighting("VBNET", new[] { ".vb" }, "VBNET-Mode.xshd");
hlm.RegisterHighlighting("XML", (".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;" +
".xshd;.wxs;.wxi;.wxl;.proj;.csproj;.vbproj;.ilproj;" +
".booproj;.build;.xfrm;.targets;.xaml;.xpt;" +
- ".xft;.map;.wsdl;.disco").Split(';'),
+ ".xft;.map;.wsdl;.disco;.ps1xml;.nuspec").Split(';'),
"XML-Mode.xshd");
}
}
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/XML-Mode.xshd b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/XML-Mode.xshd
index f77b72d8ed..8f0bdef769 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/XML-Mode.xshd
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Resources/XML-Mode.xshd
@@ -1,4 +1,4 @@
-
+
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Xshd/XmlHighlightingDefinition.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Xshd/XmlHighlightingDefinition.cs
index a0525cc1e7..d8bae25056 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Xshd/XmlHighlightingDefinition.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Highlighting/Xshd/XmlHighlightingDefinition.cs
@@ -317,22 +317,11 @@ namespace ICSharpCode.AvalonEdit.Highlighting.Xshd
StartExpression = CreateRegex(span, span.BeginRegex, span.BeginRegexType),
EndExpression = CreateRegex(span, endRegex, span.EndRegexType),
RuleSet = GetRuleSet(span, span.RuleSetReference),
- StartColor = MergeColor(wholeSpanColor, GetColor(span, span.BeginColorReference)),
+ StartColor = GetColor(span, span.BeginColorReference),
SpanColor = wholeSpanColor,
- EndColor = MergeColor(wholeSpanColor, GetColor(span, span.EndColorReference)),
- };
- }
-
- static HighlightingColor MergeColor(HighlightingColor baseColor, HighlightingColor newColor)
- {
- if (baseColor == null)
- return newColor;
- if (newColor == null)
- return baseColor;
- return new HighlightingColor {
- Foreground = newColor.Foreground ?? baseColor.Foreground,
- FontWeight = newColor.FontWeight ?? baseColor.FontWeight,
- FontStyle = newColor.FontStyle ?? baseColor.FontStyle,
+ EndColor = GetColor(span, span.EndColorReference),
+ SpanColorIncludesStart = true,
+ SpanColorIncludesEnd = true
};
}
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj
index 3d644e2710..b6b1bc0b21 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj
@@ -147,7 +147,9 @@
Selection.cs
+
+
@@ -231,6 +233,7 @@
IVisualLineTransformer.cs
+
IVisualLineTransformer.cs
@@ -440,4 +443,7 @@
+
+
+
\ No newline at end of file
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/ColumnRulerRenderer.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/ColumnRulerRenderer.cs
new file mode 100644
index 0000000000..bcf5772d76
--- /dev/null
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/ColumnRulerRenderer.cs
@@ -0,0 +1,63 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Windows;
+using System.Windows.Media;
+
+using ICSharpCode.AvalonEdit.Rendering;
+using ICSharpCode.AvalonEdit.Utils;
+
+namespace ICSharpCode.AvalonEdit.Rendering
+{
+ ///
+ /// Renders a ruler at a certain column.
+ ///
+ sealed class ColumnRulerRenderer : IBackgroundRenderer
+ {
+ Pen pen;
+ int column;
+ TextView textView;
+
+ public static readonly Color DefaultForeground = Colors.LightGray;
+
+ public ColumnRulerRenderer(TextView textView)
+ {
+ if (textView == null)
+ throw new ArgumentNullException("textView");
+
+ this.pen = new Pen(new SolidColorBrush(DefaultForeground), 1);
+ this.pen.Freeze();
+ this.textView = textView;
+ this.textView.BackgroundRenderers.Add(this);
+ }
+
+ public KnownLayer Layer {
+ get { return KnownLayer.Background; }
+ }
+
+ public void SetRuler(int column, Pen pen)
+ {
+ if (this.column != column) {
+ this.column = column;
+ textView.InvalidateLayer(this.Layer);
+ }
+ if (this.pen != pen) {
+ this.pen = pen;
+ textView.InvalidateLayer(this.Layer);
+ }
+ }
+
+ public void Draw(TextView textView, System.Windows.Media.DrawingContext drawingContext)
+ {
+ if (column < 1) return;
+ double offset = textView.WideSpaceWidth * column;
+ Size pixelSize = PixelSnapHelpers.GetPixelSize(textView);
+ double markerXPos = PixelSnapHelpers.PixelAlign(offset, pixelSize.Width);
+ Point start = new Point(markerXPos, 0);
+ Point end = new Point(markerXPos, Math.Max(textView.DocumentHeight, textView.ActualHeight));
+
+ drawingContext.DrawLine(pen, start, end);
+ }
+ }
+}
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs
index e1ec32c7f2..2482f16f1a 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/TextView.cs
@@ -40,6 +40,8 @@ namespace ICSharpCode.AvalonEdit.Rendering
FocusableProperty.OverrideMetadata(typeof(TextView), new FrameworkPropertyMetadata(Boxes.False));
}
+ ColumnRulerRenderer columnRulerRenderer;
+
///
/// Creates a new TextView instance.
///
@@ -50,7 +52,10 @@ namespace ICSharpCode.AvalonEdit.Rendering
elementGenerators = new ObserveAddRemoveCollection(ElementGenerator_Added, ElementGenerator_Removed);
lineTransformers = new ObserveAddRemoveCollection(LineTransformer_Added, LineTransformer_Removed);
backgroundRenderers = new ObserveAddRemoveCollection(BackgroundRenderer_Added, BackgroundRenderer_Removed);
+ columnRulerRenderer = new ColumnRulerRenderer(this);
this.Options = new TextEditorOptions();
+ this.columnRulerRenderer.SetRuler(Options.ColumnRulerPosition, ColumnRulerPen);
+
Debug.Assert(singleCharacterElementGenerator != null); // assert that the option change created the builtin element generators
layers = new LayerCollection(this);
@@ -178,7 +183,7 @@ namespace ICSharpCode.AvalonEdit.Rendering
new FrameworkPropertyMetadata(OnOptionsChanged));
///
- /// Gets/Sets the document displayed by the text editor.
+ /// Gets/Sets the options used by the text editor.
///
public TextEditorOptions Options {
get { return (TextEditorOptions)GetValue(OptionsProperty); }
@@ -198,6 +203,12 @@ namespace ICSharpCode.AvalonEdit.Rendering
if (OptionChanged != null) {
OptionChanged(this, e);
}
+
+ if (Options.ShowColumnRuler)
+ columnRulerRenderer.SetRuler(Options.ColumnRulerPosition, ColumnRulerPen);
+ else
+ columnRulerRenderer.SetRuler(-1, ColumnRulerPen);
+
UpdateBuiltinElementGeneratorsFromOptions();
Redraw();
}
@@ -538,6 +549,36 @@ namespace ICSharpCode.AvalonEdit.Rendering
get { return (Brush)GetValue(NonPrintableCharacterBrushProperty); }
set { SetValue(NonPrintableCharacterBrushProperty, value); }
}
+
+ ///
+ /// LinkTextForegroundBrush dependency property.
+ ///
+ public static readonly DependencyProperty LinkTextForegroundBrushProperty =
+ DependencyProperty.Register("LinkTextForegroundBrush", typeof(Brush), typeof(TextView),
+ new FrameworkPropertyMetadata(Brushes.Blue));
+
+ ///
+ /// Gets/sets the Brush used for displaying link texts.
+ ///
+ public Brush LinkTextForegroundBrush {
+ get { return (Brush)GetValue(LinkTextForegroundBrushProperty); }
+ set { SetValue(LinkTextForegroundBrushProperty, value); }
+ }
+
+ ///
+ /// LinkTextBackgroundBrush dependency property.
+ ///
+ public static readonly DependencyProperty LinkTextBackgroundBrushProperty =
+ DependencyProperty.Register("LinkTextBackgroundBrush", typeof(Brush), typeof(TextView),
+ new FrameworkPropertyMetadata(Brushes.Transparent));
+
+ ///
+ /// Gets/sets the Brush used for the background of link texts.
+ ///
+ public Brush LinkTextBackgroundBrush {
+ get { return (Brush)GetValue(LinkTextBackgroundBrushProperty); }
+ set { SetValue(LinkTextBackgroundBrushProperty, value); }
+ }
#endregion
#region Redraw methods / VisualLine invalidation
@@ -899,7 +940,8 @@ namespace ICSharpCode.AvalonEdit.Rendering
// number of pixels clipped from the first visual line(s)
clippedPixelsOnTop = scrollOffset.Y - heightTree.GetVisualPosition(firstLineInView);
- Debug.Assert(clippedPixelsOnTop >= 0);
+ // clippedPixelsOnTop should be >= 0, except for floating point inaccurracy.
+ Debug.Assert(clippedPixelsOnTop >= -ExtensionMethods.Epsilon);
newVisualLines = new List();
@@ -1877,7 +1919,9 @@ namespace ICSharpCode.AvalonEdit.Rendering
// and we need to re-measure the font metrics:
InvalidateDefaultTextMetrics();
} else if (e.Property == Control.ForegroundProperty
- || e.Property == TextView.NonPrintableCharacterBrushProperty)
+ || e.Property == TextView.NonPrintableCharacterBrushProperty
+ || e.Property == TextView.LinkTextBackgroundBrushProperty
+ || e.Property == TextView.LinkTextForegroundBrushProperty)
{
// changing brushes requires recreating the cached elements
RecreateCachedElements();
@@ -1895,6 +1939,33 @@ namespace ICSharpCode.AvalonEdit.Rendering
InvalidateDefaultTextMetrics();
Redraw();
}
+ if (e.Property == ColumnRulerPenProperty) {
+ columnRulerRenderer.SetRuler(this.Options.ColumnRulerPosition, this.ColumnRulerPen);
+ }
+ }
+
+ ///
+ /// The pen used to draw the column ruler.
+ ///
+ ///
+ public static readonly DependencyProperty ColumnRulerPenProperty =
+ DependencyProperty.Register("ColumnRulerBrush", typeof(Pen), typeof(TextView),
+ new FrameworkPropertyMetadata(CreateFrozenPen(Brushes.LightGray)));
+
+ static Pen CreateFrozenPen(SolidColorBrush brush)
+ {
+ Pen pen = new Pen(brush, 1);
+ pen.Freeze();
+ return pen;
+ }
+
+ ///
+ /// Gets/Sets the pen used to draw the column ruler.
+ ///
+ ///
+ public Pen ColumnRulerPen {
+ get { return (Pen)GetValue(ColumnRulerPenProperty); }
+ set { SetValue(ColumnRulerPenProperty, value); }
}
}
}
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/VisualLineLinkText.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/VisualLineLinkText.cs
index a2c15e579f..29482dbc5b 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/VisualLineLinkText.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/VisualLineLinkText.cs
@@ -2,6 +2,7 @@
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
+using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
using System.Windows.Documents;
@@ -46,7 +47,8 @@ namespace ICSharpCode.AvalonEdit.Rendering
///
public override TextRun CreateTextRun(int startVisualColumn, ITextRunConstructionContext context)
{
- this.TextRunProperties.SetForegroundBrush(Brushes.Blue);
+ this.TextRunProperties.SetForegroundBrush(context.TextView.LinkTextForegroundBrush);
+ this.TextRunProperties.SetBackgroundBrush(context.TextView.LinkTextBackgroundBrush);
this.TextRunProperties.SetTextDecorations(TextDecorations.Underline);
return base.CreateTextRun(startVisualColumn, context);
}
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchPanel.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchPanel.cs
index cb4c9970e4..586c8c9b18 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchPanel.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Search/SearchPanel.cs
@@ -198,8 +198,10 @@ namespace ICSharpCode.AvalonEdit.Search
if (currentDocument != null)
currentDocument.TextChanged -= textArea_Document_TextChanged;
currentDocument = textArea.Document;
- if (currentDocument != null)
+ if (currentDocument != null) {
currentDocument.TextChanged += textArea_Document_TextChanged;
+ DoSearch(false);
+ }
}
void textArea_Document_TextChanged(object sender, EventArgs e)
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/TextEditorOptions.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/TextEditorOptions.cs
index df95a8d488..4d2841d2e9 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/TextEditorOptions.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/TextEditorOptions.cs
@@ -381,5 +381,54 @@ namespace ICSharpCode.AvalonEdit
}
}
}
+
+ bool enableImeSupport = true;
+
+ ///
+ /// Gets/Sets whether the support for Input Method Editors (IME)
+ /// for non-alphanumeric scripts (Chinese, Japanese, Korean, ...) is enabled.
+ ///
+ [DefaultValue(true)]
+ public virtual bool EnableImeSupport {
+ get { return enableImeSupport; }
+ set {
+ if (enableImeSupport != value) {
+ enableImeSupport = value;
+ OnPropertyChanged("EnableImeSupport");
+ }
+ }
+ }
+
+ bool showColumnRuler = false;
+
+ ///
+ /// Gets/Sets whether the column ruler should be shown.
+ ///
+ [DefaultValue(false)]
+ public virtual bool ShowColumnRuler {
+ get { return showColumnRuler; }
+ set {
+ if (showColumnRuler != value) {
+ showColumnRuler = value;
+ OnPropertyChanged("ShowColumnRuler");
+ }
+ }
+ }
+
+ int columnRulerPosition = 80;
+
+ ///
+ /// Gets/Sets where the column ruler should be shown.
+ ///
+ [DefaultValue(80)]
+ public virtual int ColumnRulerPosition {
+ get { return columnRulerPosition; }
+ set {
+ if (columnRulerPosition != value) {
+ columnRulerPosition = value;
+ OnPropertyChanged("ColumnRulerPosition");
+ }
+ }
+ }
}
}
diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/AstBuilder.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/AstBuilder.cs
index bf647b379d..a95ddbaf2d 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Ast/AstBuilder.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Ast/AstBuilder.cs
@@ -81,6 +81,8 @@ namespace ICSharpCode.Decompiler.Ast
return true;
if (settings.YieldReturn && YieldReturnDecompiler.IsCompilerGeneratorEnumerator(type))
return true;
+ if (settings.AsyncAwait && AsyncDecompiler.IsCompilerGeneratedStateMachine(type))
+ return true;
} else if (type.IsCompilerGenerated()) {
if (type.Name.StartsWith("", StringComparison.Ordinal))
return true;
@@ -157,15 +159,10 @@ namespace ICSharpCode.Decompiler.Ast
if (!transformationsHaveRun)
RunTransformations();
- astCompileUnit.AcceptVisitor(new InsertParenthesesVisitor { InsertParenthesesForReadability = true }, null);
+ astCompileUnit.AcceptVisitor(new InsertParenthesesVisitor { InsertParenthesesForReadability = true });
var outputFormatter = new TextOutputFormatter(output);
- var formattingPolicy = new CSharpFormattingOptions();
- // disable whitespace in front of parentheses:
- formattingPolicy.SpaceBeforeMethodCallParentheses = false;
- formattingPolicy.SpaceBeforeMethodDeclarationParentheses = false;
- formattingPolicy.SpaceBeforeConstructorDeclarationParentheses = false;
- formattingPolicy.SpaceBeforeDelegateDeclarationParentheses = false;
- astCompileUnit.AcceptVisitor(new CSharpOutputVisitor(outputFormatter, formattingPolicy), null);
+ var formattingPolicy = context.Settings.CSharpFormattingOptions;
+ astCompileUnit.AcceptVisitor(new CSharpOutputVisitor(outputFormatter, formattingPolicy));
}
public void AddAssembly(AssemblyDefinition assemblyDefinition, bool onlyAssemblyLevel = false)
@@ -185,7 +182,7 @@ namespace ICSharpCode.Decompiler.Ast
}
}
}
- }, AttributedNode.AttributeRole);
+ }, EntityDeclaration.AttributeRole);
}
ConvertCustomAttributes(astCompileUnit, assemblyDefinition, "assembly");
@@ -225,7 +222,7 @@ namespace ICSharpCode.Decompiler.Ast
Arguments = { forwardedType }
}
}
- }, AttributedNode.AttributeRole);
+ }, EntityDeclaration.AttributeRole);
}
}
}
@@ -283,7 +280,7 @@ namespace ICSharpCode.Decompiler.Ast
///
///
/// TypeDeclaration or DelegateDeclaration.
- public AttributedNode CreateType(TypeDefinition typeDef)
+ public EntityDeclaration CreateType(TypeDefinition typeDef)
{
// create type
TypeDefinition oldCurrentType = context.CurrentType;
@@ -313,7 +310,7 @@ namespace ICSharpCode.Decompiler.Ast
astType.TypeParameters.AddRange(MakeTypeParameters(genericParameters));
astType.Constraints.AddRange(MakeConstraints(genericParameters));
- AttributedNode result = astType;
+ EntityDeclaration result = astType;
if (typeDef.IsEnum) {
long expectedEnumMemberValue = 0;
bool forcePrintingInitializers = IsFlagsEnum(typeDef);
@@ -321,7 +318,7 @@ namespace ICSharpCode.Decompiler.Ast
if (!field.IsStatic) {
// the value__ field
if (field.FieldType != typeDef.Module.TypeSystem.Int32) {
- astType.AddChild(ConvertType(field.FieldType), TypeDeclaration.BaseTypeRole);
+ astType.AddChild(ConvertType(field.FieldType), Roles.BaseType);
}
} else {
EnumMemberDeclaration enumMember = new EnumMemberDeclaration();
@@ -332,7 +329,7 @@ namespace ICSharpCode.Decompiler.Ast
enumMember.AddChild(new PrimitiveExpression(field.Constant), EnumMemberDeclaration.InitializerRole);
}
expectedEnumMemberValue = memberValue + 1;
- astType.AddChild(enumMember, TypeDeclaration.MemberRole);
+ astType.AddChild(enumMember, Roles.TypeMemberRole);
}
}
} else if (typeDef.BaseType != null && typeDef.BaseType.FullName == "System.MulticastDelegate") {
@@ -354,10 +351,10 @@ namespace ICSharpCode.Decompiler.Ast
} else {
// Base type
if (typeDef.BaseType != null && !typeDef.IsValueType && typeDef.BaseType.FullName != "System.Object") {
- astType.AddChild(ConvertType(typeDef.BaseType), TypeDeclaration.BaseTypeRole);
+ astType.AddChild(ConvertType(typeDef.BaseType), Roles.BaseType);
}
foreach (var i in typeDef.Interfaces)
- astType.AddChild(ConvertType(i), TypeDeclaration.BaseTypeRole);
+ astType.AddChild(ConvertType(i), Roles.BaseType);
AddTypeMembers(astType, typeDef);
@@ -726,18 +723,18 @@ namespace ICSharpCode.Decompiler.Ast
continue;
var nestedType = CreateType(nestedTypeDef);
SetNewModifier(nestedType);
- astType.AddChild(nestedType, TypeDeclaration.MemberRole);
+ astType.AddChild(nestedType, Roles.TypeMemberRole);
}
// Add fields
foreach(FieldDefinition fieldDef in typeDef.Fields) {
if (MemberIsHidden(fieldDef, context.Settings)) continue;
- astType.AddChild(CreateField(fieldDef), TypeDeclaration.MemberRole);
+ astType.AddChild(CreateField(fieldDef), Roles.TypeMemberRole);
}
// Add events
foreach(EventDefinition eventDef in typeDef.Events) {
- astType.AddChild(CreateEvent(eventDef), TypeDeclaration.MemberRole);
+ astType.AddChild(CreateEvent(eventDef), Roles.TypeMemberRole);
}
// Add properties
@@ -756,7 +753,7 @@ namespace ICSharpCode.Decompiler.Ast
}
}
- AttributedNode CreateMethod(MethodDefinition methodDef)
+ EntityDeclaration CreateMethod(MethodDefinition methodDef)
{
MethodDeclaration astMethod = new MethodDeclaration();
astMethod.AddAnnotation(methodDef);
@@ -775,6 +772,10 @@ namespace ICSharpCode.Decompiler.Ast
SetNewModifier(astMethod);
}
astMethod.Body = CreateMethodBody(methodDef, astMethod.Parameters);
+ if (context.CurrentMethodIsAsync) {
+ astMethod.Modifiers |= Modifiers.Async;
+ context.CurrentMethodIsAsync = false;
+ }
}
ConvertAttributes(astMethod, methodDef);
if (methodDef.HasCustomAttributes && astMethod.Parameters.Count > 0) {
@@ -860,7 +861,7 @@ namespace ICSharpCode.Decompiler.Ast
astMethod.Body = CreateMethodBody(methodDef, astMethod.Parameters);
ConvertAttributes(astMethod, methodDef);
if (methodDef.IsStatic && methodDef.DeclaringType.IsBeforeFieldInit && !astMethod.Body.IsNull) {
- astMethod.Body.InsertChildAfter(null, new Comment(" Note: this type is marked as 'beforefieldinit'."), AstNode.Roles.Comment);
+ astMethod.Body.InsertChildAfter(null, new Comment(" Note: this type is marked as 'beforefieldinit'."), Roles.Comment);
}
return astMethod;
}
@@ -878,7 +879,7 @@ namespace ICSharpCode.Decompiler.Ast
return m & ~Modifiers.Private;
}
- MemberDeclaration CreateProperty(PropertyDefinition propDef)
+ EntityDeclaration CreateProperty(PropertyDefinition propDef)
{
PropertyDeclaration astProp = new PropertyDeclaration();
astProp.AddAnnotation(propDef);
@@ -937,7 +938,7 @@ namespace ICSharpCode.Decompiler.Ast
}
ConvertCustomAttributes(astProp, propDef);
- MemberDeclaration member = astProp;
+ EntityDeclaration member = astProp;
if(propDef.IsIndexer())
member = ConvertPropertyToIndexer(astProp, propDef);
if(!accessor.HasOverrides && !accessor.DeclaringType.IsInterface)
@@ -960,7 +961,7 @@ namespace ICSharpCode.Decompiler.Ast
return astIndexer;
}
- AttributedNode CreateEvent(EventDefinition eventDef)
+ EntityDeclaration CreateEvent(EventDefinition eventDef)
{
if (eventDef.AddMethod != null && eventDef.AddMethod.IsAbstract) {
// An abstract event cannot be custom
@@ -1018,7 +1019,7 @@ namespace ICSharpCode.Decompiler.Ast
FieldDeclaration astField = new FieldDeclaration();
astField.AddAnnotation(fieldDef);
VariableInitializer initializer = new VariableInitializer(CleanName(fieldDef.Name));
- astField.AddChild(initializer, FieldDeclaration.Roles.Variable);
+ astField.AddChild(initializer, Roles.Variable);
astField.ReturnType = ConvertType(fieldDef.FieldType, fieldDef);
astField.Modifiers = ConvertModifiers(fieldDef);
if (fieldDef.HasConstant) {
@@ -1098,7 +1099,7 @@ namespace ICSharpCode.Decompiler.Ast
}
#region ConvertAttributes
- void ConvertAttributes(AttributedNode attributedNode, TypeDefinition typeDefinition)
+ void ConvertAttributes(EntityDeclaration attributedNode, TypeDefinition typeDefinition)
{
ConvertCustomAttributes(attributedNode, typeDefinition);
ConvertSecurityAttributes(attributedNode, typeDefinition);
@@ -1154,7 +1155,7 @@ namespace ICSharpCode.Decompiler.Ast
#endregion
}
- void ConvertAttributes(AttributedNode attributedNode, MethodDefinition methodDefinition)
+ void ConvertAttributes(EntityDeclaration attributedNode, MethodDefinition methodDefinition)
{
ConvertCustomAttributes(attributedNode, methodDefinition);
ConvertSecurityAttributes(attributedNode, methodDefinition);
@@ -1254,7 +1255,7 @@ namespace ICSharpCode.Decompiler.Ast
ConvertAttributes(attributedNode, methodDefinition.MethodReturnType, methodDefinition.Module);
}
- void ConvertAttributes(AttributedNode attributedNode, MethodReturnType methodReturnType, ModuleDefinition module)
+ void ConvertAttributes(EntityDeclaration attributedNode, MethodReturnType methodReturnType, ModuleDefinition module)
{
ConvertCustomAttributes(attributedNode, methodReturnType, "return");
if (methodReturnType.HasMarshalInfo) {
@@ -1263,7 +1264,7 @@ namespace ICSharpCode.Decompiler.Ast
}
}
- internal static void ConvertAttributes(AttributedNode attributedNode, FieldDefinition fieldDefinition, string attributeTarget = null)
+ internal static void ConvertAttributes(EntityDeclaration attributedNode, FieldDefinition fieldDefinition, string attributeTarget = null)
{
ConvertCustomAttributes(attributedNode, fieldDefinition);
@@ -1347,6 +1348,7 @@ namespace ICSharpCode.Decompiler.Ast
static void ConvertCustomAttributes(AstNode attributedNode, ICustomAttributeProvider customAttributeProvider, string attributeTarget = null)
{
+ EntityDeclaration entityDecl = attributedNode as EntityDeclaration;
if (customAttributeProvider.HasCustomAttributes) {
var attributes = new List();
foreach (var customAttribute in customAttributeProvider.CustomAttributes.OrderBy(a => a.AttributeType.FullName)) {
@@ -1358,6 +1360,15 @@ namespace ICSharpCode.Decompiler.Ast
// don't show the ParamArrayAttribute (it's converted to the 'params' modifier)
continue;
}
+ // if the method is async, remove [DebuggerStepThrough] and [Async
+ if (entityDecl != null && entityDecl.HasModifier(Modifiers.Async)) {
+ if (customAttribute.AttributeType.Name == "DebuggerStepThroughAttribute" && customAttribute.AttributeType.Namespace == "System.Diagnostics") {
+ continue;
+ }
+ if (customAttribute.AttributeType.Name == "AsyncStateMachineAttribute" && customAttribute.AttributeType.Namespace == "System.Runtime.CompilerServices") {
+ continue;
+ }
+ }
var attribute = new ICSharpCode.NRefactory.CSharp.Attribute();
attribute.AddAnnotation(customAttribute);
@@ -1402,14 +1413,14 @@ namespace ICSharpCode.Decompiler.Ast
var section = new AttributeSection();
section.AttributeTarget = attributeTarget;
section.Attributes.Add(attribute);
- attributedNode.AddChild(section, AttributedNode.AttributeRole);
+ attributedNode.AddChild(section, EntityDeclaration.AttributeRole);
}
} else if (attributes.Count > 0) {
// use single section for all attributes
var section = new AttributeSection();
section.AttributeTarget = attributeTarget;
section.Attributes.AddRange(attributes);
- attributedNode.AddChild(section, AttributedNode.AttributeRole);
+ attributedNode.AddChild(section, EntityDeclaration.AttributeRole);
}
}
}
@@ -1462,14 +1473,14 @@ namespace ICSharpCode.Decompiler.Ast
var section = new AttributeSection();
section.AttributeTarget = attributeTarget;
section.Attributes.Add(attribute);
- attributedNode.AddChild(section, AttributedNode.AttributeRole);
+ attributedNode.AddChild(section, EntityDeclaration.AttributeRole);
}
} else if (attributes.Count > 0) {
// use single section for all attributes
var section = new AttributeSection();
section.AttributeTarget = attributeTarget;
section.Attributes.AddRange(attributes);
- attributedNode.AddChild(section, AttributedNode.AttributeRole);
+ attributedNode.AddChild(section, EntityDeclaration.AttributeRole);
}
}
@@ -1594,7 +1605,7 @@ namespace ICSharpCode.Decompiler.Ast
/// Sets new modifier if the member hides some other member from a base type.
///
/// The node of the member which new modifier state should be determined.
- static void SetNewModifier(AttributedNode member)
+ static void SetNewModifier(EntityDeclaration member)
{
try {
bool addNewModifier = false;
@@ -1614,7 +1625,7 @@ namespace ICSharpCode.Decompiler.Ast
}
}
- private static bool HidesBaseMember(AttributedNode member)
+ private static bool HidesBaseMember(EntityDeclaration member)
{
var memberDefinition = member.Annotation();
bool addNewModifier = false;
diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs
index 7b051c50df..8ad9047c1c 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs
@@ -58,6 +58,7 @@ namespace ICSharpCode.Decompiler.Ast
MethodDefinition oldCurrentMethod = context.CurrentMethod;
Debug.Assert(oldCurrentMethod == null || oldCurrentMethod == methodDef);
context.CurrentMethod = methodDef;
+ context.CurrentMethodIsAsync = false;
try {
AstMethodBodyBuilder builder = new AstMethodBodyBuilder();
builder.methodDef = methodDef;
@@ -543,12 +544,15 @@ namespace ICSharpCode.Decompiler.Ast
}
return arg1;
}
- case ILCode.Castclass:
- return arg1.CastTo(operandAsTypeRef);
case ILCode.Unbox_Any:
// unboxing does not require a cast if the argument was an isinst instruction
if (arg1 is AsExpression && byteCode.Arguments[0].Code == ILCode.Isinst && TypeAnalysis.IsSameType(operand as TypeReference, byteCode.Arguments[0].Operand as TypeReference))
return arg1;
+ else
+ goto case ILCode.Castclass;
+ case ILCode.Castclass:
+ if ((byteCode.Arguments[0].InferredType != null && byteCode.Arguments[0].InferredType.IsGenericParameter) || ((Cecil.TypeReference)operand).IsGenericParameter)
+ return arg1.CastTo(new PrimitiveType("object")).CastTo(operandAsTypeRef);
else
return arg1.CastTo(operandAsTypeRef);
case ILCode.Isinst:
@@ -844,8 +848,11 @@ namespace ICSharpCode.Decompiler.Ast
case ILCode.ExpressionTreeParameterDeclarations:
args[args.Count - 1].AddAnnotation(new ParameterDeclarationAnnotation(byteCode));
return args[args.Count - 1];
+ case ILCode.Await:
+ return new UnaryOperatorExpression(UnaryOperatorType.Await, arg1);
case ILCode.NullableOf:
- case ILCode.ValueOf: return arg1;
+ case ILCode.ValueOf:
+ return arg1;
default:
throw new Exception("Unknown OpCode: " + byteCode.Code);
}
diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/CommentStatement.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/CommentStatement.cs
index 0940c6c5c7..6837b2418f 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Ast/CommentStatement.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Ast/CommentStatement.cs
@@ -38,6 +38,15 @@ namespace ICSharpCode.Decompiler.Ast
this.comment = comment;
}
+ public override void AcceptVisitor(IAstVisitor visitor)
+ {
+ }
+
+ public override T AcceptVisitor(IAstVisitor visitor)
+ {
+ return default(T);
+ }
+
public override S AcceptVisitor(IAstVisitor visitor, T data)
{
return default(S);
diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/DecompilerContext.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/DecompilerContext.cs
index 4a3f277827..624b1b33fd 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Ast/DecompilerContext.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Ast/DecompilerContext.cs
@@ -33,6 +33,7 @@ namespace ICSharpCode.Decompiler
public TypeDefinition CurrentType;
public MethodDefinition CurrentMethod;
public DecompilerSettings Settings = new DecompilerSettings();
+ public bool CurrentMethodIsAsync;
// public ITypeResolveContext TypeResolveContext;
// public IProjectContent ProjectContent;
diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs
index 26bd784e2f..b17e24656f 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs
@@ -82,7 +82,7 @@ namespace ICSharpCode.Decompiler.Ast
{
AstNode node = nodeStack.Peek();
MemberReference memberRef = node.Annotation();
- if (memberRef == null && node.Role == AstNode.Roles.TargetExpression && (node.Parent is InvocationExpression || node.Parent is ObjectCreateExpression)) {
+ if (memberRef == null && node.Role == Roles.TargetExpression && (node.Parent is InvocationExpression || node.Parent is ObjectCreateExpression)) {
memberRef = node.Parent.Annotation();
}
return memberRef;
@@ -114,6 +114,9 @@ namespace ICSharpCode.Decompiler.Ast
object GetCurrentLocalDefinition()
{
AstNode node = nodeStack.Peek();
+ if (node is Identifier && node.Parent != null)
+ node = node.Parent;
+
var parameterDef = node.Annotation();
if (parameterDef != null)
return parameterDef;
@@ -126,14 +129,11 @@ namespace ICSharpCode.Decompiler.Ast
//if (variable.OriginalVariable != null)
// return variable.OriginalVariable;
return variable;
- } else {
-
}
}
var label = node as LabelStatement;
- if (label != null)
- {
+ if (label != null) {
var method = nodeStack.Select(nd => nd.Annotation()).FirstOrDefault(mr => mr != null);
if (method != null)
return method.ToString() + label.Label;
@@ -168,7 +168,7 @@ namespace ICSharpCode.Decompiler.Ast
// Attach member reference to token only if there's no identifier in the current node.
MemberReference memberRef = GetCurrentMemberReference();
var node = nodeStack.Peek();
- if (memberRef != null && node.GetChildByRole(AstNode.Roles.Identifier).IsNull)
+ if (memberRef != null && node.GetChildByRole(Roles.Identifier).IsNull)
output.WriteReference(token, memberRef);
else
output.Write(token);
@@ -282,7 +282,7 @@ namespace ICSharpCode.Decompiler.Ast
nodeStack.Push(node);
startLocations.Push(output.Location);
- if (node is AttributedNode && node.GetChildByRole(AstNode.Roles.Identifier).IsNull)
+ if (node is EntityDeclaration && node.Annotation() != null && node.GetChildByRole(Roles.Identifier).IsNull)
output.WriteDefinition("", node.Annotation(), false);
MemberMapping mapping = node.Annotation();
@@ -330,15 +330,7 @@ namespace ICSharpCode.Decompiler.Ast
private static bool IsDefinition(AstNode node)
{
- return
- node is FieldDeclaration ||
- node is ConstructorDeclaration ||
- node is DestructorDeclaration ||
- node is EventDeclaration ||
- node is DelegateDeclaration ||
- node is OperatorDeclaration||
- node is MemberDeclaration ||
- node is TypeDeclaration;
+ return node is EntityDeclaration;
}
}
}
diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/ConvertConstructorCallIntoInitializer.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/ConvertConstructorCallIntoInitializer.cs
index 4976a759bb..36811c1852 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/ConvertConstructorCallIntoInitializer.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/ConvertConstructorCallIntoInitializer.cs
@@ -123,7 +123,7 @@ namespace ICSharpCode.Decompiler.Ast.Transforms
if (allSame) {
foreach (var ctor in instanceCtorsNotChainingWithThis)
ctor.Body.First().Remove();
- fieldOrEventDecl.GetChildrenByRole(AstNode.Roles.Variable).Single().Initializer = initializer.Detach();
+ fieldOrEventDecl.GetChildrenByRole(Roles.Variable).Single().Initializer = initializer.Detach();
}
} while (allSame);
}
diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/DelegateConstruction.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/DelegateConstruction.cs
index 9264000f08..9c5aa97f6e 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/DelegateConstruction.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/DelegateConstruction.cs
@@ -151,6 +151,7 @@ namespace ICSharpCode.Decompiler.Ast.Transforms
DecompilerContext subContext = context.Clone();
subContext.CurrentMethod = method;
+ subContext.CurrentMethodIsAsync = false;
subContext.ReservedVariableNames.AddRange(currentlyUsedVariableNames);
BlockStatement body = AstMethodBodyBuilder.CreateMethodBody(method, subContext, ame.Parameters);
TransformationPipeline.RunTransformationsUntil(body, v => v is DelegateConstruction, subContext);
diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs
index dc7e7f1a5a..43548e38d4 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs
@@ -38,8 +38,8 @@ namespace ICSharpCode.Decompiler.Ast.Transforms
for (AstNode child = node.FirstChild; child != null; child = child.NextSibling) {
result |= child.AcceptVisitor(this, data);
}
- if (result && node is AttributedNode && !(node is Accessor)) {
- ((AttributedNode)node).Modifiers |= Modifiers.Unsafe;
+ if (result && node is EntityDeclaration && !(node is Accessor)) {
+ ((EntityDeclaration)node).Modifiers |= Modifiers.Unsafe;
return false;
}
return result;
diff --git a/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/ReplaceMethodCallsWithOperators.cs b/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/ReplaceMethodCallsWithOperators.cs
index 4561da8176..6a3f8f9743 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/ReplaceMethodCallsWithOperators.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Ast/Transforms/ReplaceMethodCallsWithOperators.cs
@@ -140,7 +140,7 @@ namespace ICSharpCode.Decompiler.Ast.Transforms
invocationExpression.ReplaceWith(arguments[0]);
return;
}
- if (methodRef.Name == "op_True" && arguments.Length == 1 && invocationExpression.Role == AstNode.Roles.Condition) {
+ if (methodRef.Name == "op_True" && arguments.Length == 1 && invocationExpression.Role == Roles.Condition) {
invocationExpression.ReplaceWith(arguments[0]);
return;
}
diff --git a/src/Libraries/ICSharpCode.Decompiler/CecilExtensions.cs b/src/Libraries/ICSharpCode.Decompiler/CecilExtensions.cs
index 82b67a07f4..cc047e09cd 100644
--- a/src/Libraries/ICSharpCode.Decompiler/CecilExtensions.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/CecilExtensions.cs
@@ -133,6 +133,8 @@ namespace ICSharpCode.Decompiler
///
public static int GetEndOffset(this Instruction inst)
{
+ if (inst == null)
+ throw new ArgumentNullException("inst");
return inst.Offset + inst.GetSize();
}
diff --git a/src/Libraries/ICSharpCode.Decompiler/DecompilerSettings.cs b/src/Libraries/ICSharpCode.Decompiler/DecompilerSettings.cs
index 05a598520e..f78194a6f9 100644
--- a/src/Libraries/ICSharpCode.Decompiler/DecompilerSettings.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/DecompilerSettings.cs
@@ -18,6 +18,7 @@
using System;
using System.ComponentModel;
+using ICSharpCode.NRefactory.CSharp;
namespace ICSharpCode.Decompiler
{
@@ -71,6 +72,21 @@ namespace ICSharpCode.Decompiler
}
}
+ bool asyncAwait = true;
+
+ ///
+ /// Decompile async methods.
+ ///
+ public bool AsyncAwait {
+ get { return asyncAwait; }
+ set {
+ if (asyncAwait != value) {
+ asyncAwait = value;
+ OnPropertyChanged("AsyncAwait");
+ }
+ }
+ }
+
bool automaticProperties = true;
///
@@ -271,6 +287,26 @@ namespace ICSharpCode.Decompiler
}
#endregion
+ CSharpFormattingOptions csharpFormattingOptions;
+
+ public CSharpFormattingOptions CSharpFormattingOptions {
+ get {
+ if (csharpFormattingOptions == null) {
+ csharpFormattingOptions = FormattingOptionsFactory.CreateAllman();
+ csharpFormattingOptions.IndentSwitchBody = false;
+ }
+ return csharpFormattingOptions;
+ }
+ set {
+ if (value == null)
+ throw new ArgumentNullException();
+ if (csharpFormattingOptions != value) {
+ csharpFormattingOptions = value;
+ OnPropertyChanged("CSharpFormattingOptions");
+ }
+ }
+ }
+
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
@@ -283,6 +319,8 @@ namespace ICSharpCode.Decompiler
public DecompilerSettings Clone()
{
DecompilerSettings settings = (DecompilerSettings)MemberwiseClone();
+ if (csharpFormattingOptions != null)
+ settings.csharpFormattingOptions = csharpFormattingOptions.Clone();
settings.PropertyChanged = null;
return settings;
}
diff --git a/src/Libraries/ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs b/src/Libraries/ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs
index 413234e77f..675d9e28a0 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs
@@ -809,6 +809,7 @@ namespace ICSharpCode.Decompiler.Disassembler
{ TypeAttributes.SpecialName, "specialname" },
{ TypeAttributes.Import, "import" },
{ TypeAttributes.Serializable, "serializable" },
+ { TypeAttributes.WindowsRuntime, "windowsruntime" },
{ TypeAttributes.BeforeFieldInit, "beforefieldinit" },
{ TypeAttributes.HasSecurity, null },
};
@@ -1075,7 +1076,10 @@ namespace ICSharpCode.Decompiler.Disassembler
public void WriteAssemblyHeader(AssemblyDefinition asm)
{
- output.Write(".assembly " + DisassemblerHelpers.Escape(asm.Name.Name));
+ output.Write(".assembly ");
+ if (asm.Name.IsWindowsRuntime)
+ output.Write("windowsruntime ");
+ output.Write(DisassemblerHelpers.Escape(asm.Name.Name));
OpenBlock(false);
WriteAttributes(asm.CustomAttributes);
WriteSecurityDeclarations(asm);
@@ -1103,7 +1107,10 @@ namespace ICSharpCode.Decompiler.Disassembler
output.WriteLine(".module extern {0}", DisassemblerHelpers.Escape(mref.Name));
}
foreach (var aref in module.AssemblyReferences) {
- output.Write(".assembly extern {0}", DisassemblerHelpers.Escape(aref.Name));
+ output.Write(".assembly extern ");
+ if (aref.IsWindowsRuntime)
+ output.Write("windowsruntime ");
+ output.Write(DisassemblerHelpers.Escape(aref.Name));
OpenBlock(false);
if (aref.PublicKeyToken != null) {
output.Write(".publickeytoken = ");
diff --git a/src/Libraries/ICSharpCode.Decompiler/FlowAnalysis/ControlFlowNode.cs b/src/Libraries/ICSharpCode.Decompiler/FlowAnalysis/ControlFlowNode.cs
index 606b43286b..cab507bc95 100644
--- a/src/Libraries/ICSharpCode.Decompiler/FlowAnalysis/ControlFlowNode.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/FlowAnalysis/ControlFlowNode.cs
@@ -253,8 +253,11 @@ namespace ICSharpCode.Decompiler.FlowAnalysis
StringWriter writer = new StringWriter();
switch (NodeType) {
case ControlFlowNodeType.Normal:
- int endOffset = End.GetEndOffset();
- writer.Write("Block #{0}: IL_{1:x4} to IL_{2:x4}", BlockIndex, Start.Offset, endOffset);
+ writer.Write("Block #{0}", BlockIndex);
+ if (Start != null)
+ writer.Write(": IL_{0:x4}", Start.Offset);
+ if (End != null)
+ writer.Write(" to IL_{0:x4}", End.GetEndOffset());
break;
case ControlFlowNodeType.CatchHandler:
case ControlFlowNodeType.FinallyOrFaultHandler:
@@ -277,6 +280,10 @@ namespace ICSharpCode.Decompiler.FlowAnalysis
writer.WriteLine();
Disassembler.DisassemblerHelpers.WriteTo(inst, new PlainTextOutput(writer));
}
+ if (UserData != null) {
+ writer.WriteLine();
+ writer.Write(UserData.ToString());
+ }
return writer.ToString();
}
diff --git a/src/Libraries/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj b/src/Libraries/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj
index 846edc60a2..60bead91a6 100644
--- a/src/Libraries/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj
+++ b/src/Libraries/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj
@@ -101,6 +101,7 @@
+
@@ -114,6 +115,8 @@
+
+
diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/AsyncDecompiler.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/AsyncDecompiler.cs
new file mode 100644
index 0000000000..4535c0f82a
--- /dev/null
+++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/AsyncDecompiler.cs
@@ -0,0 +1,653 @@
+// Copyright (c) 2012 AlphaSierraPapa for the SharpDevelop Team
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using Mono.Cecil;
+using Mono.Cecil.Cil;
+
+namespace ICSharpCode.Decompiler.ILAst
+{
+ ///
+ /// Decompiler step for C# 5 async/await.
+ ///
+ class AsyncDecompiler
+ {
+ public static bool IsCompilerGeneratedStateMachine(TypeDefinition type)
+ {
+ if (!(type.DeclaringType != null && type.IsCompilerGenerated()))
+ return false;
+ foreach (TypeReference i in type.Interfaces) {
+ if (i.Namespace == "System.Runtime.CompilerServices" && i.Name == "IAsyncStateMachine")
+ return true;
+ }
+ return false;
+ }
+
+ enum AsyncMethodType
+ {
+ Void,
+ Task,
+ TaskOfT
+ }
+
+ DecompilerContext context;
+
+ // These fields are set by MatchTaskCreationPattern()
+ AsyncMethodType methodType;
+ int initialState;
+ TypeDefinition stateMachineStruct;
+ MethodDefinition moveNextMethod;
+ FieldDefinition builderField;
+ FieldDefinition stateField;
+ Dictionary fieldToParameterMap = new Dictionary();
+
+ // These fields are set by AnalyzeMoveNext()
+ int finalState = -2;
+ ILTryCatchBlock mainTryCatch;
+ ILLabel setResultAndExitLabel;
+ ILLabel exitLabel;
+ ILExpression resultExpr;
+
+ #region RunStep1() method
+ public static void RunStep1(DecompilerContext context, ILBlock method)
+ {
+ if (!context.Settings.AsyncAwait)
+ return; // abort if async decompilation is disabled
+ var yrd = new AsyncDecompiler();
+ yrd.context = context;
+ if (!yrd.MatchTaskCreationPattern(method))
+ return;
+ #if DEBUG
+ if (Debugger.IsAttached) {
+ yrd.Run();
+ } else {
+ #endif
+ try {
+ yrd.Run();
+ } catch (SymbolicAnalysisFailedException) {
+ return;
+ }
+ #if DEBUG
+ }
+ #endif
+ context.CurrentMethodIsAsync = true;
+
+ method.Body.Clear();
+ method.EntryGoto = null;
+ method.Body.AddRange(yrd.newTopLevelBody);
+ ILAstOptimizer.RemoveRedundantCode(method);
+ }
+
+ void Run()
+ {
+ AnalyzeMoveNext();
+ ValidateCatchBlock(mainTryCatch.CatchBlocks[0]);
+ AnalyzeStateMachine(mainTryCatch.TryBlock);
+ // AnalyzeStateMachine invokes ConvertBody
+ MarkGeneratedVariables();
+ YieldReturnDecompiler.TranslateFieldsToLocalAccess(newTopLevelBody, fieldToParameterMap);
+ }
+ #endregion
+
+ #region MatchTaskCreationPattern
+ bool MatchTaskCreationPattern(ILBlock method)
+ {
+ if (method.Body.Count < 5)
+ return false;
+ // Check the second-to-last instruction (the start call) first, as we can get the most information from that
+ MethodReference startMethod;
+ ILExpression loadStartTarget, loadStartArgument;
+ // call(AsyncTaskMethodBuilder::Start, ldloca(builder), ldloca(stateMachine))
+ if (!method.Body[method.Body.Count - 2].Match(ILCode.Call, out startMethod, out loadStartTarget, out loadStartArgument))
+ return false;
+ if (startMethod.Name != "Start" || startMethod.DeclaringType == null || startMethod.DeclaringType.Namespace != "System.Runtime.CompilerServices")
+ return false;
+ switch (startMethod.DeclaringType.Name) {
+ case "AsyncTaskMethodBuilder`1":
+ methodType = AsyncMethodType.TaskOfT;
+ break;
+ case "AsyncTaskMethodBuilder":
+ methodType = AsyncMethodType.Task;
+ break;
+ case "AsyncVoidMethodBuilder":
+ methodType = AsyncMethodType.Void;
+ break;
+ default:
+ return false;
+ }
+ ILVariable stateMachineVar, builderVar;
+ if (!loadStartTarget.Match(ILCode.Ldloca, out builderVar))
+ return false;
+ if (!loadStartArgument.Match(ILCode.Ldloca, out stateMachineVar))
+ return false;
+
+ stateMachineStruct = stateMachineVar.Type.ResolveWithinSameModule();
+ if (stateMachineStruct == null || !stateMachineStruct.IsValueType)
+ return false;
+ moveNextMethod = stateMachineStruct.Methods.FirstOrDefault(f => f.Name == "MoveNext");
+ if (moveNextMethod == null)
+ return false;
+
+ // Check third-to-last instruction (copy of builder):
+ // stloc(builder, ldfld(StateMachine::<>t__builder, ldloca(stateMachine)))
+ ILExpression loadBuilderExpr;
+ if (!method.Body[method.Body.Count - 3].MatchStloc(builderVar, out loadBuilderExpr))
+ return false;
+ FieldReference builderFieldRef;
+ ILExpression loadStateMachineForBuilderExpr;
+ if (!loadBuilderExpr.Match(ILCode.Ldfld, out builderFieldRef, out loadStateMachineForBuilderExpr))
+ return false;
+ if (!loadStateMachineForBuilderExpr.MatchLdloca(stateMachineVar))
+ return false;
+ builderField = builderFieldRef.ResolveWithinSameModule();
+ if (builderField == null)
+ return false;
+
+ // Check the last instruction (ret)
+ if (methodType == AsyncMethodType.Void) {
+ if (!method.Body[method.Body.Count - 1].Match(ILCode.Ret))
+ return false;
+ } else {
+ // ret(call(AsyncTaskMethodBuilder::get_Task, ldflda(StateMachine::<>t__builder, ldloca(stateMachine))))
+ ILExpression returnValue;
+ if (!method.Body[method.Body.Count - 1].Match(ILCode.Ret, out returnValue))
+ return false;
+ MethodReference getTaskMethod;
+ ILExpression builderExpr;
+ if (!returnValue.Match(ILCode.Call, out getTaskMethod, out builderExpr))
+ return false;
+ ILExpression loadStateMachineForBuilderExpr2;
+ FieldReference builderField2;
+ if (!builderExpr.Match(ILCode.Ldflda, out builderField2, out loadStateMachineForBuilderExpr2))
+ return false;
+ if (builderField2.ResolveWithinSameModule() != builderField || !loadStateMachineForBuilderExpr2.MatchLdloca(stateMachineVar))
+ return false;
+ }
+
+ // Check the last field assignment - this should be the state field
+ ILExpression initialStateExpr;
+ if (!MatchStFld(method.Body[method.Body.Count - 4], stateMachineVar, out stateField, out initialStateExpr))
+ return false;
+ if (!initialStateExpr.Match(ILCode.Ldc_I4, out initialState))
+ return false;
+ if (initialState != -1)
+ return false;
+
+ // Check the second-to-last field assignment - this should be the builder field
+ FieldDefinition builderField3;
+ ILExpression builderInitialization;
+ if (!MatchStFld(method.Body[method.Body.Count - 5], stateMachineVar, out builderField3, out builderInitialization))
+ return false;
+ MethodReference createMethodRef;
+ if (builderField3 != builderField || !builderInitialization.Match(ILCode.Call, out createMethodRef))
+ return false;
+ if (createMethodRef.Name != "Create")
+ return false;
+
+ for (int i = 0; i < method.Body.Count - 5; i++) {
+ FieldDefinition field;
+ ILExpression fieldInit;
+ if (!MatchStFld(method.Body[i], stateMachineVar, out field, out fieldInit))
+ return false;
+ ILVariable v;
+ if (!fieldInit.Match(ILCode.Ldloc, out v))
+ return false;
+ if (!v.IsParameter)
+ return false;
+ fieldToParameterMap[field] = v;
+ }
+
+ return true;
+ }
+
+ static bool MatchStFld(ILNode stfld, ILVariable stateMachineVar, out FieldDefinition field, out ILExpression expr)
+ {
+ field = null;
+ FieldReference fieldRef;
+ ILExpression ldloca;
+ if (!stfld.Match(ILCode.Stfld, out fieldRef, out ldloca, out expr))
+ return false;
+ field = fieldRef.ResolveWithinSameModule();
+ return field != null && ldloca.MatchLdloca(stateMachineVar);
+ }
+ #endregion
+
+ #region Analyze MoveNext
+ void AnalyzeMoveNext()
+ {
+ ILBlock ilMethod = CreateILAst(moveNextMethod);
+
+ if (ilMethod.Body.Count != 6)
+ throw new SymbolicAnalysisFailedException();
+
+ mainTryCatch = ilMethod.Body[0] as ILTryCatchBlock;
+ if (mainTryCatch == null || mainTryCatch.CatchBlocks.Count != 1)
+ throw new SymbolicAnalysisFailedException();
+ if (mainTryCatch.FaultBlock != null || mainTryCatch.FinallyBlock != null)
+ throw new SymbolicAnalysisFailedException();
+
+ setResultAndExitLabel = ilMethod.Body[1] as ILLabel;
+ if (setResultAndExitLabel == null)
+ throw new SymbolicAnalysisFailedException();
+
+ if (!MatchStateAssignment(ilMethod.Body[2], out finalState))
+ throw new SymbolicAnalysisFailedException();
+
+ // call(AsyncTaskMethodBuilder`1::SetResult, ldflda(StateMachine::<>t__builder, ldloc(this)), ldloc(<>t__result))
+ MethodReference setResultMethod;
+ ILExpression builderExpr;
+ if (methodType == AsyncMethodType.TaskOfT) {
+ if (!ilMethod.Body[3].Match(ILCode.Call, out setResultMethod, out builderExpr, out resultExpr))
+ throw new SymbolicAnalysisFailedException();
+ } else {
+ if (!ilMethod.Body[3].Match(ILCode.Call, out setResultMethod, out builderExpr))
+ throw new SymbolicAnalysisFailedException();
+ }
+ if (!(setResultMethod.Name == "SetResult" && IsBuilderFieldOnThis(builderExpr)))
+ throw new SymbolicAnalysisFailedException();
+
+ exitLabel = ilMethod.Body[4] as ILLabel;
+ if (exitLabel == null)
+ throw new SymbolicAnalysisFailedException();
+ }
+
+ ///
+ /// Creates ILAst for the specified method, optimized up to before the 'YieldReturn' step.
+ ///
+ ILBlock CreateILAst(MethodDefinition method)
+ {
+ if (method == null || !method.HasBody)
+ throw new SymbolicAnalysisFailedException();
+
+ ILBlock ilMethod = new ILBlock();
+ ILAstBuilder astBuilder = new ILAstBuilder();
+ ilMethod.Body = astBuilder.Build(method, true, context);
+ ILAstOptimizer optimizer = new ILAstOptimizer();
+ optimizer.Optimize(context, ilMethod, ILAstOptimizationStep.YieldReturn);
+ return ilMethod;
+ }
+
+ void ValidateCatchBlock(ILTryCatchBlock.CatchBlock catchBlock)
+ {
+ if (catchBlock.ExceptionType == null || catchBlock.ExceptionType.Name != "Exception")
+ throw new SymbolicAnalysisFailedException();
+ if (catchBlock.Body.Count != 3)
+ throw new SymbolicAnalysisFailedException();
+ int stateID;
+ if (!(MatchStateAssignment(catchBlock.Body[0], out stateID) && stateID == finalState))
+ throw new SymbolicAnalysisFailedException();
+ MethodReference setExceptionMethod;
+ ILExpression builderExpr, exceptionExpr;
+ if (!catchBlock.Body[1].Match(ILCode.Call, out setExceptionMethod, out builderExpr, out exceptionExpr))
+ throw new SymbolicAnalysisFailedException();
+ if (!(setExceptionMethod.Name == "SetException" && IsBuilderFieldOnThis(builderExpr) && exceptionExpr.MatchLdloc(catchBlock.ExceptionVariable)))
+ throw new SymbolicAnalysisFailedException();
+
+ ILLabel label;
+ if (!(catchBlock.Body[2].Match(ILCode.Leave, out label) && label == exitLabel))
+ throw new SymbolicAnalysisFailedException();
+ }
+
+ bool IsBuilderFieldOnThis(ILExpression builderExpr)
+ {
+ // ldflda(StateMachine::<>t__builder, ldloc(this))
+ FieldReference fieldRef;
+ ILExpression target;
+ return builderExpr.Match(ILCode.Ldflda, out fieldRef, out target)
+ && fieldRef.ResolveWithinSameModule() == builderField
+ && target.MatchThis();
+ }
+
+ bool MatchStateAssignment(ILNode stfld, out int stateID)
+ {
+ // stfld(StateMachine::<>1__state, ldloc(this), ldc.i4(-2))
+ stateID = 0;
+ FieldReference fieldRef;
+ ILExpression target, val;
+ if (stfld.Match(ILCode.Stfld, out fieldRef, out target, out val)) {
+ return fieldRef.ResolveWithinSameModule() == stateField
+ && target.MatchThis()
+ && val.Match(ILCode.Ldc_I4, out stateID);
+ }
+ return false;
+ }
+ #endregion
+
+ #region AnalyzeStateMachine
+ ILVariable doFinallyBodies;
+ List newTopLevelBody;
+
+ void AnalyzeStateMachine(ILBlock block)
+ {
+ var body = block.Body;
+ if (body.Count == 0)
+ throw new SymbolicAnalysisFailedException();
+ if (DetectDoFinallyBodies(body)) {
+ body.RemoveAt(0);
+ if (body.Count == 0)
+ throw new SymbolicAnalysisFailedException();
+ }
+ StateRangeAnalysis rangeAnalysis = new StateRangeAnalysis(body[0], StateRangeAnalysisMode.AsyncMoveNext, stateField);
+ int bodyLength = block.Body.Count;
+ int pos = rangeAnalysis.AssignStateRanges(body, bodyLength);
+ rangeAnalysis.EnsureLabelAtPos(body, ref pos, ref bodyLength);
+
+ var labelStateRangeMapping = rangeAnalysis.CreateLabelRangeMapping(body, pos, bodyLength);
+ newTopLevelBody = ConvertBody(body, pos, bodyLength, labelStateRangeMapping);
+ newTopLevelBody.Insert(0, MakeGoTo(labelStateRangeMapping, initialState));
+ newTopLevelBody.Add(setResultAndExitLabel);
+ if (methodType == AsyncMethodType.TaskOfT) {
+ newTopLevelBody.Add(new ILExpression(ILCode.Ret, null, resultExpr));
+ } else {
+ newTopLevelBody.Add(new ILExpression(ILCode.Ret, null));
+ }
+ }
+
+ bool DetectDoFinallyBodies(List body)
+ {
+ ILVariable v;
+ ILExpression initExpr;
+ if (!body[0].Match(ILCode.Stloc, out v, out initExpr))
+ return false;
+ int initialValue;
+ if (!(initExpr.Match(ILCode.Ldc_I4, out initialValue) && initialValue == 1))
+ return false;
+ doFinallyBodies = v;
+ return true;
+ }
+ #endregion
+
+ #region ConvertBody
+ ILExpression MakeGoTo(LabelRangeMapping mapping, int state)
+ {
+ foreach (var pair in mapping) {
+ if (pair.Value.Contains(state))
+ return new ILExpression(ILCode.Br, pair.Key);
+ }
+ throw new SymbolicAnalysisFailedException();
+ }
+
+ List ConvertBody(List body, int startPos, int bodyLength, LabelRangeMapping mapping)
+ {
+ List newBody = new List();
+ // Copy all instructions from the old body to newBody.
+ for (int pos = startPos; pos < bodyLength; pos++) {
+ ILTryCatchBlock tryCatchBlock = body[pos] as ILTryCatchBlock;
+ ILExpression expr = body[pos] as ILExpression;
+ if (expr != null && expr.Code == ILCode.Leave && expr.Operand == exitLabel) {
+ ILVariable awaiterVar;
+ FieldDefinition awaiterField;
+ int targetStateID;
+ HandleAwait(newBody, out awaiterVar, out awaiterField, out targetStateID);
+ MarkAsGeneratedVariable(awaiterVar);
+ newBody.Add(new ILExpression(ILCode.Await, null, new ILExpression(ILCode.Ldloca, awaiterVar)));
+ newBody.Add(MakeGoTo(mapping, targetStateID));
+ } else if (tryCatchBlock != null) {
+ ILTryCatchBlock newTryCatchBlock = new ILTryCatchBlock();
+ var tryBody = tryCatchBlock.TryBlock.Body;
+ if (tryBody.Count == 0)
+ throw new SymbolicAnalysisFailedException();
+ StateRangeAnalysis rangeAnalysis = new StateRangeAnalysis(tryBody[0], StateRangeAnalysisMode.AsyncMoveNext, stateField);
+ int tryBodyLength = tryBody.Count;
+ int posInTryBody = rangeAnalysis.AssignStateRanges(tryBody, tryBodyLength);
+ rangeAnalysis.EnsureLabelAtPos(tryBody, ref posInTryBody, ref tryBodyLength);
+
+ var mappingInTryBlock = rangeAnalysis.CreateLabelRangeMapping(tryBody, posInTryBody, tryBodyLength);
+ var newTryBody = ConvertBody(tryBody, posInTryBody, tryBodyLength, mappingInTryBlock);
+ newTryBody.Insert(0, MakeGoTo(mappingInTryBlock, initialState));
+
+ // If there's a label at the beginning of the state dispatcher, copy that
+ if (posInTryBody > 0 && tryBody.FirstOrDefault() is ILLabel)
+ newTryBody.Insert(0, tryBody.First());
+
+ newTryCatchBlock.TryBlock = new ILBlock(newTryBody);
+ newTryCatchBlock.CatchBlocks = new List(tryCatchBlock.CatchBlocks);
+ newTryCatchBlock.FaultBlock = tryCatchBlock.FaultBlock;
+ if (tryCatchBlock.FinallyBlock != null)
+ newTryCatchBlock.FinallyBlock = new ILBlock(ConvertFinally(tryCatchBlock.FinallyBlock.Body));
+
+ newBody.Add(newTryCatchBlock);
+ } else {
+ newBody.Add(body[pos]);
+ }
+ }
+ return newBody;
+ }
+
+ List ConvertFinally(List body)
+ {
+ List newBody = new List(body);
+ ILLabel endFinallyLabel;
+ ILExpression ceqExpr;
+ if (newBody.Count > 0 && newBody[0].Match(ILCode.Brtrue, out endFinallyLabel, out ceqExpr)) {
+ ILExpression loadDoFinallyBodies, loadZero;
+ object unused;
+ if (ceqExpr.Match(ILCode.Ceq, out unused, out loadDoFinallyBodies, out loadZero)) {
+ int num;
+ if (loadDoFinallyBodies.MatchLdloc(doFinallyBodies) && loadZero.Match(ILCode.Ldc_I4, out num) && num == 0) {
+ newBody.RemoveAt(0);
+ }
+ } else if (ceqExpr.Match(ILCode.LogicNot, out loadDoFinallyBodies)) {
+ if (loadDoFinallyBodies.MatchLdloc(doFinallyBodies)) {
+ newBody.RemoveAt(0);
+ }
+ }
+ }
+ return newBody;
+ }
+
+ void HandleAwait(List newBody, out ILVariable awaiterVar, out FieldDefinition awaiterField, out int targetStateID)
+ {
+ // Handle the instructions prior to the exit out of the method to detect what is being awaited.
+ // (analyses the last instructions in newBody and removes the analyzed instructions from newBody)
+
+ if (doFinallyBodies != null) {
+ // stloc(<>t__doFinallyBodies, ldc.i4(0))
+ ILExpression dfbInitExpr;
+ if (!newBody.LastOrDefault().MatchStloc(doFinallyBodies, out dfbInitExpr))
+ throw new SymbolicAnalysisFailedException();
+ int val;
+ if (!(dfbInitExpr.Match(ILCode.Ldc_I4, out val) && val == 0))
+ throw new SymbolicAnalysisFailedException();
+ newBody.RemoveAt(newBody.Count - 1); // remove doFinallyBodies assignment
+ }
+
+ // call(AsyncTaskMethodBuilder::AwaitUnsafeOnCompleted, ldflda(StateMachine::<>t__builder, ldloc(this)), ldloca(CS$0$0001), ldloc(this))
+ ILExpression callAwaitUnsafeOnCompleted = newBody.LastOrDefault() as ILExpression;
+ newBody.RemoveAt(newBody.Count - 1); // remove AwaitUnsafeOnCompleted call
+ if (callAwaitUnsafeOnCompleted == null || callAwaitUnsafeOnCompleted.Code != ILCode.Call)
+ throw new SymbolicAnalysisFailedException();
+ if (((MethodReference)callAwaitUnsafeOnCompleted.Operand).Name != "AwaitUnsafeOnCompleted")
+ throw new SymbolicAnalysisFailedException();
+ if (callAwaitUnsafeOnCompleted.Arguments.Count != 3)
+ throw new SymbolicAnalysisFailedException();
+ if (!callAwaitUnsafeOnCompleted.Arguments[1].Match(ILCode.Ldloca, out awaiterVar))
+ throw new SymbolicAnalysisFailedException();
+
+ // stfld(StateMachine::<>u__$awaiter6, ldloc(this), ldloc(CS$0$0001))
+ FieldReference awaiterFieldRef;
+ ILExpression loadThis, loadAwaiterVar;
+ if (!newBody.LastOrDefault().Match(ILCode.Stfld, out awaiterFieldRef, out loadThis, out loadAwaiterVar))
+ throw new SymbolicAnalysisFailedException();
+ newBody.RemoveAt(newBody.Count - 1); // remove awaiter field assignment
+ awaiterField = awaiterFieldRef.ResolveWithinSameModule();
+ if (!(awaiterField != null && loadThis.MatchThis() && loadAwaiterVar.MatchLdloc(awaiterVar)))
+ throw new SymbolicAnalysisFailedException();
+
+ // stfld(StateMachine::<>1__state, ldloc(this), ldc.i4(0))
+ if (!MatchStateAssignment(newBody.LastOrDefault(), out targetStateID))
+ throw new SymbolicAnalysisFailedException();
+ newBody.RemoveAt(newBody.Count - 1); // remove awaiter field assignment
+ }
+ #endregion
+
+ #region MarkGeneratedVariables
+ int smallestGeneratedVariableIndex = int.MaxValue;
+
+ void MarkAsGeneratedVariable(ILVariable v)
+ {
+ if (v.OriginalVariable != null && v.OriginalVariable.Index >= 0) {
+ smallestGeneratedVariableIndex = Math.Min(smallestGeneratedVariableIndex, v.OriginalVariable.Index);
+ }
+ }
+
+ void MarkGeneratedVariables()
+ {
+ var expressions = new ILBlock(newTopLevelBody).GetSelfAndChildrenRecursive();
+ foreach (var v in expressions.Select(e => e.Operand).OfType()) {
+ if (v.OriginalVariable != null && v.OriginalVariable.Index >= smallestGeneratedVariableIndex)
+ v.IsGenerated = true;
+ }
+ }
+ #endregion
+
+ #region RunStep2() method
+ public static void RunStep2(DecompilerContext context, ILBlock method)
+ {
+ if (context.CurrentMethodIsAsync) {
+ Step2(method.Body);
+ ILAstOptimizer.RemoveRedundantCode(method);
+ // Repeat the inlining/copy propagation optimization because the conversion of field access
+ // to local variables can open up additional inlining possibilities.
+ ILInlining inlining = new ILInlining(method);
+ inlining.InlineAllVariables();
+ inlining.CopyPropagation();
+ }
+ }
+
+ static void Step2(List body)
+ {
+ for (int pos = 0; pos < body.Count; pos++) {
+ ILTryCatchBlock tc = body[pos] as ILTryCatchBlock;
+ if (tc != null) {
+ Step2(tc.TryBlock.Body);
+ } else {
+ Step2(body, ref pos);
+ }
+ }
+ }
+
+ static bool Step2(List body, ref int pos)
+ {
+ // stloc(CS$0$0001, callvirt(class System.Threading.Tasks.Task`1::GetAwaiter, awaiterExpr)
+ // brtrue(IL_7C, call(valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted, ldloca(CS$0$0001)))
+ // await(ldloca(CS$0$0001))
+ // ...
+ // IL_7C:
+ // arg_8B_0 = call(valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::GetResult, ldloca(CS$0$0001))
+ // initobj(valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1, ldloca(CS$0$0001))
+
+ ILExpression loadAwaiter;
+ ILVariable awaiterVar;
+ if (!body[pos].Match(ILCode.Await, out loadAwaiter))
+ return false;
+ if (!loadAwaiter.Match(ILCode.Ldloca, out awaiterVar))
+ return false;
+
+ ILVariable stackVar;
+ ILExpression stackExpr;
+ while (pos >= 1 && body[pos - 1].Match(ILCode.Stloc, out stackVar, out stackExpr))
+ pos--;
+
+ // stloc(CS$0$0001, callvirt(class System.Threading.Tasks.Task`1::GetAwaiter, awaiterExpr)
+ ILExpression getAwaiterCall;
+ if (!(pos >= 2 && body[pos - 2].MatchStloc(awaiterVar, out getAwaiterCall)))
+ return false;
+ MethodReference getAwaiterMethod;
+ ILExpression awaitedExpr;
+ if (!(getAwaiterCall.Match(ILCode.Call, out getAwaiterMethod, out awaitedExpr) || getAwaiterCall.Match(ILCode.Callvirt, out getAwaiterMethod, out awaitedExpr)))
+ return false;
+
+ if (awaitedExpr.Code == ILCode.AddressOf) {
+ // remove 'AddressOf()' when calling GetAwaiter() on a value type
+ awaitedExpr = awaitedExpr.Arguments[0];
+ }
+
+ // brtrue(IL_7C, call(valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1::get_IsCompleted, ldloca(CS$0$0001)))
+ ILLabel label;
+ ILExpression getIsCompletedCall;
+ if (!(pos >= 1 && body[pos - 1].Match(ILCode.Brtrue, out label, out getIsCompletedCall)))
+ return false;
+
+ int labelPos = body.IndexOf(label);
+ if (labelPos < pos)
+ return false;
+ for (int i = pos + 1; i < labelPos; i++) {
+ // validate that we aren't deleting any unexpected instructions -
+ // between the await and the label, there should only be the stack, awaiter and state logic
+ ILExpression expr = body[i] as ILExpression;
+ if (expr == null)
+ return false;
+ switch (expr.Code) {
+ case ILCode.Stloc:
+ case ILCode.Initobj:
+ case ILCode.Stfld:
+ case ILCode.Await:
+ // e.g.
+ // stloc(CS$0$0001, ldfld(StateMachine::<>u__$awaitere, ldloc(this)))
+ // initobj(valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter`1, ldloca(CS$0$0002_66))
+ // stfld('d__d'::<>u__$awaitere, ldloc(this), ldloc(CS$0$0002_66))
+ // stfld('d__d'::<>1__state, ldloc(this), ldc.i4(-1))
+ break;
+ default:
+ return false;
+ }
+ }
+ if (labelPos + 1 >= body.Count)
+ return false;
+ ILExpression resultAssignment = body[labelPos + 1] as ILExpression;
+ ILVariable resultVar;
+ ILExpression getResultCall;
+ bool isResultAssignment = resultAssignment.Match(ILCode.Stloc, out resultVar, out getResultCall);
+ if (!isResultAssignment)
+ getResultCall = resultAssignment;
+ if (!(getResultCall.Operand is MethodReference && ((MethodReference)getResultCall.Operand).Name == "GetResult"))
+ return false;
+
+ pos -= 2; // also delete 'stloc', 'brtrue' and 'await'
+ body.RemoveRange(pos, labelPos - pos);
+ Debug.Assert(body[pos] == label);
+
+ pos++;
+ if (isResultAssignment) {
+ Debug.Assert(body[pos] == resultAssignment);
+ resultAssignment.Arguments[0] = new ILExpression(ILCode.Await, null, awaitedExpr);
+ } else {
+ body[pos] = new ILExpression(ILCode.Await, null, awaitedExpr);
+ }
+
+ // if the awaiter variable is cleared out in the next instruction, remove that instruction
+ if (IsVariableReset(body.ElementAtOrDefault(pos + 1), awaiterVar)) {
+ body.RemoveAt(pos + 1);
+ }
+
+ return true;
+ }
+
+ static bool IsVariableReset(ILNode expr, ILVariable variable)
+ {
+ object unused;
+ ILExpression ldloca;
+ return expr.Match(ILCode.Initobj, out unused, out ldloca) && ldloca.MatchLdloca(variable);
+ }
+ #endregion
+ }
+}
diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs
index 051662f357..bf85ca94f4 100644
--- a/src/Libraries/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/ILAstOptimizer.cs
@@ -35,6 +35,7 @@ namespace ICSharpCode.Decompiler.ILAst
InlineVariables,
CopyPropagation,
YieldReturn,
+ AsyncAwait,
PropertyAccessInstructions,
SplitToMovableBlocks,
TypeInference,
@@ -107,6 +108,10 @@ namespace ICSharpCode.Decompiler.ILAst
if (abortBeforeStep == ILAstOptimizationStep.YieldReturn) return;
YieldReturnDecompiler.Run(context, method);
+ AsyncDecompiler.RunStep1(context, method);
+
+ if (abortBeforeStep == ILAstOptimizationStep.AsyncAwait) return;
+ AsyncDecompiler.RunStep2(context, method);
if (abortBeforeStep == ILAstOptimizationStep.PropertyAccessInstructions) return;
IntroducePropertyAccessInstructions(method);
@@ -256,7 +261,7 @@ namespace ICSharpCode.Decompiler.ILAst
/// Ignore arguments of 'leave'
///
///
- void RemoveRedundantCode(ILBlock method)
+ internal static void RemoveRedundantCode(ILBlock method)
{
Dictionary labelRefCount = new Dictionary();
foreach (ILLabel target in method.GetSelfAndChildrenRecursive(e => e.IsBranch()).SelectMany(e => e.GetBranchTargets())) {
@@ -286,7 +291,13 @@ namespace ICSharpCode.Decompiler.ILAst
prevExpr.ILRanges.AddRange(((ILExpression)body[i]).ILRanges);
// Ignore pop
} else {
- newBody.Add(body[i]);
+ ILLabel label = body[i] as ILLabel;
+ if (label != null) {
+ if (labelRefCount.GetOrDefault(label) > 0)
+ newBody.Add(label);
+ } else {
+ newBody.Add(body[i]);
+ }
}
}
block.Body = newBody;
diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/ILCodes.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/ILCodes.cs
index cbf5486988..5ca063b752 100644
--- a/src/Libraries/ICSharpCode.Decompiler/ILAst/ILCodes.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/ILCodes.cs
@@ -333,7 +333,11 @@ namespace ICSharpCode.Decompiler.ILAst
/// The last child of this node is the call constructing the expression tree, all other children are the
/// assignments to the ParameterExpression variables.
///
- ExpressionTreeParameterDeclarations
+ ExpressionTreeParameterDeclarations,
+ ///
+ /// C# 5 await
+ ///
+ Await
}
public static class ILCodeUtil
diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/LoopsAndConditions.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/LoopsAndConditions.cs
index e5409a2e58..32095b03eb 100644
--- a/src/Libraries/ICSharpCode.Decompiler/ILAst/LoopsAndConditions.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/LoopsAndConditions.cs
@@ -101,7 +101,7 @@ namespace ICSharpCode.Decompiler.ILAst
// Find all branches
foreach(ILLabel target in node.GetSelfAndChildrenRecursive(e => e.IsBranch()).SelectMany(e => e.GetBranchTargets())) {
ControlFlowNode destination;
- // Labels which are out of out scope will not be int the collection
+ // Labels which are out of out scope will not be in the collection
// Insert self edge only if we are sure we are a loop
if (labelToCfNode.TryGetValue(target, out destination) && (destination != source || target == node.Body.FirstOrDefault())) {
ControlFlowEdge edge = new ControlFlowEdge(source, destination, JumpType.Normal);
@@ -228,15 +228,10 @@ namespace ICSharpCode.Decompiler.ILAst
// Do not modify entry data
scope = new HashSet(scope);
- HashSet agenda = new HashSet();
- agenda.Add(entryNode);
- while(agenda.Any()) {
- ControlFlowNode node = agenda.First();
- // Attempt for a good order
- while(agenda.Contains(node.ImmediateDominator)) {
- node = node.ImmediateDominator;
- }
- agenda.Remove(node);
+ Stack agenda = new Stack();
+ agenda.Push(entryNode);
+ while(agenda.Count > 0) {
+ ControlFlowNode node = agenda.Pop();
// Find a block that represents a simple condition
if (scope.Contains(node)) {
@@ -364,18 +359,12 @@ namespace ICSharpCode.Decompiler.ILAst
labelToCfNode.TryGetValue(falseLabel, out falseTarget);
// Pull in the conditional code
- HashSet frontiers = new HashSet();
- if (trueTarget != null)
- frontiers.UnionWith(trueTarget.DominanceFrontier.Except(new [] { trueTarget }));
- if (falseTarget != null)
- frontiers.UnionWith(falseTarget.DominanceFrontier.Except(new [] { falseTarget }));
-
- if (trueTarget != null && !frontiers.Contains(trueTarget)) {
+ if (trueTarget != null && HasSingleEdgeEnteringBlock(trueTarget)) {
HashSet content = FindDominatedNodes(scope, trueTarget);
scope.ExceptWith(content);
ilCond.TrueBlock.Body.AddRange(FindConditions(content, trueTarget));
}
- if (falseTarget != null && !frontiers.Contains(falseTarget)) {
+ if (falseTarget != null && HasSingleEdgeEnteringBlock(falseTarget)) {
HashSet content = FindDominatedNodes(scope, falseTarget);
scope.ExceptWith(content);
ilCond.FalseBlock.Body.AddRange(FindConditions(content, falseTarget));
@@ -390,9 +379,9 @@ namespace ICSharpCode.Decompiler.ILAst
}
}
- // Using the dominator tree should ensure we find the the widest loop first
- foreach(var child in node.DominatorTreeChildren) {
- agenda.Add(child);
+ // depth-first traversal of dominator tree
+ for (int i = node.DominatorTreeChildren.Count - 1; i >= 0; i--) {
+ agenda.Push(node.DominatorTreeChildren[i]);
}
}
@@ -404,6 +393,11 @@ namespace ICSharpCode.Decompiler.ILAst
return result;
}
+ static bool HasSingleEdgeEnteringBlock(ControlFlowNode node)
+ {
+ return node.Incoming.Count(edge => !node.Dominates(edge.Source)) == 1;
+ }
+
static HashSet FindDominatedNodes(HashSet scope, ControlFlowNode head)
{
HashSet agenda = new HashSet();
diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/PatternMatching.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/PatternMatching.cs
index cc4e5ee5f5..31fcf62b15 100644
--- a/src/Libraries/ICSharpCode.Decompiler/ILAst/PatternMatching.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/PatternMatching.cs
@@ -155,5 +155,17 @@ namespace ICSharpCode.Decompiler.ILAst
ILVariable v;
return node.Match(ILCode.Ldloc, out v) && v == expectedVar;
}
+
+ public static bool MatchLdloca(this ILNode node, ILVariable expectedVar)
+ {
+ ILVariable v;
+ return node.Match(ILCode.Ldloca, out v) && v == expectedVar;
+ }
+
+ public static bool MatchStloc(this ILNode node, ILVariable expectedVar, out ILExpression expr)
+ {
+ ILVariable v;
+ return node.Match(ILCode.Stloc, out v, out expr) && v == expectedVar;
+ }
}
}
diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/StateRange.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/StateRange.cs
new file mode 100644
index 0000000000..4a55e1d0b6
--- /dev/null
+++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/StateRange.cs
@@ -0,0 +1,310 @@
+// Copyright (c) 2012 AlphaSierraPapa for the SharpDevelop Team
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using Mono.Cecil;
+
+namespace ICSharpCode.Decompiler.ILAst
+{
+ struct Interval
+ {
+ public readonly int Start, End;
+
+ public Interval(int start, int end)
+ {
+ Debug.Assert(start <= end || (start == 0 && end == -1));
+ this.Start = start;
+ this.End = end;
+ }
+
+ public override string ToString()
+ {
+ return string.Format("({0} to {1})", Start, End);
+ }
+ }
+
+ class StateRange
+ {
+ readonly List data = new List();
+
+ public StateRange()
+ {
+ }
+
+ public StateRange(int start, int end)
+ {
+ this.data.Add(new Interval(start, end));
+ }
+
+ public bool IsEmpty {
+ get { return data.Count == 0; }
+ }
+
+ public bool Contains(int val)
+ {
+ foreach (Interval v in data) {
+ if (v.Start <= val && val <= v.End)
+ return true;
+ }
+ return false;
+ }
+
+ public void UnionWith(StateRange other)
+ {
+ data.AddRange(other.data);
+ }
+
+ ///
+ /// Unions this state range with (other intersect (minVal to maxVal))
+ ///
+ public void UnionWith(StateRange other, int minVal, int maxVal)
+ {
+ foreach (Interval v in other.data) {
+ int start = Math.Max(v.Start, minVal);
+ int end = Math.Min(v.End, maxVal);
+ if (start <= end)
+ data.Add(new Interval(start, end));
+ }
+ }
+
+ ///
+ /// Merges overlapping interval ranges.
+ ///
+ public void Simplify()
+ {
+ if (data.Count < 2)
+ return;
+ data.Sort((a, b) => a.Start.CompareTo(b.Start));
+ Interval prev = data[0];
+ int prevIndex = 0;
+ for (int i = 1; i < data.Count; i++) {
+ Interval next = data[i];
+ Debug.Assert(prev.Start <= next.Start);
+ if (next.Start <= prev.End + 1) { // intervals overlapping or touching
+ prev = new Interval(prev.Start, Math.Max(prev.End, next.End));
+ data[prevIndex] = prev;
+ data[i] = new Interval(0, -1); // mark as deleted
+ } else {
+ prev = next;
+ prevIndex = i;
+ }
+ }
+ data.RemoveAll(i => i.Start > i.End); // remove all entries that were marked as deleted
+ }
+
+ public override string ToString()
+ {
+ return string.Join(",", data);
+ }
+
+ public Interval ToEnclosingInterval()
+ {
+ if (data.Count == 0)
+ throw new SymbolicAnalysisFailedException();
+ return new Interval(data[0].Start, data[data.Count - 1].End);
+ }
+ }
+
+ enum StateRangeAnalysisMode
+ {
+ IteratorMoveNext,
+ IteratorDispose,
+ AsyncMoveNext
+ }
+
+ class StateRangeAnalysis
+ {
+ readonly StateRangeAnalysisMode mode;
+ readonly FieldDefinition stateField;
+ internal DefaultDictionary ranges;
+ SymbolicEvaluationContext evalContext;
+
+ internal Dictionary finallyMethodToStateInterval; // used only for IteratorDispose
+
+ ///
+ /// Initializes the state range logic:
+ /// Clears 'ranges' and sets 'ranges[entryPoint]' to the full range (int.MinValue to int.MaxValue)
+ ///
+ public StateRangeAnalysis(ILNode entryPoint, StateRangeAnalysisMode mode, FieldDefinition stateField)
+ {
+ this.mode = mode;
+ this.stateField = stateField;
+ if (mode == StateRangeAnalysisMode.IteratorDispose) {
+ finallyMethodToStateInterval = new Dictionary();
+ }
+
+ ranges = new DefaultDictionary(n => new StateRange());
+ ranges[entryPoint] = new StateRange(int.MinValue, int.MaxValue);
+ evalContext = new SymbolicEvaluationContext(stateField);
+ }
+
+ public int AssignStateRanges(List body, int bodyLength)
+ {
+ if (bodyLength == 0)
+ return 0;
+ for (int i = 0; i < bodyLength; i++) {
+ StateRange nodeRange = ranges[body[i]];
+ nodeRange.Simplify();
+
+ ILLabel label = body[i] as ILLabel;
+ if (label != null) {
+ ranges[body[i + 1]].UnionWith(nodeRange);
+ continue;
+ }
+
+ ILTryCatchBlock tryFinally = body[i] as ILTryCatchBlock;
+ if (tryFinally != null) {
+ if (mode == StateRangeAnalysisMode.IteratorDispose) {
+ if (tryFinally.CatchBlocks.Count != 0 || tryFinally.FaultBlock != null || tryFinally.FinallyBlock == null)
+ throw new SymbolicAnalysisFailedException();
+ ranges[tryFinally.TryBlock].UnionWith(nodeRange);
+ if (tryFinally.TryBlock.Body.Count != 0) {
+ ranges[tryFinally.TryBlock.Body[0]].UnionWith(nodeRange);
+ AssignStateRanges(tryFinally.TryBlock.Body, tryFinally.TryBlock.Body.Count);
+ }
+ continue;
+ } else if (mode == StateRangeAnalysisMode.AsyncMoveNext) {
+ return i;
+ } else {
+ throw new SymbolicAnalysisFailedException();
+ }
+ }
+
+ ILExpression expr = body[i] as ILExpression;
+ if (expr == null)
+ throw new SymbolicAnalysisFailedException();
+ switch (expr.Code) {
+ case ILCode.Switch:
+ {
+ SymbolicValue val = evalContext.Eval(expr.Arguments[0]);
+ if (val.Type != SymbolicValueType.State)
+ goto default;
+ ILLabel[] targetLabels = (ILLabel[])expr.Operand;
+ for (int j = 0; j < targetLabels.Length; j++) {
+ int state = j - val.Constant;
+ ranges[targetLabels[j]].UnionWith(nodeRange, state, state);
+ }
+ StateRange nextRange = ranges[body[i + 1]];
+ nextRange.UnionWith(nodeRange, int.MinValue, -1 - val.Constant);
+ nextRange.UnionWith(nodeRange, targetLabels.Length - val.Constant, int.MaxValue);
+ break;
+ }
+ case ILCode.Br:
+ case ILCode.Leave:
+ ranges[(ILLabel)expr.Operand].UnionWith(nodeRange);
+ break;
+ case ILCode.Brtrue:
+ {
+ SymbolicValue val = evalContext.Eval(expr.Arguments[0]);
+ if (val.Type == SymbolicValueType.StateEquals) {
+ ranges[(ILLabel)expr.Operand].UnionWith(nodeRange, val.Constant, val.Constant);
+ StateRange nextRange = ranges[body[i + 1]];
+ nextRange.UnionWith(nodeRange, int.MinValue, val.Constant - 1);
+ nextRange.UnionWith(nodeRange, val.Constant + 1, int.MaxValue);
+ break;
+ } else if (val.Type == SymbolicValueType.StateInEquals) {
+ ranges[body[i + 1]].UnionWith(nodeRange, val.Constant, val.Constant);
+ StateRange targetRange = ranges[(ILLabel)expr.Operand];
+ targetRange.UnionWith(nodeRange, int.MinValue, val.Constant - 1);
+ targetRange.UnionWith(nodeRange, val.Constant + 1, int.MaxValue);
+ break;
+ } else {
+ goto default;
+ }
+ }
+ case ILCode.Nop:
+ ranges[body[i + 1]].UnionWith(nodeRange);
+ break;
+ case ILCode.Ret:
+ break;
+ case ILCode.Stloc:
+ {
+ SymbolicValue val = evalContext.Eval(expr.Arguments[0]);
+ if (val.Type == SymbolicValueType.State && val.Constant == 0) {
+ evalContext.AddStateVariable((ILVariable)expr.Operand);
+ goto case ILCode.Nop;
+ } else {
+ goto default;
+ }
+ }
+ case ILCode.Call:
+ // in some cases (e.g. foreach over array) the C# compiler produces a finally method outside of try-finally blocks
+ if (mode == StateRangeAnalysisMode.IteratorDispose) {
+ MethodDefinition mdef = (expr.Operand as MethodReference).ResolveWithinSameModule();
+ if (mdef == null || finallyMethodToStateInterval.ContainsKey(mdef))
+ throw new SymbolicAnalysisFailedException();
+ finallyMethodToStateInterval.Add(mdef, nodeRange.ToEnclosingInterval());
+ break;
+ } else {
+ goto default;
+ }
+ default:
+ if (mode == StateRangeAnalysisMode.IteratorDispose) {
+ throw new SymbolicAnalysisFailedException();
+ } else {
+ return i;
+ }
+ }
+ }
+ return bodyLength;
+ }
+
+ public void EnsureLabelAtPos(List body, ref int pos, ref int bodyLength)
+ {
+ if (pos > 0 && body[pos - 1] is ILLabel) {
+ pos--;
+ } else {
+ // ensure that the first element at body[pos] is a label:
+ ILLabel newLabel = new ILLabel();
+ newLabel.Name = "YieldReturnEntryPoint";
+ ranges[newLabel] = ranges[body[pos]]; // give the label the range of the instruction at body[pos]
+ body.Insert(pos, newLabel);
+ bodyLength++;
+ }
+ }
+
+ public LabelRangeMapping CreateLabelRangeMapping(List body, int pos, int bodyLength)
+ {
+ LabelRangeMapping result = new LabelRangeMapping();
+ CreateLabelRangeMapping(body, pos, bodyLength, result, false);
+ return result;
+ }
+
+ void CreateLabelRangeMapping(List body, int pos, int bodyLength, LabelRangeMapping result, bool onlyInitialLabels)
+ {
+ for (int i = pos; i < bodyLength; i++) {
+ ILLabel label = body[i] as ILLabel;
+ if (label != null) {
+ result.Add(new KeyValuePair(label, ranges[label]));
+ } else {
+ ILTryCatchBlock tryCatchBlock = body[i] as ILTryCatchBlock;
+ if (tryCatchBlock != null) {
+ CreateLabelRangeMapping(tryCatchBlock.TryBlock.Body, 0, tryCatchBlock.TryBlock.Body.Count, result, true);
+ } else if (onlyInitialLabels) {
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ class LabelRangeMapping : List> {}
+}
diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/SymbolicExecution.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/SymbolicExecution.cs
new file mode 100644
index 0000000000..98255f2f2d
--- /dev/null
+++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/SymbolicExecution.cs
@@ -0,0 +1,148 @@
+// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using Mono.Cecil;
+
+namespace ICSharpCode.Decompiler.ILAst
+{
+ ///
+ /// This exception is thrown when we find something else than we expect from the C# compiler.
+ /// This aborts the analysis and makes the whole transform fail.
+ ///
+ class SymbolicAnalysisFailedException : Exception {}
+
+ enum SymbolicValueType
+ {
+ ///
+ /// Unknown value
+ ///
+ Unknown,
+ ///
+ /// int: Constant (result of ldc.i4)
+ ///
+ IntegerConstant,
+ ///
+ /// int: State + Constant
+ ///
+ State,
+ ///
+ /// This pointer (result of ldarg.0)
+ ///
+ This,
+ ///
+ /// bool: State == Constant
+ ///
+ StateEquals,
+ ///
+ /// bool: State != Constant
+ ///
+ StateInEquals
+ }
+
+ struct SymbolicValue
+ {
+ public readonly int Constant;
+ public readonly SymbolicValueType Type;
+
+ public SymbolicValue(SymbolicValueType type, int constant = 0)
+ {
+ this.Type = type;
+ this.Constant = constant;
+ }
+
+ public override string ToString()
+ {
+ return string.Format("[SymbolicValue {0}: {1}]", this.Type, this.Constant);
+ }
+ }
+
+ class SymbolicEvaluationContext
+ {
+ readonly FieldDefinition stateField;
+ readonly List stateVariables = new List();
+
+ public SymbolicEvaluationContext(FieldDefinition stateField)
+ {
+ this.stateField = stateField;
+ }
+
+ public void AddStateVariable(ILVariable v)
+ {
+ if (!stateVariables.Contains(v))
+ stateVariables.Add(v);
+ }
+
+ SymbolicValue Failed()
+ {
+ return new SymbolicValue(SymbolicValueType.Unknown);
+ }
+
+ public SymbolicValue Eval(ILExpression expr)
+ {
+ SymbolicValue left, right;
+ switch (expr.Code) {
+ case ILCode.Sub:
+ left = Eval(expr.Arguments[0]);
+ right = Eval(expr.Arguments[1]);
+ if (left.Type != SymbolicValueType.State && left.Type != SymbolicValueType.IntegerConstant)
+ return Failed();
+ if (right.Type != SymbolicValueType.IntegerConstant)
+ return Failed();
+ return new SymbolicValue(left.Type, unchecked ( left.Constant - right.Constant ));
+ case ILCode.Ldfld:
+ if (Eval(expr.Arguments[0]).Type != SymbolicValueType.This)
+ return Failed();
+ if (CecilExtensions.ResolveWithinSameModule(expr.Operand as FieldReference) != stateField)
+ return Failed();
+ return new SymbolicValue(SymbolicValueType.State);
+ case ILCode.Ldloc:
+ ILVariable loadedVariable = (ILVariable)expr.Operand;
+ if (stateVariables.Contains(loadedVariable))
+ return new SymbolicValue(SymbolicValueType.State);
+ else if (loadedVariable.IsParameter && loadedVariable.OriginalParameter.Index < 0)
+ return new SymbolicValue(SymbolicValueType.This);
+ else
+ return Failed();
+ case ILCode.Ldc_I4:
+ return new SymbolicValue(SymbolicValueType.IntegerConstant, (int)expr.Operand);
+ case ILCode.Ceq:
+ case ILCode.Cne:
+ left = Eval(expr.Arguments[0]);
+ right = Eval(expr.Arguments[1]);
+ if (left.Type != SymbolicValueType.State || right.Type != SymbolicValueType.IntegerConstant)
+ return Failed();
+ // bool: (state + left.Constant == right.Constant)
+ // bool: (state == right.Constant - left.Constant)
+ return new SymbolicValue(expr.Code == ILCode.Ceq ? SymbolicValueType.StateEquals : SymbolicValueType.StateInEquals, unchecked(right.Constant - left.Constant));
+ case ILCode.LogicNot:
+ SymbolicValue val = Eval(expr.Arguments[0]);
+ if (val.Type == SymbolicValueType.StateEquals)
+ return new SymbolicValue(SymbolicValueType.StateInEquals, val.Constant);
+ else if (val.Type == SymbolicValueType.StateInEquals)
+ return new SymbolicValue(SymbolicValueType.StateEquals, val.Constant);
+ else
+ return Failed();
+ default:
+ return Failed();
+ }
+ }
+ }
+}
diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs
index b2af46d975..2e46e285bf 100644
--- a/src/Libraries/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/TypeAnalysis.cs
@@ -790,8 +790,17 @@ namespace ICSharpCode.Decompiler.ILAst
case ILCode.YieldBreak:
return null;
case ILCode.Ret:
- if (forceInferChildren && expr.Arguments.Count == 1)
- InferTypeForExpression(expr.Arguments[0], context.CurrentMethod.ReturnType);
+ if (forceInferChildren && expr.Arguments.Count == 1) {
+ TypeReference returnType = context.CurrentMethod.ReturnType;
+ if (context.CurrentMethodIsAsync && returnType != null && returnType.Namespace == "System.Threading.Tasks") {
+ if (returnType.Name == "Task") {
+ returnType = typeSystem.Void;
+ } else if (returnType.Name == "Task`1" && returnType.IsGenericInstance) {
+ returnType = ((GenericInstanceType)returnType).GenericArguments[0];
+ }
+ }
+ InferTypeForExpression(expr.Arguments[0], returnType);
+ }
return null;
case ILCode.YieldReturn:
if (forceInferChildren) {
@@ -803,6 +812,14 @@ namespace ICSharpCode.Decompiler.ILAst
}
}
return null;
+ case ILCode.Await:
+ {
+ TypeReference taskType = InferTypeForExpression(expr.Arguments[0], null);
+ if (taskType.Name == "Task`1" && taskType.IsGenericInstance && taskType.Namespace == "System.Threading.Tasks") {
+ return ((GenericInstanceType)taskType).GenericArguments[0];
+ }
+ return null;
+ }
#endregion
case ILCode.Pop:
return null;
@@ -985,12 +1002,24 @@ namespace ICSharpCode.Decompiler.ILAst
InferTypeForExpression(right, typeSystem.IntPtr);
return leftPreferred;
}
+ if (IsEnum(leftPreferred)) {
+ //E+U=E
+ left.InferredType = left.ExpectedType = leftPreferred;
+ InferTypeForExpression(right, GetEnumUnderlyingType(leftPreferred));
+ return leftPreferred;
+ }
TypeReference rightPreferred = DoInferTypeForExpression(right, expectedType);
if (rightPreferred is PointerType) {
InferTypeForExpression(left, typeSystem.IntPtr);
right.InferredType = right.ExpectedType = rightPreferred;
return rightPreferred;
}
+ if (IsEnum(rightPreferred)) {
+ //U+E=E
+ right.InferredType = right.ExpectedType = rightPreferred;
+ InferTypeForExpression(left, GetEnumUnderlyingType(rightPreferred));
+ return rightPreferred;
+ }
return InferBinaryArguments(left, right, expectedType, leftPreferred: leftPreferred, rightPreferred: rightPreferred);
}
@@ -1004,6 +1033,19 @@ namespace ICSharpCode.Decompiler.ILAst
InferTypeForExpression(right, typeSystem.IntPtr);
return leftPreferred;
}
+ if (IsEnum(leftPreferred)) {
+ if (expectedType != null && IsEnum(expectedType)) {
+ // E-U=E
+ left.InferredType = left.ExpectedType = leftPreferred;
+ InferTypeForExpression(right, GetEnumUnderlyingType(leftPreferred));
+ return leftPreferred;
+ } else {
+ // E-E=U
+ left.InferredType = left.ExpectedType = leftPreferred;
+ InferTypeForExpression(right, leftPreferred);
+ return GetEnumUnderlyingType(leftPreferred);
+ }
+ }
return InferBinaryArguments(left, right, expectedType, leftPreferred: leftPreferred);
}
diff --git a/src/Libraries/ICSharpCode.Decompiler/ILAst/YieldReturnDecompiler.cs b/src/Libraries/ICSharpCode.Decompiler/ILAst/YieldReturnDecompiler.cs
index 06a211eea8..b4b6183bf8 100644
--- a/src/Libraries/ICSharpCode.Decompiler/ILAst/YieldReturnDecompiler.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/ILAst/YieldReturnDecompiler.cs
@@ -24,7 +24,7 @@ using Mono.Cecil;
namespace ICSharpCode.Decompiler.ILAst
{
- public class YieldReturnDecompiler
+ class YieldReturnDecompiler
{
// For a description on the code generated by the C# compiler for yield return:
// http://csharpindepth.com/Articles/Chapter6/IteratorBlockImplementation.aspx
@@ -34,11 +34,8 @@ namespace ICSharpCode.Decompiler.ILAst
// - Figure out which of the fields is the state field
// - Construct an exception table based on states. This allows us to determine, for each state, what the parent try block is.
- ///
- /// This exception is thrown when we find something else than we expect from the C# compiler.
- /// This aborts the analysis and makes the whole transform fail.
- ///
- class YieldAnalysisFailedException : Exception {}
+ // See http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2011/03/06/ilspy-yield-return.aspx
+ // for a description of this step.
DecompilerContext context;
TypeDefinition enumeratorType;
@@ -66,7 +63,7 @@ namespace ICSharpCode.Decompiler.ILAst
#endif
try {
yrd.Run();
- } catch (YieldAnalysisFailedException) {
+ } catch (SymbolicAnalysisFailedException) {
return;
}
#if DEBUG
@@ -211,7 +208,7 @@ namespace ICSharpCode.Decompiler.ILAst
}
}
if (stateField == null)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
}
///
@@ -220,7 +217,7 @@ namespace ICSharpCode.Decompiler.ILAst
ILBlock CreateILAst(MethodDefinition method)
{
if (method == null || !method.HasBody)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
ILBlock ilMethod = new ILBlock();
ILAstBuilder astBuilder = new ILAstBuilder();
@@ -269,7 +266,7 @@ namespace ICSharpCode.Decompiler.ILAst
}
}
if (currentField == null)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
}
#endregion
@@ -322,337 +319,30 @@ namespace ICSharpCode.Decompiler.ILAst
disposeMethod = enumeratorType.Methods.FirstOrDefault(m => m.Name == "System.IDisposable.Dispose");
ILBlock ilMethod = CreateILAst(disposeMethod);
- finallyMethodToStateInterval = new Dictionary();
-
- InitStateRanges(ilMethod.Body[0]);
- AssignStateRanges(ilMethod.Body, ilMethod.Body.Count, forDispose: true);
+ var rangeAnalysis = new StateRangeAnalysis(ilMethod.Body[0], StateRangeAnalysisMode.IteratorDispose, stateField);
+ rangeAnalysis.AssignStateRanges(ilMethod.Body, ilMethod.Body.Count);
+ finallyMethodToStateInterval = rangeAnalysis.finallyMethodToStateInterval;
// Now look at the finally blocks:
foreach (var tryFinally in ilMethod.GetSelfAndChildrenRecursive()) {
- Interval interval = ranges[tryFinally.TryBlock.Body[0]].ToEnclosingInterval();
+ Interval interval = rangeAnalysis.ranges[tryFinally.TryBlock.Body[0]].ToEnclosingInterval();
var finallyBody = tryFinally.FinallyBlock.Body;
if (finallyBody.Count != 2)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
ILExpression call = finallyBody[0] as ILExpression;
if (call == null || call.Code != ILCode.Call || call.Arguments.Count != 1)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
if (!call.Arguments[0].MatchThis())
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
if (!finallyBody[1].Match(ILCode.Endfinally))
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
MethodDefinition mdef = GetMethodDefinition(call.Operand as MethodReference);
if (mdef == null || finallyMethodToStateInterval.ContainsKey(mdef))
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
finallyMethodToStateInterval.Add(mdef, interval);
}
- ranges = null;
- }
- #endregion
-
- #region Assign StateRanges / Symbolic Execution (used for analysis of Dispose() and MoveNext())
- #region struct Interval / class StateRange
- struct Interval
- {
- public readonly int Start, End;
-
- public Interval(int start, int end)
- {
- Debug.Assert(start <= end || (start == 0 && end == -1));
- this.Start = start;
- this.End = end;
- }
-
- public override string ToString()
- {
- return string.Format("({0} to {1})", Start, End);
- }
- }
-
- class StateRange
- {
- readonly List data = new List();
-
- public StateRange()
- {
- }
-
- public StateRange(int start, int end)
- {
- this.data.Add(new Interval(start, end));
- }
-
- public bool Contains(int val)
- {
- foreach (Interval v in data) {
- if (v.Start <= val && val <= v.End)
- return true;
- }
- return false;
- }
-
- public void UnionWith(StateRange other)
- {
- data.AddRange(other.data);
- }
-
- ///
- /// Unions this state range with (other intersect (minVal to maxVal))
- ///
- public void UnionWith(StateRange other, int minVal, int maxVal)
- {
- foreach (Interval v in other.data) {
- int start = Math.Max(v.Start, minVal);
- int end = Math.Min(v.End, maxVal);
- if (start <= end)
- data.Add(new Interval(start, end));
- }
- }
-
- ///
- /// Merges overlapping interval ranges.
- ///
- public void Simplify()
- {
- if (data.Count < 2)
- return;
- data.Sort((a, b) => a.Start.CompareTo(b.Start));
- Interval prev = data[0];
- int prevIndex = 0;
- for (int i = 1; i < data.Count; i++) {
- Interval next = data[i];
- Debug.Assert(prev.Start <= next.Start);
- if (next.Start <= prev.End + 1) { // intervals overlapping or touching
- prev = new Interval(prev.Start, Math.Max(prev.End, next.End));
- data[prevIndex] = prev;
- data[i] = new Interval(0, -1); // mark as deleted
- } else {
- prev = next;
- prevIndex = i;
- }
- }
- data.RemoveAll(i => i.Start > i.End); // remove all entries that were marked as deleted
- }
-
- public override string ToString()
- {
- return string.Join(",", data);
- }
-
- public Interval ToEnclosingInterval()
- {
- if (data.Count == 0)
- throw new YieldAnalysisFailedException();
- return new Interval(data[0].Start, data[data.Count - 1].End);
- }
- }
- #endregion
-
- DefaultDictionary ranges;
- ILVariable rangeAnalysisStateVariable;
-
- ///
- /// Initializes the state range logic:
- /// Clears 'ranges' and sets 'ranges[entryPoint]' to the full range (int.MinValue to int.MaxValue)
- ///
- void InitStateRanges(ILNode entryPoint)
- {
- ranges = new DefaultDictionary(n => new StateRange());
- ranges[entryPoint] = new StateRange(int.MinValue, int.MaxValue);
- rangeAnalysisStateVariable = null;
- }
-
- int AssignStateRanges(List body, int bodyLength, bool forDispose)
- {
- if (bodyLength == 0)
- return 0;
- for (int i = 0; i < bodyLength; i++) {
- StateRange nodeRange = ranges[body[i]];
- nodeRange.Simplify();
-
- ILLabel label = body[i] as ILLabel;
- if (label != null) {
- ranges[body[i + 1]].UnionWith(nodeRange);
- continue;
- }
-
- ILTryCatchBlock tryFinally = body[i] as ILTryCatchBlock;
- if (tryFinally != null) {
- if (!forDispose || tryFinally.CatchBlocks.Count != 0 || tryFinally.FaultBlock != null || tryFinally.FinallyBlock == null)
- throw new YieldAnalysisFailedException();
- ranges[tryFinally.TryBlock].UnionWith(nodeRange);
- if (tryFinally.TryBlock.Body.Count != 0) {
- ranges[tryFinally.TryBlock.Body[0]].UnionWith(nodeRange);
- AssignStateRanges(tryFinally.TryBlock.Body, tryFinally.TryBlock.Body.Count, forDispose);
- }
- continue;
- }
-
- ILExpression expr = body[i] as ILExpression;
- if (expr == null)
- throw new YieldAnalysisFailedException();
- switch (expr.Code) {
- case ILCode.Switch:
- {
- SymbolicValue val = Eval(expr.Arguments[0]);
- if (val.Type != SymbolicValueType.State)
- throw new YieldAnalysisFailedException();
- ILLabel[] targetLabels = (ILLabel[])expr.Operand;
- for (int j = 0; j < targetLabels.Length; j++) {
- int state = j - val.Constant;
- ranges[targetLabels[j]].UnionWith(nodeRange, state, state);
- }
- StateRange nextRange = ranges[body[i + 1]];
- nextRange.UnionWith(nodeRange, int.MinValue, -1 - val.Constant);
- nextRange.UnionWith(nodeRange, targetLabels.Length - val.Constant, int.MaxValue);
- break;
- }
- case ILCode.Br:
- case ILCode.Leave:
- ranges[(ILLabel)expr.Operand].UnionWith(nodeRange);
- break;
- case ILCode.Brtrue:
- {
- SymbolicValue val = Eval(expr.Arguments[0]);
- if (val.Type == SymbolicValueType.StateEquals) {
- ranges[(ILLabel)expr.Operand].UnionWith(nodeRange, val.Constant, val.Constant);
- StateRange nextRange = ranges[body[i + 1]];
- nextRange.UnionWith(nodeRange, int.MinValue, val.Constant - 1);
- nextRange.UnionWith(nodeRange, val.Constant + 1, int.MaxValue);
- } else if (val.Type == SymbolicValueType.StateInEquals) {
- ranges[body[i + 1]].UnionWith(nodeRange, val.Constant, val.Constant);
- StateRange targetRange = ranges[(ILLabel)expr.Operand];
- targetRange.UnionWith(nodeRange, int.MinValue, val.Constant - 1);
- targetRange.UnionWith(nodeRange, val.Constant + 1, int.MaxValue);
- } else {
- throw new YieldAnalysisFailedException();
- }
- break;
- }
- case ILCode.Nop:
- ranges[body[i + 1]].UnionWith(nodeRange);
- break;
- case ILCode.Ret:
- break;
- case ILCode.Stloc:
- {
- SymbolicValue val = Eval(expr.Arguments[0]);
- if (val.Type == SymbolicValueType.State && val.Constant == 0 && rangeAnalysisStateVariable == null)
- rangeAnalysisStateVariable = (ILVariable)expr.Operand;
- else
- throw new YieldAnalysisFailedException();
- goto case ILCode.Nop;
- }
- case ILCode.Call:
- // in some cases (e.g. foreach over array) the C# compiler produces a finally method outside of try-finally blocks
- if (forDispose) {
- MethodDefinition mdef = GetMethodDefinition(expr.Operand as MethodReference);
- if (mdef == null || finallyMethodToStateInterval.ContainsKey(mdef))
- throw new YieldAnalysisFailedException();
- finallyMethodToStateInterval.Add(mdef, nodeRange.ToEnclosingInterval());
- } else {
- throw new YieldAnalysisFailedException();
- }
- break;
- default:
- if (forDispose)
- throw new YieldAnalysisFailedException();
- else
- return i;
- }
- }
- return bodyLength;
- }
-
- enum SymbolicValueType
- {
- ///
- /// int: Constant (result of ldc.i4)
- ///
- IntegerConstant,
- ///
- /// int: State + Constant
- ///
- State,
- ///
- /// This pointer (result of ldarg.0)
- ///
- This,
- ///
- /// bool: State == Constant
- ///
- StateEquals,
- ///
- /// bool: State != Constant
- ///
- StateInEquals
- }
-
- struct SymbolicValue
- {
- public readonly int Constant;
- public readonly SymbolicValueType Type;
-
- public SymbolicValue(SymbolicValueType type, int constant = 0)
- {
- this.Type = type;
- this.Constant = constant;
- }
-
- public override string ToString()
- {
- return string.Format("[SymbolicValue {0}: {1}]", this.Type, this.Constant);
- }
- }
-
- SymbolicValue Eval(ILExpression expr)
- {
- SymbolicValue left, right;
- switch (expr.Code) {
- case ILCode.Sub:
- left = Eval(expr.Arguments[0]);
- right = Eval(expr.Arguments[1]);
- if (left.Type != SymbolicValueType.State && left.Type != SymbolicValueType.IntegerConstant)
- throw new YieldAnalysisFailedException();
- if (right.Type != SymbolicValueType.IntegerConstant)
- throw new YieldAnalysisFailedException();
- return new SymbolicValue(left.Type, unchecked ( left.Constant - right.Constant ));
- case ILCode.Ldfld:
- if (Eval(expr.Arguments[0]).Type != SymbolicValueType.This)
- throw new YieldAnalysisFailedException();
- if (GetFieldDefinition(expr.Operand as FieldReference) != stateField)
- throw new YieldAnalysisFailedException();
- return new SymbolicValue(SymbolicValueType.State);
- case ILCode.Ldloc:
- ILVariable loadedVariable = (ILVariable)expr.Operand;
- if (loadedVariable == rangeAnalysisStateVariable)
- return new SymbolicValue(SymbolicValueType.State);
- else if (loadedVariable.IsParameter && loadedVariable.OriginalParameter.Index < 0)
- return new SymbolicValue(SymbolicValueType.This);
- else
- throw new YieldAnalysisFailedException();
- case ILCode.Ldc_I4:
- return new SymbolicValue(SymbolicValueType.IntegerConstant, (int)expr.Operand);
- case ILCode.Ceq:
- case ILCode.Cne:
- left = Eval(expr.Arguments[0]);
- right = Eval(expr.Arguments[1]);
- if (left.Type != SymbolicValueType.State || right.Type != SymbolicValueType.IntegerConstant)
- throw new YieldAnalysisFailedException();
- // bool: (state + left.Constant == right.Constant)
- // bool: (state == right.Constant - left.Constant)
- return new SymbolicValue(expr.Code == ILCode.Ceq ? SymbolicValueType.StateEquals : SymbolicValueType.StateInEquals, unchecked(right.Constant - left.Constant));
- case ILCode.LogicNot:
- SymbolicValue val = Eval(expr.Arguments[0]);
- if (val.Type == SymbolicValueType.StateEquals)
- return new SymbolicValue(SymbolicValueType.StateInEquals, val.Constant);
- else if (val.Type == SymbolicValueType.StateInEquals)
- return new SymbolicValue(SymbolicValueType.StateEquals, val.Constant);
- else
- throw new YieldAnalysisFailedException();
- default:
- throw new YieldAnalysisFailedException();
- }
+ rangeAnalysis = null;
}
#endregion
@@ -667,10 +357,10 @@ namespace ICSharpCode.Decompiler.ILAst
ILBlock ilMethod = CreateILAst(moveNextMethod);
if (ilMethod.Body.Count == 0)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
ILExpression lastReturnArg;
if (!ilMethod.Body.Last().Match(ILCode.Ret, out lastReturnArg))
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
// There are two possibilities:
if (lastReturnArg.Code == ILCode.Ldloc) {
@@ -678,14 +368,14 @@ namespace ICSharpCode.Decompiler.ILAst
returnVariable = (ILVariable)lastReturnArg.Operand;
returnLabel = ilMethod.Body.ElementAtOrDefault(ilMethod.Body.Count - 2) as ILLabel;
if (returnLabel == null)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
} else {
// b) the compiler directly returns constants
returnVariable = null;
returnLabel = null;
// In this case, the last return must return false.
if (lastReturnArg.Code != ILCode.Ldc_I4 || (int)lastReturnArg.Operand != 0)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
}
ILTryCatchBlock tryFaultBlock = ilMethod.Body[0] as ILTryCatchBlock;
@@ -694,23 +384,23 @@ namespace ICSharpCode.Decompiler.ILAst
if (tryFaultBlock != null) {
// there are try-finally blocks
if (returnVariable == null) // in this case, we must use a return variable
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
// must be a try-fault block:
if (tryFaultBlock.CatchBlocks.Count != 0 || tryFaultBlock.FinallyBlock != null || tryFaultBlock.FaultBlock == null)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
ILBlock faultBlock = tryFaultBlock.FaultBlock;
// Ensure the fault block contains the call to Dispose().
if (faultBlock.Body.Count != 2)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
MethodReference disposeMethodRef;
ILExpression disposeArg;
if (!faultBlock.Body[0].Match(ILCode.Call, out disposeMethodRef, out disposeArg))
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
if (GetMethodDefinition(disposeMethodRef) != disposeMethod || !disposeArg.MatchThis())
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
if (!faultBlock.Body[1].Match(ILCode.Endfinally))
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
body = tryFaultBlock.TryBlock.Body;
bodyLength = body.Count;
@@ -734,39 +424,22 @@ namespace ICSharpCode.Decompiler.ILAst
bodyLength--;
ILExpression store0 = body.ElementAtOrDefault(bodyLength - 1) as ILExpression;
if (store0 == null || store0.Code != ILCode.Stloc || store0.Operand != returnVariable)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
if (store0.Arguments[0].Code != ILCode.Ldc_I4 || (int)store0.Arguments[0].Operand != 0)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
bodyLength--; // don't conside the stloc instruction to be part of the body
}
// verify that the last element in the body is a label pointing to the 'ret(false)'
returnFalseLabel = body.ElementAtOrDefault(bodyLength - 1) as ILLabel;
if (returnFalseLabel == null)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
- InitStateRanges(body[0]);
- int pos = AssignStateRanges(body, bodyLength, forDispose: false);
- if (pos > 0 && body[pos - 1] is ILLabel) {
- pos--;
- } else {
- // ensure that the first element at body[pos] is a label:
- ILLabel newLabel = new ILLabel();
- newLabel.Name = "YieldReturnEntryPoint";
- ranges[newLabel] = ranges[body[pos]]; // give the label the range of the instruction at body[pos]
-
- body.Insert(pos, newLabel);
- bodyLength++;
- }
-
- List> labels = new List>();
- for (int i = pos; i < bodyLength; i++) {
- ILLabel label = body[i] as ILLabel;
- if (label != null) {
- labels.Add(new KeyValuePair(label, ranges[label]));
- }
- }
+ var rangeAnalysis = new StateRangeAnalysis(body[0], StateRangeAnalysisMode.IteratorMoveNext, stateField);
+ int pos = rangeAnalysis.AssignStateRanges(body, bodyLength);
+ rangeAnalysis.EnsureLabelAtPos(body, ref pos, ref bodyLength);
+ var labels = rangeAnalysis.CreateLabelRangeMapping(body, pos, bodyLength);
ConvertBody(body, pos, bodyLength, labels);
}
#endregion
@@ -797,7 +470,7 @@ namespace ICSharpCode.Decompiler.ILAst
// Handle stores to 'state' or 'current'
if (GetFieldDefinition(expr.Operand as FieldReference) == stateField) {
if (expr.Arguments[1].Code != ILCode.Ldc_I4)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
currentState = (int)expr.Arguments[1].Operand;
stateChanges.Add(new SetState(newBody.Count, currentState));
} else if (GetFieldDefinition(expr.Operand as FieldReference) == currentField) {
@@ -809,18 +482,18 @@ namespace ICSharpCode.Decompiler.ILAst
// handle store+branch to the returnVariable
ILExpression br = body.ElementAtOrDefault(++pos) as ILExpression;
if (br == null || !(br.Code == ILCode.Br || br.Code == ILCode.Leave) || br.Operand != returnLabel || expr.Arguments[0].Code != ILCode.Ldc_I4)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
int val = (int)expr.Arguments[0].Operand;
if (val == 0) {
newBody.Add(MakeGoTo(returnFalseLabel));
} else if (val == 1) {
newBody.Add(MakeGoTo(labels, currentState));
} else {
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
}
} else if (expr != null && expr.Code == ILCode.Ret) {
if (expr.Arguments.Count != 1 || expr.Arguments[0].Code != ILCode.Ldc_I4)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
// handle direct return (e.g. in release builds)
int val = (int)expr.Arguments[0].Operand;
if (val == 0) {
@@ -828,24 +501,24 @@ namespace ICSharpCode.Decompiler.ILAst
} else if (val == 1) {
newBody.Add(MakeGoTo(labels, currentState));
} else {
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
}
} else if (expr != null && expr.Code == ILCode.Call && expr.Arguments.Count == 1 && expr.Arguments[0].MatchThis()) {
MethodDefinition method = GetMethodDefinition(expr.Operand as MethodReference);
if (method == null)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
Interval interval;
if (method == disposeMethod) {
// Explicit call to dispose is used for "yield break;" within the method.
ILExpression br = body.ElementAtOrDefault(++pos) as ILExpression;
if (br == null || !(br.Code == ILCode.Br || br.Code == ILCode.Leave) || br.Operand != returnFalseLabel)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
newBody.Add(MakeGoTo(returnFalseLabel));
} else if (finallyMethodToStateInterval.TryGetValue(method, out interval)) {
// Call to Finally-method
int index = stateChanges.FindIndex(ss => ss.NewState >= interval.Start && ss.NewState <= interval.End);
if (index < 0)
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
ILLabel label = new ILLabel();
label.Name = "JumpOutOfTryFinally" + interval.Start + "_" + interval.End;
@@ -883,7 +556,7 @@ namespace ICSharpCode.Decompiler.ILAst
if (pair.Value.Contains(state))
return MakeGoTo(pair.Key);
}
- throw new YieldAnalysisFailedException();
+ throw new SymbolicAnalysisFailedException();
}
ILBlock ConvertFinallyBlock(MethodDefinition finallyMethod)
@@ -907,6 +580,11 @@ namespace ICSharpCode.Decompiler.ILAst
#region TranslateFieldsToLocalAccess
void TranslateFieldsToLocalAccess()
+ {
+ TranslateFieldsToLocalAccess(newBody, fieldToParameterMap);
+ }
+
+ internal static void TranslateFieldsToLocalAccess(List newBody, Dictionary fieldToParameterMap)
{
var fieldToLocalMap = new DefaultDictionary(f => new ILVariable { Name = f.Name, Type = f.FieldType });
foreach (ILNode node in newBody) {
diff --git a/src/Libraries/ICSharpCode.Decompiler/Properties/AssemblyInfo.cs b/src/Libraries/ICSharpCode.Decompiler/Properties/AssemblyInfo.cs
index 0deae79817..818b72b10b 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Properties/AssemblyInfo.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Properties/AssemblyInfo.cs
@@ -19,8 +19,8 @@ using System.Runtime.InteropServices;
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
-[assembly: AssemblyVersion("2.0.0.1489")]
-[assembly: AssemblyInformationalVersion("2.0.0.1489-774e3cd8")]
+[assembly: AssemblyVersion("2.1.0.1603")]
+[assembly: AssemblyInformationalVersion("2.1.0.1603-1170e2f8")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2243:AttributeStringLiteralsShouldParseCorrectly",
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/Async.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/Async.cs
new file mode 100644
index 0000000000..ccd1222556
--- /dev/null
+++ b/src/Libraries/ICSharpCode.Decompiler/Tests/Async.cs
@@ -0,0 +1,144 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#pragma warning disable 1998
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Threading.Tasks;
+
+public class Async
+{
+ public async void SimpleVoidMethod()
+ {
+ Console.WriteLine("Before");
+ await Task.Delay(TimeSpan.FromSeconds(1.0));
+ Console.WriteLine("After");
+ }
+
+ public async void VoidMethodWithoutAwait()
+ {
+ Console.WriteLine("No Await");
+ }
+
+ public async Task SimpleVoidTaskMethod()
+ {
+ Console.WriteLine("Before");
+ await Task.Delay(TimeSpan.FromSeconds(1.0));
+ Console.WriteLine("After");
+ }
+
+ public async Task TaskMethodWithoutAwait()
+ {
+ Console.WriteLine("No Await");
+ }
+
+ public async Task SimpleBoolTaskMethod()
+ {
+ Console.WriteLine("Before");
+ await Task.Delay(TimeSpan.FromSeconds(1.0));
+ Console.WriteLine("After");
+ return true;
+ }
+
+ public async void TwoAwaitsWithDifferentAwaiterTypes()
+ {
+ Console.WriteLine("Before");
+ if (await this.SimpleBoolTaskMethod())
+ {
+ await Task.Delay(TimeSpan.FromSeconds(1.0));
+ }
+ Console.WriteLine("After");
+ }
+
+ public async void StreamCopyTo(Stream destination, int bufferSize)
+ {
+ byte[] array = new byte[bufferSize];
+ int count;
+ while ((count = await destination.ReadAsync(array, 0, array.Length)) != 0)
+ {
+ await destination.WriteAsync(array, 0, count);
+ }
+ }
+
+ public async void StreamCopyToWithConfigureAwait(Stream destination, int bufferSize)
+ {
+ byte[] array = new byte[bufferSize];
+ int count;
+ while ((count = await destination.ReadAsync(array, 0, array.Length).ConfigureAwait(false)) != 0)
+ {
+ await destination.WriteAsync(array, 0, count).ConfigureAwait(false);
+ }
+ }
+
+ public async void AwaitInLoopCondition()
+ {
+ while (await this.SimpleBoolTaskMethod())
+ {
+ Console.WriteLine("Body");
+ }
+ }
+
+ public async Task AwaitInForEach(IEnumerable> elements)
+ {
+ int num = 0;
+ foreach (Task current in elements)
+ {
+ num += await current;
+ }
+ return num;
+ }
+
+ public async Task TaskMethodWithoutAwaitButWithExceptionHandling()
+ {
+ try
+ {
+ using (new StringWriter())
+ {
+ Console.WriteLine("No Await");
+ }
+ }
+ catch (Exception)
+ {
+ Console.WriteLine("Crash");
+ }
+ }
+
+ public async Task NestedAwait(Task> task)
+ {
+ return await(await task);
+ }
+
+ public async Task AwaitWithStack(Task task)
+ {
+ Console.WriteLine("A", 1, await task);
+ }
+
+ public async Task AwaitWithStack2(Task task)
+ {
+ if (await this.SimpleBoolTaskMethod())
+ {
+ Console.WriteLine("A", 1, await task);
+ }
+ else
+ {
+ int num = 1;
+ Console.WriteLine("A", 1, num);
+ }
+ }
+}
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/ControlFlow.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/ControlFlow.cs
new file mode 100644
index 0000000000..76038f1254
--- /dev/null
+++ b/src/Libraries/ICSharpCode.Decompiler/Tests/ControlFlow.cs
@@ -0,0 +1,81 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+
+public static class ControlFlow
+{
+ public static void EmptyIf(string input, List value, Dictionary _headers)
+ {
+ if (value.Contains("test"))
+ {
+ }
+ _headers.Add(2, "result");
+ }
+
+ public static void NormalIf(string input, List value, Dictionary _headers)
+ {
+ if (value.Contains("test"))
+ {
+ _headers.Add(1, "result");
+ }
+ else
+ {
+ _headers.Add(1, "else");
+ }
+ _headers.Add(2, "end");
+ }
+
+ public static void NormalIf2(string input, List value, Dictionary _headers)
+ {
+ if (value.Contains("test"))
+ {
+ _headers.Add(1, "result");
+ }
+ _headers.Add(2, "end");
+ }
+
+ public static void NormalIf3(string input, List value, Dictionary _headers)
+ {
+ if (value.Contains("test"))
+ {
+ _headers.Add(1, "result");
+ }
+ else
+ {
+ _headers.Add(1, "else");
+ }
+ }
+
+ public static void Test(string input, List value, Dictionary _headers)
+ {
+ foreach (string current in value)
+ {
+ _headers.Add(0, current);
+ }
+ if (value.Contains("test"))
+ {
+ _headers.Add(1, "result");
+ }
+ else
+ {
+ _headers.Add(1, "else");
+ }
+ }
+}
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/Generics.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/Generics.cs
index 5adb934c68..9776d42f34 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Tests/Generics.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Tests/Generics.cs
@@ -107,4 +107,59 @@ public static class Generics
// Tests references to inner classes in generic classes
return d.Keys.GetEnumerator();
}
+
+ public static bool IsString(T input)
+ {
+ return input is string;
+ }
+
+ public static string AsString(T input)
+ {
+ return input as string;
+ }
+
+ public static string CastToString(T input)
+ {
+ return (string)((object)input);
+ }
+
+ public static T CastFromString(string input)
+ {
+ return (T)((object)input);
+ }
+
+ public static bool IsInt(T input)
+ {
+ return input is int;
+ }
+
+ public static int CastToInt(T input)
+ {
+ return (int)((object)input);
+ }
+
+ public static T CastFromInt(int input)
+ {
+ return (T)((object)input);
+ }
+
+ public static bool IsNullableInt(T input)
+ {
+ return input is int?;
+ }
+
+ public static int? AsNullableInt(T input)
+ {
+ return input as int?;
+ }
+
+ public static int? CastToNullableInt(T input)
+ {
+ return (int?)((object)input);
+ }
+
+ public static T CastFromNullableInt(int? input)
+ {
+ return (T)((object)input);
+ }
}
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/Helpers/RemoveCompilerAttribute.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/Helpers/RemoveCompilerAttribute.cs
index 2519165578..cb65620242 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Tests/Helpers/RemoveCompilerAttribute.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Tests/Helpers/RemoveCompilerAttribute.cs
@@ -15,7 +15,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
var section = (AttributeSection)attribute.Parent;
SimpleType type = attribute.Type as SimpleType;
if (section.AttributeTarget == "assembly" &&
- (type.Identifier == "CompilationRelaxations" || type.Identifier == "RuntimeCompatibility" || type.Identifier == "SecurityPermission" || type.Identifier == "AssemblyVersion"))
+ (type.Identifier == "CompilationRelaxations" || type.Identifier == "RuntimeCompatibility" || type.Identifier == "SecurityPermission" || type.Identifier == "AssemblyVersion" || type.Identifier == "Debuggable"))
{
attribute.Remove();
if (section.Attributes.Count == 0)
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj b/src/Libraries/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj
index c42f043393..69598ac73f 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj
+++ b/src/Libraries/ICSharpCode.Decompiler/Tests/ICSharpCode.Decompiler.Tests.csproj
@@ -7,7 +7,7 @@
Library
ICSharpCode.Decompiler.Tests
ICSharpCode.Decompiler.Tests
- v4.0
+ v4.5
Properties
True
False
@@ -15,6 +15,7 @@
false
False
67,169,1058,728,1720,649
+
x86
@@ -62,9 +63,13 @@
+
+
+
+
@@ -77,6 +82,10 @@
+
+
+
+
@@ -117,10 +126,11 @@
ICSharpCode.Decompiler
-
+
+
+
-
\ No newline at end of file
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/IL/ILTests.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/IL/ILTests.cs
new file mode 100644
index 0000000000..3cfed30f22
--- /dev/null
+++ b/src/Libraries/ICSharpCode.Decompiler/Tests/IL/ILTests.cs
@@ -0,0 +1,51 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.IO;
+using ICSharpCode.Decompiler.Ast;
+using ICSharpCode.Decompiler.Tests.Helpers;
+using Mono.Cecil;
+using NUnit.Framework;
+
+namespace ICSharpCode.Decompiler.Tests
+{
+ [TestFixture]
+ public class ILTests
+ {
+ const string path = "../../Tests/IL";
+
+ [Test]
+ public void SequenceOfNestedIfs()
+ {
+ Run("SequenceOfNestedIfs.dll", "SequenceOfNestedIfs.Output.cs");
+ }
+
+ void Run(string compiledFile, string expectedOutputFile)
+ {
+ string expectedOutput = File.ReadAllText(Path.Combine(path, expectedOutputFile));
+ var assembly = AssemblyDefinition.ReadAssembly(Path.Combine(path, compiledFile));
+ AstBuilder decompiler = new AstBuilder(new DecompilerContext(assembly.MainModule));
+ decompiler.AddAssembly(assembly);
+ new Helpers.RemoveCompilerAttribute().Run(decompiler.CompilationUnit);
+ StringWriter output = new StringWriter();
+ decompiler.GenerateCode(new PlainTextOutput(output));
+ CodeAssert.AreEqual(expectedOutput, output.ToString());
+ }
+ }
+}
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/IL/SequenceOfNestedIfs.Output.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/IL/SequenceOfNestedIfs.Output.cs
new file mode 100644
index 0000000000..754d7dafdc
--- /dev/null
+++ b/src/Libraries/ICSharpCode.Decompiler/Tests/IL/SequenceOfNestedIfs.Output.cs
@@ -0,0 +1,53 @@
+using System;
+[Serializable]
+public class Material
+{
+ public static implicit operator bool(Material m)
+ {
+ return m == null;
+ }
+}
+[Serializable]
+public class SequenceOfNestedIfs
+{
+ public bool _clear;
+ public Material _material;
+ public override bool CheckShader()
+ {
+ return false;
+ }
+ public override void CreateMaterials()
+ {
+ if (!this._clear)
+ {
+ if (!this.CheckShader())
+ {
+ return;
+ }
+ this._material = new Material();
+ }
+ if (!this._material)
+ {
+ if (!this.CheckShader())
+ {
+ return;
+ }
+ this._material = new Material();
+ }
+ if (!this._material)
+ {
+ if (!this.CheckShader())
+ {
+ return;
+ }
+ this._material = new Material();
+ }
+ if (!this._material)
+ {
+ if (this.CheckShader())
+ {
+ this._material = new Material();
+ }
+ }
+ }
+}
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/IL/SequenceOfNestedIfs.dll b/src/Libraries/ICSharpCode.Decompiler/Tests/IL/SequenceOfNestedIfs.dll
new file mode 100644
index 0000000000..f517d4546d
Binary files /dev/null and b/src/Libraries/ICSharpCode.Decompiler/Tests/IL/SequenceOfNestedIfs.dll differ
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/IL/SequenceOfNestedIfs.il b/src/Libraries/ICSharpCode.Decompiler/Tests/IL/SequenceOfNestedIfs.il
new file mode 100644
index 0000000000..9c9b749ce4
--- /dev/null
+++ b/src/Libraries/ICSharpCode.Decompiler/Tests/IL/SequenceOfNestedIfs.il
@@ -0,0 +1,140 @@
+// Metadata version: v2.0.50727
+.assembly extern mscorlib
+{
+ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
+ .ver 2:0:0:0
+}
+
+.assembly SequenceOfNestedIfs
+{
+ .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
+ 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+.module SequenceOfNestedIfs
+// MVID: {DCEC8A87-5679-4EBE-89A3-51274D8B5446}
+.imagebase 0x00400000
+.file alignment 0x00000200
+.stackreserve 0x00100000
+.subsystem 0x0003 // WINDOWS_CUI
+.corflags 0x00000001 // ILONLY
+// Image base: 0x01D60000
+
+
+// =============== CLASS MEMBERS DECLARATION ===================
+
+.class public auto ansi serializable beforefieldinit Material
+ extends [mscorlib]System.Object
+{
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+ // Code size 7 (0x7)
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: call instance void [mscorlib]System.Object::.ctor()
+ IL_0006: ret
+ } // end of method Material::.ctor
+
+ .method public hidebysig specialname static
+ bool op_Implicit(class Material m) cil managed
+ {
+ // Code size 11 (0xb)
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: ldnull
+ IL_0008: ceq
+ IL_000a: ret
+ } // end of method Material::op_Implicit
+
+} // end of class Material
+
+.class public auto ansi serializable beforefieldinit SequenceOfNestedIfs
+ extends [mscorlib]System.Object
+{
+ .field public bool _clear
+ .field public class Material _material
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+ // Code size 7 (0x7)
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: call instance void [mscorlib]System.Object::.ctor()
+ IL_0006: ret
+ } // end of method SequenceOfNestedIfs::.ctor
+
+ .method public hidebysig virtual instance bool
+ CheckShader() cil managed
+ {
+ // Code size 2 (0x2)
+ .maxstack 8
+ IL_0000: ldc.i4.0
+ IL_0001: ret
+ } // end of method SequenceOfNestedIfs::CheckShader
+
+ .method public hidebysig virtual instance void
+ CreateMaterials() cil managed
+ {
+ // Code size 168 (0xa8)
+ .maxstack 13
+ IL_0000: ldarg.0
+ IL_0001: ldfld bool SequenceOfNestedIfs::_clear
+ IL_0006: brtrue IL_0026
+
+ IL_000b: ldarg.0
+ IL_000c: callvirt instance bool SequenceOfNestedIfs::CheckShader()
+ IL_0011: brtrue IL_001b
+
+ IL_0016: br IL_00a7
+
+ IL_001b: ldarg.0
+ IL_001c: newobj instance void Material::.ctor()
+ IL_0021: stfld class Material SequenceOfNestedIfs::_material
+ IL_0026: ldarg.0
+ IL_0027: ldfld class Material SequenceOfNestedIfs::_material
+ IL_002c: call bool Material::op_Implicit(class Material)
+ IL_0031: brtrue IL_0051
+
+ IL_0036: ldarg.0
+ IL_0037: callvirt instance bool SequenceOfNestedIfs::CheckShader()
+ IL_003c: brtrue IL_0046
+
+ IL_0041: br IL_00a7
+
+ IL_0046: ldarg.0
+ IL_0047: newobj instance void Material::.ctor()
+ IL_004c: stfld class Material SequenceOfNestedIfs::_material
+ IL_0051: ldarg.0
+ IL_0052: ldfld class Material SequenceOfNestedIfs::_material
+ IL_0057: call bool Material::op_Implicit(class Material)
+ IL_005c: brtrue IL_007c
+
+ IL_0061: ldarg.0
+ IL_0062: callvirt instance bool SequenceOfNestedIfs::CheckShader()
+ IL_0067: brtrue IL_0071
+
+ IL_006c: br IL_00a7
+
+ IL_0071: ldarg.0
+ IL_0072: newobj instance void Material::.ctor()
+ IL_0077: stfld class Material SequenceOfNestedIfs::_material
+ IL_007c: ldarg.0
+ IL_007d: ldfld class Material SequenceOfNestedIfs::_material
+ IL_0082: call bool Material::op_Implicit(class Material)
+ IL_0087: brtrue IL_00a7
+
+ IL_008c: ldarg.0
+ IL_008d: callvirt instance bool SequenceOfNestedIfs::CheckShader()
+ IL_0092: brtrue IL_009c
+
+ IL_0097: br IL_00a7
+
+ IL_009c: ldarg.0
+ IL_009d: newobj instance void Material::.ctor()
+ IL_00a2: stfld class Material SequenceOfNestedIfs::_material
+ IL_00a7: ret
+ } // end of method SequenceOfNestedIfs::CreateMaterials
+
+} // end of class SequenceOfNestedIfs
\ No newline at end of file
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/StackTests/StackTests.exe b/src/Libraries/ICSharpCode.Decompiler/Tests/IL/StackTests.exe
similarity index 100%
rename from src/Libraries/ICSharpCode.Decompiler/Tests/StackTests/StackTests.exe
rename to src/Libraries/ICSharpCode.Decompiler/Tests/IL/StackTests.exe
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/StackTests/StackTests.il b/src/Libraries/ICSharpCode.Decompiler/Tests/IL/StackTests.il
similarity index 100%
rename from src/Libraries/ICSharpCode.Decompiler/Tests/StackTests/StackTests.il
rename to src/Libraries/ICSharpCode.Decompiler/Tests/IL/StackTests.il
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/PropertiesAndEvents.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/PropertiesAndEvents.cs
index 4bacc06e3e..9b3d165893 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Tests/PropertiesAndEvents.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Tests/PropertiesAndEvents.cs
@@ -24,10 +24,9 @@ public class PropertiesAndEvents
public event EventHandler AutomaticEvent;
[field: NonSerialized]
- public event EventHandler AutomaticEventWithInitializer = delegate
+ public event EventHandler AutomaticEventWithInitializer = delegate(object sender, EventArgs e)
{
- }
- ;
+ };
public event EventHandler CustomEvent
{
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/TestRunner.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/TestRunner.cs
index a4feebca09..52a03a4623 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Tests/TestRunner.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Tests/TestRunner.cs
@@ -34,6 +34,12 @@ namespace ICSharpCode.Decompiler.Tests
[TestFixture]
public class TestRunner
{
+ [Test]
+ public void Async()
+ {
+ TestFile(@"..\..\Tests\Async.cs");
+ }
+
[Test, Ignore("disambiguating overloads is not yet implemented")]
public void CallOverloadedMethod()
{
@@ -61,7 +67,7 @@ namespace ICSharpCode.Decompiler.Tests
[Test]
public void ExceptionHandling()
{
- TestFile(@"..\..\Tests\ExceptionHandling.cs", false);
+ TestFile(@"..\..\Tests\ExceptionHandling.cs", optimize: false);
}
[Test]
@@ -76,6 +82,12 @@ namespace ICSharpCode.Decompiler.Tests
TestFile(@"..\..\Tests\CustomShortCircuitOperators.cs");
}
+ [Test]
+ public void ControlFlowWithDebug()
+ {
+ TestFile(@"..\..\Tests\ControlFlow.cs", optimize: false, useDebug: true);
+ }
+
[Test]
public void IncrementDecrement()
{
@@ -160,16 +172,16 @@ namespace ICSharpCode.Decompiler.Tests
TestFile(@"..\..\Tests\TypeAnalysisTests.cs");
}
- static void TestFile(string fileName)
+ static void TestFile(string fileName, bool useDebug = false)
{
- TestFile(fileName, false);
- TestFile(fileName, true);
+ TestFile(fileName, false, useDebug);
+ TestFile(fileName, true, useDebug);
}
- static void TestFile(string fileName, bool optimize)
+ static void TestFile(string fileName, bool optimize, bool useDebug = false)
{
string code = File.ReadAllText(fileName);
- AssemblyDefinition assembly = Compile(code, optimize);
+ AssemblyDefinition assembly = Compile(code, optimize, useDebug);
AstBuilder decompiler = new AstBuilder(new DecompilerContext(assembly.MainModule));
decompiler.AddAssembly(assembly);
new Helpers.RemoveCompilerAttribute().Run(decompiler.CompilationUnit);
@@ -178,11 +190,11 @@ namespace ICSharpCode.Decompiler.Tests
CodeAssert.AreEqual(code, output.ToString());
}
- static AssemblyDefinition Compile(string code, bool optimize)
+ static AssemblyDefinition Compile(string code, bool optimize, bool useDebug)
{
CSharpCodeProvider provider = new CSharpCodeProvider(new Dictionary { { "CompilerVersion", "v4.0" } });
CompilerParameters options = new CompilerParameters();
- options.CompilerOptions = "/unsafe /o" + (optimize ? "+" : "-");
+ options.CompilerOptions = "/unsafe /o" + (optimize ? "+" : "-") + (useDebug ? " /debug": "");
options.ReferencedAssemblies.Add("System.Core.dll");
CompilerResults results = provider.CompileAssemblyFromSource(options, code);
try {
diff --git a/src/Libraries/ICSharpCode.Decompiler/Tests/TypeAnalysisTests.cs b/src/Libraries/ICSharpCode.Decompiler/Tests/TypeAnalysisTests.cs
index 3c0ffc4b97..760bb862d3 100644
--- a/src/Libraries/ICSharpCode.Decompiler/Tests/TypeAnalysisTests.cs
+++ b/src/Libraries/ICSharpCode.Decompiler/Tests/TypeAnalysisTests.cs
@@ -140,4 +140,14 @@ public class TypeAnalysisTests
{
return new byte[length];
}
+
+ public StringComparison EnumDiffNumber(StringComparison data)
+ {
+ return data - 1;
+ }
+
+ public int EnumDiff(StringComparison a, StringComparison b)
+ {
+ return Math.Abs(a - b);
+ }
}
diff --git a/src/Libraries/Mono.Cecil/.gitignore b/src/Libraries/Mono.Cecil/.gitignore
new file mode 100644
index 0000000000..8dcb32b7f6
--- /dev/null
+++ b/src/Libraries/Mono.Cecil/.gitignore
@@ -0,0 +1,10 @@
+bin
+obj
+*.suo
+*.user
+*.pidb
+*.userprefs
+*.xml
+*.nupkg
+**/test-results/*
+*Resharper*
diff --git a/src/Libraries/Mono.Cecil/Mono.Cecil.PE/Image.cs b/src/Libraries/Mono.Cecil/Mono.Cecil.PE/Image.cs
index 9a04494f01..e5d8075251 100644
--- a/src/Libraries/Mono.Cecil/Mono.Cecil.PE/Image.cs
+++ b/src/Libraries/Mono.Cecil/Mono.Cecil.PE/Image.cs
@@ -52,6 +52,7 @@ namespace Mono.Cecil.PE {
public DataDirectory Debug;
public DataDirectory Resources;
+ public DataDirectory StrongName;
public StringHeap StringHeap;
public BlobHeap BlobHeap;
diff --git a/src/Libraries/Mono.Cecil/Mono.Cecil.PE/ImageReader.cs b/src/Libraries/Mono.Cecil/Mono.Cecil.PE/ImageReader.cs
index 9baeca5eef..b320169192 100644
--- a/src/Libraries/Mono.Cecil/Mono.Cecil.PE/ImageReader.cs
+++ b/src/Libraries/Mono.Cecil/Mono.Cecil.PE/ImageReader.cs
@@ -322,6 +322,7 @@ namespace Mono.Cecil.PE {
// Resources 8
image.Resources = ReadDataDirectory ();
// StrongNameSignature 8
+ image.StrongName = ReadDataDirectory ();
// CodeManagerTable 8
// VTableFixups 8
// ExportAddressTableJumps 8
diff --git a/src/Libraries/Mono.Cecil/Mono.Cecil.PE/ImageWriter.cs b/src/Libraries/Mono.Cecil/Mono.Cecil.PE/ImageWriter.cs
index af6aa7a359..bea308c919 100644
--- a/src/Libraries/Mono.Cecil/Mono.Cecil.PE/ImageWriter.cs
+++ b/src/Libraries/Mono.Cecil/Mono.Cecil.PE/ImageWriter.cs
@@ -75,7 +75,7 @@ namespace Mono.Cecil.PE {
this.GetDebugHeader ();
this.GetWin32Resources ();
this.text_map = BuildTextMap ();
- this.sections = 2; // text + reloc
+ this.sections = (ushort) (pe64 ? 1 : 2); // text + reloc
this.time_stamp = (uint) DateTime.UtcNow.Subtract (new DateTime (1970, 1, 1)).TotalSeconds;
}
@@ -133,7 +133,8 @@ namespace Mono.Cecil.PE {
previous = rsrc;
}
- reloc = CreateSection (".reloc", 12u, previous);
+ if (!pe64)
+ reloc = CreateSection (".reloc", 12u, previous);
}
Section CreateSection (string name, uint size, Section previous)
@@ -217,20 +218,29 @@ namespace Mono.Cecil.PE {
throw new NotSupportedException ();
}
+ Section LastSection ()
+ {
+ if (reloc != null)
+ return reloc;
+
+ if (rsrc != null)
+ return rsrc;
+
+ return text;
+ }
+
void WriteOptionalHeaders ()
{
WriteUInt16 ((ushort) (!pe64 ? 0x10b : 0x20b)); // Magic
WriteByte (8); // LMajor
WriteByte (0); // LMinor
WriteUInt32 (text.SizeOfRawData); // CodeSize
- WriteUInt32 (reloc.SizeOfRawData
+ WriteUInt32 (reloc != null ? reloc.SizeOfRawData : 0
+ (rsrc != null ? rsrc.SizeOfRawData : 0)); // InitializedDataSize
WriteUInt32 (0); // UninitializedDataSize
- var entry_point_rva = text_map.GetRVA (TextSegment.StartupStub);
- if (module.Architecture == TargetArchitecture.IA64)
- entry_point_rva += 0x20;
- WriteUInt32 (entry_point_rva); // EntryPointRVA
+ var startub_stub = text_map.GetRange (TextSegment.StartupStub);
+ WriteUInt32 (startub_stub.Length > 0 ? startub_stub.Start : 0); // EntryPointRVA
WriteUInt32 (text_rva); // BaseOfCode
if (!pe64) {
@@ -251,7 +261,8 @@ namespace Mono.Cecil.PE {
WriteUInt16 (0); // SubSysMinor
WriteUInt32 (0); // Reserved
- WriteUInt32 (reloc.VirtualAddress + Align (reloc.VirtualSize, section_alignment)); // ImageSize
+ var last_section = LastSection();
+ WriteUInt32 (last_section.VirtualAddress + Align (last_section.VirtualSize, section_alignment)); // ImageSize
WriteUInt32 (text.PointerToRawData); // HeaderSize
WriteUInt32 (0); // Checksum
@@ -288,8 +299,8 @@ namespace Mono.Cecil.PE {
WriteZeroDataDirectory (); // ExceptionTable
WriteZeroDataDirectory (); // CertificateTable
- WriteUInt32 (reloc.VirtualAddress); // BaseRelocationTable
- WriteUInt32 (reloc.VirtualSize);
+ WriteUInt32 (reloc != null ? reloc.VirtualAddress : 0); // BaseRelocationTable
+ WriteUInt32 (reloc != null ? reloc.VirtualSize : 0);
if (text_map.GetLength (TextSegment.DebugDirectory) > 0) {
WriteUInt32 (text_map.GetRVA (TextSegment.DebugDirectory));
@@ -335,7 +346,8 @@ namespace Mono.Cecil.PE {
if (rsrc != null)
WriteSection (rsrc, 0x40000040);
- WriteSection (reloc, 0x42000040);
+ if (reloc != null)
+ WriteSection (reloc, 0x42000040);
}
void WriteSection (Section section, uint characteristics)
@@ -386,8 +398,10 @@ namespace Mono.Cecil.PE {
// ImportAddressTable
- WriteRVA (text_map.GetRVA (TextSegment.ImportHintNameTable));
- WriteRVA (0);
+ if (!pe64) {
+ WriteRVA (text_map.GetRVA (TextSegment.ImportHintNameTable));
+ WriteRVA (0);
+ }
// CLIHeader
@@ -439,6 +453,9 @@ namespace Mono.Cecil.PE {
WriteDebugDirectory ();
}
+ if (pe64)
+ return;
+
// ImportDirectory
MoveToRVA (TextSegment.ImportDirectory);
WriteImportDirectory ();
@@ -605,19 +622,8 @@ namespace Mono.Cecil.PE {
WriteUInt16 (0x25ff);
WriteUInt32 ((uint) image_base + text_map.GetRVA (TextSegment.ImportAddressTable));
return;
- case TargetArchitecture.AMD64:
- WriteUInt16 (0xa148);
- WriteUInt32 ((uint) image_base + text_map.GetRVA (TextSegment.ImportAddressTable));
- WriteUInt16 (0xe0ff);
- return;
- case TargetArchitecture.IA64:
- WriteBytes (new byte [] {
- 0x0b, 0x48, 0x00, 0x02, 0x18, 0x10, 0xa0, 0x40, 0x24, 0x30, 0x28, 0x00, 0x00, 0x00, 0x04, 0x00,
- 0x10, 0x08, 0x00, 0x12, 0x18, 0x10, 0x60, 0x50, 0x04, 0x80, 0x03, 0x00, 0x60, 0x00, 0x80, 0x00
- });
- WriteUInt32 ((uint) image_base + text_map.GetRVA (TextSegment.StartupStub));
- WriteUInt32 ((uint) image_base + text_rva);
- return;
+ default:
+ throw new NotSupportedException ();
}
}
@@ -642,13 +648,8 @@ namespace Mono.Cecil.PE {
case TargetArchitecture.I386:
WriteUInt32 (0x3000 + reloc_rva - page_rva);
break;
- case TargetArchitecture.AMD64:
- WriteUInt32 (0xa000 + reloc_rva - page_rva);
- break;
- case TargetArchitecture.IA64:
- WriteUInt16 ((ushort) (0xa000 + reloc_rva - page_rva));
- WriteUInt16 ((ushort) (0xa000 + reloc_rva - page_rva + 8));
- break;
+ default:
+ throw new NotSupportedException();
}
WriteBytes (new byte [file_alignment - reloc.VirtualSize]);
@@ -663,7 +664,8 @@ namespace Mono.Cecil.PE {
WriteText ();
if (rsrc != null)
WriteRsrc ();
- WriteReloc ();
+ if (reloc != null)
+ WriteReloc ();
}
TextMap BuildTextMap ()
@@ -694,8 +696,16 @@ namespace Mono.Cecil.PE {
map.AddMap (TextSegment.DebugDirectory, debug_dir_len, 4);
+ if (pe64) {
+ var start = map.GetNextRVA (TextSegment.DebugDirectory);
+ map.AddMap (TextSegment.ImportDirectory, new Range (start, 0));
+ map.AddMap (TextSegment.ImportHintNameTable, new Range (start, 0));
+ map.AddMap (TextSegment.StartupStub, new Range (start, 0));
+ return map;
+ }
+
RVA import_dir_rva = map.GetNextRVA (TextSegment.DebugDirectory);
- RVA import_hnt_rva = import_dir_rva + (!pe64 ? 48u : 52u);
+ RVA import_hnt_rva = import_dir_rva + 48u;
import_hnt_rva = (import_hnt_rva + 15u) & ~15u;
uint import_dir_len = (import_hnt_rva - import_dir_rva) + 27u;
@@ -716,12 +726,8 @@ namespace Mono.Cecil.PE {
switch (module.Architecture) {
case TargetArchitecture.I386:
return 6;
- case TargetArchitecture.AMD64:
- return 12;
- case TargetArchitecture.IA64:
- return 48;
default:
- throw new InvalidOperationException ();
+ throw new NotSupportedException ();
}
}
@@ -744,11 +750,8 @@ namespace Mono.Cecil.PE {
int GetStrongNameLength ()
{
- if ((module.Attributes & ModuleAttributes.StrongNameSigned) == 0)
- return 0;
-
if (module.Assembly == null)
- throw new InvalidOperationException ();
+ return 0;
var public_key = module.Assembly.Name.PublicKey;
diff --git a/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyFlags.cs b/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyFlags.cs
index e466e78441..72a0eb06c2 100644
--- a/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyFlags.cs
+++ b/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyFlags.cs
@@ -35,6 +35,7 @@ namespace Mono.Cecil {
PublicKey = 0x0001,
SideBySideCompatible = 0x0000,
Retargetable = 0x0100,
+ WindowsRuntime = 0x0200,
DisableJITCompileOptimizer = 0x4000,
EnableJITCompileTracking = 0x8000,
}
diff --git a/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyNameReference.cs b/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyNameReference.cs
index 31b7a30b3a..3da978057b 100644
--- a/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyNameReference.cs
+++ b/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyNameReference.cs
@@ -92,6 +92,11 @@ namespace Mono.Cecil {
set { attributes = attributes.SetAttributes ((uint) AssemblyAttributes.Retargetable, value); }
}
+ public bool IsWindowsRuntime {
+ get { return attributes.GetAttributes ((uint) AssemblyAttributes.WindowsRuntime); }
+ set { attributes = attributes.SetAttributes ((uint) AssemblyAttributes.WindowsRuntime, value); }
+ }
+
public byte [] PublicKey {
get { return public_key; }
set {
diff --git a/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyWriter.cs b/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyWriter.cs
index 22c77ab7ac..bffa439c60 100644
--- a/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyWriter.cs
+++ b/src/Libraries/Mono.Cecil/Mono.Cecil/AssemblyWriter.cs
@@ -97,13 +97,11 @@ namespace Mono.Cecil {
var symbol_writer = GetSymbolWriter (module, fq_name, symbol_writer_provider);
#if !SILVERLIGHT && !CF
- if (parameters.StrongNameKeyPair != null && name != null)
+ if (parameters.StrongNameKeyPair != null && name != null) {
name.PublicKey = parameters.StrongNameKeyPair.PublicKey;
-#endif
-
- if (name != null && name.HasPublicKey)
module.Attributes |= ModuleAttributes.StrongNameSigned;
-
+ }
+#endif
var metadata = new MetadataBuilder (module, fq_name,
symbol_writer_provider, symbol_writer);
@@ -786,7 +784,7 @@ namespace Mono.Cecil {
TextMap CreateTextMap ()
{
var map = new TextMap ();
- map.AddMap (TextSegment.ImportAddressTable, module.Architecture == TargetArchitecture.I386 ? 8 : 16);
+ map.AddMap (TextSegment.ImportAddressTable, module.Architecture == TargetArchitecture.I386 ? 8 : 0);
map.AddMap (TextSegment.CLIHeader, 0x48, 8);
return map;
}
diff --git a/src/Libraries/Mono.Cecil/Mono.Cecil/Import.cs b/src/Libraries/Mono.Cecil/Mono.Cecil/Import.cs
index 4f3ff25c4e..38d0120412 100644
--- a/src/Libraries/Mono.Cecil/Mono.Cecil/Import.cs
+++ b/src/Libraries/Mono.Cecil/Mono.Cecil/Import.cs
@@ -92,7 +92,7 @@ namespace Mono.Cecil {
if (IsNestedType (type))
reference.DeclaringType = ImportType (type.DeclaringType, context, import_kind);
else
- reference.Namespace = type.Namespace;
+ reference.Namespace = type.Namespace ?? string.Empty;
if (type.IsGenericType)
ImportGenericParameters (reference, type.GetGenericArguments ());
diff --git a/src/Libraries/Mono.Cecil/Mono.Cecil/TypeAttributes.cs b/src/Libraries/Mono.Cecil/Mono.Cecil/TypeAttributes.cs
index bc4e18f336..86fbc4dba5 100644
--- a/src/Libraries/Mono.Cecil/Mono.Cecil/TypeAttributes.cs
+++ b/src/Libraries/Mono.Cecil/Mono.Cecil/TypeAttributes.cs
@@ -62,6 +62,7 @@ namespace Mono.Cecil {
// Implementation attributes
Import = 0x00001000, // Class/Interface is imported
Serializable = 0x00002000, // Class is serializable
+ WindowsRuntime = 0x00004000, // Windows Runtime type
// String formatting attributes
StringFormatMask = 0x00030000, // Use this mask to retrieve string information for native interop
diff --git a/src/Libraries/Mono.Cecil/Mono.Cecil/TypeDefinition.cs b/src/Libraries/Mono.Cecil/Mono.Cecil/TypeDefinition.cs
index a43e7e53ea..58c52af179 100644
--- a/src/Libraries/Mono.Cecil/Mono.Cecil/TypeDefinition.cs
+++ b/src/Libraries/Mono.Cecil/Mono.Cecil/TypeDefinition.cs
@@ -389,6 +389,11 @@ namespace Mono.Cecil {
set { attributes = attributes.SetAttributes ((uint) TypeAttributes.Serializable, value); }
}
+ public bool IsWindowsRuntime {
+ get { return attributes.GetAttributes ((uint) TypeAttributes.WindowsRuntime); }
+ set { attributes = attributes.SetAttributes ((uint) TypeAttributes.WindowsRuntime, value); }
+ }
+
public bool IsAnsiClass {
get { return attributes.GetMaskedAttributes ((uint) TypeAttributes.StringFormatMask, (uint) TypeAttributes.AnsiClass); }
set { attributes = attributes.SetMaskedAttributes ((uint) TypeAttributes.StringFormatMask, (uint) TypeAttributes.AnsiClass, value); }
diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/AbstractLexer.cs b/src/Libraries/NRefactory/Project/Src/Lexer/AbstractLexer.cs
index 2d332c4934..688c7e95f6 100644
--- a/src/Libraries/NRefactory/Project/Src/Lexer/AbstractLexer.cs
+++ b/src/Libraries/NRefactory/Project/Src/Lexer/AbstractLexer.cs
@@ -282,7 +282,7 @@ namespace ICSharpCode.NRefactory.Parser
if ('a' <= digit && digit <= 'f') {
return digit - 'a' + 0xA;
}
- errors.Error(line, col, String.Format("Invalid hex number '" + digit + "'"));
+ errors.Error(line, col, "Invalid hex number '" + digit + "'");
return 0;
}
protected Location lastLineEnd = new Location (1, 1);
diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg
index f4c218cd3f..41512e9020 100644
--- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg
+++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.atg
@@ -691,8 +691,9 @@ ConditionalExpression =
.
LambdaExpression =
- SubLambdaExpression |
- FunctionLambdaExpression
+ (. lambdaNestingDepth++; .)
+ ( SubLambdaExpression | FunctionLambdaExpression )
+ (. lambdaNestingDepth--; .)
.
SubLambdaExpression =
@@ -1136,10 +1137,19 @@ MultilineIfRemainder =
SelectStatement =
"Select" [ "Case" ] Expression StatementTerminator
{
- "Case" (
+ // HACK: '<' is recognized as XML literal, if occurring at the start of an expression
+ // in the CaseClause however it can only be a less-than-sign and vbc does not allow XML literals.
+ // we use a simple xmlAllowed flag:
+ // the flag is only set to false immetiately before the expression is parsed and set to true once '<'
+ // is recognized as less-than-sign to allow normal behavior of the lexer in later expressions.
+ "Case" (. xmlAllowed = false; .) (
"Else" |
- ( [ "Is" ] ComparisonOperator SimpleExpressionWithSuffix | Expression )
- { "," ( [ "Is" ] ComparisonOperator SimpleExpressionWithSuffix | Expression ) }
+ ( (. xmlAllowed = true; .) [ "Is" ] ComparisonOperator SimpleExpressionWithSuffix
+ | (. xmlAllowed = true; .) Expression )
+ { "," (. xmlAllowed = false; .)
+ ( (. xmlAllowed = true; .) [ "Is" ] ComparisonOperator SimpleExpressionWithSuffix
+ | (. xmlAllowed = true; .) Expression )
+ }
)
StatementTerminatorAndBlock
}
diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs
index 1649eb2c50..da283225ce 100644
--- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs
+++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinder.cs
@@ -40,6 +40,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
nextTokenIsPotentialStartOfExpression = state.NextTokenIsPotentialStartOfExpression;
nextTokenIsStartOfImportsOrAccessExpression = state.NextTokenIsStartOfImportsOrAccessExpression;
readXmlIdentifier = state.ReadXmlIdentifier;
+ lambdaNestingDepth = state.LambdaNestingDepth;
identifierExpected = state.IdentifierExpected;
stateStack = new Stack(state.StateStack.Reverse());
stack = new Stack(state.BlockStack.Select(x => (Block)x.Clone()).Reverse());
@@ -49,7 +50,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
void Print(string text)
{
- //Console.WriteLine(text);
+// Console.WriteLine(text);
output.AppendLine(text);
}
@@ -107,6 +108,10 @@ namespace ICSharpCode.NRefactory.Parser.VB
.IsElement(fx => fx.context == expected);
}
+ public int LambdaNestingDepth {
+ get { return lambdaNestingDepth; }
+ }
+
public bool NextTokenIsPotentialStartOfExpression {
get { return nextTokenIsPotentialStartOfExpression; }
}
@@ -116,6 +121,10 @@ namespace ICSharpCode.NRefactory.Parser.VB
set { readXmlIdentifier = value; }
}
+ public bool XmlAllowed {
+ get { return xmlAllowed; }
+ }
+
public bool NextTokenIsStartOfImportsOrAccessExpression {
get { return nextTokenIsStartOfImportsOrAccessExpression; }
}
diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinderState.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinderState.cs
index 6b72f9f3e5..f386b83974 100644
--- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinderState.cs
+++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/ExpressionFinderState.cs
@@ -15,6 +15,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
public bool ReadXmlIdentifier { get; set; }
public bool IdentifierExpected { get; set; }
public bool NextTokenIsStartOfImportsOrAccessExpression { get; set; }
+ public int LambdaNestingDepth { get; set; }
public Stack StateStack { get; set; }
public Stack BlockStack { get; set; }
public int CurrentState { get; set; }
diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs
index 71dbce54a9..cad5421a4f 100644
--- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs
+++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Lexer.cs
@@ -317,7 +317,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
return new Token(Tokens.XmlEndInlineVB, new Location(x, y), new Location(Col, Line));
}
#endregion
- if (ch == '<' && (ef.NextTokenIsPotentialStartOfExpression || ef.NextTokenIsStartOfImportsOrAccessExpression)) {
+ if (ch == '<' && ef.XmlAllowed && (ef.NextTokenIsPotentialStartOfExpression || ef.NextTokenIsStartOfImportsOrAccessExpression)) {
xmlModeStack.Push(new XmlModeInfo(ef.NextTokenIsStartOfImportsOrAccessExpression));
XmlModeInfo info = xmlModeStack.Peek();
int x = Col - 1;
@@ -1136,13 +1136,22 @@ namespace ICSharpCode.NRefactory.Parser.VB
public override void SkipCurrentBlock(int targetToken)
{
int lastKind = -1;
- int kind = base.lastToken.kind;
- while (kind != Tokens.EOF &&
- !(lastKind == Tokens.End && kind == targetToken))
- {
+ int kind = lastToken.kind;
+ int lambdaDepth = 0;
+
+ while (kind != Tokens.EOF) {
lastKind = kind;
+ StartPeek();
+ // lambda nesting depth is not correct at end of lambda,
+ // so we have to check right before the end
+ if (Peek().kind == Tokens.End)
+ lambdaDepth = ef.LambdaNestingDepth;
NextToken();
kind = lastToken.kind;
+ // special handling for multi line lambdas
+ // once lambdaDepth <= 0 we've reached the end of the method (after the last End Sub/Function)
+ if (lastKind == Tokens.End && kind == targetToken && lambdaDepth <= 0)
+ break;
}
}
diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs
index a4cf09d0cc..cdced2c739 100644
--- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs
+++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/Parser.cs
@@ -10,8 +10,8 @@ namespace ICSharpCode.NRefactory.Parser.VB {
partial class ExpressionFinder {
const int startOfExpression = 55;
- const int startOfBlock = 259;
- const int endOfStatementTerminatorAndBlock = 263;
+ const int startOfBlock = 261;
+ const int endOfStatementTerminatorAndBlock = 265;
static BitArray GetExpectedSet(int state)
{
switch (state) {
@@ -27,8 +27,9 @@ partial class ExpressionFinder {
return set[3];
case 6:
case 88:
- case 264:
- case 531:
+ case 266:
+ case 365:
+ case 537:
{
BitArray a = new BitArray(239);
return a;
@@ -51,25 +52,25 @@ partial class ExpressionFinder {
case 205:
case 244:
case 248:
- case 295:
- case 399:
- case 405:
- case 475:
- case 521:
- case 528:
- case 536:
- case 566:
- case 602:
- case 651:
- case 665:
- case 738:
+ case 297:
+ case 404:
+ case 410:
+ case 481:
+ case 527:
+ case 534:
+ case 542:
+ case 572:
+ case 608:
+ case 657:
+ case 671:
+ case 744:
return set[6];
case 12:
case 13:
- case 567:
- case 568:
- case 613:
- case 623:
+ case 573:
+ case 574:
+ case 619:
+ case 629:
{
BitArray a = new BitArray(239);
a.Set(1, true);
@@ -82,42 +83,42 @@ partial class ExpressionFinder {
case 23:
case 24:
case 36:
- case 256:
- case 259:
- case 260:
- case 296:
- case 300:
- case 322:
- case 337:
- case 348:
- case 351:
- case 357:
- case 362:
- case 372:
- case 373:
- case 396:
- case 423:
- case 527:
+ case 258:
+ case 261:
+ case 262:
+ case 298:
+ case 302:
+ case 324:
+ case 339:
+ case 350:
+ case 353:
+ case 359:
+ case 364:
+ case 377:
+ case 378:
+ case 401:
+ case 428:
case 533:
case 539:
- case 543:
- case 551:
- case 559:
- case 569:
- case 578:
- case 595:
- case 600:
- case 608:
+ case 545:
+ case 549:
+ case 557:
+ case 565:
+ case 575:
+ case 584:
+ case 601:
+ case 606:
case 614:
- case 617:
- case 624:
- case 627:
- case 646:
- case 649:
- case 673:
- case 681:
- case 717:
- case 737:
+ case 620:
+ case 623:
+ case 630:
+ case 633:
+ case 652:
+ case 655:
+ case 679:
+ case 687:
+ case 723:
+ case 743:
{
BitArray a = new BitArray(239);
a.Set(1, true);
@@ -131,27 +132,27 @@ partial class ExpressionFinder {
case 18:
return set[8];
case 19:
- case 257:
- case 271:
- case 298:
- case 352:
- case 397:
- case 455:
- case 576:
- case 596:
- case 615:
- case 619:
+ case 259:
+ case 273:
+ case 300:
+ case 354:
+ case 402:
+ case 461:
+ case 582:
+ case 602:
+ case 621:
case 625:
- case 647:
- case 682:
+ case 631:
+ case 653:
+ case 688:
{
BitArray a = new BitArray(239);
a.Set(113, true);
return a;
}
case 22:
- case 544:
- case 579:
+ case 550:
+ case 585:
return set[9];
case 25:
{
@@ -163,7 +164,7 @@ partial class ExpressionFinder {
case 27:
return set[10];
case 28:
- case 721:
+ case 727:
return set[11];
case 29:
return set[12];
@@ -174,31 +175,31 @@ partial class ExpressionFinder {
case 152:
case 217:
case 218:
- case 265:
- case 276:
- case 277:
- case 463:
- case 464:
- case 465:
- case 466:
- case 554:
- case 555:
- case 588:
- case 589:
- case 676:
- case 677:
- case 730:
- case 731:
+ case 267:
+ case 278:
+ case 279:
+ case 469:
+ case 470:
+ case 471:
+ case 472:
+ case 560:
+ case 561:
+ case 594:
+ case 595:
+ case 682:
+ case 683:
+ case 736:
+ case 737:
return set[14];
case 33:
case 34:
- case 522:
- case 523:
+ case 528:
case 529:
- case 530:
- case 556:
- case 557:
- case 670:
+ case 535:
+ case 536:
+ case 562:
+ case 563:
+ case 676:
return set[15];
case 35:
case 37:
@@ -208,29 +209,29 @@ partial class ExpressionFinder {
case 187:
case 203:
case 221:
- case 307:
- case 332:
- case 422:
- case 440:
- case 451:
- case 478:
- case 532:
- case 550:
- case 558:
- case 630:
- case 633:
- case 655:
- case 658:
- case 660:
- case 672:
- case 685:
- case 687:
- case 710:
- case 713:
+ case 309:
+ case 334:
+ case 427:
+ case 445:
+ case 456:
+ case 484:
+ case 538:
+ case 556:
+ case 564:
+ case 636:
+ case 639:
+ case 661:
+ case 664:
+ case 666:
+ case 678:
+ case 691:
+ case 693:
case 716:
+ case 719:
case 722:
- case 725:
- case 743:
+ case 728:
+ case 731:
+ case 749:
return set[16];
case 38:
case 41:
@@ -241,8 +242,8 @@ partial class ExpressionFinder {
case 97:
case 101:
case 163:
- case 388:
- case 482:
+ case 393:
+ case 488:
return set[19];
case 42:
{
@@ -260,17 +261,17 @@ partial class ExpressionFinder {
case 46:
case 167:
case 188:
- case 392:
- case 427:
- case 476:
- case 479:
- case 499:
- case 562:
- case 593:
- case 645:
- case 691:
- case 720:
- case 729:
+ case 397:
+ case 432:
+ case 482:
+ case 485:
+ case 505:
+ case 568:
+ case 599:
+ case 651:
+ case 697:
+ case 726:
+ case 735:
{
BitArray a = new BitArray(239);
a.Set(38, true);
@@ -282,7 +283,7 @@ partial class ExpressionFinder {
case 49:
case 179:
case 186:
- case 394:
+ case 399:
{
BitArray a = new BitArray(239);
a.Set(22, true);
@@ -292,36 +293,36 @@ partial class ExpressionFinder {
case 51:
case 52:
case 54:
- case 390:
- case 391:
- case 412:
- case 413:
- case 419:
- case 420:
- case 490:
- case 491:
- case 704:
- case 705:
+ case 395:
+ case 396:
+ case 417:
+ case 418:
+ case 424:
+ case 425:
+ case 496:
+ case 497:
+ case 710:
+ case 711:
return set[22];
case 53:
case 169:
case 170:
case 172:
case 181:
- case 414:
- case 421:
- case 429:
- case 438:
- case 442:
- case 486:
- case 489:
- case 493:
+ case 419:
+ case 426:
+ case 434:
+ case 443:
+ case 447:
+ case 492:
case 495:
- case 496:
- case 506:
- case 513:
- case 520:
- case 706:
+ case 499:
+ case 501:
+ case 502:
+ case 512:
+ case 519:
+ case 526:
+ case 712:
{
BitArray a = new BitArray(239);
a.Set(22, true);
@@ -345,34 +346,35 @@ partial class ExpressionFinder {
case 197:
case 215:
case 239:
- case 274:
- case 284:
+ case 276:
case 286:
- case 287:
- case 304:
- case 321:
- case 326:
- case 335:
- case 341:
+ case 288:
+ case 289:
+ case 306:
+ case 323:
+ case 328:
+ case 337:
case 343:
- case 347:
- case 350:
- case 356:
- case 367:
+ case 345:
+ case 349:
+ case 352:
+ case 358:
case 369:
- case 370:
- case 376:
- case 393:
- case 395:
- case 415:
- case 439:
- case 468:
- case 484:
- case 485:
- case 487:
- case 488:
- case 549:
- case 629:
+ case 372:
+ case 374:
+ case 375:
+ case 381:
+ case 398:
+ case 400:
+ case 420:
+ case 444:
+ case 474:
+ case 490:
+ case 491:
+ case 493:
+ case 494:
+ case 555:
+ case 635:
return set[23];
case 57:
case 78:
@@ -448,7 +450,7 @@ partial class ExpressionFinder {
return a;
}
case 71:
- case 443:
+ case 448:
{
BitArray a = new BitArray(239);
a.Set(40, true);
@@ -464,10 +466,10 @@ partial class ExpressionFinder {
case 98:
case 222:
case 223:
- case 282:
- case 283:
- case 334:
- case 739:
+ case 284:
+ case 285:
+ case 336:
+ case 745:
{
BitArray a = new BitArray(239);
a.Set(20, true);
@@ -499,7 +501,7 @@ partial class ExpressionFinder {
}
case 84:
case 100:
- case 516:
+ case 522:
{
BitArray a = new BitArray(239);
a.Set(22, true);
@@ -546,14 +548,14 @@ partial class ExpressionFinder {
return a;
}
case 96:
- case 686:
+ case 692:
{
BitArray a = new BitArray(239);
a.Set(26, true);
return a;
}
case 103:
- case 353:
+ case 355:
{
BitArray a = new BitArray(239);
a.Set(231, true);
@@ -578,7 +580,7 @@ partial class ExpressionFinder {
return a;
}
case 107:
- case 299:
+ case 301:
{
BitArray a = new BitArray(239);
a.Set(218, true);
@@ -603,7 +605,8 @@ partial class ExpressionFinder {
return a;
}
case 111:
- case 456:
+ case 457:
+ case 462:
{
BitArray a = new BitArray(239);
a.Set(210, true);
@@ -628,15 +631,15 @@ partial class ExpressionFinder {
return a;
}
case 115:
- case 359:
+ case 361:
{
BitArray a = new BitArray(239);
a.Set(197, true);
return a;
}
case 116:
- case 601:
- case 620:
+ case 607:
+ case 626:
{
BitArray a = new BitArray(239);
a.Set(186, true);
@@ -661,9 +664,9 @@ partial class ExpressionFinder {
return a;
}
case 120:
- case 316:
- case 323:
- case 338:
+ case 318:
+ case 325:
+ case 340:
{
BitArray a = new BitArray(239);
a.Set(163, true);
@@ -705,7 +708,8 @@ partial class ExpressionFinder {
return a;
}
case 127:
- case 258:
+ case 254:
+ case 260:
{
BitArray a = new BitArray(239);
a.Set(127, true);
@@ -757,7 +761,7 @@ partial class ExpressionFinder {
return a;
}
case 135:
- case 638:
+ case 644:
{
BitArray a = new BitArray(239);
a.Set(98, true);
@@ -836,21 +840,22 @@ partial class ExpressionFinder {
return set[32];
case 161:
case 162:
- case 480:
- case 481:
+ case 486:
+ case 487:
return set[33];
case 164:
return set[34];
case 173:
case 174:
- case 319:
- case 328:
+ case 321:
+ case 330:
return set[35];
case 175:
- case 458:
+ case 253:
+ case 464:
return set[36];
case 176:
- case 375:
+ case 380:
{
BitArray a = new BitArray(239);
a.Set(135, true);
@@ -859,14 +864,14 @@ partial class ExpressionFinder {
case 177:
case 184:
case 189:
- case 253:
- case 424:
- case 452:
- case 474:
- case 477:
- case 590:
- case 591:
- case 643:
+ case 255:
+ case 429:
+ case 458:
+ case 480:
+ case 483:
+ case 596:
+ case 597:
+ case 649:
{
BitArray a = new BitArray(239);
a.Set(37, true);
@@ -909,7 +914,7 @@ partial class ExpressionFinder {
}
case 202:
case 204:
- case 320:
+ case 322:
{
BitArray a = new BitArray(239);
a.Set(138, true);
@@ -926,8 +931,8 @@ partial class ExpressionFinder {
case 234:
case 242:
case 246:
- case 269:
- case 273:
+ case 271:
+ case 275:
return set[40];
case 210:
{
@@ -939,10 +944,10 @@ partial class ExpressionFinder {
case 216:
return set[41];
case 219:
- case 278:
+ case 280:
return set[42];
case 220:
- case 279:
+ case 281:
return set[43];
case 225:
{
@@ -972,43 +977,43 @@ partial class ExpressionFinder {
case 245:
return set[45];
case 252:
- case 553:
- case 664:
- case 675:
- case 683:
+ case 559:
+ case 670:
+ case 681:
+ case 689:
{
BitArray a = new BitArray(239);
a.Set(127, true);
a.Set(210, true);
return a;
}
- case 254:
- case 255:
+ case 256:
+ case 257:
return set[46];
- case 261:
- case 262:
- return set[47];
case 263:
+ case 264:
+ return set[47];
+ case 265:
return set[48];
- case 266:
- return set[49];
- case 267:
case 268:
- case 381:
- return set[50];
+ return set[49];
+ case 269:
case 270:
- case 275:
- case 365:
- case 656:
- case 657:
- case 659:
- case 694:
- case 711:
- case 712:
- case 714:
- case 723:
- case 724:
- case 726:
+ case 386:
+ return set[50];
+ case 272:
+ case 277:
+ case 366:
+ case 662:
+ case 663:
+ case 665:
+ case 700:
+ case 717:
+ case 718:
+ case 720:
+ case 729:
+ case 730:
+ case 732:
{
BitArray a = new BitArray(239);
a.Set(1, true);
@@ -1016,32 +1021,32 @@ partial class ExpressionFinder {
a.Set(22, true);
return a;
}
- case 272:
+ case 274:
{
BitArray a = new BitArray(239);
a.Set(226, true);
return a;
}
- case 280:
- case 281:
+ case 282:
+ case 283:
return set[51];
- case 285:
+ case 287:
+ case 329:
+ case 344:
+ case 409:
+ return set[52];
+ case 290:
+ case 291:
+ case 311:
+ case 312:
+ case 326:
case 327:
+ case 341:
case 342:
- case 404:
- return set[52];
- case 288:
- case 289:
- case 309:
- case 310:
- case 324:
- case 325:
- case 339:
- case 340:
return set[53];
- case 290:
- case 382:
- case 385:
+ case 292:
+ case 387:
+ case 390:
{
BitArray a = new BitArray(239);
a.Set(1, true);
@@ -1049,7 +1054,7 @@ partial class ExpressionFinder {
a.Set(111, true);
return a;
}
- case 291:
+ case 293:
{
BitArray a = new BitArray(239);
a.Set(108, true);
@@ -1057,18 +1062,18 @@ partial class ExpressionFinder {
a.Set(231, true);
return a;
}
- case 292:
+ case 294:
return set[54];
- case 293:
- case 312:
+ case 295:
+ case 314:
return set[55];
- case 294:
+ case 296:
{
BitArray a = new BitArray(239);
a.Set(5, true);
return a;
}
- case 297:
+ case 299:
{
BitArray a = new BitArray(239);
a.Set(75, true);
@@ -1076,11 +1081,11 @@ partial class ExpressionFinder {
a.Set(123, true);
return a;
}
- case 301:
- case 302:
- return set[56];
case 303:
- case 308:
+ case 304:
+ return set[56];
+ case 305:
+ case 310:
{
BitArray a = new BitArray(239);
a.Set(1, true);
@@ -1088,36 +1093,36 @@ partial class ExpressionFinder {
a.Set(229, true);
return a;
}
- case 305:
- case 306:
+ case 307:
+ case 308:
return set[57];
- case 311:
- return set[58];
case 313:
+ return set[58];
+ case 315:
{
BitArray a = new BitArray(239);
a.Set(118, true);
return a;
}
- case 314:
- case 315:
- return set[59];
+ case 316:
case 317:
- case 318:
+ return set[59];
+ case 319:
+ case 320:
return set[60];
- case 329:
- case 330:
- return set[61];
case 331:
- return set[62];
+ case 332:
+ return set[61];
case 333:
+ return set[62];
+ case 335:
{
BitArray a = new BitArray(239);
a.Set(20, true);
a.Set(138, true);
return a;
}
- case 336:
+ case 338:
{
BitArray a = new BitArray(239);
a.Set(1, true);
@@ -1125,38 +1130,40 @@ partial class ExpressionFinder {
a.Set(205, true);
return a;
}
- case 344:
+ case 346:
return set[63];
- case 345:
- case 349:
+ case 347:
+ case 351:
{
BitArray a = new BitArray(239);
a.Set(152, true);
return a;
}
- case 346:
+ case 348:
return set[64];
- case 354:
- case 355:
+ case 356:
+ case 357:
return set[65];
- case 358:
+ case 360:
{
BitArray a = new BitArray(239);
a.Set(74, true);
a.Set(113, true);
return a;
}
- case 360:
- case 361:
- return set[66];
+ case 362:
case 363:
- case 364:
- return set[67];
- case 366:
+ return set[66];
+ case 367:
case 368:
+ return set[67];
+ case 370:
return set[68];
case 371:
- case 377:
+ case 373:
+ return set[69];
+ case 376:
+ case 382:
{
BitArray a = new BitArray(239);
a.Set(1, true);
@@ -1164,7 +1171,7 @@ partial class ExpressionFinder {
a.Set(214, true);
return a;
}
- case 374:
+ case 379:
{
BitArray a = new BitArray(239);
a.Set(111, true);
@@ -1172,7 +1179,7 @@ partial class ExpressionFinder {
a.Set(113, true);
return a;
}
- case 378:
+ case 383:
{
BitArray a = new BitArray(239);
a.Set(1, true);
@@ -1180,63 +1187,63 @@ partial class ExpressionFinder {
a.Set(135, true);
return a;
}
- case 379:
- case 380:
- case 453:
- case 454:
- return set[69];
- case 383:
case 384:
- case 386:
- case 387:
+ case 385:
+ case 459:
+ case 460:
return set[70];
+ case 388:
case 389:
+ case 391:
+ case 392:
return set[71];
- case 398:
+ case 394:
+ return set[72];
+ case 403:
{
BitArray a = new BitArray(239);
a.Set(211, true);
a.Set(233, true);
return a;
}
- case 400:
- case 401:
+ case 405:
case 406:
- case 407:
- return set[72];
- case 402:
- case 408:
- return set[73];
- case 403:
case 411:
- case 418:
+ case 412:
+ return set[73];
+ case 407:
+ case 413:
return set[74];
- case 409:
- case 410:
+ case 408:
case 416:
- case 417:
- case 701:
- case 702:
+ case 423:
return set[75];
- case 425:
- case 426:
+ case 414:
+ case 415:
+ case 421:
+ case 422:
+ case 707:
+ case 708:
return set[76];
- case 428:
case 430:
case 431:
- case 592:
- case 644:
return set[77];
- case 432:
case 433:
- return set[78];
- case 434:
case 435:
- return set[79];
case 436:
- return set[80];
+ case 598:
+ case 650:
+ return set[78];
case 437:
+ case 438:
+ return set[79];
+ case 439:
+ case 440:
+ return set[80];
case 441:
+ return set[81];
+ case 442:
+ case 446:
{
BitArray a = new BitArray(239);
a.Set(20, true);
@@ -1244,87 +1251,87 @@ partial class ExpressionFinder {
a.Set(38, true);
return a;
}
- case 444:
- case 445:
case 449:
- return set[81];
- case 446:
+ case 450:
+ case 454:
+ return set[82];
+ case 451:
{
BitArray a = new BitArray(239);
a.Set(22, true);
a.Set(39, true);
return a;
}
- case 447:
- case 448:
- return set[82];
- case 450:
+ case 452:
+ case 453:
+ return set[83];
+ case 455:
{
BitArray a = new BitArray(239);
a.Set(21, true);
return a;
}
- case 457:
- return set[83];
- case 459:
- case 472:
+ case 463:
return set[84];
- case 460:
- case 473:
+ case 465:
+ case 478:
return set[85];
- case 461:
- case 462:
+ case 466:
+ case 479:
+ return set[86];
+ case 467:
+ case 468:
{
BitArray a = new BitArray(239);
a.Set(10, true);
return a;
}
- case 467:
+ case 473:
{
BitArray a = new BitArray(239);
a.Set(12, true);
return a;
}
- case 469:
+ case 475:
{
BitArray a = new BitArray(239);
a.Set(13, true);
return a;
}
- case 470:
- return set[86];
- case 471:
+ case 476:
return set[87];
- case 483:
+ case 477:
return set[88];
- case 492:
- case 494:
+ case 489:
return set[89];
- case 497:
case 498:
- case 560:
- case 561:
- case 689:
- case 690:
- return set[90];
case 500:
- case 501:
- case 502:
+ return set[90];
+ case 503:
+ case 504:
+ case 566:
+ case 567:
+ case 695:
+ case 696:
+ return set[91];
+ case 506:
case 507:
case 508:
- case 563:
- case 692:
- case 719:
- case 728:
- return set[91];
- case 503:
- case 509:
- case 518:
+ case 513:
+ case 514:
+ case 569:
+ case 698:
+ case 725:
+ case 734:
return set[92];
- case 504:
- case 505:
+ case 509:
+ case 515:
+ case 524:
+ return set[93];
case 510:
case 511:
+ case 516:
+ case 517:
{
BitArray a = new BitArray(239);
a.Set(22, true);
@@ -1332,18 +1339,18 @@ partial class ExpressionFinder {
a.Set(63, true);
return a;
}
- case 512:
- case 514:
- case 519:
- return set[93];
- case 515:
- case 517:
+ case 518:
+ case 520:
+ case 525:
return set[94];
- case 524:
- case 537:
- case 538:
- case 594:
- case 671:
+ case 521:
+ case 523:
+ return set[95];
+ case 530:
+ case 543:
+ case 544:
+ case 600:
+ case 677:
{
BitArray a = new BitArray(239);
a.Set(1, true);
@@ -1351,28 +1358,28 @@ partial class ExpressionFinder {
a.Set(63, true);
return a;
}
- case 525:
- case 526:
- case 598:
- case 599:
- return set[95];
- case 534:
- case 535:
- case 542:
+ case 531:
+ case 532:
+ case 604:
+ case 605:
+ return set[96];
+ case 540:
+ case 541:
+ case 548:
{
BitArray a = new BitArray(239);
a.Set(115, true);
return a;
}
- case 540:
- case 541:
- return set[96];
- case 545:
case 546:
- return set[97];
case 547:
- case 548:
- case 607:
+ return set[97];
+ case 551:
+ case 552:
+ return set[98];
+ case 553:
+ case 554:
+ case 613:
{
BitArray a = new BitArray(239);
a.Set(1, true);
@@ -1380,15 +1387,15 @@ partial class ExpressionFinder {
a.Set(21, true);
return a;
}
- case 552:
+ case 558:
{
BitArray a = new BitArray(239);
a.Set(103, true);
return a;
}
- case 564:
- case 565:
- case 577:
+ case 570:
+ case 571:
+ case 583:
{
BitArray a = new BitArray(239);
a.Set(84, true);
@@ -1396,84 +1403,84 @@ partial class ExpressionFinder {
a.Set(209, true);
return a;
}
- case 570:
- case 571:
- return set[98];
- case 572:
- case 573:
+ case 576:
+ case 577:
return set[99];
- case 574:
- case 575:
- case 586:
+ case 578:
+ case 579:
return set[100];
case 580:
case 581:
+ case 592:
return set[101];
- case 582:
- case 583:
- case 708:
+ case 586:
+ case 587:
return set[102];
- case 584:
+ case 588:
+ case 589:
+ case 714:
return set[103];
- case 585:
+ case 590:
return set[104];
- case 587:
- case 597:
+ case 591:
+ return set[105];
+ case 593:
+ case 603:
{
BitArray a = new BitArray(239);
a.Set(172, true);
return a;
}
- case 603:
- case 604:
- return set[105];
- case 605:
- return set[106];
- case 606:
- case 637:
- return set[107];
case 609:
case 610:
+ return set[106];
case 611:
- case 628:
- return set[108];
+ return set[107];
case 612:
+ case 643:
+ return set[108];
+ case 615:
case 616:
- case 626:
+ case 617:
+ case 634:
+ return set[109];
+ case 618:
+ case 622:
+ case 632:
{
BitArray a = new BitArray(239);
a.Set(128, true);
a.Set(198, true);
return a;
}
- case 618:
- return set[109];
- case 621:
+ case 624:
return set[110];
- case 622:
+ case 627:
return set[111];
- case 631:
- case 632:
- case 634:
- case 700:
- case 703:
+ case 628:
return set[112];
- case 635:
- case 636:
+ case 637:
+ case 638:
+ case 640:
+ case 706:
+ case 709:
return set[113];
- case 639:
case 641:
- case 650:
+ case 642:
+ return set[114];
+ case 645:
+ case 647:
+ case 656:
{
BitArray a = new BitArray(239);
a.Set(119, true);
return a;
}
- case 640:
- return set[114];
- case 642:
+ case 646:
return set[115];
case 648:
+ return set[116];
+ case 654:
{
BitArray a = new BitArray(239);
a.Set(56, true);
@@ -1481,11 +1488,11 @@ partial class ExpressionFinder {
a.Set(193, true);
return a;
}
- case 652:
- case 653:
- return set[116];
- case 654:
- case 661:
+ case 658:
+ case 659:
+ return set[117];
+ case 660:
+ case 667:
{
BitArray a = new BitArray(239);
a.Set(1, true);
@@ -1493,111 +1500,111 @@ partial class ExpressionFinder {
a.Set(136, true);
return a;
}
- case 662:
+ case 668:
{
BitArray a = new BitArray(239);
a.Set(101, true);
return a;
}
- case 663:
- return set[117];
- case 666:
- case 667:
+ case 669:
+ return set[118];
+ case 672:
+ case 673:
{
BitArray a = new BitArray(239);
a.Set(149, true);
return a;
}
- case 668:
case 674:
- case 740:
+ case 680:
+ case 746:
{
BitArray a = new BitArray(239);
a.Set(3, true);
return a;
}
- case 669:
- return set[118];
- case 678:
- case 679:
+ case 675:
return set[119];
- case 680:
- case 688:
- return set[120];
case 684:
+ case 685:
+ return set[120];
+ case 686:
+ case 694:
return set[121];
- case 693:
- case 695:
+ case 690:
return set[122];
- case 696:
- case 707:
+ case 699:
+ case 701:
return set[123];
- case 697:
- case 698:
+ case 702:
+ case 713:
return set[124];
- case 699:
+ case 703:
+ case 704:
return set[125];
- case 709:
+ case 705:
+ return set[126];
+ case 715:
{
BitArray a = new BitArray(239);
a.Set(136, true);
return a;
}
- case 715:
+ case 721:
{
BitArray a = new BitArray(239);
a.Set(140, true);
return a;
}
- case 718:
- case 727:
+ case 724:
+ case 733:
{
BitArray a = new BitArray(239);
a.Set(169, true);
return a;
}
- case 732:
- return set[126];
- case 733:
+ case 738:
+ return set[127];
+ case 739:
{
BitArray a = new BitArray(239);
a.Set(160, true);
return a;
}
- case 734:
+ case 740:
{
BitArray a = new BitArray(239);
a.Set(137, true);
return a;
}
- case 735:
- case 736:
- return set[127];
case 741:
+ case 742:
+ return set[128];
+ case 747:
{
BitArray a = new BitArray(239);
a.Set(11, true);
return a;
}
- case 742:
- return set[128];
- case 744:
+ case 748:
+ return set[129];
+ case 750:
{
BitArray a = new BitArray(239);
a.Set(173, true);
return a;
}
- case 745:
- return set[129];
- case 746:
+ case 751:
+ return set[130];
+ case 752:
{
BitArray a = new BitArray(239);
a.Set(67, true);
a.Set(213, true);
return a;
}
- case 747:
- return set[130];
+ case 753:
+ return set[131];
default: throw new InvalidOperationException();
}
}
@@ -1611,11 +1618,13 @@ partial class ExpressionFinder {
bool wasQualifierTokenAtStart = false;
bool nextTokenIsPotentialStartOfExpression = false;
bool readXmlIdentifier = false;
+ bool xmlAllowed = true;
bool identifierExpected = false;
bool nextTokenIsStartOfImportsOrAccessExpression = false;
bool isMissingModifier = false;
bool isAlreadyInExpr = false;
bool wasNormalAttribute = false;
+ int lambdaNestingDepth = 0;
int activeArgument = 0;
List errors = new List();
@@ -1653,7 +1662,7 @@ partial class ExpressionFinder {
if (la == null) { currentState = 1; break; }
if (la.kind == 173) {
stateStack.Push(1);
- goto case 744;
+ goto case 750;
} else {
goto case 2;
}
@@ -1662,7 +1671,7 @@ partial class ExpressionFinder {
if (la == null) { currentState = 2; break; }
if (la.kind == 137) {
stateStack.Push(2);
- goto case 734;
+ goto case 740;
} else {
goto case 3;
}
@@ -1671,7 +1680,7 @@ partial class ExpressionFinder {
if (la == null) { currentState = 3; break; }
if (la.kind == 40) {
stateStack.Push(3);
- goto case 443;
+ goto case 448;
} else {
goto case 4;
}
@@ -1690,7 +1699,7 @@ partial class ExpressionFinder {
case 5: {
if (la == null) { currentState = 5; break; }
if (la.kind == 160) {
- currentState = 730;
+ currentState = 736;
break;
} else {
if (set[4].Get(la.kind)) {
@@ -1709,26 +1718,26 @@ partial class ExpressionFinder {
if (la == null) { currentState = 7; break; }
if (la.kind == 40) {
stateStack.Push(7);
- goto case 443;
+ goto case 448;
} else {
goto case 8;
}
}
case 8: {
if (la == null) { currentState = 8; break; }
- if (set[131].Get(la.kind)) {
+ if (set[132].Get(la.kind)) {
currentState = 8;
break;
} else {
if (la.kind == 84 || la.kind == 155 || la.kind == 209) {
- goto case 564;
+ goto case 570;
} else {
if (la.kind == 103) {
- currentState = 553;
+ currentState = 559;
break;
} else {
if (la.kind == 115) {
- goto case 534;
+ goto case 540;
} else {
if (la.kind == 142) {
goto case 9;
@@ -1763,7 +1772,7 @@ partial class ExpressionFinder {
case 13: {
if (la == null) { currentState = 13; break; }
if (la.kind == 37) {
- currentState = 727;
+ currentState = 733;
break;
} else {
goto case 14;
@@ -1780,7 +1789,7 @@ partial class ExpressionFinder {
case 16: {
if (la == null) { currentState = 16; break; }
if (la.kind == 140) {
- currentState = 722;
+ currentState = 728;
break;
} else {
goto case 17;
@@ -1850,7 +1859,7 @@ partial class ExpressionFinder {
if (la == null) { currentState = 27; break; }
if (la.kind == 40) {
stateStack.Push(26);
- goto case 443;
+ goto case 448;
} else {
isMissingModifier = true;
goto case 28;
@@ -1858,8 +1867,8 @@ partial class ExpressionFinder {
}
case 28: {
if (la == null) { currentState = 28; break; }
- if (set[132].Get(la.kind)) {
- currentState = 721;
+ if (set[133].Get(la.kind)) {
+ currentState = 727;
break;
} else {
isMissingModifier = false;
@@ -1870,15 +1879,15 @@ partial class ExpressionFinder {
if (la == null) { currentState = 29; break; }
if (la.kind == 84 || la.kind == 155 || la.kind == 209) {
stateStack.Push(17);
- goto case 564;
+ goto case 570;
} else {
if (la.kind == 103) {
stateStack.Push(17);
- goto case 552;
+ goto case 558;
} else {
if (la.kind == 115) {
stateStack.Push(17);
- goto case 534;
+ goto case 540;
} else {
if (la.kind == 142) {
stateStack.Push(17);
@@ -1899,11 +1908,11 @@ partial class ExpressionFinder {
case 30: {
if (la == null) { currentState = 30; break; }
if (la.kind == 119) {
- currentState = 528;
+ currentState = 534;
break;
} else {
if (la.kind == 186) {
- currentState = 521;
+ currentState = 527;
break;
} else {
if (la.kind == 127 || la.kind == 210) {
@@ -1932,7 +1941,7 @@ partial class ExpressionFinder {
case 34: {
if (la == null) { currentState = 34; break; }
if (la.kind == 37) {
- currentState = 497;
+ currentState = 503;
break;
} else {
if (la.kind == 63) {
@@ -1962,7 +1971,7 @@ partial class ExpressionFinder {
currentState = 38;
break;
} else {
- if (set[133].Get(la.kind)) {
+ if (set[134].Get(la.kind)) {
currentState = 38;
break;
} else {
@@ -2031,7 +2040,7 @@ partial class ExpressionFinder {
case 44: {
if (la == null) { currentState = 44; break; }
if (la.kind == 169) {
- currentState = 492;
+ currentState = 498;
break;
} else {
if (set[22].Get(la.kind)) {
@@ -2065,7 +2074,7 @@ partial class ExpressionFinder {
if (la == null) { currentState = 48; break; }
if (set[23].Get(la.kind)) {
activeArgument = 0;
- goto case 488;
+ goto case 494;
} else {
if (la.kind == 22) {
activeArgument = 0;
@@ -2385,7 +2394,7 @@ partial class ExpressionFinder {
}
case 77: {
if (la == null) { currentState = 77; break; }
- if (set[134].Get(la.kind)) {
+ if (set[135].Get(la.kind)) {
currentState = 76;
break;
} else {
@@ -3748,7 +3757,7 @@ partial class ExpressionFinder {
currentState = 165;
break;
} else {
- if (set[135].Get(la.kind)) {
+ if (set[136].Get(la.kind)) {
currentState = 161;
break;
} else {
@@ -3845,42 +3854,43 @@ partial class ExpressionFinder {
}
case 174: {
if (la == null) { currentState = 174; break; }
- if (set[136].Get(la.kind)) {
+ if (set[137].Get(la.kind)) {
currentState = 175;
break;
} else {
if (la.kind == 37) {
- currentState = 484;
+ currentState = 490;
break;
} else {
- if (set[137].Get(la.kind)) {
+ if (set[138].Get(la.kind)) {
currentState = 175;
break;
} else {
- if (set[133].Get(la.kind)) {
+ if (set[134].Get(la.kind)) {
currentState = 175;
break;
} else {
- if (set[135].Get(la.kind)) {
- currentState = 480;
+ if (set[136].Get(la.kind)) {
+ currentState = 486;
break;
} else {
if (la.kind == 129) {
- currentState = 477;
+ currentState = 483;
break;
} else {
if (la.kind == 237) {
- currentState = 474;
+ currentState = 480;
break;
} else {
- if (set[83].Get(la.kind)) {
+ if (set[84].Get(la.kind)) {
stateStack.Push(175);
nextTokenIsPotentialStartOfExpression = true;
PushContext(Context.Xml, la, t);
- goto case 457;
+ goto case 463;
} else {
if (la.kind == 127 || la.kind == 210) {
stateStack.Push(175);
+ lambdaNestingDepth++;
goto case 252;
} else {
if (la.kind == 58 || la.kind == 126) {
@@ -3957,7 +3967,7 @@ partial class ExpressionFinder {
}
case 183: {
if (la == null) { currentState = 183; break; }
- if (set[138].Get(la.kind)) {
+ if (set[139].Get(la.kind)) {
currentState = 189;
break;
} else {
@@ -4149,7 +4159,7 @@ partial class ExpressionFinder {
}
case 205: {
if (la == null) { currentState = 205; break; }
- if (set[123].Get(la.kind)) {
+ if (set[124].Get(la.kind)) {
currentState = stateStack.Pop();
break;
} else {
@@ -4506,105 +4516,117 @@ partial class ExpressionFinder {
case 252: {
if (la == null) { currentState = 252; break; }
if (la.kind == 210) {
- currentState = 452;
- break;
+ stateStack.Push(253);
+ goto case 457;
} else {
if (la.kind == 127) {
- currentState = 253;
- break;
+ stateStack.Push(253);
+ goto case 254;
} else {
- goto case 6;
+ Error(la);
+ goto case 253;
}
}
}
case 253: {
- stateStack.Push(254);
- goto case 424;
+ lambdaNestingDepth--;
+ currentState = stateStack.Pop();
+ goto switchlbl;
}
case 254: {
+ if (la == null) { currentState = 254; break; }
+ Expect(127, la); // "Function"
+ currentState = 255;
+ break;
+ }
+ case 255: {
+ stateStack.Push(256);
+ goto case 429;
+ }
+ case 256: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 255;
+ goto case 257;
}
- case 255: {
- if (la == null) { currentState = 255; break; }
+ case 257: {
+ if (la == null) { currentState = 257; break; }
if (set[23].Get(la.kind)) {
goto case 55;
} else {
if (la.kind == 1 || la.kind == 21 || la.kind == 63) {
if (la.kind == 63) {
- currentState = 422;
+ currentState = 427;
break;
} else {
- goto case 256;
+ goto case 258;
}
} else {
goto case 6;
}
}
}
- case 256: {
- stateStack.Push(257);
- goto case 259;
+ case 258: {
+ stateStack.Push(259);
+ goto case 261;
}
- case 257: {
- if (la == null) { currentState = 257; break; }
+ case 259: {
+ if (la == null) { currentState = 259; break; }
Expect(113, la); // "End"
- currentState = 258;
+ currentState = 260;
break;
}
- case 258: {
- if (la == null) { currentState = 258; break; }
+ case 260: {
+ if (la == null) { currentState = 260; break; }
Expect(127, la); // "Function"
currentState = stateStack.Pop();
break;
}
- case 259: {
+ case 261: {
PushContext(Context.Body, la, t);
- goto case 260;
+ goto case 262;
}
- case 260: {
- stateStack.Push(261);
+ case 262: {
+ stateStack.Push(263);
goto case 23;
}
- case 261: {
+ case 263: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 262;
+ goto case 264;
}
- case 262: {
- if (la == null) { currentState = 262; break; }
- if (set[139].Get(la.kind)) {
- if (set[69].Get(la.kind)) {
+ case 264: {
+ if (la == null) { currentState = 264; break; }
+ if (set[140].Get(la.kind)) {
+ if (set[70].Get(la.kind)) {
if (set[50].Get(la.kind)) {
- stateStack.Push(260);
- goto case 267;
+ stateStack.Push(262);
+ goto case 269;
} else {
- goto case 260;
+ goto case 262;
}
} else {
if (la.kind == 113) {
- currentState = 265;
+ currentState = 267;
break;
} else {
- goto case 264;
+ goto case 266;
}
}
} else {
- goto case 263;
+ goto case 265;
}
}
- case 263: {
+ case 265: {
PopContext();
currentState = stateStack.Pop();
goto switchlbl;
}
- case 264: {
+ case 266: {
Error(la);
- goto case 261;
+ goto case 263;
}
- case 265: {
- if (la == null) { currentState = 265; break; }
+ case 267: {
+ if (la == null) { currentState = 267; break; }
if (la.kind == 1 || la.kind == 21) {
- goto case 260;
+ goto case 262;
} else {
if (set[49].Get(la.kind)) {
currentState = endOfStatementTerminatorAndBlock; /* leave this block */
@@ -4613,68 +4635,68 @@ partial class ExpressionFinder {
goto switchlbl;
} else {
- goto case 264;
+ goto case 266;
}
}
}
- case 266: {
- if (la == null) { currentState = 266; break; }
- currentState = 261;
+ case 268: {
+ if (la == null) { currentState = 268; break; }
+ currentState = 263;
break;
}
- case 267: {
+ case 269: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 268;
+ goto case 270;
}
- case 268: {
- if (la == null) { currentState = 268; break; }
+ case 270: {
+ if (la == null) { currentState = 270; break; }
if (la.kind == 88 || la.kind == 105 || la.kind == 204) {
- currentState = 399;
+ currentState = 404;
break;
} else {
if (la.kind == 211 || la.kind == 233) {
- currentState = 395;
+ currentState = 400;
break;
} else {
if (la.kind == 56 || la.kind == 193) {
- currentState = 393;
+ currentState = 398;
break;
} else {
if (la.kind == 189) {
- currentState = 388;
+ currentState = 393;
break;
} else {
if (la.kind == 135) {
- currentState = 370;
+ currentState = 375;
break;
} else {
if (la.kind == 197) {
- currentState = 354;
+ currentState = 356;
break;
} else {
if (la.kind == 231) {
- currentState = 350;
+ currentState = 352;
break;
} else {
if (la.kind == 108) {
- currentState = 344;
+ currentState = 346;
break;
} else {
if (la.kind == 124) {
- currentState = 317;
+ currentState = 319;
break;
} else {
if (la.kind == 118 || la.kind == 171 || la.kind == 194) {
if (la.kind == 118 || la.kind == 171) {
if (la.kind == 171) {
- currentState = 313;
+ currentState = 315;
break;
} else {
- goto case 313;
+ goto case 315;
}
} else {
if (la.kind == 194) {
- currentState = 311;
+ currentState = 313;
break;
} else {
goto case 6;
@@ -4682,31 +4704,31 @@ partial class ExpressionFinder {
}
} else {
if (la.kind == 215) {
- currentState = 309;
+ currentState = 311;
break;
} else {
if (la.kind == 218) {
- currentState = 296;
+ currentState = 298;
break;
} else {
- if (set[140].Get(la.kind)) {
+ if (set[141].Get(la.kind)) {
if (la.kind == 132) {
- currentState = 293;
+ currentState = 295;
break;
} else {
if (la.kind == 120) {
- currentState = 292;
+ currentState = 294;
break;
} else {
if (la.kind == 89) {
- currentState = 291;
+ currentState = 293;
break;
} else {
if (la.kind == 206) {
goto case 113;
} else {
if (la.kind == 195) {
- currentState = 288;
+ currentState = 290;
break;
} else {
goto case 6;
@@ -4717,18 +4739,18 @@ partial class ExpressionFinder {
}
} else {
if (la.kind == 191) {
- currentState = 286;
+ currentState = 288;
break;
} else {
if (la.kind == 117) {
- currentState = 284;
+ currentState = 286;
break;
} else {
if (la.kind == 226) {
- currentState = 269;
+ currentState = 271;
break;
} else {
- if (set[141].Get(la.kind)) {
+ if (set[142].Get(la.kind)) {
if (la.kind == 73) {
currentState = 55;
break;
@@ -4755,75 +4777,75 @@ partial class ExpressionFinder {
}
}
}
- case 269: {
- stateStack.Push(270);
+ case 271: {
+ stateStack.Push(272);
SetIdentifierExpected(la);
nextTokenIsPotentialStartOfExpression = true;
- goto case 273;
+ goto case 275;
}
- case 270: {
- if (la == null) { currentState = 270; break; }
+ case 272: {
+ if (la == null) { currentState = 272; break; }
if (la.kind == 22) {
- currentState = 269;
+ currentState = 271;
break;
} else {
- stateStack.Push(271);
- goto case 259;
+ stateStack.Push(273);
+ goto case 261;
}
}
- case 271: {
- if (la == null) { currentState = 271; break; }
+ case 273: {
+ if (la == null) { currentState = 273; break; }
Expect(113, la); // "End"
- currentState = 272;
+ currentState = 274;
break;
}
- case 272: {
- if (la == null) { currentState = 272; break; }
+ case 274: {
+ if (la == null) { currentState = 274; break; }
Expect(226, la); // "Using"
currentState = stateStack.Pop();
break;
}
- case 273: {
- if (la == null) { currentState = 273; break; }
+ case 275: {
+ if (la == null) { currentState = 275; break; }
if (set[6].Get(la.kind)) {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(276);
+ stateStack.Push(278);
goto case 205;
} else {
- goto case 274;
+ goto case 276;
}
}
- case 274: {
- stateStack.Push(275);
+ case 276: {
+ stateStack.Push(277);
goto case 55;
}
- case 275: {
+ case 277: {
if (!isAlreadyInExpr) PopContext(); isAlreadyInExpr = false;
currentState = stateStack.Pop();
goto switchlbl;
}
- case 276: {
+ case 278: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 277;
+ goto case 279;
}
- case 277: {
- if (la == null) { currentState = 277; break; }
+ case 279: {
+ if (la == null) { currentState = 279; break; }
if (set[42].Get(la.kind)) {
PopContext(); isAlreadyInExpr = true;
- goto case 278;
+ goto case 280;
} else {
- goto case 274;
+ goto case 276;
}
}
- case 278: {
- if (la == null) { currentState = 278; break; }
+ case 280: {
+ if (la == null) { currentState = 280; break; }
if (la.kind == 63) {
- currentState = 280;
+ currentState = 282;
break;
} else {
if (la.kind == 20) {
- currentState = 274;
+ currentState = 276;
break;
} else {
if (set[43].Get(la.kind)) {
@@ -4834,60 +4856,60 @@ partial class ExpressionFinder {
} else {
Error(la);
- goto case 274;
+ goto case 276;
}
}
}
}
- case 279: {
- if (la == null) { currentState = 279; break; }
- currentState = 274;
+ case 281: {
+ if (la == null) { currentState = 281; break; }
+ currentState = 276;
break;
}
- case 280: {
+ case 282: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 281;
+ goto case 283;
}
- case 281: {
- if (la == null) { currentState = 281; break; }
+ case 283: {
+ if (la == null) { currentState = 283; break; }
if (set[16].Get(la.kind)) {
PushContext(Context.Type, la, t);
- stateStack.Push(282);
+ stateStack.Push(284);
goto case 37;
} else {
- goto case 274;
+ goto case 276;
}
}
- case 282: {
+ case 284: {
PopContext();
- goto case 283;
+ goto case 285;
}
- case 283: {
- if (la == null) { currentState = 283; break; }
+ case 285: {
+ if (la == null) { currentState = 285; break; }
Expect(20, la); // "="
- currentState = 274;
+ currentState = 276;
break;
}
- case 284: {
- stateStack.Push(285);
+ case 286: {
+ stateStack.Push(287);
goto case 55;
}
- case 285: {
- if (la == null) { currentState = 285; break; }
+ case 287: {
+ if (la == null) { currentState = 287; break; }
if (la.kind == 22) {
- currentState = 284;
+ currentState = 286;
break;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
- case 286: {
+ case 288: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 287;
+ goto case 289;
}
- case 287: {
- if (la == null) { currentState = 287; break; }
+ case 289: {
+ if (la == null) { currentState = 289; break; }
if (la.kind == 184) {
currentState = 55;
break;
@@ -4895,27 +4917,27 @@ partial class ExpressionFinder {
goto case 55;
}
}
- case 288: {
+ case 290: {
PushContext(Context.Expression, la, t);
nextTokenIsPotentialStartOfExpression = true;
- goto case 289;
+ goto case 291;
}
- case 289: {
- if (la == null) { currentState = 289; break; }
+ case 291: {
+ if (la == null) { currentState = 291; break; }
if (set[23].Get(la.kind)) {
- stateStack.Push(290);
+ stateStack.Push(292);
goto case 55;
} else {
- goto case 290;
+ goto case 292;
}
}
- case 290: {
+ case 292: {
PopContext();
currentState = stateStack.Pop();
goto switchlbl;
}
- case 291: {
- if (la == null) { currentState = 291; break; }
+ case 293: {
+ if (la == null) { currentState = 293; break; }
if (la.kind == 108) {
goto case 132;
} else {
@@ -4930,8 +4952,8 @@ partial class ExpressionFinder {
}
}
}
- case 292: {
- if (la == null) { currentState = 292; break; }
+ case 294: {
+ if (la == null) { currentState = 294; break; }
if (la.kind == 108) {
goto case 132;
} else {
@@ -4966,118 +4988,118 @@ partial class ExpressionFinder {
}
}
}
- case 293: {
- if (la == null) { currentState = 293; break; }
+ case 295: {
+ if (la == null) { currentState = 295; break; }
if (set[6].Get(la.kind)) {
- goto case 295;
+ goto case 297;
} else {
if (la.kind == 5) {
- goto case 294;
+ goto case 296;
} else {
goto case 6;
}
}
}
- case 294: {
- if (la == null) { currentState = 294; break; }
+ case 296: {
+ if (la == null) { currentState = 296; break; }
currentState = stateStack.Pop();
break;
}
- case 295: {
- if (la == null) { currentState = 295; break; }
+ case 297: {
+ if (la == null) { currentState = 297; break; }
currentState = stateStack.Pop();
break;
}
- case 296: {
- stateStack.Push(297);
- goto case 259;
+ case 298: {
+ stateStack.Push(299);
+ goto case 261;
}
- case 297: {
- if (la == null) { currentState = 297; break; }
+ case 299: {
+ if (la == null) { currentState = 299; break; }
if (la.kind == 75) {
- currentState = 301;
+ currentState = 303;
break;
} else {
if (la.kind == 123) {
- currentState = 300;
+ currentState = 302;
break;
} else {
- goto case 298;
+ goto case 300;
}
}
}
- case 298: {
- if (la == null) { currentState = 298; break; }
+ case 300: {
+ if (la == null) { currentState = 300; break; }
Expect(113, la); // "End"
- currentState = 299;
+ currentState = 301;
break;
}
- case 299: {
- if (la == null) { currentState = 299; break; }
+ case 301: {
+ if (la == null) { currentState = 301; break; }
Expect(218, la); // "Try"
currentState = stateStack.Pop();
break;
}
- case 300: {
- stateStack.Push(298);
- goto case 259;
+ case 302: {
+ stateStack.Push(300);
+ goto case 261;
}
- case 301: {
+ case 303: {
SetIdentifierExpected(la);
- goto case 302;
+ goto case 304;
}
- case 302: {
- if (la == null) { currentState = 302; break; }
+ case 304: {
+ if (la == null) { currentState = 304; break; }
if (set[6].Get(la.kind)) {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(305);
+ stateStack.Push(307);
goto case 205;
} else {
- goto case 303;
+ goto case 305;
}
}
- case 303: {
- if (la == null) { currentState = 303; break; }
+ case 305: {
+ if (la == null) { currentState = 305; break; }
if (la.kind == 229) {
- currentState = 304;
+ currentState = 306;
break;
} else {
- goto case 296;
+ goto case 298;
}
}
- case 304: {
- stateStack.Push(296);
+ case 306: {
+ stateStack.Push(298);
goto case 55;
}
- case 305: {
+ case 307: {
PopContext();
- goto case 306;
+ goto case 308;
}
- case 306: {
- if (la == null) { currentState = 306; break; }
+ case 308: {
+ if (la == null) { currentState = 308; break; }
if (la.kind == 63) {
- currentState = 307;
+ currentState = 309;
break;
} else {
- goto case 303;
+ goto case 305;
}
}
- case 307: {
+ case 309: {
PushContext(Context.Type, la, t);
- stateStack.Push(308);
+ stateStack.Push(310);
goto case 37;
}
- case 308: {
+ case 310: {
PopContext();
- goto case 303;
+ goto case 305;
}
- case 309: {
+ case 311: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 310;
+ goto case 312;
}
- case 310: {
- if (la == null) { currentState = 310; break; }
+ case 312: {
+ if (la == null) { currentState = 312; break; }
if (set[23].Get(la.kind)) {
goto case 55;
} else {
@@ -5085,47 +5107,47 @@ partial class ExpressionFinder {
goto switchlbl;
}
}
- case 311: {
- if (la == null) { currentState = 311; break; }
+ case 313: {
+ if (la == null) { currentState = 313; break; }
if (la.kind == 163) {
goto case 120;
} else {
- goto case 312;
+ goto case 314;
}
}
- case 312: {
- if (la == null) { currentState = 312; break; }
+ case 314: {
+ if (la == null) { currentState = 314; break; }
if (la.kind == 5) {
- goto case 294;
+ goto case 296;
} else {
if (set[6].Get(la.kind)) {
- goto case 295;
+ goto case 297;
} else {
goto case 6;
}
}
}
- case 313: {
- if (la == null) { currentState = 313; break; }
+ case 315: {
+ if (la == null) { currentState = 315; break; }
Expect(118, la); // "Error"
- currentState = 314;
+ currentState = 316;
break;
}
- case 314: {
+ case 316: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 315;
+ goto case 317;
}
- case 315: {
- if (la == null) { currentState = 315; break; }
+ case 317: {
+ if (la == null) { currentState = 317; break; }
if (set[23].Get(la.kind)) {
goto case 55;
} else {
if (la.kind == 132) {
- currentState = 312;
+ currentState = 314;
break;
} else {
if (la.kind == 194) {
- currentState = 316;
+ currentState = 318;
break;
} else {
goto case 6;
@@ -5133,109 +5155,109 @@ partial class ExpressionFinder {
}
}
}
- case 316: {
- if (la == null) { currentState = 316; break; }
+ case 318: {
+ if (la == null) { currentState = 318; break; }
Expect(163, la); // "Next"
currentState = stateStack.Pop();
break;
}
- case 317: {
+ case 319: {
nextTokenIsPotentialStartOfExpression = true;
SetIdentifierExpected(la);
- goto case 318;
+ goto case 320;
}
- case 318: {
- if (la == null) { currentState = 318; break; }
+ case 320: {
+ if (la == null) { currentState = 320; break; }
if (set[35].Get(la.kind)) {
- stateStack.Push(334);
- goto case 328;
+ stateStack.Push(336);
+ goto case 330;
} else {
if (la.kind == 110) {
- currentState = 319;
+ currentState = 321;
break;
} else {
goto case 6;
}
}
}
- case 319: {
- stateStack.Push(320);
- goto case 328;
+ case 321: {
+ stateStack.Push(322);
+ goto case 330;
}
- case 320: {
- if (la == null) { currentState = 320; break; }
+ case 322: {
+ if (la == null) { currentState = 322; break; }
Expect(138, la); // "In"
- currentState = 321;
+ currentState = 323;
break;
}
- case 321: {
- stateStack.Push(322);
+ case 323: {
+ stateStack.Push(324);
goto case 55;
}
- case 322: {
- stateStack.Push(323);
- goto case 259;
+ case 324: {
+ stateStack.Push(325);
+ goto case 261;
}
- case 323: {
- if (la == null) { currentState = 323; break; }
+ case 325: {
+ if (la == null) { currentState = 325; break; }
Expect(163, la); // "Next"
- currentState = 324;
+ currentState = 326;
break;
}
- case 324: {
+ case 326: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 325;
+ goto case 327;
}
- case 325: {
- if (la == null) { currentState = 325; break; }
+ case 327: {
+ if (la == null) { currentState = 327; break; }
if (set[23].Get(la.kind)) {
- goto case 326;
+ goto case 328;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
- case 326: {
- stateStack.Push(327);
+ case 328: {
+ stateStack.Push(329);
goto case 55;
}
- case 327: {
- if (la == null) { currentState = 327; break; }
+ case 329: {
+ if (la == null) { currentState = 329; break; }
if (la.kind == 22) {
- currentState = 326;
+ currentState = 328;
break;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
- case 328: {
+ case 330: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(329);
+ stateStack.Push(331);
goto case 173;
}
- case 329: {
+ case 331: {
PopContext();
- goto case 330;
+ goto case 332;
}
- case 330: {
- if (la == null) { currentState = 330; break; }
+ case 332: {
+ if (la == null) { currentState = 332; break; }
if (la.kind == 33) {
- currentState = 331;
+ currentState = 333;
break;
} else {
- goto case 331;
+ goto case 333;
}
}
- case 331: {
- if (la == null) { currentState = 331; break; }
+ case 333: {
+ if (la == null) { currentState = 333; break; }
if (set[32].Get(la.kind)) {
- stateStack.Push(331);
+ stateStack.Push(333);
goto case 160;
} else {
if (la.kind == 63) {
- currentState = 332;
+ currentState = 334;
break;
} else {
currentState = stateStack.Pop();
@@ -5243,98 +5265,98 @@ partial class ExpressionFinder {
}
}
}
- case 332: {
+ case 334: {
PushContext(Context.Type, la, t);
- stateStack.Push(333);
+ stateStack.Push(335);
goto case 37;
}
- case 333: {
+ case 335: {
PopContext();
currentState = stateStack.Pop();
goto switchlbl;
}
- case 334: {
- if (la == null) { currentState = 334; break; }
+ case 336: {
+ if (la == null) { currentState = 336; break; }
Expect(20, la); // "="
- currentState = 335;
+ currentState = 337;
break;
}
- case 335: {
- stateStack.Push(336);
+ case 337: {
+ stateStack.Push(338);
goto case 55;
}
- case 336: {
- if (la == null) { currentState = 336; break; }
+ case 338: {
+ if (la == null) { currentState = 338; break; }
if (la.kind == 205) {
- currentState = 343;
+ currentState = 345;
break;
} else {
- goto case 337;
+ goto case 339;
}
}
- case 337: {
- stateStack.Push(338);
- goto case 259;
+ case 339: {
+ stateStack.Push(340);
+ goto case 261;
}
- case 338: {
- if (la == null) { currentState = 338; break; }
+ case 340: {
+ if (la == null) { currentState = 340; break; }
Expect(163, la); // "Next"
- currentState = 339;
+ currentState = 341;
break;
}
- case 339: {
+ case 341: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 340;
+ goto case 342;
}
- case 340: {
- if (la == null) { currentState = 340; break; }
+ case 342: {
+ if (la == null) { currentState = 342; break; }
if (set[23].Get(la.kind)) {
- goto case 341;
+ goto case 343;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
- case 341: {
- stateStack.Push(342);
+ case 343: {
+ stateStack.Push(344);
goto case 55;
}
- case 342: {
- if (la == null) { currentState = 342; break; }
+ case 344: {
+ if (la == null) { currentState = 344; break; }
if (la.kind == 22) {
- currentState = 341;
+ currentState = 343;
break;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
- case 343: {
- stateStack.Push(337);
+ case 345: {
+ stateStack.Push(339);
goto case 55;
}
- case 344: {
- if (la == null) { currentState = 344; break; }
+ case 346: {
+ if (la == null) { currentState = 346; break; }
if (la.kind == 224 || la.kind == 231) {
- currentState = 347;
+ currentState = 349;
break;
} else {
if (la.kind == 1 || la.kind == 21) {
- stateStack.Push(345);
- goto case 259;
+ stateStack.Push(347);
+ goto case 261;
} else {
goto case 6;
}
}
}
- case 345: {
- if (la == null) { currentState = 345; break; }
+ case 347: {
+ if (la == null) { currentState = 347; break; }
Expect(152, la); // "Loop"
- currentState = 346;
+ currentState = 348;
break;
}
- case 346: {
- if (la == null) { currentState = 346; break; }
+ case 348: {
+ if (la == null) { currentState = 348; break; }
if (la.kind == 224 || la.kind == 231) {
currentState = 55;
break;
@@ -5343,142 +5365,166 @@ partial class ExpressionFinder {
goto switchlbl;
}
}
- case 347: {
- stateStack.Push(348);
+ case 349: {
+ stateStack.Push(350);
goto case 55;
}
- case 348: {
- stateStack.Push(349);
- goto case 259;
+ case 350: {
+ stateStack.Push(351);
+ goto case 261;
}
- case 349: {
- if (la == null) { currentState = 349; break; }
+ case 351: {
+ if (la == null) { currentState = 351; break; }
Expect(152, la); // "Loop"
currentState = stateStack.Pop();
break;
}
- case 350: {
- stateStack.Push(351);
+ case 352: {
+ stateStack.Push(353);
goto case 55;
}
- case 351: {
- stateStack.Push(352);
- goto case 259;
+ case 353: {
+ stateStack.Push(354);
+ goto case 261;
}
- case 352: {
- if (la == null) { currentState = 352; break; }
+ case 354: {
+ if (la == null) { currentState = 354; break; }
Expect(113, la); // "End"
- currentState = 353;
+ currentState = 355;
break;
}
- case 353: {
- if (la == null) { currentState = 353; break; }
+ case 355: {
+ if (la == null) { currentState = 355; break; }
Expect(231, la); // "While"
currentState = stateStack.Pop();
break;
}
- case 354: {
+ case 356: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 355;
+ goto case 357;
}
- case 355: {
- if (la == null) { currentState = 355; break; }
+ case 357: {
+ if (la == null) { currentState = 357; break; }
if (la.kind == 74) {
- currentState = 356;
+ currentState = 358;
break;
} else {
- goto case 356;
+ goto case 358;
}
}
- case 356: {
- stateStack.Push(357);
+ case 358: {
+ stateStack.Push(359);
goto case 55;
}
- case 357: {
- stateStack.Push(358);
+ case 359: {
+ stateStack.Push(360);
goto case 23;
}
- case 358: {
- if (la == null) { currentState = 358; break; }
+ case 360: {
+ if (la == null) { currentState = 360; break; }
if (la.kind == 74) {
- currentState = 360;
+ currentState = 362;
break;
} else {
Expect(113, la); // "End"
- currentState = 359;
+ currentState = 361;
break;
}
}
- case 359: {
- if (la == null) { currentState = 359; break; }
+ case 361: {
+ if (la == null) { currentState = 361; break; }
Expect(197, la); // "Select"
currentState = stateStack.Pop();
break;
}
- case 360: {
+ case 362: {
+ xmlAllowed = false;
nextTokenIsPotentialStartOfExpression = true;
- goto case 361;
+ goto case 363;
}
- case 361: {
- if (la == null) { currentState = 361; break; }
+ case 363: {
+ if (la == null) { currentState = 363; break; }
if (la.kind == 111) {
- currentState = 362;
+ currentState = 364;
break;
} else {
if (set[67].Get(la.kind)) {
- goto case 363;
+ if (set[68].Get(la.kind)) {
+ xmlAllowed = true;
+ goto case 370;
+ } else {
+ if (set[23].Get(la.kind)) {
+ xmlAllowed = true;
+ goto case 369;
+ } else {
+ goto case 365;
+ }
+ }
} else {
Error(la);
- goto case 362;
+ goto case 364;
}
}
}
- case 362: {
- stateStack.Push(358);
- goto case 259;
+ case 364: {
+ stateStack.Push(360);
+ goto case 261;
}
- case 363: {
+ case 365: {
+ Error(la);
+ goto case 366;
+ }
+ case 366: {
+ if (la == null) { currentState = 366; break; }
+ if (la.kind == 22) {
+ currentState = 367;
+ break;
+ } else {
+ goto case 364;
+ }
+ }
+ case 367: {
+ xmlAllowed = false;
nextTokenIsPotentialStartOfExpression = true;
- goto case 364;
+ goto case 368;
}
- case 364: {
- if (la == null) { currentState = 364; break; }
- if (set[142].Get(la.kind)) {
- if (la.kind == 144) {
- currentState = 366;
- break;
- } else {
- goto case 366;
- }
+ case 368: {
+ if (la == null) { currentState = 368; break; }
+ if (set[68].Get(la.kind)) {
+ xmlAllowed = true;
+ goto case 370;
} else {
if (set[23].Get(la.kind)) {
- stateStack.Push(365);
- goto case 55;
+ xmlAllowed = true;
+ goto case 369;
} else {
- Error(la);
goto case 365;
}
}
}
- case 365: {
- if (la == null) { currentState = 365; break; }
- if (la.kind == 22) {
- currentState = 363;
+ case 369: {
+ stateStack.Push(366);
+ goto case 55;
+ }
+ case 370: {
+ if (la == null) { currentState = 370; break; }
+ if (la.kind == 144) {
+ currentState = 371;
break;
} else {
- goto case 362;
+ goto case 371;
}
}
- case 366: {
- stateStack.Push(367);
- goto case 368;
+ case 371: {
+ stateStack.Push(372);
+ goto case 373;
}
- case 367: {
- stateStack.Push(365);
+ case 372: {
+ stateStack.Push(366);
goto case 75;
}
- case 368: {
- if (la == null) { currentState = 368; break; }
+ case 373: {
+ if (la == null) { currentState = 373; break; }
if (la.kind == 20) {
goto case 73;
} else {
@@ -5489,7 +5535,7 @@ partial class ExpressionFinder {
goto case 71;
} else {
if (la.kind == 39) {
- currentState = 369;
+ currentState = 374;
break;
} else {
if (la.kind == 42) {
@@ -5506,109 +5552,109 @@ partial class ExpressionFinder {
}
}
}
- case 369: {
+ case 374: {
wasNormalAttribute = false;
currentState = stateStack.Pop();
goto switchlbl;
}
- case 370: {
- stateStack.Push(371);
+ case 375: {
+ stateStack.Push(376);
goto case 55;
}
- case 371: {
- if (la == null) { currentState = 371; break; }
+ case 376: {
+ if (la == null) { currentState = 376; break; }
if (la.kind == 214) {
- currentState = 379;
+ currentState = 384;
break;
} else {
- goto case 372;
+ goto case 377;
}
}
- case 372: {
- if (la == null) { currentState = 372; break; }
+ case 377: {
+ if (la == null) { currentState = 377; break; }
if (la.kind == 1 || la.kind == 21) {
- goto case 373;
+ goto case 378;
} else {
goto case 6;
}
}
- case 373: {
- stateStack.Push(374);
- goto case 259;
+ case 378: {
+ stateStack.Push(379);
+ goto case 261;
}
- case 374: {
- if (la == null) { currentState = 374; break; }
+ case 379: {
+ if (la == null) { currentState = 379; break; }
if (la.kind == 111 || la.kind == 112) {
if (la.kind == 111) {
- currentState = 378;
+ currentState = 383;
break;
} else {
if (la.kind == 112) {
- currentState = 376;
+ currentState = 381;
break;
} else {
Error(la);
- goto case 373;
+ goto case 378;
}
}
} else {
Expect(113, la); // "End"
- currentState = 375;
+ currentState = 380;
break;
}
}
- case 375: {
- if (la == null) { currentState = 375; break; }
+ case 380: {
+ if (la == null) { currentState = 380; break; }
Expect(135, la); // "If"
currentState = stateStack.Pop();
break;
}
- case 376: {
- stateStack.Push(377);
+ case 381: {
+ stateStack.Push(382);
goto case 55;
}
- case 377: {
- if (la == null) { currentState = 377; break; }
+ case 382: {
+ if (la == null) { currentState = 382; break; }
if (la.kind == 214) {
- currentState = 373;
+ currentState = 378;
break;
} else {
- goto case 373;
+ goto case 378;
}
}
- case 378: {
- if (la == null) { currentState = 378; break; }
+ case 383: {
+ if (la == null) { currentState = 383; break; }
if (la.kind == 135) {
- currentState = 376;
+ currentState = 381;
break;
} else {
- goto case 373;
+ goto case 378;
}
}
- case 379: {
+ case 384: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 380;
+ goto case 385;
}
- case 380: {
- if (la == null) { currentState = 380; break; }
+ case 385: {
+ if (la == null) { currentState = 385; break; }
if (set[50].Get(la.kind)) {
- goto case 381;
+ goto case 386;
} else {
- goto case 372;
+ goto case 377;
}
}
- case 381: {
- stateStack.Push(382);
- goto case 267;
+ case 386: {
+ stateStack.Push(387);
+ goto case 269;
}
- case 382: {
- if (la == null) { currentState = 382; break; }
+ case 387: {
+ if (la == null) { currentState = 387; break; }
if (la.kind == 21) {
- currentState = 386;
+ currentState = 391;
break;
} else {
if (la.kind == 111) {
- currentState = 383;
+ currentState = 388;
break;
} else {
currentState = stateStack.Pop();
@@ -5616,99 +5662,99 @@ partial class ExpressionFinder {
}
}
}
- case 383: {
+ case 388: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 384;
+ goto case 389;
}
- case 384: {
- if (la == null) { currentState = 384; break; }
+ case 389: {
+ if (la == null) { currentState = 389; break; }
if (set[50].Get(la.kind)) {
- stateStack.Push(385);
- goto case 267;
+ stateStack.Push(390);
+ goto case 269;
} else {
- goto case 385;
+ goto case 390;
}
}
- case 385: {
- if (la == null) { currentState = 385; break; }
+ case 390: {
+ if (la == null) { currentState = 390; break; }
if (la.kind == 21) {
- currentState = 383;
+ currentState = 388;
break;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
- case 386: {
+ case 391: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 387;
+ goto case 392;
}
- case 387: {
- if (la == null) { currentState = 387; break; }
+ case 392: {
+ if (la == null) { currentState = 392; break; }
if (set[50].Get(la.kind)) {
- goto case 381;
+ goto case 386;
} else {
- goto case 382;
+ goto case 387;
}
}
- case 388: {
- stateStack.Push(389);
+ case 393: {
+ stateStack.Push(394);
goto case 101;
}
- case 389: {
- if (la == null) { currentState = 389; break; }
+ case 394: {
+ if (la == null) { currentState = 394; break; }
if (la.kind == 37) {
- currentState = 390;
+ currentState = 395;
break;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
- case 390: {
+ case 395: {
PushContext(Context.Expression, la, t);
nextTokenIsPotentialStartOfExpression = true;
- goto case 391;
+ goto case 396;
}
- case 391: {
- if (la == null) { currentState = 391; break; }
+ case 396: {
+ if (la == null) { currentState = 396; break; }
if (set[21].Get(la.kind)) {
- stateStack.Push(392);
+ stateStack.Push(397);
goto case 47;
} else {
- goto case 392;
+ goto case 397;
}
}
- case 392: {
+ case 397: {
PopContext();
goto case 46;
}
- case 393: {
- stateStack.Push(394);
+ case 398: {
+ stateStack.Push(399);
goto case 55;
}
- case 394: {
- if (la == null) { currentState = 394; break; }
+ case 399: {
+ if (la == null) { currentState = 399; break; }
Expect(22, la); // ","
currentState = 55;
break;
}
- case 395: {
- stateStack.Push(396);
+ case 400: {
+ stateStack.Push(401);
goto case 55;
}
- case 396: {
- stateStack.Push(397);
- goto case 259;
+ case 401: {
+ stateStack.Push(402);
+ goto case 261;
}
- case 397: {
- if (la == null) { currentState = 397; break; }
+ case 402: {
+ if (la == null) { currentState = 402; break; }
Expect(113, la); // "End"
- currentState = 398;
+ currentState = 403;
break;
}
- case 398: {
- if (la == null) { currentState = 398; break; }
+ case 403: {
+ if (la == null) { currentState = 403; break; }
if (la.kind == 233) {
goto case 102;
} else {
@@ -5719,362 +5765,362 @@ partial class ExpressionFinder {
}
}
}
- case 399: {
+ case 404: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(400);
+ stateStack.Push(405);
goto case 205;
}
- case 400: {
+ case 405: {
PopContext();
- goto case 401;
+ goto case 406;
}
- case 401: {
- if (la == null) { currentState = 401; break; }
+ case 406: {
+ if (la == null) { currentState = 406; break; }
if (la.kind == 33) {
- currentState = 402;
+ currentState = 407;
break;
} else {
- goto case 402;
+ goto case 407;
}
}
- case 402: {
- if (la == null) { currentState = 402; break; }
+ case 407: {
+ if (la == null) { currentState = 407; break; }
if (la.kind == 37) {
- currentState = 419;
+ currentState = 424;
break;
} else {
if (la.kind == 63) {
- currentState = 416;
+ currentState = 421;
break;
} else {
- goto case 403;
+ goto case 408;
}
}
}
- case 403: {
- if (la == null) { currentState = 403; break; }
+ case 408: {
+ if (la == null) { currentState = 408; break; }
if (la.kind == 20) {
- currentState = 415;
+ currentState = 420;
break;
} else {
- goto case 404;
+ goto case 409;
}
}
- case 404: {
- if (la == null) { currentState = 404; break; }
+ case 409: {
+ if (la == null) { currentState = 409; break; }
if (la.kind == 22) {
- currentState = 405;
+ currentState = 410;
break;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
- case 405: {
+ case 410: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(406);
+ stateStack.Push(411);
goto case 205;
}
- case 406: {
+ case 411: {
PopContext();
- goto case 407;
+ goto case 412;
}
- case 407: {
- if (la == null) { currentState = 407; break; }
+ case 412: {
+ if (la == null) { currentState = 412; break; }
if (la.kind == 33) {
- currentState = 408;
+ currentState = 413;
break;
} else {
- goto case 408;
+ goto case 413;
}
}
- case 408: {
- if (la == null) { currentState = 408; break; }
+ case 413: {
+ if (la == null) { currentState = 413; break; }
if (la.kind == 37) {
- currentState = 412;
+ currentState = 417;
break;
} else {
if (la.kind == 63) {
- currentState = 409;
+ currentState = 414;
break;
} else {
- goto case 403;
+ goto case 408;
}
}
}
- case 409: {
+ case 414: {
PushContext(Context.Type, la, t);
- goto case 410;
+ goto case 415;
}
- case 410: {
- if (la == null) { currentState = 410; break; }
+ case 415: {
+ if (la == null) { currentState = 415; break; }
if (la.kind == 162) {
- stateStack.Push(411);
+ stateStack.Push(416);
goto case 85;
} else {
if (set[16].Get(la.kind)) {
- stateStack.Push(411);
+ stateStack.Push(416);
goto case 37;
} else {
Error(la);
- goto case 411;
+ goto case 416;
}
}
}
- case 411: {
+ case 416: {
PopContext();
- goto case 403;
+ goto case 408;
}
- case 412: {
+ case 417: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 413;
+ goto case 418;
}
- case 413: {
- if (la == null) { currentState = 413; break; }
+ case 418: {
+ if (la == null) { currentState = 418; break; }
if (set[23].Get(la.kind)) {
- stateStack.Push(414);
+ stateStack.Push(419);
goto case 55;
} else {
- goto case 414;
+ goto case 419;
}
}
- case 414: {
- if (la == null) { currentState = 414; break; }
+ case 419: {
+ if (la == null) { currentState = 419; break; }
if (la.kind == 22) {
- currentState = 412;
+ currentState = 417;
break;
} else {
Expect(38, la); // ")"
- currentState = 408;
+ currentState = 413;
break;
}
}
- case 415: {
- stateStack.Push(404);
+ case 420: {
+ stateStack.Push(409);
goto case 55;
}
- case 416: {
+ case 421: {
PushContext(Context.Type, la, t);
- goto case 417;
+ goto case 422;
}
- case 417: {
- if (la == null) { currentState = 417; break; }
+ case 422: {
+ if (la == null) { currentState = 422; break; }
if (la.kind == 162) {
- stateStack.Push(418);
+ stateStack.Push(423);
goto case 85;
} else {
if (set[16].Get(la.kind)) {
- stateStack.Push(418);
+ stateStack.Push(423);
goto case 37;
} else {
Error(la);
- goto case 418;
+ goto case 423;
}
}
}
- case 418: {
+ case 423: {
PopContext();
- goto case 403;
+ goto case 408;
}
- case 419: {
+ case 424: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 420;
+ goto case 425;
}
- case 420: {
- if (la == null) { currentState = 420; break; }
+ case 425: {
+ if (la == null) { currentState = 425; break; }
if (set[23].Get(la.kind)) {
- stateStack.Push(421);
+ stateStack.Push(426);
goto case 55;
} else {
- goto case 421;
+ goto case 426;
}
}
- case 421: {
- if (la == null) { currentState = 421; break; }
+ case 426: {
+ if (la == null) { currentState = 426; break; }
if (la.kind == 22) {
- currentState = 419;
+ currentState = 424;
break;
} else {
Expect(38, la); // ")"
- currentState = 402;
+ currentState = 407;
break;
}
}
- case 422: {
+ case 427: {
PushContext(Context.Type, la, t);
- stateStack.Push(423);
+ stateStack.Push(428);
goto case 37;
}
- case 423: {
+ case 428: {
PopContext();
- goto case 256;
+ goto case 258;
}
- case 424: {
- if (la == null) { currentState = 424; break; }
+ case 429: {
+ if (la == null) { currentState = 429; break; }
Expect(37, la); // "("
- currentState = 425;
+ currentState = 430;
break;
}
- case 425: {
+ case 430: {
PushContext(Context.Default, la, t);
SetIdentifierExpected(la);
- goto case 426;
+ goto case 431;
}
- case 426: {
- if (la == null) { currentState = 426; break; }
- if (set[77].Get(la.kind)) {
- stateStack.Push(427);
- goto case 428;
+ case 431: {
+ if (la == null) { currentState = 431; break; }
+ if (set[78].Get(la.kind)) {
+ stateStack.Push(432);
+ goto case 433;
} else {
- goto case 427;
+ goto case 432;
}
}
- case 427: {
+ case 432: {
PopContext();
goto case 46;
}
- case 428: {
- stateStack.Push(429);
+ case 433: {
+ stateStack.Push(434);
PushContext(Context.Parameter, la, t);
- goto case 430;
+ goto case 435;
}
- case 429: {
- if (la == null) { currentState = 429; break; }
+ case 434: {
+ if (la == null) { currentState = 434; break; }
if (la.kind == 22) {
- currentState = 428;
+ currentState = 433;
break;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
- case 430: {
+ case 435: {
SetIdentifierExpected(la);
- goto case 431;
+ goto case 436;
}
- case 431: {
- if (la == null) { currentState = 431; break; }
+ case 436: {
+ if (la == null) { currentState = 436; break; }
if (la.kind == 40) {
- stateStack.Push(430);
- goto case 443;
+ stateStack.Push(435);
+ goto case 448;
} else {
- goto case 432;
+ goto case 437;
}
}
- case 432: {
+ case 437: {
SetIdentifierExpected(la);
- goto case 433;
+ goto case 438;
}
- case 433: {
- if (la == null) { currentState = 433; break; }
+ case 438: {
+ if (la == null) { currentState = 438; break; }
if (set[143].Get(la.kind)) {
- currentState = 432;
+ currentState = 437;
break;
} else {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(434);
+ stateStack.Push(439);
goto case 205;
}
}
- case 434: {
+ case 439: {
PopContext();
- goto case 435;
+ goto case 440;
}
- case 435: {
- if (la == null) { currentState = 435; break; }
+ case 440: {
+ if (la == null) { currentState = 440; break; }
if (la.kind == 33) {
- currentState = 436;
+ currentState = 441;
break;
} else {
- goto case 436;
+ goto case 441;
}
}
- case 436: {
- if (la == null) { currentState = 436; break; }
+ case 441: {
+ if (la == null) { currentState = 441; break; }
if (la.kind == 37) {
- currentState = 442;
+ currentState = 447;
break;
} else {
if (la.kind == 63) {
- currentState = 440;
+ currentState = 445;
break;
} else {
- goto case 437;
+ goto case 442;
}
}
}
- case 437: {
- if (la == null) { currentState = 437; break; }
+ case 442: {
+ if (la == null) { currentState = 442; break; }
if (la.kind == 20) {
- currentState = 439;
+ currentState = 444;
break;
} else {
- goto case 438;
+ goto case 443;
}
}
- case 438: {
+ case 443: {
PopContext();
currentState = stateStack.Pop();
goto switchlbl;
}
- case 439: {
- stateStack.Push(438);
+ case 444: {
+ stateStack.Push(443);
goto case 55;
}
- case 440: {
+ case 445: {
PushContext(Context.Type, la, t);
- stateStack.Push(441);
+ stateStack.Push(446);
goto case 37;
}
- case 441: {
+ case 446: {
PopContext();
- goto case 437;
+ goto case 442;
}
- case 442: {
- if (la == null) { currentState = 442; break; }
+ case 447: {
+ if (la == null) { currentState = 447; break; }
if (la.kind == 22) {
- currentState = 442;
+ currentState = 447;
break;
} else {
Expect(38, la); // ")"
- currentState = 436;
+ currentState = 441;
break;
}
}
- case 443: {
- if (la == null) { currentState = 443; break; }
+ case 448: {
+ if (la == null) { currentState = 448; break; }
Expect(40, la); // "<"
- currentState = 444;
+ currentState = 449;
break;
}
- case 444: {
+ case 449: {
wasNormalAttribute = true; PushContext(Context.Attribute, la, t);
- goto case 445;
+ goto case 450;
}
- case 445: {
- stateStack.Push(446);
- goto case 449;
+ case 450: {
+ stateStack.Push(451);
+ goto case 454;
}
- case 446: {
- if (la == null) { currentState = 446; break; }
+ case 451: {
+ if (la == null) { currentState = 451; break; }
if (la.kind == 22) {
- currentState = 445;
+ currentState = 450;
break;
} else {
Expect(39, la); // ">"
- currentState = 447;
+ currentState = 452;
break;
}
}
- case 447: {
+ case 452: {
PopContext();
- goto case 448;
+ goto case 453;
}
- case 448: {
- if (la == null) { currentState = 448; break; }
+ case 453: {
+ if (la == null) { currentState = 453; break; }
if (la.kind == 1) {
goto case 25;
} else {
@@ -6082,296 +6128,302 @@ partial class ExpressionFinder {
goto switchlbl;
}
}
- case 449: {
- if (la == null) { currentState = 449; break; }
+ case 454: {
+ if (la == null) { currentState = 454; break; }
if (la.kind == 65 || la.kind == 155) {
- currentState = 450;
+ currentState = 455;
break;
} else {
goto case 37;
}
}
- case 450: {
- if (la == null) { currentState = 450; break; }
+ case 455: {
+ if (la == null) { currentState = 455; break; }
Expect(21, la); // ":"
- currentState = 451;
+ currentState = 456;
break;
}
- case 451: {
+ case 456: {
wasNormalAttribute = false;
goto case 37;
}
- case 452: {
- stateStack.Push(453);
- goto case 424;
+ case 457: {
+ if (la == null) { currentState = 457; break; }
+ Expect(210, la); // "Sub"
+ currentState = 458;
+ break;
}
- case 453: {
+ case 458: {
+ stateStack.Push(459);
+ goto case 429;
+ }
+ case 459: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 454;
+ goto case 460;
}
- case 454: {
- if (la == null) { currentState = 454; break; }
+ case 460: {
+ if (la == null) { currentState = 460; break; }
if (set[50].Get(la.kind)) {
- goto case 267;
+ goto case 269;
} else {
if (la.kind == 1 || la.kind == 21) {
- stateStack.Push(455);
- goto case 259;
+ stateStack.Push(461);
+ goto case 261;
} else {
goto case 6;
}
}
}
- case 455: {
- if (la == null) { currentState = 455; break; }
+ case 461: {
+ if (la == null) { currentState = 461; break; }
Expect(113, la); // "End"
- currentState = 456;
+ currentState = 462;
break;
}
- case 456: {
- if (la == null) { currentState = 456; break; }
+ case 462: {
+ if (la == null) { currentState = 462; break; }
Expect(210, la); // "Sub"
currentState = stateStack.Pop();
break;
}
- case 457: {
- if (la == null) { currentState = 457; break; }
+ case 463: {
+ if (la == null) { currentState = 463; break; }
if (la.kind == 17 || la.kind == 18 || la.kind == 19) {
- currentState = 470;
+ currentState = 476;
break;
} else {
if (la.kind == 10) {
- stateStack.Push(459);
- goto case 461;
+ stateStack.Push(465);
+ goto case 467;
} else {
Error(la);
- goto case 458;
+ goto case 464;
}
}
}
- case 458: {
+ case 464: {
PopContext();
currentState = stateStack.Pop();
goto switchlbl;
}
- case 459: {
- if (la == null) { currentState = 459; break; }
+ case 465: {
+ if (la == null) { currentState = 465; break; }
if (la.kind == 17) {
- currentState = 460;
+ currentState = 466;
break;
} else {
- goto case 458;
+ goto case 464;
}
}
- case 460: {
- if (la == null) { currentState = 460; break; }
+ case 466: {
+ if (la == null) { currentState = 466; break; }
if (la.kind == 16) {
- currentState = 459;
+ currentState = 465;
break;
} else {
- goto case 459;
+ goto case 465;
}
}
- case 461: {
+ case 467: {
PushContext(Context.Xml, la, t);
- goto case 462;
+ goto case 468;
}
- case 462: {
- if (la == null) { currentState = 462; break; }
+ case 468: {
+ if (la == null) { currentState = 468; break; }
Expect(10, la); // XmlOpenTag
- currentState = 463;
+ currentState = 469;
break;
}
- case 463: {
- if (la == null) { currentState = 463; break; }
+ case 469: {
+ if (la == null) { currentState = 469; break; }
if (set[144].Get(la.kind)) {
if (set[145].Get(la.kind)) {
- currentState = 463;
+ currentState = 469;
break;
} else {
if (la.kind == 12) {
- stateStack.Push(463);
- goto case 467;
+ stateStack.Push(469);
+ goto case 473;
} else {
Error(la);
- goto case 463;
+ goto case 469;
}
}
} else {
if (la.kind == 14) {
- currentState = 464;
+ currentState = 470;
break;
} else {
if (la.kind == 11) {
- currentState = 465;
+ currentState = 471;
break;
} else {
Error(la);
- goto case 464;
+ goto case 470;
}
}
}
}
- case 464: {
+ case 470: {
PopContext();
currentState = stateStack.Pop();
goto switchlbl;
}
- case 465: {
- if (la == null) { currentState = 465; break; }
+ case 471: {
+ if (la == null) { currentState = 471; break; }
if (set[146].Get(la.kind)) {
if (set[147].Get(la.kind)) {
- currentState = 465;
+ currentState = 471;
break;
} else {
if (la.kind == 12) {
- stateStack.Push(465);
- goto case 467;
+ stateStack.Push(471);
+ goto case 473;
} else {
if (la.kind == 10) {
- stateStack.Push(465);
- goto case 461;
+ stateStack.Push(471);
+ goto case 467;
} else {
Error(la);
- goto case 465;
+ goto case 471;
}
}
}
} else {
Expect(15, la); // XmlOpenEndTag
- currentState = 466;
+ currentState = 472;
break;
}
}
- case 466: {
- if (la == null) { currentState = 466; break; }
+ case 472: {
+ if (la == null) { currentState = 472; break; }
if (set[148].Get(la.kind)) {
if (set[149].Get(la.kind)) {
- currentState = 466;
+ currentState = 472;
break;
} else {
if (la.kind == 12) {
- stateStack.Push(466);
- goto case 467;
+ stateStack.Push(472);
+ goto case 473;
} else {
Error(la);
- goto case 466;
+ goto case 472;
}
}
} else {
Expect(11, la); // XmlCloseTag
- currentState = 464;
+ currentState = 470;
break;
}
}
- case 467: {
- if (la == null) { currentState = 467; break; }
+ case 473: {
+ if (la == null) { currentState = 473; break; }
Expect(12, la); // XmlStartInlineVB
- currentState = 468;
+ currentState = 474;
break;
}
- case 468: {
- stateStack.Push(469);
+ case 474: {
+ stateStack.Push(475);
goto case 55;
}
- case 469: {
- if (la == null) { currentState = 469; break; }
+ case 475: {
+ if (la == null) { currentState = 475; break; }
Expect(13, la); // XmlEndInlineVB
currentState = stateStack.Pop();
break;
}
- case 470: {
- if (la == null) { currentState = 470; break; }
+ case 476: {
+ if (la == null) { currentState = 476; break; }
if (la.kind == 16) {
- currentState = 471;
+ currentState = 477;
break;
} else {
- goto case 471;
+ goto case 477;
}
}
- case 471: {
- if (la == null) { currentState = 471; break; }
+ case 477: {
+ if (la == null) { currentState = 477; break; }
if (la.kind == 17 || la.kind == 19) {
- currentState = 470;
+ currentState = 476;
break;
} else {
if (la.kind == 10) {
- stateStack.Push(472);
- goto case 461;
+ stateStack.Push(478);
+ goto case 467;
} else {
- goto case 458;
+ goto case 464;
}
}
}
- case 472: {
- if (la == null) { currentState = 472; break; }
+ case 478: {
+ if (la == null) { currentState = 478; break; }
if (la.kind == 17) {
- currentState = 473;
+ currentState = 479;
break;
} else {
- goto case 458;
+ goto case 464;
}
}
- case 473: {
- if (la == null) { currentState = 473; break; }
+ case 479: {
+ if (la == null) { currentState = 479; break; }
if (la.kind == 16) {
- currentState = 472;
+ currentState = 478;
break;
} else {
- goto case 472;
+ goto case 478;
}
}
- case 474: {
- if (la == null) { currentState = 474; break; }
+ case 480: {
+ if (la == null) { currentState = 480; break; }
Expect(37, la); // "("
- currentState = 475;
+ currentState = 481;
break;
}
- case 475: {
+ case 481: {
readXmlIdentifier = true;
- stateStack.Push(476);
+ stateStack.Push(482);
goto case 205;
}
- case 476: {
- if (la == null) { currentState = 476; break; }
+ case 482: {
+ if (la == null) { currentState = 482; break; }
Expect(38, la); // ")"
currentState = 175;
break;
}
- case 477: {
- if (la == null) { currentState = 477; break; }
+ case 483: {
+ if (la == null) { currentState = 483; break; }
Expect(37, la); // "("
- currentState = 478;
+ currentState = 484;
break;
}
- case 478: {
+ case 484: {
PushContext(Context.Type, la, t);
- stateStack.Push(479);
+ stateStack.Push(485);
goto case 37;
}
- case 479: {
+ case 485: {
PopContext();
- goto case 476;
+ goto case 482;
}
- case 480: {
+ case 486: {
nextTokenIsStartOfImportsOrAccessExpression = true; wasQualifierTokenAtStart = true;
- goto case 481;
+ goto case 487;
}
- case 481: {
- if (la == null) { currentState = 481; break; }
+ case 487: {
+ if (la == null) { currentState = 487; break; }
if (la.kind == 10) {
- currentState = 482;
+ currentState = 488;
break;
} else {
- goto case 482;
+ goto case 488;
}
}
- case 482: {
- stateStack.Push(483);
+ case 488: {
+ stateStack.Push(489);
goto case 101;
}
- case 483: {
- if (la == null) { currentState = 483; break; }
+ case 489: {
+ if (la == null) { currentState = 489; break; }
if (la.kind == 11) {
currentState = 175;
break;
@@ -6379,235 +6431,235 @@ partial class ExpressionFinder {
goto case 175;
}
}
- case 484: {
+ case 490: {
activeArgument = 0;
- goto case 485;
+ goto case 491;
}
- case 485: {
- stateStack.Push(486);
+ case 491: {
+ stateStack.Push(492);
goto case 55;
}
- case 486: {
- if (la == null) { currentState = 486; break; }
+ case 492: {
+ if (la == null) { currentState = 492; break; }
if (la.kind == 22) {
- currentState = 487;
+ currentState = 493;
break;
} else {
- goto case 476;
+ goto case 482;
}
}
- case 487: {
+ case 493: {
activeArgument++;
- goto case 485;
+ goto case 491;
}
- case 488: {
- stateStack.Push(489);
+ case 494: {
+ stateStack.Push(495);
goto case 55;
}
- case 489: {
- if (la == null) { currentState = 489; break; }
+ case 495: {
+ if (la == null) { currentState = 495; break; }
if (la.kind == 22) {
- currentState = 490;
+ currentState = 496;
break;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
- case 490: {
+ case 496: {
activeArgument++;
nextTokenIsPotentialStartOfExpression = true;
- goto case 491;
+ goto case 497;
}
- case 491: {
- if (la == null) { currentState = 491; break; }
+ case 497: {
+ if (la == null) { currentState = 497; break; }
if (set[23].Get(la.kind)) {
- goto case 488;
+ goto case 494;
} else {
- goto case 489;
+ goto case 495;
}
}
- case 492: {
- if (la == null) { currentState = 492; break; }
+ case 498: {
+ if (la == null) { currentState = 498; break; }
if (set[16].Get(la.kind)) {
PushContext(Context.Type, la, t);
- stateStack.Push(496);
+ stateStack.Push(502);
goto case 37;
} else {
- goto case 493;
+ goto case 499;
}
}
- case 493: {
- if (la == null) { currentState = 493; break; }
+ case 499: {
+ if (la == null) { currentState = 499; break; }
if (la.kind == 22) {
- currentState = 494;
+ currentState = 500;
break;
} else {
goto case 45;
}
}
- case 494: {
- if (la == null) { currentState = 494; break; }
+ case 500: {
+ if (la == null) { currentState = 500; break; }
if (set[16].Get(la.kind)) {
PushContext(Context.Type, la, t);
- stateStack.Push(495);
+ stateStack.Push(501);
goto case 37;
} else {
- goto case 493;
+ goto case 499;
}
}
- case 495: {
+ case 501: {
PopContext();
- goto case 493;
+ goto case 499;
}
- case 496: {
+ case 502: {
PopContext();
- goto case 493;
+ goto case 499;
}
- case 497: {
+ case 503: {
SetIdentifierExpected(la);
- goto case 498;
+ goto case 504;
}
- case 498: {
- if (la == null) { currentState = 498; break; }
+ case 504: {
+ if (la == null) { currentState = 504; break; }
if (set[150].Get(la.kind)) {
if (la.kind == 169) {
- currentState = 500;
+ currentState = 506;
break;
} else {
- if (set[77].Get(la.kind)) {
- stateStack.Push(499);
- goto case 428;
+ if (set[78].Get(la.kind)) {
+ stateStack.Push(505);
+ goto case 433;
} else {
Error(la);
- goto case 499;
+ goto case 505;
}
}
} else {
- goto case 499;
+ goto case 505;
}
}
- case 499: {
- if (la == null) { currentState = 499; break; }
+ case 505: {
+ if (la == null) { currentState = 505; break; }
Expect(38, la); // ")"
currentState = 34;
break;
}
- case 500: {
- stateStack.Push(499);
- goto case 501;
+ case 506: {
+ stateStack.Push(505);
+ goto case 507;
}
- case 501: {
+ case 507: {
SetIdentifierExpected(la);
- goto case 502;
+ goto case 508;
}
- case 502: {
- if (la == null) { currentState = 502; break; }
+ case 508: {
+ if (la == null) { currentState = 508; break; }
if (la.kind == 138 || la.kind == 178) {
- currentState = 503;
+ currentState = 509;
break;
} else {
- goto case 503;
+ goto case 509;
}
}
- case 503: {
+ case 509: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(504);
- goto case 518;
+ stateStack.Push(510);
+ goto case 524;
}
- case 504: {
+ case 510: {
PopContext();
- goto case 505;
- }
- case 505: {
- if (la == null) { currentState = 505; break; }
+ goto case 511;
+ }
+ case 511: {
+ if (la == null) { currentState = 511; break; }
if (la.kind == 63) {
- currentState = 519;
+ currentState = 525;
break;
} else {
- goto case 506;
+ goto case 512;
}
}
- case 506: {
- if (la == null) { currentState = 506; break; }
+ case 512: {
+ if (la == null) { currentState = 512; break; }
if (la.kind == 22) {
- currentState = 507;
+ currentState = 513;
break;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
- case 507: {
+ case 513: {
SetIdentifierExpected(la);
- goto case 508;
+ goto case 514;
}
- case 508: {
- if (la == null) { currentState = 508; break; }
+ case 514: {
+ if (la == null) { currentState = 514; break; }
if (la.kind == 138 || la.kind == 178) {
- currentState = 509;
+ currentState = 515;
break;
} else {
- goto case 509;
+ goto case 515;
}
}
- case 509: {
+ case 515: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(510);
- goto case 518;
+ stateStack.Push(516);
+ goto case 524;
}
- case 510: {
+ case 516: {
PopContext();
- goto case 511;
+ goto case 517;
}
- case 511: {
- if (la == null) { currentState = 511; break; }
+ case 517: {
+ if (la == null) { currentState = 517; break; }
if (la.kind == 63) {
- currentState = 512;
+ currentState = 518;
break;
} else {
- goto case 506;
+ goto case 512;
}
}
- case 512: {
+ case 518: {
PushContext(Context.Type, la, t);
- stateStack.Push(513);
- goto case 514;
+ stateStack.Push(519);
+ goto case 520;
}
- case 513: {
+ case 519: {
PopContext();
- goto case 506;
+ goto case 512;
}
- case 514: {
- if (la == null) { currentState = 514; break; }
- if (set[94].Get(la.kind)) {
- goto case 517;
+ case 520: {
+ if (la == null) { currentState = 520; break; }
+ if (set[95].Get(la.kind)) {
+ goto case 523;
} else {
if (la.kind == 35) {
- currentState = 515;
+ currentState = 521;
break;
} else {
goto case 6;
}
}
}
- case 515: {
- stateStack.Push(516);
- goto case 517;
+ case 521: {
+ stateStack.Push(522);
+ goto case 523;
}
- case 516: {
- if (la == null) { currentState = 516; break; }
+ case 522: {
+ if (la == null) { currentState = 522; break; }
if (la.kind == 22) {
- currentState = 515;
+ currentState = 521;
break;
} else {
goto case 82;
}
}
- case 517: {
- if (la == null) { currentState = 517; break; }
+ case 523: {
+ if (la == null) { currentState = 523; break; }
if (set[16].Get(la.kind)) {
currentState = 38;
break;
@@ -6627,8 +6679,8 @@ partial class ExpressionFinder {
}
}
}
- case 518: {
- if (la == null) { currentState = 518; break; }
+ case 524: {
+ if (la == null) { currentState = 524; break; }
if (la.kind == 2) {
goto case 145;
} else {
@@ -6735,515 +6787,515 @@ partial class ExpressionFinder {
}
}
}
- case 519: {
+ case 525: {
PushContext(Context.Type, la, t);
- stateStack.Push(520);
- goto case 514;
+ stateStack.Push(526);
+ goto case 520;
}
- case 520: {
+ case 526: {
PopContext();
- goto case 506;
+ goto case 512;
}
- case 521: {
+ case 527: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(522);
+ stateStack.Push(528);
goto case 205;
}
- case 522: {
+ case 528: {
PopContext();
- goto case 523;
+ goto case 529;
}
- case 523: {
- if (la == null) { currentState = 523; break; }
+ case 529: {
+ if (la == null) { currentState = 529; break; }
if (la.kind == 37) {
- stateStack.Push(524);
- goto case 424;
+ stateStack.Push(530);
+ goto case 429;
} else {
- goto case 524;
+ goto case 530;
}
}
- case 524: {
- if (la == null) { currentState = 524; break; }
+ case 530: {
+ if (la == null) { currentState = 530; break; }
if (la.kind == 63) {
- currentState = 525;
+ currentState = 531;
break;
} else {
goto case 23;
}
}
- case 525: {
+ case 531: {
PushContext(Context.Type, la, t);
- goto case 526;
+ goto case 532;
}
- case 526: {
- if (la == null) { currentState = 526; break; }
+ case 532: {
+ if (la == null) { currentState = 532; break; }
if (la.kind == 40) {
- stateStack.Push(526);
- goto case 443;
+ stateStack.Push(532);
+ goto case 448;
} else {
- stateStack.Push(527);
+ stateStack.Push(533);
goto case 37;
}
}
- case 527: {
+ case 533: {
PopContext();
goto case 23;
}
- case 528: {
+ case 534: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(529);
+ stateStack.Push(535);
goto case 205;
}
- case 529: {
+ case 535: {
PopContext();
- goto case 530;
+ goto case 536;
}
- case 530: {
- if (la == null) { currentState = 530; break; }
+ case 536: {
+ if (la == null) { currentState = 536; break; }
if (la.kind == 37 || la.kind == 63) {
if (la.kind == 63) {
- currentState = 532;
+ currentState = 538;
break;
} else {
if (la.kind == 37) {
stateStack.Push(23);
- goto case 424;
+ goto case 429;
} else {
- goto case 531;
+ goto case 537;
}
}
} else {
goto case 23;
}
}
- case 531: {
+ case 537: {
Error(la);
goto case 23;
}
- case 532: {
+ case 538: {
PushContext(Context.Type, la, t);
- stateStack.Push(533);
+ stateStack.Push(539);
goto case 37;
}
- case 533: {
+ case 539: {
PopContext();
goto case 23;
}
- case 534: {
+ case 540: {
PushContext(Context.TypeDeclaration, la, t);
- goto case 535;
+ goto case 541;
}
- case 535: {
- if (la == null) { currentState = 535; break; }
+ case 541: {
+ if (la == null) { currentState = 541; break; }
Expect(115, la); // "Enum"
- currentState = 536;
+ currentState = 542;
break;
}
- case 536: {
+ case 542: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(537);
+ stateStack.Push(543);
goto case 205;
}
- case 537: {
+ case 543: {
PopContext();
- goto case 538;
+ goto case 544;
}
- case 538: {
- if (la == null) { currentState = 538; break; }
+ case 544: {
+ if (la == null) { currentState = 544; break; }
if (la.kind == 63) {
- currentState = 550;
+ currentState = 556;
break;
} else {
- goto case 539;
+ goto case 545;
}
}
- case 539: {
- stateStack.Push(540);
+ case 545: {
+ stateStack.Push(546);
goto case 23;
}
- case 540: {
+ case 546: {
SetIdentifierExpected(la);
- goto case 541;
+ goto case 547;
}
- case 541: {
- if (la == null) { currentState = 541; break; }
- if (set[97].Get(la.kind)) {
- goto case 545;
+ case 547: {
+ if (la == null) { currentState = 547; break; }
+ if (set[98].Get(la.kind)) {
+ goto case 551;
} else {
Expect(113, la); // "End"
- currentState = 542;
+ currentState = 548;
break;
}
}
- case 542: {
- if (la == null) { currentState = 542; break; }
+ case 548: {
+ if (la == null) { currentState = 548; break; }
Expect(115, la); // "Enum"
- currentState = 543;
+ currentState = 549;
break;
}
- case 543: {
- stateStack.Push(544);
+ case 549: {
+ stateStack.Push(550);
goto case 23;
}
- case 544: {
+ case 550: {
PopContext();
currentState = stateStack.Pop();
goto switchlbl;
}
- case 545: {
+ case 551: {
SetIdentifierExpected(la);
- goto case 546;
+ goto case 552;
}
- case 546: {
- if (la == null) { currentState = 546; break; }
+ case 552: {
+ if (la == null) { currentState = 552; break; }
if (la.kind == 40) {
- stateStack.Push(545);
- goto case 443;
+ stateStack.Push(551);
+ goto case 448;
} else {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(547);
+ stateStack.Push(553);
goto case 205;
}
}
- case 547: {
+ case 553: {
PopContext();
- goto case 548;
+ goto case 554;
}
- case 548: {
- if (la == null) { currentState = 548; break; }
+ case 554: {
+ if (la == null) { currentState = 554; break; }
if (la.kind == 20) {
- currentState = 549;
+ currentState = 555;
break;
} else {
- goto case 539;
+ goto case 545;
}
}
- case 549: {
- stateStack.Push(539);
+ case 555: {
+ stateStack.Push(545);
goto case 55;
}
- case 550: {
+ case 556: {
PushContext(Context.Type, la, t);
- stateStack.Push(551);
+ stateStack.Push(557);
goto case 37;
}
- case 551: {
+ case 557: {
PopContext();
- goto case 539;
+ goto case 545;
}
- case 552: {
- if (la == null) { currentState = 552; break; }
+ case 558: {
+ if (la == null) { currentState = 558; break; }
Expect(103, la); // "Delegate"
- currentState = 553;
+ currentState = 559;
break;
}
- case 553: {
- if (la == null) { currentState = 553; break; }
+ case 559: {
+ if (la == null) { currentState = 559; break; }
if (la.kind == 210) {
- currentState = 554;
+ currentState = 560;
break;
} else {
if (la.kind == 127) {
- currentState = 554;
+ currentState = 560;
break;
} else {
Error(la);
- goto case 554;
+ goto case 560;
}
}
}
- case 554: {
+ case 560: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- goto case 555;
+ goto case 561;
}
- case 555: {
- if (la == null) { currentState = 555; break; }
- currentState = 556;
+ case 561: {
+ if (la == null) { currentState = 561; break; }
+ currentState = 562;
break;
}
- case 556: {
+ case 562: {
PopContext();
- goto case 557;
+ goto case 563;
}
- case 557: {
- if (la == null) { currentState = 557; break; }
+ case 563: {
+ if (la == null) { currentState = 563; break; }
if (la.kind == 37) {
- currentState = 560;
+ currentState = 566;
break;
} else {
if (la.kind == 63) {
- currentState = 558;
+ currentState = 564;
break;
} else {
goto case 23;
}
}
}
- case 558: {
+ case 564: {
PushContext(Context.Type, la, t);
- stateStack.Push(559);
+ stateStack.Push(565);
goto case 37;
}
- case 559: {
+ case 565: {
PopContext();
goto case 23;
}
- case 560: {
+ case 566: {
SetIdentifierExpected(la);
- goto case 561;
+ goto case 567;
}
- case 561: {
- if (la == null) { currentState = 561; break; }
+ case 567: {
+ if (la == null) { currentState = 567; break; }
if (set[150].Get(la.kind)) {
if (la.kind == 169) {
- currentState = 563;
+ currentState = 569;
break;
} else {
- if (set[77].Get(la.kind)) {
- stateStack.Push(562);
- goto case 428;
+ if (set[78].Get(la.kind)) {
+ stateStack.Push(568);
+ goto case 433;
} else {
Error(la);
- goto case 562;
+ goto case 568;
}
}
} else {
- goto case 562;
+ goto case 568;
}
}
- case 562: {
- if (la == null) { currentState = 562; break; }
+ case 568: {
+ if (la == null) { currentState = 568; break; }
Expect(38, la); // ")"
- currentState = 557;
+ currentState = 563;
break;
}
- case 563: {
- stateStack.Push(562);
- goto case 501;
+ case 569: {
+ stateStack.Push(568);
+ goto case 507;
}
- case 564: {
+ case 570: {
PushContext(Context.TypeDeclaration, la, t);
- goto case 565;
+ goto case 571;
}
- case 565: {
- if (la == null) { currentState = 565; break; }
+ case 571: {
+ if (la == null) { currentState = 571; break; }
if (la.kind == 155) {
- currentState = 566;
+ currentState = 572;
break;
} else {
if (la.kind == 84) {
- currentState = 566;
+ currentState = 572;
break;
} else {
if (la.kind == 209) {
- currentState = 566;
+ currentState = 572;
break;
} else {
Error(la);
- goto case 566;
+ goto case 572;
}
}
}
}
- case 566: {
+ case 572: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(567);
+ stateStack.Push(573);
goto case 205;
}
- case 567: {
+ case 573: {
PopContext();
- goto case 568;
+ goto case 574;
}
- case 568: {
- if (la == null) { currentState = 568; break; }
+ case 574: {
+ if (la == null) { currentState = 574; break; }
if (la.kind == 37) {
- currentState = 718;
+ currentState = 724;
break;
} else {
- goto case 569;
+ goto case 575;
}
}
- case 569: {
- stateStack.Push(570);
+ case 575: {
+ stateStack.Push(576);
goto case 23;
}
- case 570: {
+ case 576: {
SetIdentifierExpected(la);
isMissingModifier = true;
- goto case 571;
+ goto case 577;
}
- case 571: {
- if (la == null) { currentState = 571; break; }
+ case 577: {
+ if (la == null) { currentState = 577; break; }
if (la.kind == 140) {
isMissingModifier = false;
- goto case 715;
+ goto case 721;
} else {
- goto case 572;
+ goto case 578;
}
}
- case 572: {
+ case 578: {
SetIdentifierExpected(la);
isMissingModifier = true;
- goto case 573;
+ goto case 579;
}
- case 573: {
- if (la == null) { currentState = 573; break; }
+ case 579: {
+ if (la == null) { currentState = 579; break; }
if (la.kind == 136) {
isMissingModifier = false;
- goto case 709;
+ goto case 715;
} else {
- goto case 574;
+ goto case 580;
}
}
- case 574: {
+ case 580: {
SetIdentifierExpected(la);
isMissingModifier = true;
- goto case 575;
+ goto case 581;
}
- case 575: {
- if (la == null) { currentState = 575; break; }
- if (set[101].Get(la.kind)) {
- goto case 580;
+ case 581: {
+ if (la == null) { currentState = 581; break; }
+ if (set[102].Get(la.kind)) {
+ goto case 586;
} else {
isMissingModifier = false;
- goto case 576;
+ goto case 582;
}
}
- case 576: {
- if (la == null) { currentState = 576; break; }
+ case 582: {
+ if (la == null) { currentState = 582; break; }
Expect(113, la); // "End"
- currentState = 577;
+ currentState = 583;
break;
}
- case 577: {
- if (la == null) { currentState = 577; break; }
+ case 583: {
+ if (la == null) { currentState = 583; break; }
if (la.kind == 155) {
- currentState = 578;
+ currentState = 584;
break;
} else {
if (la.kind == 84) {
- currentState = 578;
+ currentState = 584;
break;
} else {
if (la.kind == 209) {
- currentState = 578;
+ currentState = 584;
break;
} else {
Error(la);
- goto case 578;
+ goto case 584;
}
}
}
}
- case 578: {
- stateStack.Push(579);
+ case 584: {
+ stateStack.Push(585);
goto case 23;
}
- case 579: {
+ case 585: {
PopContext();
currentState = stateStack.Pop();
goto switchlbl;
}
- case 580: {
+ case 586: {
SetIdentifierExpected(la);
isMissingModifier = true;
- goto case 581;
+ goto case 587;
}
- case 581: {
- if (la == null) { currentState = 581; break; }
+ case 587: {
+ if (la == null) { currentState = 587; break; }
if (la.kind == 40) {
- stateStack.Push(580);
- goto case 443;
+ stateStack.Push(586);
+ goto case 448;
} else {
isMissingModifier = true;
- goto case 582;
+ goto case 588;
}
}
- case 582: {
+ case 588: {
SetIdentifierExpected(la);
- goto case 583;
+ goto case 589;
}
- case 583: {
- if (la == null) { currentState = 583; break; }
- if (set[132].Get(la.kind)) {
- currentState = 708;
+ case 589: {
+ if (la == null) { currentState = 589; break; }
+ if (set[133].Get(la.kind)) {
+ currentState = 714;
break;
} else {
isMissingModifier = false;
SetIdentifierExpected(la);
- goto case 584;
+ goto case 590;
}
}
- case 584: {
- if (la == null) { currentState = 584; break; }
+ case 590: {
+ if (la == null) { currentState = 590; break; }
if (la.kind == 84 || la.kind == 155 || la.kind == 209) {
- stateStack.Push(574);
- goto case 564;
+ stateStack.Push(580);
+ goto case 570;
} else {
if (la.kind == 103) {
- stateStack.Push(574);
- goto case 552;
+ stateStack.Push(580);
+ goto case 558;
} else {
if (la.kind == 115) {
- stateStack.Push(574);
- goto case 534;
+ stateStack.Push(580);
+ goto case 540;
} else {
if (la.kind == 142) {
- stateStack.Push(574);
+ stateStack.Push(580);
goto case 9;
} else {
- if (set[104].Get(la.kind)) {
- stateStack.Push(574);
+ if (set[105].Get(la.kind)) {
+ stateStack.Push(580);
PushContext(Context.Member, la, t);
SetIdentifierExpected(la);
- goto case 585;
+ goto case 591;
} else {
Error(la);
- goto case 574;
+ goto case 580;
}
}
}
}
}
}
- case 585: {
- if (la == null) { currentState = 585; break; }
- if (set[122].Get(la.kind)) {
- stateStack.Push(586);
- goto case 693;
+ case 591: {
+ if (la == null) { currentState = 591; break; }
+ if (set[123].Get(la.kind)) {
+ stateStack.Push(592);
+ goto case 699;
} else {
if (la.kind == 127 || la.kind == 210) {
- stateStack.Push(586);
- goto case 675;
+ stateStack.Push(592);
+ goto case 681;
} else {
if (la.kind == 101) {
- stateStack.Push(586);
- goto case 662;
+ stateStack.Push(592);
+ goto case 668;
} else {
if (la.kind == 119) {
- stateStack.Push(586);
- goto case 650;
+ stateStack.Push(592);
+ goto case 656;
} else {
if (la.kind == 98) {
- stateStack.Push(586);
- goto case 638;
+ stateStack.Push(592);
+ goto case 644;
} else {
if (la.kind == 186) {
- stateStack.Push(586);
- goto case 601;
+ stateStack.Push(592);
+ goto case 607;
} else {
if (la.kind == 172) {
- stateStack.Push(586);
- goto case 587;
+ stateStack.Push(592);
+ goto case 593;
} else {
Error(la);
- goto case 586;
+ goto case 592;
}
}
}
@@ -7252,716 +7304,716 @@ partial class ExpressionFinder {
}
}
}
- case 586: {
+ case 592: {
PopContext();
currentState = stateStack.Pop();
goto switchlbl;
- }
- case 587: {
- if (la == null) { currentState = 587; break; }
+ }
+ case 593: {
+ if (la == null) { currentState = 593; break; }
Expect(172, la); // "Operator"
- currentState = 588;
+ currentState = 594;
break;
}
- case 588: {
+ case 594: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- goto case 589;
+ goto case 595;
}
- case 589: {
- if (la == null) { currentState = 589; break; }
- currentState = 590;
+ case 595: {
+ if (la == null) { currentState = 595; break; }
+ currentState = 596;
break;
}
- case 590: {
+ case 596: {
PopContext();
- goto case 591;
+ goto case 597;
}
- case 591: {
- if (la == null) { currentState = 591; break; }
+ case 597: {
+ if (la == null) { currentState = 597; break; }
Expect(37, la); // "("
- currentState = 592;
+ currentState = 598;
break;
}
- case 592: {
- stateStack.Push(593);
- goto case 428;
+ case 598: {
+ stateStack.Push(599);
+ goto case 433;
}
- case 593: {
- if (la == null) { currentState = 593; break; }
+ case 599: {
+ if (la == null) { currentState = 599; break; }
Expect(38, la); // ")"
- currentState = 594;
+ currentState = 600;
break;
}
- case 594: {
- if (la == null) { currentState = 594; break; }
+ case 600: {
+ if (la == null) { currentState = 600; break; }
if (la.kind == 63) {
- currentState = 598;
+ currentState = 604;
break;
} else {
- goto case 595;
+ goto case 601;
}
}
- case 595: {
- stateStack.Push(596);
- goto case 259;
+ case 601: {
+ stateStack.Push(602);
+ goto case 261;
}
- case 596: {
- if (la == null) { currentState = 596; break; }
+ case 602: {
+ if (la == null) { currentState = 602; break; }
Expect(113, la); // "End"
- currentState = 597;
+ currentState = 603;
break;
}
- case 597: {
- if (la == null) { currentState = 597; break; }
+ case 603: {
+ if (la == null) { currentState = 603; break; }
Expect(172, la); // "Operator"
currentState = 23;
break;
}
- case 598: {
+ case 604: {
PushContext(Context.Type, la, t);
- goto case 599;
+ goto case 605;
}
- case 599: {
- if (la == null) { currentState = 599; break; }
+ case 605: {
+ if (la == null) { currentState = 605; break; }
if (la.kind == 40) {
- stateStack.Push(599);
- goto case 443;
+ stateStack.Push(605);
+ goto case 448;
} else {
- stateStack.Push(600);
+ stateStack.Push(606);
goto case 37;
}
}
- case 600: {
+ case 606: {
PopContext();
- goto case 595;
+ goto case 601;
}
- case 601: {
- if (la == null) { currentState = 601; break; }
+ case 607: {
+ if (la == null) { currentState = 607; break; }
Expect(186, la); // "Property"
- currentState = 602;
+ currentState = 608;
break;
}
- case 602: {
+ case 608: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(603);
+ stateStack.Push(609);
goto case 205;
}
- case 603: {
+ case 609: {
PopContext();
- goto case 604;
+ goto case 610;
}
- case 604: {
- if (la == null) { currentState = 604; break; }
+ case 610: {
+ if (la == null) { currentState = 610; break; }
if (la.kind == 37) {
- stateStack.Push(605);
- goto case 424;
+ stateStack.Push(611);
+ goto case 429;
} else {
- goto case 605;
+ goto case 611;
}
}
- case 605: {
- if (la == null) { currentState = 605; break; }
+ case 611: {
+ if (la == null) { currentState = 611; break; }
if (la.kind == 63) {
- currentState = 635;
+ currentState = 641;
break;
} else {
- goto case 606;
+ goto case 612;
}
}
- case 606: {
- if (la == null) { currentState = 606; break; }
+ case 612: {
+ if (la == null) { currentState = 612; break; }
if (la.kind == 136) {
- currentState = 630;
+ currentState = 636;
break;
} else {
- goto case 607;
+ goto case 613;
}
}
- case 607: {
- if (la == null) { currentState = 607; break; }
+ case 613: {
+ if (la == null) { currentState = 613; break; }
if (la.kind == 20) {
- currentState = 629;
+ currentState = 635;
break;
} else {
- goto case 608;
+ goto case 614;
}
}
- case 608: {
- stateStack.Push(609);
+ case 614: {
+ stateStack.Push(615);
goto case 23;
}
- case 609: {
+ case 615: {
PopContext();
- goto case 610;
+ goto case 616;
}
- case 610: {
- if (la == null) { currentState = 610; break; }
+ case 616: {
+ if (la == null) { currentState = 616; break; }
if (la.kind == 40) {
- stateStack.Push(610);
- goto case 443;
+ stateStack.Push(616);
+ goto case 448;
} else {
- goto case 611;
+ goto case 617;
}
}
- case 611: {
- if (la == null) { currentState = 611; break; }
+ case 617: {
+ if (la == null) { currentState = 617; break; }
if (set[151].Get(la.kind)) {
- currentState = 628;
+ currentState = 634;
break;
} else {
if (la.kind == 128 || la.kind == 198) {
PushContext(Context.Member, la, t);
- goto case 612;
+ goto case 618;
} else {
currentState = stateStack.Pop();
goto switchlbl;
}
}
}
- case 612: {
- if (la == null) { currentState = 612; break; }
+ case 618: {
+ if (la == null) { currentState = 618; break; }
if (la.kind == 128) {
- currentState = 613;
+ currentState = 619;
break;
} else {
if (la.kind == 198) {
- currentState = 613;
+ currentState = 619;
break;
} else {
Error(la);
- goto case 613;
+ goto case 619;
}
}
}
- case 613: {
- if (la == null) { currentState = 613; break; }
+ case 619: {
+ if (la == null) { currentState = 619; break; }
if (la.kind == 37) {
- stateStack.Push(614);
- goto case 424;
+ stateStack.Push(620);
+ goto case 429;
} else {
- goto case 614;
+ goto case 620;
}
}
- case 614: {
- stateStack.Push(615);
- goto case 259;
+ case 620: {
+ stateStack.Push(621);
+ goto case 261;
}
- case 615: {
- if (la == null) { currentState = 615; break; }
+ case 621: {
+ if (la == null) { currentState = 621; break; }
Expect(113, la); // "End"
- currentState = 616;
+ currentState = 622;
break;
}
- case 616: {
- if (la == null) { currentState = 616; break; }
+ case 622: {
+ if (la == null) { currentState = 622; break; }
if (la.kind == 128) {
- currentState = 617;
+ currentState = 623;
break;
} else {
if (la.kind == 198) {
- currentState = 617;
+ currentState = 623;
break;
} else {
Error(la);
- goto case 617;
+ goto case 623;
}
}
}
- case 617: {
- stateStack.Push(618);
+ case 623: {
+ stateStack.Push(624);
goto case 23;
}
- case 618: {
- if (la == null) { currentState = 618; break; }
- if (set[110].Get(la.kind)) {
- goto case 621;
+ case 624: {
+ if (la == null) { currentState = 624; break; }
+ if (set[111].Get(la.kind)) {
+ goto case 627;
} else {
- goto case 619;
+ goto case 625;
}
}
- case 619: {
- if (la == null) { currentState = 619; break; }
+ case 625: {
+ if (la == null) { currentState = 625; break; }
Expect(113, la); // "End"
- currentState = 620;
+ currentState = 626;
break;
}
- case 620: {
- if (la == null) { currentState = 620; break; }
+ case 626: {
+ if (la == null) { currentState = 626; break; }
Expect(186, la); // "Property"
currentState = 23;
break;
}
- case 621: {
- if (la == null) { currentState = 621; break; }
+ case 627: {
+ if (la == null) { currentState = 627; break; }
if (la.kind == 40) {
- stateStack.Push(621);
- goto case 443;
+ stateStack.Push(627);
+ goto case 448;
} else {
- goto case 622;
+ goto case 628;
}
}
- case 622: {
- if (la == null) { currentState = 622; break; }
+ case 628: {
+ if (la == null) { currentState = 628; break; }
if (set[151].Get(la.kind)) {
- currentState = 622;
+ currentState = 628;
break;
} else {
if (la.kind == 128) {
- currentState = 623;
+ currentState = 629;
break;
} else {
if (la.kind == 198) {
- currentState = 623;
+ currentState = 629;
break;
} else {
Error(la);
- goto case 623;
+ goto case 629;
}
}
}
}
- case 623: {
- if (la == null) { currentState = 623; break; }
+ case 629: {
+ if (la == null) { currentState = 629; break; }
if (la.kind == 37) {
- stateStack.Push(624);
- goto case 424;
+ stateStack.Push(630);
+ goto case 429;
} else {
- goto case 624;
+ goto case 630;
}
}
- case 624: {
- stateStack.Push(625);
- goto case 259;
+ case 630: {
+ stateStack.Push(631);
+ goto case 261;
}
- case 625: {
- if (la == null) { currentState = 625; break; }
+ case 631: {
+ if (la == null) { currentState = 631; break; }
Expect(113, la); // "End"
- currentState = 626;
+ currentState = 632;
break;
}
- case 626: {
- if (la == null) { currentState = 626; break; }
+ case 632: {
+ if (la == null) { currentState = 632; break; }
if (la.kind == 128) {
- currentState = 627;
+ currentState = 633;
break;
} else {
if (la.kind == 198) {
- currentState = 627;
+ currentState = 633;
break;
} else {
Error(la);
- goto case 627;
+ goto case 633;
}
}
}
- case 627: {
- stateStack.Push(619);
+ case 633: {
+ stateStack.Push(625);
goto case 23;
}
- case 628: {
+ case 634: {
SetIdentifierExpected(la);
- goto case 611;
+ goto case 617;
}
- case 629: {
- stateStack.Push(608);
+ case 635: {
+ stateStack.Push(614);
goto case 55;
}
- case 630: {
+ case 636: {
PushContext(Context.Type, la, t);
- stateStack.Push(631);
+ stateStack.Push(637);
goto case 37;
}
- case 631: {
+ case 637: {
PopContext();
- goto case 632;
+ goto case 638;
}
- case 632: {
- if (la == null) { currentState = 632; break; }
+ case 638: {
+ if (la == null) { currentState = 638; break; }
if (la.kind == 22) {
- currentState = 633;
+ currentState = 639;
break;
} else {
- goto case 607;
+ goto case 613;
}
}
- case 633: {
+ case 639: {
PushContext(Context.Type, la, t);
- stateStack.Push(634);
+ stateStack.Push(640);
goto case 37;
}
- case 634: {
+ case 640: {
PopContext();
- goto case 632;
+ goto case 638;
}
- case 635: {
+ case 641: {
PushContext(Context.Type, la, t);
- goto case 636;
+ goto case 642;
}
- case 636: {
- if (la == null) { currentState = 636; break; }
+ case 642: {
+ if (la == null) { currentState = 642; break; }
if (la.kind == 40) {
- stateStack.Push(636);
- goto case 443;
+ stateStack.Push(642);
+ goto case 448;
} else {
if (la.kind == 162) {
- stateStack.Push(637);
+ stateStack.Push(643);
goto case 85;
} else {
if (set[16].Get(la.kind)) {
- stateStack.Push(637);
+ stateStack.Push(643);
goto case 37;
} else {
Error(la);
- goto case 637;
+ goto case 643;
}
}
}
}
- case 637: {
+ case 643: {
PopContext();
- goto case 606;
+ goto case 612;
}
- case 638: {
- if (la == null) { currentState = 638; break; }
+ case 644: {
+ if (la == null) { currentState = 644; break; }
Expect(98, la); // "Custom"
- currentState = 639;
+ currentState = 645;
break;
}
- case 639: {
- stateStack.Push(640);
- goto case 650;
+ case 645: {
+ stateStack.Push(646);
+ goto case 656;
}
- case 640: {
- if (la == null) { currentState = 640; break; }
- if (set[115].Get(la.kind)) {
- goto case 642;
+ case 646: {
+ if (la == null) { currentState = 646; break; }
+ if (set[116].Get(la.kind)) {
+ goto case 648;
} else {
Expect(113, la); // "End"
- currentState = 641;
+ currentState = 647;
break;
}
}
- case 641: {
- if (la == null) { currentState = 641; break; }
+ case 647: {
+ if (la == null) { currentState = 647; break; }
Expect(119, la); // "Event"
currentState = 23;
break;
}
- case 642: {
- if (la == null) { currentState = 642; break; }
+ case 648: {
+ if (la == null) { currentState = 648; break; }
if (la.kind == 40) {
- stateStack.Push(642);
- goto case 443;
+ stateStack.Push(648);
+ goto case 448;
} else {
if (la.kind == 56) {
- currentState = 643;
+ currentState = 649;
break;
} else {
if (la.kind == 193) {
- currentState = 643;
+ currentState = 649;
break;
} else {
if (la.kind == 189) {
- currentState = 643;
+ currentState = 649;
break;
} else {
Error(la);
- goto case 643;
+ goto case 649;
}
}
}
}
}
- case 643: {
- if (la == null) { currentState = 643; break; }
+ case 649: {
+ if (la == null) { currentState = 649; break; }
Expect(37, la); // "("
- currentState = 644;
+ currentState = 650;
break;
}
- case 644: {
- stateStack.Push(645);
- goto case 428;
+ case 650: {
+ stateStack.Push(651);
+ goto case 433;
}
- case 645: {
- if (la == null) { currentState = 645; break; }
+ case 651: {
+ if (la == null) { currentState = 651; break; }
Expect(38, la); // ")"
- currentState = 646;
+ currentState = 652;
break;
}
- case 646: {
- stateStack.Push(647);
- goto case 259;
+ case 652: {
+ stateStack.Push(653);
+ goto case 261;
}
- case 647: {
- if (la == null) { currentState = 647; break; }
+ case 653: {
+ if (la == null) { currentState = 653; break; }
Expect(113, la); // "End"
- currentState = 648;
+ currentState = 654;
break;
}
- case 648: {
- if (la == null) { currentState = 648; break; }
+ case 654: {
+ if (la == null) { currentState = 654; break; }
if (la.kind == 56) {
- currentState = 649;
+ currentState = 655;
break;
} else {
if (la.kind == 193) {
- currentState = 649;
+ currentState = 655;
break;
} else {
if (la.kind == 189) {
- currentState = 649;
+ currentState = 655;
break;
} else {
Error(la);
- goto case 649;
+ goto case 655;
}
}
}
}
- case 649: {
- stateStack.Push(640);
+ case 655: {
+ stateStack.Push(646);
goto case 23;
}
- case 650: {
- if (la == null) { currentState = 650; break; }
+ case 656: {
+ if (la == null) { currentState = 656; break; }
Expect(119, la); // "Event"
- currentState = 651;
+ currentState = 657;
break;
}
- case 651: {
+ case 657: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(652);
+ stateStack.Push(658);
goto case 205;
}
- case 652: {
+ case 658: {
PopContext();
- goto case 653;
+ goto case 659;
}
- case 653: {
- if (la == null) { currentState = 653; break; }
+ case 659: {
+ if (la == null) { currentState = 659; break; }
if (la.kind == 63) {
- currentState = 660;
+ currentState = 666;
break;
} else {
if (set[152].Get(la.kind)) {
if (la.kind == 37) {
- stateStack.Push(654);
- goto case 424;
+ stateStack.Push(660);
+ goto case 429;
} else {
- goto case 654;
+ goto case 660;
}
} else {
Error(la);
- goto case 654;
+ goto case 660;
}
}
}
- case 654: {
- if (la == null) { currentState = 654; break; }
+ case 660: {
+ if (la == null) { currentState = 660; break; }
if (la.kind == 136) {
- currentState = 655;
+ currentState = 661;
break;
} else {
goto case 23;
}
}
- case 655: {
+ case 661: {
PushContext(Context.Type, la, t);
- stateStack.Push(656);
+ stateStack.Push(662);
goto case 37;
}
- case 656: {
+ case 662: {
PopContext();
- goto case 657;
+ goto case 663;
}
- case 657: {
- if (la == null) { currentState = 657; break; }
+ case 663: {
+ if (la == null) { currentState = 663; break; }
if (la.kind == 22) {
- currentState = 658;
+ currentState = 664;
break;
} else {
goto case 23;
}
}
- case 658: {
+ case 664: {
PushContext(Context.Type, la, t);
- stateStack.Push(659);
+ stateStack.Push(665);
goto case 37;
}
- case 659: {
+ case 665: {
PopContext();
- goto case 657;
+ goto case 663;
}
- case 660: {
+ case 666: {
PushContext(Context.Type, la, t);
- stateStack.Push(661);
+ stateStack.Push(667);
goto case 37;
}
- case 661: {
+ case 667: {
PopContext();
- goto case 654;
+ goto case 660;
}
- case 662: {
- if (la == null) { currentState = 662; break; }
+ case 668: {
+ if (la == null) { currentState = 668; break; }
Expect(101, la); // "Declare"
- currentState = 663;
+ currentState = 669;
break;
}
- case 663: {
- if (la == null) { currentState = 663; break; }
+ case 669: {
+ if (la == null) { currentState = 669; break; }
if (la.kind == 62 || la.kind == 66 || la.kind == 223) {
- currentState = 664;
+ currentState = 670;
break;
} else {
- goto case 664;
+ goto case 670;
}
}
- case 664: {
- if (la == null) { currentState = 664; break; }
+ case 670: {
+ if (la == null) { currentState = 670; break; }
if (la.kind == 210) {
- currentState = 665;
+ currentState = 671;
break;
} else {
if (la.kind == 127) {
- currentState = 665;
+ currentState = 671;
break;
} else {
Error(la);
- goto case 665;
+ goto case 671;
}
}
}
- case 665: {
+ case 671: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(666);
+ stateStack.Push(672);
goto case 205;
}
- case 666: {
+ case 672: {
PopContext();
- goto case 667;
+ goto case 673;
}
- case 667: {
- if (la == null) { currentState = 667; break; }
+ case 673: {
+ if (la == null) { currentState = 673; break; }
Expect(149, la); // "Lib"
- currentState = 668;
+ currentState = 674;
break;
}
- case 668: {
- if (la == null) { currentState = 668; break; }
+ case 674: {
+ if (la == null) { currentState = 674; break; }
Expect(3, la); // LiteralString
- currentState = 669;
+ currentState = 675;
break;
}
- case 669: {
- if (la == null) { currentState = 669; break; }
+ case 675: {
+ if (la == null) { currentState = 675; break; }
if (la.kind == 59) {
- currentState = 674;
+ currentState = 680;
break;
} else {
- goto case 670;
+ goto case 676;
}
}
- case 670: {
- if (la == null) { currentState = 670; break; }
+ case 676: {
+ if (la == null) { currentState = 676; break; }
if (la.kind == 37) {
- stateStack.Push(671);
- goto case 424;
+ stateStack.Push(677);
+ goto case 429;
} else {
- goto case 671;
+ goto case 677;
}
}
- case 671: {
- if (la == null) { currentState = 671; break; }
+ case 677: {
+ if (la == null) { currentState = 677; break; }
if (la.kind == 63) {
- currentState = 672;
+ currentState = 678;
break;
} else {
goto case 23;
}
}
- case 672: {
+ case 678: {
PushContext(Context.Type, la, t);
- stateStack.Push(673);
+ stateStack.Push(679);
goto case 37;
}
- case 673: {
+ case 679: {
PopContext();
goto case 23;
}
- case 674: {
- if (la == null) { currentState = 674; break; }
+ case 680: {
+ if (la == null) { currentState = 680; break; }
Expect(3, la); // LiteralString
- currentState = 670;
+ currentState = 676;
break;
}
- case 675: {
- if (la == null) { currentState = 675; break; }
+ case 681: {
+ if (la == null) { currentState = 681; break; }
if (la.kind == 210) {
- currentState = 676;
+ currentState = 682;
break;
} else {
if (la.kind == 127) {
- currentState = 676;
+ currentState = 682;
break;
} else {
Error(la);
- goto case 676;
+ goto case 682;
}
}
}
- case 676: {
+ case 682: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- goto case 677;
+ goto case 683;
}
- case 677: {
- if (la == null) { currentState = 677; break; }
- currentState = 678;
+ case 683: {
+ if (la == null) { currentState = 683; break; }
+ currentState = 684;
break;
}
- case 678: {
+ case 684: {
PopContext();
- goto case 679;
+ goto case 685;
}
- case 679: {
- if (la == null) { currentState = 679; break; }
+ case 685: {
+ if (la == null) { currentState = 685; break; }
if (la.kind == 37) {
- currentState = 689;
+ currentState = 695;
break;
} else {
if (la.kind == 63) {
- currentState = 687;
+ currentState = 693;
break;
} else {
- goto case 680;
+ goto case 686;
}
}
}
- case 680: {
- if (la == null) { currentState = 680; break; }
+ case 686: {
+ if (la == null) { currentState = 686; break; }
if (la.kind == 134 || la.kind == 136) {
- currentState = 684;
+ currentState = 690;
break;
} else {
- goto case 681;
+ goto case 687;
}
}
- case 681: {
- stateStack.Push(682);
- goto case 259;
+ case 687: {
+ stateStack.Push(688);
+ goto case 261;
}
- case 682: {
- if (la == null) { currentState = 682; break; }
+ case 688: {
+ if (la == null) { currentState = 688; break; }
Expect(113, la); // "End"
- currentState = 683;
+ currentState = 689;
break;
}
- case 683: {
- if (la == null) { currentState = 683; break; }
+ case 689: {
+ if (la == null) { currentState = 689; break; }
if (la.kind == 210) {
currentState = 23;
break;
@@ -7970,129 +8022,129 @@ partial class ExpressionFinder {
currentState = 23;
break;
} else {
- goto case 531;
+ goto case 537;
}
}
}
- case 684: {
- if (la == null) { currentState = 684; break; }
+ case 690: {
+ if (la == null) { currentState = 690; break; }
if (la.kind == 153 || la.kind == 158 || la.kind == 159) {
- currentState = 686;
+ currentState = 692;
break;
} else {
- goto case 685;
+ goto case 691;
}
}
- case 685: {
- stateStack.Push(681);
+ case 691: {
+ stateStack.Push(687);
goto case 37;
}
- case 686: {
- if (la == null) { currentState = 686; break; }
+ case 692: {
+ if (la == null) { currentState = 692; break; }
Expect(26, la); // "."
- currentState = 685;
+ currentState = 691;
break;
}
- case 687: {
+ case 693: {
PushContext(Context.Type, la, t);
- stateStack.Push(688);
+ stateStack.Push(694);
goto case 37;
}
- case 688: {
+ case 694: {
PopContext();
- goto case 680;
+ goto case 686;
}
- case 689: {
+ case 695: {
SetIdentifierExpected(la);
- goto case 690;
+ goto case 696;
}
- case 690: {
- if (la == null) { currentState = 690; break; }
+ case 696: {
+ if (la == null) { currentState = 696; break; }
if (set[150].Get(la.kind)) {
if (la.kind == 169) {
- currentState = 692;
+ currentState = 698;
break;
} else {
- if (set[77].Get(la.kind)) {
- stateStack.Push(691);
- goto case 428;
+ if (set[78].Get(la.kind)) {
+ stateStack.Push(697);
+ goto case 433;
} else {
Error(la);
- goto case 691;
+ goto case 697;
}
}
} else {
- goto case 691;
+ goto case 697;
}
}
- case 691: {
- if (la == null) { currentState = 691; break; }
+ case 697: {
+ if (la == null) { currentState = 697; break; }
Expect(38, la); // ")"
- currentState = 679;
+ currentState = 685;
break;
}
- case 692: {
- stateStack.Push(691);
- goto case 501;
+ case 698: {
+ stateStack.Push(697);
+ goto case 507;
}
- case 693: {
- stateStack.Push(694);
+ case 699: {
+ stateStack.Push(700);
SetIdentifierExpected(la);
- goto case 695;
+ goto case 701;
}
- case 694: {
- if (la == null) { currentState = 694; break; }
+ case 700: {
+ if (la == null) { currentState = 700; break; }
if (la.kind == 22) {
- currentState = 693;
+ currentState = 699;
break;
} else {
goto case 23;
}
}
- case 695: {
- if (la == null) { currentState = 695; break; }
+ case 701: {
+ if (la == null) { currentState = 701; break; }
if (la.kind == 88) {
- currentState = 696;
+ currentState = 702;
break;
} else {
- goto case 696;
+ goto case 702;
}
}
- case 696: {
+ case 702: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- stateStack.Push(697);
- goto case 707;
+ stateStack.Push(703);
+ goto case 713;
}
- case 697: {
+ case 703: {
PopContext();
- goto case 698;
+ goto case 704;
}
- case 698: {
- if (la == null) { currentState = 698; break; }
+ case 704: {
+ if (la == null) { currentState = 704; break; }
if (la.kind == 33) {
- currentState = 699;
+ currentState = 705;
break;
} else {
- goto case 699;
+ goto case 705;
}
}
- case 699: {
- if (la == null) { currentState = 699; break; }
+ case 705: {
+ if (la == null) { currentState = 705; break; }
if (la.kind == 37) {
- currentState = 704;
+ currentState = 710;
break;
} else {
if (la.kind == 63) {
- currentState = 701;
+ currentState = 707;
break;
} else {
- goto case 700;
+ goto case 706;
}
}
}
- case 700: {
- if (la == null) { currentState = 700; break; }
+ case 706: {
+ if (la == null) { currentState = 706; break; }
if (la.kind == 20) {
currentState = 55;
break;
@@ -8101,56 +8153,56 @@ partial class ExpressionFinder {
goto switchlbl;
}
}
- case 701: {
+ case 707: {
PushContext(Context.Type, la, t);
- goto case 702;
+ goto case 708;
}
- case 702: {
- if (la == null) { currentState = 702; break; }
+ case 708: {
+ if (la == null) { currentState = 708; break; }
if (la.kind == 162) {
- stateStack.Push(703);
+ stateStack.Push(709);
goto case 85;
} else {
if (set[16].Get(la.kind)) {
- stateStack.Push(703);
+ stateStack.Push(709);
goto case 37;
} else {
Error(la);
- goto case 703;
+ goto case 709;
}
}
}
- case 703: {
+ case 709: {
PopContext();
- goto case 700;
+ goto case 706;
}
- case 704: {
+ case 710: {
nextTokenIsPotentialStartOfExpression = true;
- goto case 705;
+ goto case 711;
}
- case 705: {
- if (la == null) { currentState = 705; break; }
+ case 711: {
+ if (la == null) { currentState = 711; break; }
if (set[23].Get(la.kind)) {
- stateStack.Push(706);
+ stateStack.Push(712);
goto case 55;
} else {
- goto case 706;
+ goto case 712;
}
}
- case 706: {
- if (la == null) { currentState = 706; break; }
+ case 712: {
+ if (la == null) { currentState = 712; break; }
if (la.kind == 22) {
- currentState = 704;
+ currentState = 710;
break;
} else {
Expect(38, la); // ")"
- currentState = 699;
+ currentState = 705;
break;
}
}
- case 707: {
- if (la == null) { currentState = 707; break; }
- if (set[137].Get(la.kind)) {
+ case 713: {
+ if (la == null) { currentState = 713; break; }
+ if (set[138].Get(la.kind)) {
currentState = stateStack.Pop();
break;
} else {
@@ -8165,249 +8217,249 @@ partial class ExpressionFinder {
}
}
}
- case 708: {
+ case 714: {
isMissingModifier = false;
- goto case 582;
+ goto case 588;
}
- case 709: {
- if (la == null) { currentState = 709; break; }
+ case 715: {
+ if (la == null) { currentState = 715; break; }
Expect(136, la); // "Implements"
- currentState = 710;
+ currentState = 716;
break;
}
- case 710: {
+ case 716: {
PushContext(Context.Type, la, t);
- stateStack.Push(711);
+ stateStack.Push(717);
goto case 37;
}
- case 711: {
+ case 717: {
PopContext();
- goto case 712;
+ goto case 718;
}
- case 712: {
- if (la == null) { currentState = 712; break; }
+ case 718: {
+ if (la == null) { currentState = 718; break; }
if (la.kind == 22) {
- currentState = 713;
+ currentState = 719;
break;
} else {
- stateStack.Push(574);
+ stateStack.Push(580);
goto case 23;
}
}
- case 713: {
+ case 719: {
PushContext(Context.Type, la, t);
- stateStack.Push(714);
+ stateStack.Push(720);
goto case 37;
}
- case 714: {
+ case 720: {
PopContext();
- goto case 712;
+ goto case 718;
}
- case 715: {
- if (la == null) { currentState = 715; break; }
+ case 721: {
+ if (la == null) { currentState = 721; break; }
Expect(140, la); // "Inherits"
- currentState = 716;
+ currentState = 722;
break;
}
- case 716: {
+ case 722: {
PushContext(Context.Type, la, t);
- stateStack.Push(717);
+ stateStack.Push(723);
goto case 37;
}
- case 717: {
+ case 723: {
PopContext();
- stateStack.Push(572);
+ stateStack.Push(578);
goto case 23;
}
- case 718: {
- if (la == null) { currentState = 718; break; }
+ case 724: {
+ if (la == null) { currentState = 724; break; }
Expect(169, la); // "Of"
- currentState = 719;
+ currentState = 725;
break;
}
- case 719: {
- stateStack.Push(720);
- goto case 501;
+ case 725: {
+ stateStack.Push(726);
+ goto case 507;
}
- case 720: {
- if (la == null) { currentState = 720; break; }
+ case 726: {
+ if (la == null) { currentState = 726; break; }
Expect(38, la); // ")"
- currentState = 569;
+ currentState = 575;
break;
}
- case 721: {
+ case 727: {
isMissingModifier = false;
goto case 28;
}
- case 722: {
+ case 728: {
PushContext(Context.Type, la, t);
- stateStack.Push(723);
+ stateStack.Push(729);
goto case 37;
}
- case 723: {
+ case 729: {
PopContext();
- goto case 724;
+ goto case 730;
}
- case 724: {
- if (la == null) { currentState = 724; break; }
+ case 730: {
+ if (la == null) { currentState = 730; break; }
if (la.kind == 22) {
- currentState = 725;
+ currentState = 731;
break;
} else {
stateStack.Push(17);
goto case 23;
}
}
- case 725: {
+ case 731: {
PushContext(Context.Type, la, t);
- stateStack.Push(726);
+ stateStack.Push(732);
goto case 37;
}
- case 726: {
+ case 732: {
PopContext();
- goto case 724;
+ goto case 730;
}
- case 727: {
- if (la == null) { currentState = 727; break; }
+ case 733: {
+ if (la == null) { currentState = 733; break; }
Expect(169, la); // "Of"
- currentState = 728;
+ currentState = 734;
break;
}
- case 728: {
- stateStack.Push(729);
- goto case 501;
+ case 734: {
+ stateStack.Push(735);
+ goto case 507;
}
- case 729: {
- if (la == null) { currentState = 729; break; }
+ case 735: {
+ if (la == null) { currentState = 735; break; }
Expect(38, la); // ")"
currentState = 14;
break;
}
- case 730: {
+ case 736: {
PushContext(Context.Identifier, la, t);
SetIdentifierExpected(la);
- goto case 731;
+ goto case 737;
}
- case 731: {
- if (la == null) { currentState = 731; break; }
+ case 737: {
+ if (la == null) { currentState = 737; break; }
if (set[49].Get(la.kind)) {
- currentState = 731;
+ currentState = 737;
break;
} else {
PopContext();
- stateStack.Push(732);
+ stateStack.Push(738);
goto case 23;
}
}
- case 732: {
- if (la == null) { currentState = 732; break; }
+ case 738: {
+ if (la == null) { currentState = 738; break; }
if (set[3].Get(la.kind)) {
- stateStack.Push(732);
+ stateStack.Push(738);
goto case 5;
} else {
Expect(113, la); // "End"
- currentState = 733;
+ currentState = 739;
break;
}
}
- case 733: {
- if (la == null) { currentState = 733; break; }
+ case 739: {
+ if (la == null) { currentState = 739; break; }
Expect(160, la); // "Namespace"
currentState = 23;
break;
}
- case 734: {
- if (la == null) { currentState = 734; break; }
+ case 740: {
+ if (la == null) { currentState = 740; break; }
Expect(137, la); // "Imports"
- currentState = 735;
+ currentState = 741;
break;
}
- case 735: {
+ case 741: {
PushContext(Context.Importable, la, t);
nextTokenIsStartOfImportsOrAccessExpression = true;
- goto case 736;
+ goto case 742;
}
- case 736: {
- if (la == null) { currentState = 736; break; }
+ case 742: {
+ if (la == null) { currentState = 742; break; }
if (set[153].Get(la.kind)) {
- currentState = 742;
+ currentState = 748;
break;
} else {
if (la.kind == 10) {
- currentState = 738;
+ currentState = 744;
break;
} else {
Error(la);
- goto case 737;
+ goto case 743;
}
}
}
- case 737: {
+ case 743: {
PopContext();
goto case 23;
}
- case 738: {
- stateStack.Push(739);
+ case 744: {
+ stateStack.Push(745);
goto case 205;
}
- case 739: {
- if (la == null) { currentState = 739; break; }
+ case 745: {
+ if (la == null) { currentState = 745; break; }
Expect(20, la); // "="
- currentState = 740;
+ currentState = 746;
break;
}
- case 740: {
- if (la == null) { currentState = 740; break; }
+ case 746: {
+ if (la == null) { currentState = 746; break; }
Expect(3, la); // LiteralString
- currentState = 741;
+ currentState = 747;
break;
}
- case 741: {
- if (la == null) { currentState = 741; break; }
+ case 747: {
+ if (la == null) { currentState = 747; break; }
Expect(11, la); // XmlCloseTag
- currentState = 737;
+ currentState = 743;
break;
}
- case 742: {
- if (la == null) { currentState = 742; break; }
+ case 748: {
+ if (la == null) { currentState = 748; break; }
if (la.kind == 33 || la.kind == 37) {
- stateStack.Push(742);
+ stateStack.Push(748);
goto case 42;
} else {
if (la.kind == 20 || la.kind == 26) {
- currentState = 743;
+ currentState = 749;
break;
} else {
- goto case 737;
+ goto case 743;
}
}
}
- case 743: {
- stateStack.Push(737);
+ case 749: {
+ stateStack.Push(743);
goto case 37;
}
- case 744: {
- if (la == null) { currentState = 744; break; }
+ case 750: {
+ if (la == null) { currentState = 750; break; }
Expect(173, la); // "Option"
- currentState = 745;
+ currentState = 751;
break;
}
- case 745: {
- if (la == null) { currentState = 745; break; }
+ case 751: {
+ if (la == null) { currentState = 751; break; }
if (la.kind == 121 || la.kind == 139 || la.kind == 207) {
- currentState = 747;
+ currentState = 753;
break;
} else {
if (la.kind == 87) {
- currentState = 746;
+ currentState = 752;
break;
} else {
- goto case 531;
+ goto case 537;
}
}
}
- case 746: {
- if (la == null) { currentState = 746; break; }
+ case 752: {
+ if (la == null) { currentState = 752; break; }
if (la.kind == 213) {
currentState = 23;
break;
@@ -8416,12 +8468,12 @@ partial class ExpressionFinder {
currentState = 23;
break;
} else {
- goto case 531;
+ goto case 537;
}
}
}
- case 747: {
- if (la == null) { currentState = 747; break; }
+ case 753: {
+ if (la == null) { currentState = 753; break; }
if (la.kind == 170 || la.kind == 171) {
currentState = 23;
break;
@@ -8518,6 +8570,7 @@ partial class ExpressionFinder {
new BitArray(new int[] {-66189316, 1174405160, -51383073, -972018405, -1030969182, 17106228, -97186288, 8259}),
new BitArray(new int[] {-65140740, 1174409128, -51384097, -971985637, -1030903646, 17106228, -97186288, 8259}),
new BitArray(new int[] {-65140740, 1174409128, -51384097, -972018405, -1030903646, 17106228, -97186288, 8259}),
+ new BitArray(new int[] {1048576, 3968, 0, 0, 65536, 0, 0, 0}),
new BitArray(new int[] {1048576, 3968, 0, 0, 0, 0, 0, 0}),
new BitArray(new int[] {-64092162, 1191182376, -1051937, -680509669, -1030969166, -1593504460, -21144002, 8903}),
new BitArray(new int[] {-64092162, 1191182376, -1051937, -680476901, -1030969166, -1593504460, -21144002, 8903}),
@@ -8592,7 +8645,6 @@ partial class ExpressionFinder {
new BitArray(new int[] {-64092162, 1191182376, -1051937, -680378597, -1030969166, -1593504460, -21144002, 8903}),
new BitArray(new int[] {0, 0, 33554432, 16777216, 16, 0, 16392, 0}),
new BitArray(new int[] {-66189316, 1174405160, -51383585, -972018405, -1030969182, 17106228, -97186288, 8259}),
- new BitArray(new int[] {1048576, 3968, 0, 0, 65536, 0, 0, 0}),
new BitArray(new int[] {0, 0, 288, 0, 0, 4210688, 0, 0}),
new BitArray(new int[] {-18434, -1, -1, -1, -1, -1, -1, -1}),
new BitArray(new int[] {-22530, -1, -1, -1, -1, -1, -1, -1}),
diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/PushParser.frame b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/PushParser.frame
index 2e7fcca080..73427172fc 100644
--- a/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/PushParser.frame
+++ b/src/Libraries/NRefactory/Project/Src/Lexer/VBNet/PushParser.frame
@@ -37,11 +37,13 @@ partial class ExpressionFinder {
bool wasQualifierTokenAtStart = false;
bool nextTokenIsPotentialStartOfExpression = false;
bool readXmlIdentifier = false;
+ bool xmlAllowed = true;
bool identifierExpected = false;
bool nextTokenIsStartOfImportsOrAccessExpression = false;
bool isMissingModifier = false;
bool isAlreadyInExpr = false;
bool wasNormalAttribute = false;
+ int lambdaNestingDepth = 0;
int activeArgument = 0;
List errors = new List();
diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs
index d5f5a8c3b1..6fd33cca4f 100644
--- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs
+++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/Parser.cs
@@ -183,7 +183,7 @@ out u);
void GlobalAttributeSection() {
Expect(40);
-#line 2823 "VBNET.ATG"
+#line 2826 "VBNET.ATG"
Location startPos = t.Location;
if (la.kind == 65) {
lexer.NextToken();
@@ -191,20 +191,20 @@ out u);
lexer.NextToken();
} else SynErr(243);
-#line 2825 "VBNET.ATG"
+#line 2828 "VBNET.ATG"
string attributeTarget = t.val != null ? t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture) : null;
List attributes = new List();
ASTAttribute attribute;
Expect(21);
Attribute(
-#line 2829 "VBNET.ATG"
+#line 2832 "VBNET.ATG"
out attribute);
-#line 2829 "VBNET.ATG"
+#line 2832 "VBNET.ATG"
attributes.Add(attribute);
while (
-#line 2830 "VBNET.ATG"
+#line 2833 "VBNET.ATG"
NotFinalComma()) {
if (la.kind == 22) {
lexer.NextToken();
@@ -216,10 +216,10 @@ NotFinalComma()) {
Expect(21);
}
Attribute(
-#line 2830 "VBNET.ATG"
+#line 2833 "VBNET.ATG"
out attribute);
-#line 2830 "VBNET.ATG"
+#line 2833 "VBNET.ATG"
attributes.Add(attribute);
}
if (la.kind == 22) {
@@ -228,7 +228,7 @@ out attribute);
Expect(39);
EndOfStmt();
-#line 2835 "VBNET.ATG"
+#line 2838 "VBNET.ATG"
AttributeSection section = new AttributeSection {
AttributeTarget = attributeTarget,
Attributes = attributes,
@@ -354,47 +354,47 @@ out aliasedType);
}
void Qualident(
-#line 3623 "VBNET.ATG"
+#line 3626 "VBNET.ATG"
out string qualident) {
-#line 3625 "VBNET.ATG"
+#line 3628 "VBNET.ATG"
string name;
qualidentBuilder.Length = 0;
Identifier();
-#line 3629 "VBNET.ATG"
+#line 3632 "VBNET.ATG"
qualidentBuilder.Append(t.val);
while (
-#line 3630 "VBNET.ATG"
+#line 3633 "VBNET.ATG"
DotAndIdentOrKw()) {
Expect(26);
IdentifierOrKeyword(
-#line 3630 "VBNET.ATG"
+#line 3633 "VBNET.ATG"
out name);
-#line 3630 "VBNET.ATG"
+#line 3633 "VBNET.ATG"
qualidentBuilder.Append('.'); qualidentBuilder.Append(name);
}
-#line 3632 "VBNET.ATG"
+#line 3635 "VBNET.ATG"
qualident = qualidentBuilder.ToString();
}
void TypeName(
-#line 2694 "VBNET.ATG"
+#line 2697 "VBNET.ATG"
out TypeReference typeref) {
-#line 2695 "VBNET.ATG"
+#line 2698 "VBNET.ATG"
ArrayList rank = null; Location startLocation = la.Location;
NonArrayTypeName(
-#line 2697 "VBNET.ATG"
+#line 2700 "VBNET.ATG"
out typeref, false);
ArrayTypeModifiers(
-#line 2698 "VBNET.ATG"
+#line 2701 "VBNET.ATG"
out rank);
-#line 2700 "VBNET.ATG"
+#line 2703 "VBNET.ATG"
if (typeref != null) {
if (rank != null) {
typeref.RankSpecifier = (int[])rank.ToArray(typeof(int));
@@ -429,10 +429,10 @@ out rank);
}
void AttributeSection(
-#line 2901 "VBNET.ATG"
+#line 2904 "VBNET.ATG"
out AttributeSection section) {
-#line 2903 "VBNET.ATG"
+#line 2906 "VBNET.ATG"
string attributeTarget = "";
List attributes = new List();
ASTAttribute attribute;
@@ -440,22 +440,22 @@ out AttributeSection section) {
Expect(40);
if (
-#line 2909 "VBNET.ATG"
+#line 2912 "VBNET.ATG"
IsLocalAttrTarget()) {
if (la.kind == 119) {
lexer.NextToken();
-#line 2910 "VBNET.ATG"
+#line 2913 "VBNET.ATG"
attributeTarget = "event";
} else if (la.kind == 195) {
lexer.NextToken();
-#line 2911 "VBNET.ATG"
+#line 2914 "VBNET.ATG"
attributeTarget = "return";
} else {
Identifier();
-#line 2914 "VBNET.ATG"
+#line 2917 "VBNET.ATG"
string val = t.val.ToLower(System.Globalization.CultureInfo.InvariantCulture);
if (val != "field" || val != "method" ||
val != "module" || val != "param" ||
@@ -468,20 +468,20 @@ IsLocalAttrTarget()) {
Expect(21);
}
Attribute(
-#line 2924 "VBNET.ATG"
+#line 2927 "VBNET.ATG"
out attribute);
-#line 2924 "VBNET.ATG"
+#line 2927 "VBNET.ATG"
attributes.Add(attribute);
while (
-#line 2925 "VBNET.ATG"
+#line 2928 "VBNET.ATG"
NotFinalComma()) {
Expect(22);
Attribute(
-#line 2925 "VBNET.ATG"
+#line 2928 "VBNET.ATG"
out attribute);
-#line 2925 "VBNET.ATG"
+#line 2928 "VBNET.ATG"
attributes.Add(attribute);
}
if (la.kind == 22) {
@@ -489,7 +489,7 @@ out attribute);
}
Expect(39);
-#line 2929 "VBNET.ATG"
+#line 2932 "VBNET.ATG"
section = new AttributeSection {
AttributeTarget = attributeTarget,
Attributes = attributes,
@@ -500,69 +500,69 @@ out attribute);
}
void TypeModifier(
-#line 3708 "VBNET.ATG"
+#line 3711 "VBNET.ATG"
ModifierList m) {
switch (la.kind) {
case 188: {
lexer.NextToken();
-#line 3709 "VBNET.ATG"
+#line 3712 "VBNET.ATG"
m.Add(Modifiers.Public, t.Location);
break;
}
case 187: {
lexer.NextToken();
-#line 3710 "VBNET.ATG"
+#line 3713 "VBNET.ATG"
m.Add(Modifiers.Protected, t.Location);
break;
}
case 125: {
lexer.NextToken();
-#line 3711 "VBNET.ATG"
+#line 3714 "VBNET.ATG"
m.Add(Modifiers.Internal, t.Location);
break;
}
case 185: {
lexer.NextToken();
-#line 3712 "VBNET.ATG"
+#line 3715 "VBNET.ATG"
m.Add(Modifiers.Private, t.Location);
break;
}
case 200: {
lexer.NextToken();
-#line 3713 "VBNET.ATG"
+#line 3716 "VBNET.ATG"
m.Add(Modifiers.Static, t.Location);
break;
}
case 199: {
lexer.NextToken();
-#line 3714 "VBNET.ATG"
+#line 3717 "VBNET.ATG"
m.Add(Modifiers.New, t.Location);
break;
}
case 156: {
lexer.NextToken();
-#line 3715 "VBNET.ATG"
+#line 3718 "VBNET.ATG"
m.Add(Modifiers.Abstract, t.Location);
break;
}
case 166: {
lexer.NextToken();
-#line 3716 "VBNET.ATG"
+#line 3719 "VBNET.ATG"
m.Add(Modifiers.Sealed, t.Location);
break;
}
case 183: {
lexer.NextToken();
-#line 3717 "VBNET.ATG"
+#line 3720 "VBNET.ATG"
m.Add(Modifiers.Partial, t.Location);
break;
}
@@ -1007,28 +1007,28 @@ out typeRef);
}
void TypeImplementsClause(
-#line 1617 "VBNET.ATG"
+#line 1620 "VBNET.ATG"
out List baseInterfaces) {
-#line 1619 "VBNET.ATG"
+#line 1622 "VBNET.ATG"
baseInterfaces = new List();
TypeReference type = null;
Expect(136);
TypeName(
-#line 1622 "VBNET.ATG"
+#line 1625 "VBNET.ATG"
out type);
-#line 1624 "VBNET.ATG"
+#line 1627 "VBNET.ATG"
if (type != null) baseInterfaces.Add(type);
while (la.kind == 22) {
lexer.NextToken();
TypeName(
-#line 1627 "VBNET.ATG"
+#line 1630 "VBNET.ATG"
out type);
-#line 1628 "VBNET.ATG"
+#line 1631 "VBNET.ATG"
if (type != null) baseInterfaces.Add(type);
}
EndOfStmt();
@@ -1158,10 +1158,10 @@ m, attributes);
}
void NonArrayTypeName(
-#line 2722 "VBNET.ATG"
+#line 2725 "VBNET.ATG"
out TypeReference typeref, bool canBeUnbound) {
-#line 2724 "VBNET.ATG"
+#line 2727 "VBNET.ATG"
string name;
typeref = null;
bool isGlobal = false;
@@ -1171,36 +1171,36 @@ out TypeReference typeref, bool canBeUnbound) {
lexer.NextToken();
Expect(26);
-#line 2729 "VBNET.ATG"
+#line 2732 "VBNET.ATG"
isGlobal = true;
}
QualIdentAndTypeArguments(
-#line 2730 "VBNET.ATG"
+#line 2733 "VBNET.ATG"
out typeref, canBeUnbound);
-#line 2731 "VBNET.ATG"
+#line 2734 "VBNET.ATG"
typeref.IsGlobal = isGlobal;
while (la.kind == 26) {
lexer.NextToken();
-#line 2732 "VBNET.ATG"
+#line 2735 "VBNET.ATG"
TypeReference nestedTypeRef;
QualIdentAndTypeArguments(
-#line 2733 "VBNET.ATG"
+#line 2736 "VBNET.ATG"
out nestedTypeRef, canBeUnbound);
-#line 2734 "VBNET.ATG"
+#line 2737 "VBNET.ATG"
typeref = new InnerClassTypeReference(typeref, nestedTypeRef.Type, nestedTypeRef.GenericTypes);
}
} else if (la.kind == 168) {
lexer.NextToken();
-#line 2737 "VBNET.ATG"
+#line 2740 "VBNET.ATG"
typeref = new TypeReference("System.Object", true);
if (la.kind == 33) {
lexer.NextToken();
-#line 2741 "VBNET.ATG"
+#line 2744 "VBNET.ATG"
List typeArguments = new List(1);
if (typeref != null) typeArguments.Add(typeref);
typeref = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true };
@@ -1208,15 +1208,15 @@ out nestedTypeRef, canBeUnbound);
}
} else if (StartOf(12)) {
PrimitiveTypeName(
-#line 2747 "VBNET.ATG"
+#line 2750 "VBNET.ATG"
out name);
-#line 2747 "VBNET.ATG"
+#line 2750 "VBNET.ATG"
typeref = new TypeReference(name, true);
if (la.kind == 33) {
lexer.NextToken();
-#line 2751 "VBNET.ATG"
+#line 2754 "VBNET.ATG"
List typeArguments = new List(1);
if (typeref != null) typeArguments.Add(typeref);
typeref = new TypeReference("System.Nullable", typeArguments) { IsKeyword = true };
@@ -1255,27 +1255,27 @@ out f);
}
void InterfaceBase(
-#line 1602 "VBNET.ATG"
+#line 1605 "VBNET.ATG"
out List bases) {
-#line 1604 "VBNET.ATG"
+#line 1607 "VBNET.ATG"
TypeReference type;
bases = new List();
Expect(140);
TypeName(
-#line 1608 "VBNET.ATG"
+#line 1611 "VBNET.ATG"
out type);
-#line 1608 "VBNET.ATG"
+#line 1611 "VBNET.ATG"
if (type != null) bases.Add(type);
while (la.kind == 22) {
lexer.NextToken();
TypeName(
-#line 1611 "VBNET.ATG"
+#line 1614 "VBNET.ATG"
out type);
-#line 1611 "VBNET.ATG"
+#line 1614 "VBNET.ATG"
if (type != null) bases.Add(type);
}
EndOfStmt();
@@ -1302,162 +1302,162 @@ TypeDeclaration newType) {
}
void FormalParameterList(
-#line 2939 "VBNET.ATG"
+#line 2942 "VBNET.ATG"
List parameter) {
-#line 2940 "VBNET.ATG"
+#line 2943 "VBNET.ATG"
ParameterDeclarationExpression p;
FormalParameter(
-#line 2942 "VBNET.ATG"
+#line 2945 "VBNET.ATG"
out p);
-#line 2942 "VBNET.ATG"
+#line 2945 "VBNET.ATG"
if (p != null) parameter.Add(p);
while (la.kind == 22) {
lexer.NextToken();
FormalParameter(
-#line 2944 "VBNET.ATG"
+#line 2947 "VBNET.ATG"
out p);
-#line 2944 "VBNET.ATG"
+#line 2947 "VBNET.ATG"
if (p != null) parameter.Add(p);
}
}
void MemberModifier(
-#line 3720 "VBNET.ATG"
+#line 3723 "VBNET.ATG"
ModifierList m) {
switch (la.kind) {
case 156: {
lexer.NextToken();
-#line 3721 "VBNET.ATG"
+#line 3724 "VBNET.ATG"
m.Add(Modifiers.Abstract, t.Location);
break;
}
case 102: {
lexer.NextToken();
-#line 3722 "VBNET.ATG"
+#line 3725 "VBNET.ATG"
m.Add(Modifiers.Default, t.Location);
break;
}
case 125: {
lexer.NextToken();
-#line 3723 "VBNET.ATG"
+#line 3726 "VBNET.ATG"
m.Add(Modifiers.Internal, t.Location);
break;
}
case 199: {
lexer.NextToken();
-#line 3724 "VBNET.ATG"
+#line 3727 "VBNET.ATG"
m.Add(Modifiers.New, t.Location);
break;
}
case 181: {
lexer.NextToken();
-#line 3725 "VBNET.ATG"
+#line 3728 "VBNET.ATG"
m.Add(Modifiers.Override, t.Location);
break;
}
case 157: {
lexer.NextToken();
-#line 3726 "VBNET.ATG"
+#line 3729 "VBNET.ATG"
m.Add(Modifiers.Abstract, t.Location);
break;
}
case 185: {
lexer.NextToken();
-#line 3727 "VBNET.ATG"
+#line 3730 "VBNET.ATG"
m.Add(Modifiers.Private, t.Location);
break;
}
case 187: {
lexer.NextToken();
-#line 3728 "VBNET.ATG"
+#line 3731 "VBNET.ATG"
m.Add(Modifiers.Protected, t.Location);
break;
}
case 188: {
lexer.NextToken();
-#line 3729 "VBNET.ATG"
+#line 3732 "VBNET.ATG"
m.Add(Modifiers.Public, t.Location);
break;
}
case 166: {
lexer.NextToken();
-#line 3730 "VBNET.ATG"
+#line 3733 "VBNET.ATG"
m.Add(Modifiers.Sealed, t.Location);
break;
}
case 167: {
lexer.NextToken();
-#line 3731 "VBNET.ATG"
+#line 3734 "VBNET.ATG"
m.Add(Modifiers.Sealed, t.Location);
break;
}
case 200: {
lexer.NextToken();
-#line 3732 "VBNET.ATG"
+#line 3735 "VBNET.ATG"
m.Add(Modifiers.Static, t.Location);
break;
}
case 180: {
lexer.NextToken();
-#line 3733 "VBNET.ATG"
+#line 3736 "VBNET.ATG"
m.Add(Modifiers.Virtual, t.Location);
break;
}
case 179: {
lexer.NextToken();
-#line 3734 "VBNET.ATG"
+#line 3737 "VBNET.ATG"
m.Add(Modifiers.Overloads, t.Location);
break;
}
case 190: {
lexer.NextToken();
-#line 3735 "VBNET.ATG"
+#line 3738 "VBNET.ATG"
m.Add(Modifiers.ReadOnly, t.Location);
break;
}
case 235: {
lexer.NextToken();
-#line 3736 "VBNET.ATG"
+#line 3739 "VBNET.ATG"
m.Add(Modifiers.WriteOnly, t.Location);
break;
}
case 234: {
lexer.NextToken();
-#line 3737 "VBNET.ATG"
+#line 3740 "VBNET.ATG"
m.Add(Modifiers.WithEvents, t.Location);
break;
}
case 105: {
lexer.NextToken();
-#line 3738 "VBNET.ATG"
+#line 3741 "VBNET.ATG"
m.Add(Modifiers.Dim, t.Location);
break;
}
case 183: {
lexer.NextToken();
-#line 3739 "VBNET.ATG"
+#line 3742 "VBNET.ATG"
m.Add(Modifiers.Partial, t.Location);
break;
}
@@ -2249,6 +2249,7 @@ out stmt);
Parameters = parameters,
TypeReference = returnType,
OverloadableOperator = operatorType,
+ Name = GetReflectionNameForOperator(operatorType, opConversionType),
ConversionType = opConversionType,
Body = (BlockStatement)stmt,
StartLocation = m.GetDeclarationLocation(startPos),
@@ -2506,28 +2507,28 @@ mod, attributes);
}
void Expr(
-#line 1661 "VBNET.ATG"
+#line 1664 "VBNET.ATG"
out Expression expr) {
-#line 1662 "VBNET.ATG"
+#line 1665 "VBNET.ATG"
expr = null; Location startLocation = la.Location;
if (
-#line 1665 "VBNET.ATG"
+#line 1668 "VBNET.ATG"
IsQueryExpression() ) {
QueryExpr(
-#line 1666 "VBNET.ATG"
+#line 1669 "VBNET.ATG"
out expr);
} else if (la.kind == 127 || la.kind == 210) {
LambdaExpr(
-#line 1667 "VBNET.ATG"
+#line 1670 "VBNET.ATG"
out expr);
} else if (StartOf(21)) {
DisjunctionExpr(
-#line 1668 "VBNET.ATG"
+#line 1671 "VBNET.ATG"
out expr);
} else SynErr(266);
-#line 1671 "VBNET.ATG"
+#line 1674 "VBNET.ATG"
if (expr != null) {
expr.StartLocation = startLocation;
expr.EndLocation = t.EndLocation;
@@ -2536,87 +2537,87 @@ out expr);
}
void ImplementsClause(
-#line 1634 "VBNET.ATG"
+#line 1637 "VBNET.ATG"
out List baseInterfaces) {
-#line 1636 "VBNET.ATG"
+#line 1639 "VBNET.ATG"
baseInterfaces = new List();
TypeReference type = null;
string memberName = null;
Expect(136);
NonArrayTypeName(
-#line 1641 "VBNET.ATG"
+#line 1644 "VBNET.ATG"
out type, false);
-#line 1642 "VBNET.ATG"
+#line 1645 "VBNET.ATG"
if (type != null) memberName = TypeReference.StripLastIdentifierFromType(ref type);
-#line 1643 "VBNET.ATG"
+#line 1646 "VBNET.ATG"
baseInterfaces.Add(new InterfaceImplementation(type, memberName));
while (la.kind == 22) {
lexer.NextToken();
NonArrayTypeName(
-#line 1645 "VBNET.ATG"
+#line 1648 "VBNET.ATG"
out type, false);
-#line 1646 "VBNET.ATG"
+#line 1649 "VBNET.ATG"
if (type != null) memberName = TypeReference.StripLastIdentifierFromType(ref type);
-#line 1647 "VBNET.ATG"
+#line 1650 "VBNET.ATG"
baseInterfaces.Add(new InterfaceImplementation(type, memberName));
}
}
void HandlesClause(
-#line 1592 "VBNET.ATG"
+#line 1595 "VBNET.ATG"
out List handlesClause) {
-#line 1594 "VBNET.ATG"
+#line 1597 "VBNET.ATG"
handlesClause = new List();
string name;
Expect(134);
EventMemberSpecifier(
-#line 1597 "VBNET.ATG"
+#line 1600 "VBNET.ATG"
out name);
-#line 1597 "VBNET.ATG"
+#line 1600 "VBNET.ATG"
if (name != null) handlesClause.Add(name);
while (la.kind == 22) {
lexer.NextToken();
EventMemberSpecifier(
-#line 1598 "VBNET.ATG"
+#line 1601 "VBNET.ATG"
out name);
-#line 1598 "VBNET.ATG"
+#line 1601 "VBNET.ATG"
if (name != null) handlesClause.Add(name);
}
}
void Block(
-#line 2987 "VBNET.ATG"
+#line 2990 "VBNET.ATG"
out Statement stmt) {
-#line 2990 "VBNET.ATG"
+#line 2993 "VBNET.ATG"
BlockStatement blockStmt = new BlockStatement();
/* in snippet parsing mode, t might be null */
if (t != null) blockStmt.StartLocation = t.EndLocation;
BlockStart(blockStmt);
while (StartOf(22) ||
-#line 2996 "VBNET.ATG"
+#line 2999 "VBNET.ATG"
IsEndStmtAhead()) {
if (
-#line 2996 "VBNET.ATG"
+#line 2999 "VBNET.ATG"
IsEndStmtAhead()) {
-#line 2997 "VBNET.ATG"
+#line 3000 "VBNET.ATG"
Token first = la;
Expect(113);
EndOfStmt();
-#line 3000 "VBNET.ATG"
+#line 3003 "VBNET.ATG"
AddChild(new EndStatement() {
StartLocation = first.Location,
EndLocation = first.EndLocation }
@@ -2628,7 +2629,7 @@ IsEndStmtAhead()) {
}
}
-#line 3009 "VBNET.ATG"
+#line 3012 "VBNET.ATG"
stmt = blockStmt;
if (t != null) blockStmt.EndLocation = t.EndLocation;
BlockEnd();
@@ -2636,26 +2637,26 @@ IsEndStmtAhead()) {
}
void Charset(
-#line 1584 "VBNET.ATG"
+#line 1587 "VBNET.ATG"
out CharsetModifier charsetModifier) {
-#line 1585 "VBNET.ATG"
+#line 1588 "VBNET.ATG"
charsetModifier = CharsetModifier.None;
if (la.kind == 127 || la.kind == 210) {
} else if (la.kind == 62) {
lexer.NextToken();
-#line 1586 "VBNET.ATG"
+#line 1589 "VBNET.ATG"
charsetModifier = CharsetModifier.Ansi;
} else if (la.kind == 66) {
lexer.NextToken();
-#line 1587 "VBNET.ATG"
+#line 1590 "VBNET.ATG"
charsetModifier = CharsetModifier.Auto;
} else if (la.kind == 223) {
lexer.NextToken();
-#line 1588 "VBNET.ATG"
+#line 1591 "VBNET.ATG"
charsetModifier = CharsetModifier.Unicode;
} else SynErr(267);
}
@@ -2783,10 +2784,10 @@ out CharsetModifier charsetModifier) {
}
void VariableDeclaratorPartAfterIdentifier(
-#line 1463 "VBNET.ATG"
+#line 1466 "VBNET.ATG"
List fieldDeclaration, string name) {
-#line 1465 "VBNET.ATG"
+#line 1468 "VBNET.ATG"
Expression expr = null;
TypeReference type = null;
ArrayList rank = null;
@@ -2794,28 +2795,28 @@ List fieldDeclaration, string name) {
Location startLocation = t.Location;
if (
-#line 1471 "VBNET.ATG"
+#line 1474 "VBNET.ATG"
IsSize() && !IsDims()) {
ArrayInitializationModifier(
-#line 1471 "VBNET.ATG"
+#line 1474 "VBNET.ATG"
out dimension);
}
if (
-#line 1472 "VBNET.ATG"
+#line 1475 "VBNET.ATG"
IsDims()) {
ArrayNameModifier(
-#line 1472 "VBNET.ATG"
+#line 1475 "VBNET.ATG"
out rank);
}
if (
-#line 1474 "VBNET.ATG"
+#line 1477 "VBNET.ATG"
IsObjectCreation()) {
Expect(63);
ObjectCreateExpression(
-#line 1474 "VBNET.ATG"
+#line 1477 "VBNET.ATG"
out expr);
-#line 1476 "VBNET.ATG"
+#line 1479 "VBNET.ATG"
if (expr is ObjectCreateExpression) {
type = ((ObjectCreateExpression)expr).CreateType.Clone();
} else {
@@ -2826,10 +2827,10 @@ out expr);
if (la.kind == 63) {
lexer.NextToken();
TypeName(
-#line 1483 "VBNET.ATG"
+#line 1486 "VBNET.ATG"
out type);
-#line 1485 "VBNET.ATG"
+#line 1488 "VBNET.ATG"
if (type != null) {
for (int i = fieldDeclaration.Count - 1; i >= 0; i--) {
VariableDeclaration vd = fieldDeclaration[i];
@@ -2842,7 +2843,7 @@ out type);
}
-#line 1497 "VBNET.ATG"
+#line 1500 "VBNET.ATG"
if (type == null && (dimension != null || rank != null)) {
type = new TypeReference("");
}
@@ -2869,12 +2870,12 @@ out type);
if (la.kind == 20) {
lexer.NextToken();
Expr(
-#line 1520 "VBNET.ATG"
+#line 1523 "VBNET.ATG"
out expr);
}
} else SynErr(269);
-#line 1523 "VBNET.ATG"
+#line 1526 "VBNET.ATG"
VariableDeclaration varDecl = new VariableDeclaration(name, expr, type);
varDecl.StartLocation = startLocation;
varDecl.EndLocation = t.Location;
@@ -2883,22 +2884,22 @@ out expr);
}
void VariableDeclarator(
-#line 1457 "VBNET.ATG"
+#line 1460 "VBNET.ATG"
List fieldDeclaration) {
Identifier();
-#line 1459 "VBNET.ATG"
+#line 1462 "VBNET.ATG"
string name = t.val;
VariableDeclaratorPartAfterIdentifier(
-#line 1460 "VBNET.ATG"
+#line 1463 "VBNET.ATG"
fieldDeclaration, name);
}
void ConstantDeclarator(
-#line 1438 "VBNET.ATG"
+#line 1441 "VBNET.ATG"
List constantDeclaration) {
-#line 1440 "VBNET.ATG"
+#line 1443 "VBNET.ATG"
Expression expr = null;
TypeReference type = null;
string name = String.Empty;
@@ -2906,20 +2907,20 @@ List constantDeclaration) {
Identifier();
-#line 1445 "VBNET.ATG"
+#line 1448 "VBNET.ATG"
name = t.val; location = t.Location;
if (la.kind == 63) {
lexer.NextToken();
TypeName(
-#line 1446 "VBNET.ATG"
+#line 1449 "VBNET.ATG"
out type);
}
Expect(20);
Expr(
-#line 1447 "VBNET.ATG"
+#line 1450 "VBNET.ATG"
out expr);
-#line 1449 "VBNET.ATG"
+#line 1452 "VBNET.ATG"
VariableDeclaration f = new VariableDeclaration(name, expr);
f.TypeReference = type;
f.StartLocation = location;
@@ -2928,10 +2929,10 @@ out expr);
}
void ObjectCreateExpression(
-#line 2123 "VBNET.ATG"
+#line 2126 "VBNET.ATG"
out Expression oce) {
-#line 2125 "VBNET.ATG"
+#line 2128 "VBNET.ATG"
TypeReference type = null;
CollectionInitializerExpression initializer = null;
List arguments = null;
@@ -2943,39 +2944,39 @@ out Expression oce) {
Expect(162);
if (StartOf(8)) {
NonArrayTypeName(
-#line 2134 "VBNET.ATG"
+#line 2137 "VBNET.ATG"
out type, false);
if (la.kind == 37) {
lexer.NextToken();
NormalOrReDimArgumentList(
-#line 2135 "VBNET.ATG"
+#line 2138 "VBNET.ATG"
out arguments, out canBeNormal, out canBeReDim);
Expect(38);
if (la.kind == 35 ||
-#line 2136 "VBNET.ATG"
+#line 2139 "VBNET.ATG"
la.kind == Tokens.OpenParenthesis) {
if (
-#line 2136 "VBNET.ATG"
+#line 2139 "VBNET.ATG"
la.kind == Tokens.OpenParenthesis) {
ArrayTypeModifiers(
-#line 2137 "VBNET.ATG"
+#line 2140 "VBNET.ATG"
out dimensions);
CollectionInitializer(
-#line 2138 "VBNET.ATG"
+#line 2141 "VBNET.ATG"
out initializer);
} else {
CollectionInitializer(
-#line 2139 "VBNET.ATG"
+#line 2142 "VBNET.ATG"
out initializer);
}
}
-#line 2141 "VBNET.ATG"
+#line 2144 "VBNET.ATG"
if (canBeReDim && !canBeNormal && initializer == null) initializer = new CollectionInitializerExpression();
}
}
-#line 2145 "VBNET.ATG"
+#line 2148 "VBNET.ATG"
if (initializer == null) {
oce = new ObjectCreateExpression(type, arguments);
} else {
@@ -2990,53 +2991,53 @@ out initializer);
if (la.kind == 126 || la.kind == 233) {
if (la.kind == 233) {
-#line 2160 "VBNET.ATG"
+#line 2163 "VBNET.ATG"
MemberInitializerExpression memberInitializer = null;
Expression anonymousMember = null;
lexer.NextToken();
-#line 2165 "VBNET.ATG"
+#line 2168 "VBNET.ATG"
CollectionInitializerExpression memberInitializers = new CollectionInitializerExpression();
memberInitializers.StartLocation = la.Location;
Expect(35);
if (la.kind == 26 || la.kind == 147) {
MemberInitializer(
-#line 2170 "VBNET.ATG"
+#line 2173 "VBNET.ATG"
out memberInitializer);
-#line 2171 "VBNET.ATG"
+#line 2174 "VBNET.ATG"
memberInitializers.CreateExpressions.Add(memberInitializer);
} else if (StartOf(24)) {
Expr(
-#line 2172 "VBNET.ATG"
+#line 2175 "VBNET.ATG"
out anonymousMember);
-#line 2173 "VBNET.ATG"
+#line 2176 "VBNET.ATG"
memberInitializers.CreateExpressions.Add(anonymousMember);
} else SynErr(270);
while (la.kind == 22) {
lexer.NextToken();
if (la.kind == 26 || la.kind == 147) {
MemberInitializer(
-#line 2177 "VBNET.ATG"
+#line 2180 "VBNET.ATG"
out memberInitializer);
-#line 2178 "VBNET.ATG"
+#line 2181 "VBNET.ATG"
memberInitializers.CreateExpressions.Add(memberInitializer);
} else if (StartOf(24)) {
Expr(
-#line 2179 "VBNET.ATG"
+#line 2182 "VBNET.ATG"
out anonymousMember);
-#line 2180 "VBNET.ATG"
+#line 2183 "VBNET.ATG"
memberInitializers.CreateExpressions.Add(anonymousMember);
} else SynErr(271);
}
Expect(36);
-#line 2185 "VBNET.ATG"
+#line 2188 "VBNET.ATG"
memberInitializers.EndLocation = t.Location;
if(oce is ObjectCreateExpression)
{
@@ -3046,17 +3047,17 @@ out anonymousMember);
} else {
lexer.NextToken();
CollectionInitializer(
-#line 2195 "VBNET.ATG"
+#line 2198 "VBNET.ATG"
out initializer);
-#line 2197 "VBNET.ATG"
+#line 2200 "VBNET.ATG"
if(oce is ObjectCreateExpression)
((ObjectCreateExpression)oce).ObjectInitializer = initializer;
}
}
-#line 2203 "VBNET.ATG"
+#line 2206 "VBNET.ATG"
if (oce != null) {
oce.StartLocation = startLocation;
oce.EndLocation = t.EndLocation;
@@ -3065,10 +3066,10 @@ out initializer);
}
void AccessorDecls(
-#line 1372 "VBNET.ATG"
+#line 1375 "VBNET.ATG"
out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
-#line 1374 "VBNET.ATG"
+#line 1377 "VBNET.ATG"
List attributes = new List();
AttributeSection section;
getBlock = null;
@@ -3076,60 +3077,60 @@ out PropertyGetRegion getBlock, out PropertySetRegion setBlock) {
while (la.kind == 40) {
AttributeSection(
-#line 1379 "VBNET.ATG"
+#line 1382 "VBNET.ATG"
out section);
-#line 1379 "VBNET.ATG"
+#line 1382 "VBNET.ATG"
attributes.Add(section);
}
if (StartOf(25)) {
GetAccessorDecl(
-#line 1381 "VBNET.ATG"
+#line 1384 "VBNET.ATG"
out getBlock, attributes);
if (StartOf(26)) {
-#line 1383 "VBNET.ATG"
+#line 1386 "VBNET.ATG"
attributes = new List();
while (la.kind == 40) {
AttributeSection(
-#line 1384 "VBNET.ATG"
+#line 1387 "VBNET.ATG"
out section);
-#line 1384 "VBNET.ATG"
+#line 1387 "VBNET.ATG"
attributes.Add(section);
}
SetAccessorDecl(
-#line 1385 "VBNET.ATG"
+#line 1388 "VBNET.ATG"
out setBlock, attributes);
}
} else if (StartOf(27)) {
SetAccessorDecl(
-#line 1388 "VBNET.ATG"
+#line 1391 "VBNET.ATG"
out setBlock, attributes);
if (StartOf(28)) {
-#line 1390 "VBNET.ATG"
+#line 1393 "VBNET.ATG"
attributes = new List();
while (la.kind == 40) {
AttributeSection(
-#line 1391 "VBNET.ATG"
+#line 1394 "VBNET.ATG"
out section);
-#line 1391 "VBNET.ATG"
+#line 1394 "VBNET.ATG"
attributes.Add(section);
}
GetAccessorDecl(
-#line 1392 "VBNET.ATG"
+#line 1395 "VBNET.ATG"
out getBlock, attributes);
}
} else SynErr(272);
}
void EventAccessorDeclaration(
-#line 1335 "VBNET.ATG"
+#line 1338 "VBNET.ATG"
out EventAddRemoveRegion eventAccessorDeclaration) {
-#line 1337 "VBNET.ATG"
+#line 1340 "VBNET.ATG"
Statement stmt = null;
List p = new List();
AttributeSection section;
@@ -3138,10 +3139,10 @@ out EventAddRemoveRegion eventAccessorDeclaration) {
while (la.kind == 40) {
AttributeSection(
-#line 1343 "VBNET.ATG"
+#line 1346 "VBNET.ATG"
out section);
-#line 1343 "VBNET.ATG"
+#line 1346 "VBNET.ATG"
attributes.Add(section);
}
if (la.kind == 56) {
@@ -3150,20 +3151,20 @@ out section);
lexer.NextToken();
if (StartOf(6)) {
FormalParameterList(
-#line 1345 "VBNET.ATG"
+#line 1348 "VBNET.ATG"
p);
}
Expect(38);
}
Expect(1);
Block(
-#line 1346 "VBNET.ATG"
+#line 1349 "VBNET.ATG"
out stmt);
Expect(113);
Expect(56);
EndOfStmt();
-#line 1348 "VBNET.ATG"
+#line 1351 "VBNET.ATG"
eventAccessorDeclaration = new EventAddRegion(attributes);
eventAccessorDeclaration.Block = (BlockStatement)stmt;
eventAccessorDeclaration.Parameters = p;
@@ -3174,20 +3175,20 @@ out stmt);
lexer.NextToken();
if (StartOf(6)) {
FormalParameterList(
-#line 1353 "VBNET.ATG"
+#line 1356 "VBNET.ATG"
p);
}
Expect(38);
}
Expect(1);
Block(
-#line 1354 "VBNET.ATG"
+#line 1357 "VBNET.ATG"
out stmt);
Expect(113);
Expect(193);
EndOfStmt();
-#line 1356 "VBNET.ATG"
+#line 1359 "VBNET.ATG"
eventAccessorDeclaration = new EventRemoveRegion(attributes);
eventAccessorDeclaration.Block = (BlockStatement)stmt;
eventAccessorDeclaration.Parameters = p;
@@ -3198,20 +3199,20 @@ out stmt);
lexer.NextToken();
if (StartOf(6)) {
FormalParameterList(
-#line 1361 "VBNET.ATG"
+#line 1364 "VBNET.ATG"
p);
}
Expect(38);
}
Expect(1);
Block(
-#line 1362 "VBNET.ATG"
+#line 1365 "VBNET.ATG"
out stmt);
Expect(113);
Expect(189);
EndOfStmt();
-#line 1364 "VBNET.ATG"
+#line 1367 "VBNET.ATG"
eventAccessorDeclaration = new EventRaiseRegion(attributes);
eventAccessorDeclaration.Block = (BlockStatement)stmt;
eventAccessorDeclaration.Parameters = p;
@@ -3220,163 +3221,170 @@ out stmt);
}
void OverloadableOperator(
-#line 1277 "VBNET.ATG"
+#line 1278 "VBNET.ATG"
out OverloadableOperatorType operatorType) {
-#line 1278 "VBNET.ATG"
+#line 1279 "VBNET.ATG"
operatorType = OverloadableOperatorType.None;
switch (la.kind) {
case 31: {
lexer.NextToken();
-#line 1280 "VBNET.ATG"
+#line 1281 "VBNET.ATG"
operatorType = OverloadableOperatorType.Add;
break;
}
case 30: {
lexer.NextToken();
-#line 1282 "VBNET.ATG"
+#line 1283 "VBNET.ATG"
operatorType = OverloadableOperatorType.Subtract;
break;
}
case 34: {
lexer.NextToken();
-#line 1284 "VBNET.ATG"
+#line 1285 "VBNET.ATG"
operatorType = OverloadableOperatorType.Multiply;
break;
}
case 24: {
lexer.NextToken();
-#line 1286 "VBNET.ATG"
+#line 1287 "VBNET.ATG"
operatorType = OverloadableOperatorType.Divide;
break;
}
case 25: {
lexer.NextToken();
-#line 1288 "VBNET.ATG"
+#line 1289 "VBNET.ATG"
operatorType = OverloadableOperatorType.DivideInteger;
break;
}
case 23: {
lexer.NextToken();
-#line 1290 "VBNET.ATG"
+#line 1291 "VBNET.ATG"
operatorType = OverloadableOperatorType.Concat;
break;
}
case 150: {
lexer.NextToken();
-#line 1292 "VBNET.ATG"
+#line 1293 "VBNET.ATG"
operatorType = OverloadableOperatorType.Like;
break;
}
case 154: {
lexer.NextToken();
-#line 1294 "VBNET.ATG"
+#line 1295 "VBNET.ATG"
operatorType = OverloadableOperatorType.Modulus;
break;
}
case 60: {
lexer.NextToken();
-#line 1296 "VBNET.ATG"
+#line 1297 "VBNET.ATG"
operatorType = OverloadableOperatorType.BitwiseAnd;
break;
}
case 175: {
lexer.NextToken();
-#line 1298 "VBNET.ATG"
+#line 1299 "VBNET.ATG"
operatorType = OverloadableOperatorType.BitwiseOr;
break;
}
case 236: {
lexer.NextToken();
-#line 1300 "VBNET.ATG"
+#line 1301 "VBNET.ATG"
operatorType = OverloadableOperatorType.ExclusiveOr;
break;
}
+ case 164: {
+ lexer.NextToken();
+
+#line 1303 "VBNET.ATG"
+ operatorType = OverloadableOperatorType.BitNot;
+ break;
+ }
case 32: {
lexer.NextToken();
-#line 1302 "VBNET.ATG"
+#line 1305 "VBNET.ATG"
operatorType = OverloadableOperatorType.Power;
break;
}
case 44: {
lexer.NextToken();
-#line 1304 "VBNET.ATG"
+#line 1307 "VBNET.ATG"
operatorType = OverloadableOperatorType.ShiftLeft;
break;
}
case 45: {
lexer.NextToken();
-#line 1306 "VBNET.ATG"
+#line 1309 "VBNET.ATG"
operatorType = OverloadableOperatorType.ShiftRight;
break;
}
case 20: {
lexer.NextToken();
-#line 1308 "VBNET.ATG"
+#line 1311 "VBNET.ATG"
operatorType = OverloadableOperatorType.Equality;
break;
}
case 41: {
lexer.NextToken();
-#line 1310 "VBNET.ATG"
+#line 1313 "VBNET.ATG"
operatorType = OverloadableOperatorType.InEquality;
break;
}
case 40: {
lexer.NextToken();
-#line 1312 "VBNET.ATG"
+#line 1315 "VBNET.ATG"
operatorType = OverloadableOperatorType.LessThan;
break;
}
case 43: {
lexer.NextToken();
-#line 1314 "VBNET.ATG"
+#line 1317 "VBNET.ATG"
operatorType = OverloadableOperatorType.LessThanOrEqual;
break;
}
case 39: {
lexer.NextToken();
-#line 1316 "VBNET.ATG"
+#line 1319 "VBNET.ATG"
operatorType = OverloadableOperatorType.GreaterThan;
break;
}
case 42: {
lexer.NextToken();
-#line 1318 "VBNET.ATG"
+#line 1321 "VBNET.ATG"
operatorType = OverloadableOperatorType.GreaterThanOrEqual;
break;
}
case 94: {
lexer.NextToken();
-#line 1320 "VBNET.ATG"
+#line 1323 "VBNET.ATG"
operatorType = OverloadableOperatorType.CType;
break;
}
case 2: case 58: case 62: case 64: case 65: case 66: case 67: case 70: case 87: case 98: case 104: case 107: case 116: case 121: case 126: case 133: case 139: case 143: case 146: case 147: case 170: case 176: case 178: case 184: case 203: case 212: case 213: case 223: case 224: case 230: {
Identifier();
-#line 1324 "VBNET.ATG"
+#line 1327 "VBNET.ATG"
string opName = t.val;
if (string.Equals(opName, "istrue", StringComparison.InvariantCultureIgnoreCase)) {
operatorType = OverloadableOperatorType.IsTrue;
@@ -3393,10 +3401,10 @@ out OverloadableOperatorType operatorType) {
}
void FormalParameter(
-#line 2948 "VBNET.ATG"
+#line 2951 "VBNET.ATG"
out ParameterDeclarationExpression p) {
-#line 2950 "VBNET.ATG"
+#line 2953 "VBNET.ATG"
AttributeSection section;
List attributes = new List();
TypeReference type = null;
@@ -3408,36 +3416,36 @@ out ParameterDeclarationExpression p) {
while (la.kind == 40) {
AttributeSection(
-#line 2960 "VBNET.ATG"
+#line 2963 "VBNET.ATG"
out section);
-#line 2960 "VBNET.ATG"
+#line 2963 "VBNET.ATG"
attributes.Add(section);
}
while (StartOf(29)) {
ParameterModifier(
-#line 2961 "VBNET.ATG"
+#line 2964 "VBNET.ATG"
mod);
}
Identifier();
-#line 2962 "VBNET.ATG"
+#line 2965 "VBNET.ATG"
string parameterName = t.val;
if (
-#line 2963 "VBNET.ATG"
+#line 2966 "VBNET.ATG"
IsDims()) {
ArrayTypeModifiers(
-#line 2963 "VBNET.ATG"
+#line 2966 "VBNET.ATG"
out arrayModifiers);
}
if (la.kind == 63) {
lexer.NextToken();
TypeName(
-#line 2964 "VBNET.ATG"
+#line 2967 "VBNET.ATG"
out type);
}
-#line 2966 "VBNET.ATG"
+#line 2969 "VBNET.ATG"
if(type != null) {
if (arrayModifiers != null) {
if (type.RankSpecifier != null) {
@@ -3451,11 +3459,11 @@ out type);
if (la.kind == 20) {
lexer.NextToken();
Expr(
-#line 2976 "VBNET.ATG"
+#line 2979 "VBNET.ATG"
out expr);
}
-#line 2978 "VBNET.ATG"
+#line 2981 "VBNET.ATG"
mod.Check();
p = new ParameterDeclarationExpression(type, parameterName, mod.Modifier, expr);
p.Attributes = attributes;
@@ -3465,67 +3473,67 @@ out expr);
}
void GetAccessorDecl(
-#line 1398 "VBNET.ATG"
+#line 1401 "VBNET.ATG"
out PropertyGetRegion getBlock, List attributes) {
-#line 1399 "VBNET.ATG"
+#line 1402 "VBNET.ATG"
Statement stmt = null; Modifiers m;
PropertyAccessorAccessModifier(
-#line 1401 "VBNET.ATG"
+#line 1404 "VBNET.ATG"
out m);
Expect(128);
-#line 1403 "VBNET.ATG"
+#line 1406 "VBNET.ATG"
Location startLocation = t.Location;
Expect(1);
Block(
-#line 1405 "VBNET.ATG"
+#line 1408 "VBNET.ATG"
out stmt);
-#line 1406 "VBNET.ATG"
+#line 1409 "VBNET.ATG"
getBlock = new PropertyGetRegion((BlockStatement)stmt, attributes);
Expect(113);
Expect(128);
-#line 1408 "VBNET.ATG"
+#line 1411 "VBNET.ATG"
getBlock.Modifier = m;
-#line 1409 "VBNET.ATG"
+#line 1412 "VBNET.ATG"
getBlock.StartLocation = startLocation; getBlock.EndLocation = t.EndLocation;
EndOfStmt();
}
void SetAccessorDecl(
-#line 1414 "VBNET.ATG"
+#line 1417 "VBNET.ATG"
out PropertySetRegion setBlock, List attributes) {
-#line 1416 "VBNET.ATG"
+#line 1419 "VBNET.ATG"
Statement stmt = null;
List p = new List();
Modifiers m;
PropertyAccessorAccessModifier(
-#line 1421 "VBNET.ATG"
+#line 1424 "VBNET.ATG"
out m);
Expect(198);
-#line 1423 "VBNET.ATG"
+#line 1426 "VBNET.ATG"
Location startLocation = t.Location;
if (la.kind == 37) {
lexer.NextToken();
if (StartOf(6)) {
FormalParameterList(
-#line 1424 "VBNET.ATG"
+#line 1427 "VBNET.ATG"
p);
}
Expect(38);
}
Expect(1);
Block(
-#line 1426 "VBNET.ATG"
+#line 1429 "VBNET.ATG"
out stmt);
-#line 1428 "VBNET.ATG"
+#line 1431 "VBNET.ATG"
setBlock = new PropertySetRegion((BlockStatement)stmt, attributes);
setBlock.Modifier = m;
setBlock.Parameters = p;
@@ -3533,116 +3541,116 @@ out stmt);
Expect(113);
Expect(198);
-#line 1433 "VBNET.ATG"
+#line 1436 "VBNET.ATG"
setBlock.StartLocation = startLocation; setBlock.EndLocation = t.EndLocation;
EndOfStmt();
}
void PropertyAccessorAccessModifier(
-#line 3742 "VBNET.ATG"
+#line 3745 "VBNET.ATG"
out Modifiers m) {
-#line 3743 "VBNET.ATG"
+#line 3746 "VBNET.ATG"
m = Modifiers.None;
while (StartOf(30)) {
if (la.kind == 188) {
lexer.NextToken();
-#line 3745 "VBNET.ATG"
+#line 3748 "VBNET.ATG"
m |= Modifiers.Public;
} else if (la.kind == 187) {
lexer.NextToken();
-#line 3746 "VBNET.ATG"
+#line 3749 "VBNET.ATG"
m |= Modifiers.Protected;
} else if (la.kind == 125) {
lexer.NextToken();
-#line 3747 "VBNET.ATG"
+#line 3750 "VBNET.ATG"
m |= Modifiers.Internal;
} else {
lexer.NextToken();
-#line 3748 "VBNET.ATG"
+#line 3751 "VBNET.ATG"
m |= Modifiers.Private;
}
}
}
void ArrayInitializationModifier(
-#line 1531 "VBNET.ATG"
+#line 1534 "VBNET.ATG"
out List arrayModifiers) {
-#line 1533 "VBNET.ATG"
+#line 1536 "VBNET.ATG"
arrayModifiers = null;
Expect(37);
InitializationRankList(
-#line 1535 "VBNET.ATG"
+#line 1538 "VBNET.ATG"
out arrayModifiers);
Expect(38);
}
void ArrayNameModifier(
-#line 2775 "VBNET.ATG"
+#line 2778 "VBNET.ATG"
out ArrayList arrayModifiers) {
-#line 2777 "VBNET.ATG"
+#line 2780 "VBNET.ATG"
arrayModifiers = null;
ArrayTypeModifiers(
-#line 2779 "VBNET.ATG"
+#line 2782 "VBNET.ATG"
out arrayModifiers);
}
void InitializationRankList(
-#line 1539 "VBNET.ATG"
+#line 1542 "VBNET.ATG"
out List rank) {
-#line 1541 "VBNET.ATG"
+#line 1544 "VBNET.ATG"
rank = new List();
Expression expr = null;
Expr(
-#line 1544 "VBNET.ATG"
+#line 1547 "VBNET.ATG"
out expr);
if (la.kind == 216) {
lexer.NextToken();
-#line 1545 "VBNET.ATG"
+#line 1548 "VBNET.ATG"
EnsureIsZero(expr);
Expr(
-#line 1546 "VBNET.ATG"
+#line 1549 "VBNET.ATG"
out expr);
}
-#line 1548 "VBNET.ATG"
+#line 1551 "VBNET.ATG"
if (expr != null) { rank.Add(expr); }
while (la.kind == 22) {
lexer.NextToken();
Expr(
-#line 1550 "VBNET.ATG"
+#line 1553 "VBNET.ATG"
out expr);
if (la.kind == 216) {
lexer.NextToken();
-#line 1551 "VBNET.ATG"
+#line 1554 "VBNET.ATG"
EnsureIsZero(expr);
Expr(
-#line 1552 "VBNET.ATG"
+#line 1555 "VBNET.ATG"
out expr);
}
-#line 1554 "VBNET.ATG"
+#line 1557 "VBNET.ATG"
if (expr != null) { rank.Add(expr); }
}
}
void CollectionInitializer(
-#line 1559 "VBNET.ATG"
+#line 1562 "VBNET.ATG"
out CollectionInitializerExpression outExpr) {
-#line 1561 "VBNET.ATG"
+#line 1564 "VBNET.ATG"
Expression expr = null;
CollectionInitializerExpression initializer = new CollectionInitializerExpression();
Location startLocation = la.Location;
@@ -3650,27 +3658,27 @@ out CollectionInitializerExpression outExpr) {
Expect(35);
if (StartOf(24)) {
Expr(
-#line 1567 "VBNET.ATG"
+#line 1570 "VBNET.ATG"
out expr);
-#line 1569 "VBNET.ATG"
+#line 1572 "VBNET.ATG"
if (expr != null) { initializer.CreateExpressions.Add(expr); }
while (
-#line 1572 "VBNET.ATG"
+#line 1575 "VBNET.ATG"
NotFinalComma()) {
Expect(22);
Expr(
-#line 1572 "VBNET.ATG"
+#line 1575 "VBNET.ATG"
out expr);
-#line 1573 "VBNET.ATG"
+#line 1576 "VBNET.ATG"
if (expr != null) { initializer.CreateExpressions.Add(expr); }
}
}
Expect(36);
-#line 1578 "VBNET.ATG"
+#line 1581 "VBNET.ATG"
outExpr = initializer;
outExpr.StartLocation = startLocation;
outExpr.EndLocation = t.EndLocation;
@@ -3678,10 +3686,10 @@ out expr);
}
void EventMemberSpecifier(
-#line 1651 "VBNET.ATG"
+#line 1654 "VBNET.ATG"
out string name) {
-#line 1652 "VBNET.ATG"
+#line 1655 "VBNET.ATG"
string eventName;
if (StartOf(4)) {
Identifier();
@@ -3691,182 +3699,182 @@ out string name) {
lexer.NextToken();
} else SynErr(275);
-#line 1655 "VBNET.ATG"
+#line 1658 "VBNET.ATG"
name = t.val;
Expect(26);
IdentifierOrKeyword(
-#line 1657 "VBNET.ATG"
+#line 1660 "VBNET.ATG"
out eventName);
-#line 1658 "VBNET.ATG"
+#line 1661 "VBNET.ATG"
name = name + "." + eventName;
}
void IdentifierOrKeyword(
-#line 3675 "VBNET.ATG"
+#line 3678 "VBNET.ATG"
out string name) {
lexer.NextToken();
-#line 3677 "VBNET.ATG"
+#line 3680 "VBNET.ATG"
name = t.val;
}
void QueryExpr(
-#line 2296 "VBNET.ATG"
+#line 2299 "VBNET.ATG"
out Expression expr) {
-#line 2298 "VBNET.ATG"
+#line 2301 "VBNET.ATG"
QueryExpressionVB qexpr = new QueryExpressionVB();
qexpr.StartLocation = la.Location;
expr = qexpr;
FromOrAggregateQueryOperator(
-#line 2302 "VBNET.ATG"
+#line 2305 "VBNET.ATG"
qexpr.Clauses);
while (StartOf(31)) {
QueryOperator(
-#line 2303 "VBNET.ATG"
+#line 2306 "VBNET.ATG"
qexpr.Clauses);
}
-#line 2305 "VBNET.ATG"
+#line 2308 "VBNET.ATG"
qexpr.EndLocation = t.EndLocation;
}
void LambdaExpr(
-#line 2210 "VBNET.ATG"
+#line 2213 "VBNET.ATG"
out Expression expr) {
-#line 2212 "VBNET.ATG"
+#line 2215 "VBNET.ATG"
LambdaExpression lambda = null;
if (la.kind == 210) {
SubLambdaExpression(
-#line 2214 "VBNET.ATG"
+#line 2217 "VBNET.ATG"
out lambda);
} else if (la.kind == 127) {
FunctionLambdaExpression(
-#line 2215 "VBNET.ATG"
+#line 2218 "VBNET.ATG"
out lambda);
} else SynErr(276);
-#line 2216 "VBNET.ATG"
+#line 2219 "VBNET.ATG"
expr = lambda;
}
void DisjunctionExpr(
-#line 1960 "VBNET.ATG"
+#line 1963 "VBNET.ATG"
out Expression outExpr) {
-#line 1962 "VBNET.ATG"
+#line 1965 "VBNET.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
Location startLocation = la.Location;
ConjunctionExpr(
-#line 1966 "VBNET.ATG"
+#line 1969 "VBNET.ATG"
out outExpr);
while (la.kind == 175 || la.kind == 177 || la.kind == 236) {
if (la.kind == 175) {
lexer.NextToken();
-#line 1969 "VBNET.ATG"
+#line 1972 "VBNET.ATG"
op = BinaryOperatorType.BitwiseOr;
} else if (la.kind == 177) {
lexer.NextToken();
-#line 1970 "VBNET.ATG"
+#line 1973 "VBNET.ATG"
op = BinaryOperatorType.LogicalOr;
} else {
lexer.NextToken();
-#line 1971 "VBNET.ATG"
+#line 1974 "VBNET.ATG"
op = BinaryOperatorType.ExclusiveOr;
}
ConjunctionExpr(
-#line 1973 "VBNET.ATG"
+#line 1976 "VBNET.ATG"
out expr);
-#line 1973 "VBNET.ATG"
+#line 1976 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation };
}
}
void AssignmentOperator(
-#line 1678 "VBNET.ATG"
+#line 1681 "VBNET.ATG"
out AssignmentOperatorType op) {
-#line 1679 "VBNET.ATG"
+#line 1682 "VBNET.ATG"
op = AssignmentOperatorType.None;
switch (la.kind) {
case 20: {
lexer.NextToken();
-#line 1680 "VBNET.ATG"
+#line 1683 "VBNET.ATG"
op = AssignmentOperatorType.Assign;
break;
}
case 54: {
lexer.NextToken();
-#line 1681 "VBNET.ATG"
+#line 1684 "VBNET.ATG"
op = AssignmentOperatorType.ConcatString;
break;
}
case 46: {
lexer.NextToken();
-#line 1682 "VBNET.ATG"
+#line 1685 "VBNET.ATG"
op = AssignmentOperatorType.Add;
break;
}
case 48: {
lexer.NextToken();
-#line 1683 "VBNET.ATG"
+#line 1686 "VBNET.ATG"
op = AssignmentOperatorType.Subtract;
break;
}
case 49: {
lexer.NextToken();
-#line 1684 "VBNET.ATG"
+#line 1687 "VBNET.ATG"
op = AssignmentOperatorType.Multiply;
break;
}
case 50: {
lexer.NextToken();
-#line 1685 "VBNET.ATG"
+#line 1688 "VBNET.ATG"
op = AssignmentOperatorType.Divide;
break;
}
case 51: {
lexer.NextToken();
-#line 1686 "VBNET.ATG"
+#line 1689 "VBNET.ATG"
op = AssignmentOperatorType.DivideInteger;
break;
}
case 47: {
lexer.NextToken();
-#line 1687 "VBNET.ATG"
+#line 1690 "VBNET.ATG"
op = AssignmentOperatorType.Power;
break;
}
case 52: {
lexer.NextToken();
-#line 1688 "VBNET.ATG"
+#line 1691 "VBNET.ATG"
op = AssignmentOperatorType.ShiftLeft;
break;
}
case 53: {
lexer.NextToken();
-#line 1689 "VBNET.ATG"
+#line 1692 "VBNET.ATG"
op = AssignmentOperatorType.ShiftRight;
break;
}
@@ -3875,13 +3883,13 @@ out AssignmentOperatorType op) {
}
void SimpleExpr(
-#line 1693 "VBNET.ATG"
+#line 1696 "VBNET.ATG"
out Expression pexpr) {
-#line 1694 "VBNET.ATG"
+#line 1697 "VBNET.ATG"
string name; Location startLocation = la.Location;
SimpleNonInvocationExpression(
-#line 1697 "VBNET.ATG"
+#line 1700 "VBNET.ATG"
out pexpr);
while (StartOf(32)) {
if (la.kind == 26) {
@@ -3889,73 +3897,73 @@ out pexpr);
if (la.kind == 10) {
lexer.NextToken();
IdentifierOrKeyword(
-#line 1700 "VBNET.ATG"
+#line 1703 "VBNET.ATG"
out name);
Expect(11);
-#line 1701 "VBNET.ATG"
+#line 1704 "VBNET.ATG"
pexpr = new XmlMemberAccessExpression(pexpr, XmlAxisType.Element, name, true);
} else if (StartOf(33)) {
IdentifierOrKeyword(
-#line 1702 "VBNET.ATG"
+#line 1705 "VBNET.ATG"
out name);
-#line 1703 "VBNET.ATG"
+#line 1706 "VBNET.ATG"
pexpr = new MemberReferenceExpression(pexpr, name) { StartLocation = startLocation, EndLocation = t.EndLocation };
} else SynErr(278);
if (
-#line 1705 "VBNET.ATG"
+#line 1708 "VBNET.ATG"
la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) {
lexer.NextToken();
Expect(169);
TypeArgumentList(
-#line 1706 "VBNET.ATG"
+#line 1709 "VBNET.ATG"
((MemberReferenceExpression)pexpr).TypeArguments);
Expect(38);
}
} else if (la.kind == 29) {
lexer.NextToken();
IdentifierOrKeyword(
-#line 1708 "VBNET.ATG"
+#line 1711 "VBNET.ATG"
out name);
-#line 1708 "VBNET.ATG"
+#line 1711 "VBNET.ATG"
pexpr = new BinaryOperatorExpression(pexpr, BinaryOperatorType.DictionaryAccess, new PrimitiveExpression(name, name) { StartLocation = t.Location, EndLocation = t.EndLocation });
} else if (la.kind == 27 || la.kind == 28) {
-#line 1709 "VBNET.ATG"
+#line 1712 "VBNET.ATG"
XmlAxisType type = XmlAxisType.Attribute; bool isXmlName = false;
if (la.kind == 28) {
lexer.NextToken();
} else if (la.kind == 27) {
lexer.NextToken();
-#line 1710 "VBNET.ATG"
+#line 1713 "VBNET.ATG"
type = XmlAxisType.Descendents;
} else SynErr(279);
if (la.kind == 10) {
lexer.NextToken();
-#line 1710 "VBNET.ATG"
+#line 1713 "VBNET.ATG"
isXmlName = true;
}
IdentifierOrKeyword(
-#line 1710 "VBNET.ATG"
+#line 1713 "VBNET.ATG"
out name);
if (la.kind == 11) {
lexer.NextToken();
}
-#line 1711 "VBNET.ATG"
+#line 1714 "VBNET.ATG"
pexpr = new XmlMemberAccessExpression(pexpr, type, name, isXmlName);
} else {
InvocationExpression(
-#line 1712 "VBNET.ATG"
+#line 1715 "VBNET.ATG"
ref pexpr);
}
}
-#line 1716 "VBNET.ATG"
+#line 1719 "VBNET.ATG"
if (pexpr != null) {
pexpr.StartLocation = startLocation;
pexpr.EndLocation = t.EndLocation;
@@ -3964,10 +3972,10 @@ ref pexpr);
}
void SimpleNonInvocationExpression(
-#line 1723 "VBNET.ATG"
+#line 1726 "VBNET.ATG"
out Expression pexpr) {
-#line 1725 "VBNET.ATG"
+#line 1728 "VBNET.ATG"
Expression expr;
CollectionInitializerExpression cie;
TypeReference type = null;
@@ -3980,98 +3988,98 @@ out Expression pexpr) {
case 3: {
lexer.NextToken();
-#line 1735 "VBNET.ATG"
+#line 1738 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat };
break;
}
case 4: {
lexer.NextToken();
-#line 1736 "VBNET.ATG"
+#line 1739 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat };
break;
}
case 7: {
lexer.NextToken();
-#line 1737 "VBNET.ATG"
+#line 1740 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat };
break;
}
case 6: {
lexer.NextToken();
-#line 1738 "VBNET.ATG"
+#line 1741 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat };
break;
}
case 5: {
lexer.NextToken();
-#line 1739 "VBNET.ATG"
+#line 1742 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat };
break;
}
case 9: {
lexer.NextToken();
-#line 1740 "VBNET.ATG"
+#line 1743 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat };
break;
}
case 8: {
lexer.NextToken();
-#line 1741 "VBNET.ATG"
+#line 1744 "VBNET.ATG"
pexpr = new PrimitiveExpression(t.literalValue, t.val) { LiteralFormat = t.literalFormat };
break;
}
case 217: {
lexer.NextToken();
-#line 1743 "VBNET.ATG"
+#line 1746 "VBNET.ATG"
pexpr = new PrimitiveExpression(true, "true");
break;
}
case 122: {
lexer.NextToken();
-#line 1744 "VBNET.ATG"
+#line 1747 "VBNET.ATG"
pexpr = new PrimitiveExpression(false, "false");
break;
}
case 165: {
lexer.NextToken();
-#line 1745 "VBNET.ATG"
+#line 1748 "VBNET.ATG"
pexpr = new PrimitiveExpression(null, "null");
break;
}
case 37: {
lexer.NextToken();
Expr(
-#line 1746 "VBNET.ATG"
+#line 1749 "VBNET.ATG"
out expr);
Expect(38);
-#line 1746 "VBNET.ATG"
+#line 1749 "VBNET.ATG"
pexpr = new ParenthesizedExpression(expr);
break;
}
case 2: case 58: case 62: case 64: case 65: case 66: case 67: case 70: case 87: case 98: case 104: case 107: case 116: case 121: case 126: case 133: case 139: case 143: case 146: case 147: case 170: case 176: case 178: case 184: case 203: case 212: case 213: case 223: case 224: case 230: {
Identifier();
-#line 1748 "VBNET.ATG"
+#line 1751 "VBNET.ATG"
pexpr = new IdentifierExpression(t.val);
pexpr.StartLocation = t.Location; pexpr.EndLocation = t.EndLocation;
if (
-#line 1751 "VBNET.ATG"
+#line 1754 "VBNET.ATG"
la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) {
lexer.NextToken();
Expect(169);
TypeArgumentList(
-#line 1752 "VBNET.ATG"
+#line 1755 "VBNET.ATG"
((IdentifierExpression)pexpr).TypeArguments);
Expect(38);
}
@@ -4079,51 +4087,51 @@ la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) {
}
case 68: case 71: case 82: case 99: case 100: case 109: case 141: case 151: case 168: case 196: case 201: case 202: case 208: case 221: case 222: case 225: {
-#line 1754 "VBNET.ATG"
+#line 1757 "VBNET.ATG"
string val = String.Empty;
if (StartOf(12)) {
PrimitiveTypeName(
-#line 1755 "VBNET.ATG"
+#line 1758 "VBNET.ATG"
out val);
} else if (la.kind == 168) {
lexer.NextToken();
-#line 1755 "VBNET.ATG"
+#line 1758 "VBNET.ATG"
val = "System.Object";
} else SynErr(280);
-#line 1756 "VBNET.ATG"
+#line 1759 "VBNET.ATG"
pexpr = new TypeReferenceExpression(new TypeReference(val, true));
break;
}
case 153: {
lexer.NextToken();
-#line 1757 "VBNET.ATG"
+#line 1760 "VBNET.ATG"
pexpr = new ThisReferenceExpression();
break;
}
case 158: case 159: {
-#line 1758 "VBNET.ATG"
+#line 1761 "VBNET.ATG"
Expression retExpr = null;
if (la.kind == 158) {
lexer.NextToken();
-#line 1759 "VBNET.ATG"
+#line 1762 "VBNET.ATG"
retExpr = new BaseReferenceExpression() { StartLocation = t.Location, EndLocation = t.EndLocation };
} else if (la.kind == 159) {
lexer.NextToken();
-#line 1760 "VBNET.ATG"
+#line 1763 "VBNET.ATG"
retExpr = new ClassReferenceExpression() { StartLocation = t.Location, EndLocation = t.EndLocation };
} else SynErr(281);
Expect(26);
IdentifierOrKeyword(
-#line 1762 "VBNET.ATG"
+#line 1765 "VBNET.ATG"
out name);
-#line 1762 "VBNET.ATG"
+#line 1765 "VBNET.ATG"
pexpr = new MemberReferenceExpression(retExpr, name) { StartLocation = startLocation, EndLocation = t.EndLocation };
break;
}
@@ -4132,86 +4140,86 @@ out name);
Expect(26);
Identifier();
-#line 1764 "VBNET.ATG"
+#line 1767 "VBNET.ATG"
type = new TypeReference(t.val ?? "");
-#line 1766 "VBNET.ATG"
+#line 1769 "VBNET.ATG"
type.IsGlobal = true;
-#line 1767 "VBNET.ATG"
+#line 1770 "VBNET.ATG"
pexpr = new TypeReferenceExpression(type);
break;
}
case 162: {
ObjectCreateExpression(
-#line 1768 "VBNET.ATG"
+#line 1771 "VBNET.ATG"
out expr);
-#line 1768 "VBNET.ATG"
+#line 1771 "VBNET.ATG"
pexpr = expr;
break;
}
case 35: {
CollectionInitializer(
-#line 1769 "VBNET.ATG"
+#line 1772 "VBNET.ATG"
out cie);
-#line 1769 "VBNET.ATG"
+#line 1772 "VBNET.ATG"
pexpr = cie;
break;
}
case 94: case 106: case 219: {
-#line 1771 "VBNET.ATG"
+#line 1774 "VBNET.ATG"
CastType castType = CastType.Cast;
if (la.kind == 106) {
lexer.NextToken();
} else if (la.kind == 94) {
lexer.NextToken();
-#line 1773 "VBNET.ATG"
+#line 1776 "VBNET.ATG"
castType = CastType.Conversion;
} else if (la.kind == 219) {
lexer.NextToken();
-#line 1774 "VBNET.ATG"
+#line 1777 "VBNET.ATG"
castType = CastType.TryCast;
} else SynErr(282);
Expect(37);
Expr(
-#line 1776 "VBNET.ATG"
+#line 1779 "VBNET.ATG"
out expr);
Expect(22);
TypeName(
-#line 1776 "VBNET.ATG"
+#line 1779 "VBNET.ATG"
out type);
Expect(38);
-#line 1777 "VBNET.ATG"
+#line 1780 "VBNET.ATG"
pexpr = new CastExpression(type, expr, castType);
break;
}
case 76: case 77: case 78: case 79: case 80: case 81: case 83: case 85: case 86: case 90: case 91: case 92: case 93: case 95: case 96: case 97: {
CastTarget(
-#line 1778 "VBNET.ATG"
+#line 1781 "VBNET.ATG"
out type);
Expect(37);
Expr(
-#line 1778 "VBNET.ATG"
+#line 1781 "VBNET.ATG"
out expr);
Expect(38);
-#line 1778 "VBNET.ATG"
+#line 1781 "VBNET.ATG"
pexpr = new CastExpression(type, expr, CastType.PrimitiveConversion);
break;
}
case 57: {
lexer.NextToken();
Expr(
-#line 1779 "VBNET.ATG"
+#line 1782 "VBNET.ATG"
out expr);
-#line 1779 "VBNET.ATG"
+#line 1782 "VBNET.ATG"
pexpr = new AddressOfExpression(expr);
break;
}
@@ -4219,37 +4227,37 @@ out expr);
lexer.NextToken();
Expect(37);
GetTypeTypeName(
-#line 1780 "VBNET.ATG"
+#line 1783 "VBNET.ATG"
out type);
Expect(38);
-#line 1780 "VBNET.ATG"
+#line 1783 "VBNET.ATG"
pexpr = new TypeOfExpression(type);
break;
}
case 220: {
lexer.NextToken();
SimpleExpr(
-#line 1781 "VBNET.ATG"
+#line 1784 "VBNET.ATG"
out expr);
Expect(144);
TypeName(
-#line 1781 "VBNET.ATG"
+#line 1784 "VBNET.ATG"
out type);
-#line 1781 "VBNET.ATG"
+#line 1784 "VBNET.ATG"
pexpr = new TypeOfIsExpression(expr, type);
break;
}
case 135: {
ConditionalExpression(
-#line 1782 "VBNET.ATG"
+#line 1785 "VBNET.ATG"
out pexpr);
break;
}
case 10: case 16: case 17: case 18: case 19: {
XmlLiteralExpression(
-#line 1783 "VBNET.ATG"
+#line 1786 "VBNET.ATG"
out pexpr);
break;
}
@@ -4260,62 +4268,62 @@ out pexpr);
if (la.kind == 10) {
lexer.NextToken();
IdentifierOrKeyword(
-#line 1789 "VBNET.ATG"
+#line 1792 "VBNET.ATG"
out name);
Expect(11);
-#line 1790 "VBNET.ATG"
+#line 1793 "VBNET.ATG"
pexpr = new XmlMemberAccessExpression(null, XmlAxisType.Element, name, true) { StartLocation = startLocation, EndLocation = t.EndLocation };
} else if (StartOf(33)) {
IdentifierOrKeyword(
-#line 1791 "VBNET.ATG"
+#line 1794 "VBNET.ATG"
out name);
-#line 1792 "VBNET.ATG"
+#line 1795 "VBNET.ATG"
pexpr = new MemberReferenceExpression(null, name) { StartLocation = startLocation, EndLocation = t.EndLocation };
} else SynErr(283);
} else if (la.kind == 29) {
lexer.NextToken();
IdentifierOrKeyword(
-#line 1794 "VBNET.ATG"
+#line 1797 "VBNET.ATG"
out name);
-#line 1794 "VBNET.ATG"
+#line 1797 "VBNET.ATG"
pexpr = new BinaryOperatorExpression(null, BinaryOperatorType.DictionaryAccess, new PrimitiveExpression(name, name) { StartLocation = t.Location, EndLocation = t.EndLocation });
} else {
-#line 1795 "VBNET.ATG"
+#line 1798 "VBNET.ATG"
XmlAxisType axisType = XmlAxisType.Element; bool isXmlIdentifier = false;
if (la.kind == 27) {
lexer.NextToken();
-#line 1796 "VBNET.ATG"
+#line 1799 "VBNET.ATG"
axisType = XmlAxisType.Descendents;
} else if (la.kind == 28) {
lexer.NextToken();
-#line 1796 "VBNET.ATG"
+#line 1799 "VBNET.ATG"
axisType = XmlAxisType.Attribute;
} else SynErr(284);
if (la.kind == 10) {
lexer.NextToken();
-#line 1797 "VBNET.ATG"
+#line 1800 "VBNET.ATG"
isXmlIdentifier = true;
}
IdentifierOrKeyword(
-#line 1797 "VBNET.ATG"
+#line 1800 "VBNET.ATG"
out name);
if (la.kind == 11) {
lexer.NextToken();
}
-#line 1798 "VBNET.ATG"
+#line 1801 "VBNET.ATG"
pexpr = new XmlMemberAccessExpression(null, axisType, name, isXmlIdentifier);
}
} else SynErr(285);
-#line 1803 "VBNET.ATG"
+#line 1806 "VBNET.ATG"
if (pexpr != null) {
pexpr.StartLocation = startLocation;
pexpr.EndLocation = t.EndLocation;
@@ -4324,161 +4332,161 @@ out name);
}
void TypeArgumentList(
-#line 2811 "VBNET.ATG"
+#line 2814 "VBNET.ATG"
List typeArguments) {
-#line 2813 "VBNET.ATG"
+#line 2816 "VBNET.ATG"
TypeReference typeref;
TypeName(
-#line 2815 "VBNET.ATG"
+#line 2818 "VBNET.ATG"
out typeref);
-#line 2815 "VBNET.ATG"
+#line 2818 "VBNET.ATG"
if (typeref != null) typeArguments.Add(typeref);
while (la.kind == 22) {
lexer.NextToken();
TypeName(
-#line 2818 "VBNET.ATG"
+#line 2821 "VBNET.ATG"
out typeref);
-#line 2818 "VBNET.ATG"
+#line 2821 "VBNET.ATG"
if (typeref != null) typeArguments.Add(typeref);
}
}
void InvocationExpression(
-#line 1924 "VBNET.ATG"
+#line 1927 "VBNET.ATG"
ref Expression pexpr) {
-#line 1925 "VBNET.ATG"
+#line 1928 "VBNET.ATG"
List parameters = null;
Expect(37);
-#line 1927 "VBNET.ATG"
+#line 1930 "VBNET.ATG"
Location start = t.Location;
ArgumentList(
-#line 1928 "VBNET.ATG"
+#line 1931 "VBNET.ATG"
out parameters);
Expect(38);
-#line 1931 "VBNET.ATG"
+#line 1934 "VBNET.ATG"
pexpr = new InvocationExpression(pexpr, parameters);
-#line 1933 "VBNET.ATG"
+#line 1936 "VBNET.ATG"
pexpr.StartLocation = start; pexpr.EndLocation = t.Location;
}
void PrimitiveTypeName(
-#line 3682 "VBNET.ATG"
+#line 3685 "VBNET.ATG"
out string type) {
-#line 3683 "VBNET.ATG"
+#line 3686 "VBNET.ATG"
type = String.Empty;
switch (la.kind) {
case 68: {
lexer.NextToken();
-#line 3684 "VBNET.ATG"
+#line 3687 "VBNET.ATG"
type = "System.Boolean";
break;
}
case 99: {
lexer.NextToken();
-#line 3685 "VBNET.ATG"
+#line 3688 "VBNET.ATG"
type = "System.DateTime";
break;
}
case 82: {
lexer.NextToken();
-#line 3686 "VBNET.ATG"
+#line 3689 "VBNET.ATG"
type = "System.Char";
break;
}
case 208: {
lexer.NextToken();
-#line 3687 "VBNET.ATG"
+#line 3690 "VBNET.ATG"
type = "System.String";
break;
}
case 100: {
lexer.NextToken();
-#line 3688 "VBNET.ATG"
+#line 3691 "VBNET.ATG"
type = "System.Decimal";
break;
}
case 71: {
lexer.NextToken();
-#line 3689 "VBNET.ATG"
+#line 3692 "VBNET.ATG"
type = "System.Byte";
break;
}
case 201: {
lexer.NextToken();
-#line 3690 "VBNET.ATG"
+#line 3693 "VBNET.ATG"
type = "System.Int16";
break;
}
case 141: {
lexer.NextToken();
-#line 3691 "VBNET.ATG"
+#line 3694 "VBNET.ATG"
type = "System.Int32";
break;
}
case 151: {
lexer.NextToken();
-#line 3692 "VBNET.ATG"
+#line 3695 "VBNET.ATG"
type = "System.Int64";
break;
}
case 202: {
lexer.NextToken();
-#line 3693 "VBNET.ATG"
+#line 3696 "VBNET.ATG"
type = "System.Single";
break;
}
case 109: {
lexer.NextToken();
-#line 3694 "VBNET.ATG"
+#line 3697 "VBNET.ATG"
type = "System.Double";
break;
}
case 221: {
lexer.NextToken();
-#line 3695 "VBNET.ATG"
+#line 3698 "VBNET.ATG"
type = "System.UInt32";
break;
}
case 222: {
lexer.NextToken();
-#line 3696 "VBNET.ATG"
+#line 3699 "VBNET.ATG"
type = "System.UInt64";
break;
}
case 225: {
lexer.NextToken();
-#line 3697 "VBNET.ATG"
+#line 3700 "VBNET.ATG"
type = "System.UInt16";
break;
}
case 196: {
lexer.NextToken();
-#line 3698 "VBNET.ATG"
+#line 3701 "VBNET.ATG"
type = "System.SByte";
break;
}
@@ -4487,122 +4495,122 @@ out string type) {
}
void CastTarget(
-#line 1938 "VBNET.ATG"
+#line 1941 "VBNET.ATG"
out TypeReference type) {
-#line 1940 "VBNET.ATG"
+#line 1943 "VBNET.ATG"
type = null;
switch (la.kind) {
case 76: {
lexer.NextToken();
-#line 1942 "VBNET.ATG"
+#line 1945 "VBNET.ATG"
type = new TypeReference("System.Boolean", true);
break;
}
case 77: {
lexer.NextToken();
-#line 1943 "VBNET.ATG"
+#line 1946 "VBNET.ATG"
type = new TypeReference("System.Byte", true);
break;
}
case 90: {
lexer.NextToken();
-#line 1944 "VBNET.ATG"
+#line 1947 "VBNET.ATG"
type = new TypeReference("System.SByte", true);
break;
}
case 78: {
lexer.NextToken();
-#line 1945 "VBNET.ATG"
+#line 1948 "VBNET.ATG"
type = new TypeReference("System.Char", true);
break;
}
case 79: {
lexer.NextToken();
-#line 1946 "VBNET.ATG"
+#line 1949 "VBNET.ATG"
type = new TypeReference("System.DateTime", true);
break;
}
case 81: {
lexer.NextToken();
-#line 1947 "VBNET.ATG"
+#line 1950 "VBNET.ATG"
type = new TypeReference("System.Decimal", true);
break;
}
case 80: {
lexer.NextToken();
-#line 1948 "VBNET.ATG"
+#line 1951 "VBNET.ATG"
type = new TypeReference("System.Double", true);
break;
}
case 91: {
lexer.NextToken();
-#line 1949 "VBNET.ATG"
+#line 1952 "VBNET.ATG"
type = new TypeReference("System.Int16", true);
break;
}
case 83: {
lexer.NextToken();
-#line 1950 "VBNET.ATG"
+#line 1953 "VBNET.ATG"
type = new TypeReference("System.Int32", true);
break;
}
case 85: {
lexer.NextToken();
-#line 1951 "VBNET.ATG"
+#line 1954 "VBNET.ATG"
type = new TypeReference("System.Int64", true);
break;
}
case 97: {
lexer.NextToken();
-#line 1952 "VBNET.ATG"
+#line 1955 "VBNET.ATG"
type = new TypeReference("System.UInt16", true);
break;
}
case 95: {
lexer.NextToken();
-#line 1953 "VBNET.ATG"
+#line 1956 "VBNET.ATG"
type = new TypeReference("System.UInt32", true);
break;
}
case 96: {
lexer.NextToken();
-#line 1954 "VBNET.ATG"
+#line 1957 "VBNET.ATG"
type = new TypeReference("System.UInt64", true);
break;
}
case 86: {
lexer.NextToken();
-#line 1955 "VBNET.ATG"
+#line 1958 "VBNET.ATG"
type = new TypeReference("System.Object", true);
break;
}
case 92: {
lexer.NextToken();
-#line 1956 "VBNET.ATG"
+#line 1959 "VBNET.ATG"
type = new TypeReference("System.Single", true);
break;
}
case 93: {
lexer.NextToken();
-#line 1957 "VBNET.ATG"
+#line 1960 "VBNET.ATG"
type = new TypeReference("System.String", true);
break;
}
@@ -4611,19 +4619,19 @@ out TypeReference type) {
}
void GetTypeTypeName(
-#line 2710 "VBNET.ATG"
+#line 2713 "VBNET.ATG"
out TypeReference typeref) {
-#line 2711 "VBNET.ATG"
+#line 2714 "VBNET.ATG"
ArrayList rank = null;
NonArrayTypeName(
-#line 2713 "VBNET.ATG"
+#line 2716 "VBNET.ATG"
out typeref, true);
ArrayTypeModifiers(
-#line 2714 "VBNET.ATG"
+#line 2717 "VBNET.ATG"
out rank);
-#line 2715 "VBNET.ATG"
+#line 2718 "VBNET.ATG"
if (rank != null && typeref != null) {
typeref.RankSpecifier = (int[])rank.ToArray(typeof(int));
}
@@ -4631,10 +4639,10 @@ out rank);
}
void ConditionalExpression(
-#line 1890 "VBNET.ATG"
+#line 1893 "VBNET.ATG"
out Expression expr) {
-#line 1892 "VBNET.ATG"
+#line 1895 "VBNET.ATG"
ConditionalExpression conditionalExpression = new ConditionalExpression();
BinaryOperatorExpression binaryOperatorExpression = new BinaryOperatorExpression();
conditionalExpression.StartLocation = binaryOperatorExpression.StartLocation = la.Location;
@@ -4646,21 +4654,21 @@ out Expression expr) {
Expect(135);
Expect(37);
Expr(
-#line 1901 "VBNET.ATG"
+#line 1904 "VBNET.ATG"
out condition);
Expect(22);
Expr(
-#line 1901 "VBNET.ATG"
+#line 1904 "VBNET.ATG"
out trueExpr);
if (la.kind == 22) {
lexer.NextToken();
Expr(
-#line 1901 "VBNET.ATG"
+#line 1904 "VBNET.ATG"
out falseExpr);
}
Expect(38);
-#line 1903 "VBNET.ATG"
+#line 1906 "VBNET.ATG"
if(falseExpr != null)
{
conditionalExpression.Condition = condition;
@@ -4683,50 +4691,50 @@ out falseExpr);
}
void XmlLiteralExpression(
-#line 1810 "VBNET.ATG"
+#line 1813 "VBNET.ATG"
out Expression pexpr) {
-#line 1812 "VBNET.ATG"
+#line 1815 "VBNET.ATG"
List exprs = new List();
XmlExpression currentExpression = null;
if (StartOf(36)) {
XmlContentExpression(
-#line 1817 "VBNET.ATG"
+#line 1820 "VBNET.ATG"
exprs);
while (StartOf(36)) {
XmlContentExpression(
-#line 1817 "VBNET.ATG"
+#line 1820 "VBNET.ATG"
exprs);
}
if (la.kind == 10) {
XmlElement(
-#line 1817 "VBNET.ATG"
+#line 1820 "VBNET.ATG"
out currentExpression);
-#line 1817 "VBNET.ATG"
+#line 1820 "VBNET.ATG"
exprs.Add(currentExpression);
while (StartOf(36)) {
XmlContentExpression(
-#line 1817 "VBNET.ATG"
+#line 1820 "VBNET.ATG"
exprs);
}
}
} else if (la.kind == 10) {
XmlElement(
-#line 1819 "VBNET.ATG"
+#line 1822 "VBNET.ATG"
out currentExpression);
-#line 1819 "VBNET.ATG"
+#line 1822 "VBNET.ATG"
exprs.Add(currentExpression);
while (StartOf(36)) {
XmlContentExpression(
-#line 1819 "VBNET.ATG"
+#line 1822 "VBNET.ATG"
exprs);
}
} else SynErr(288);
-#line 1822 "VBNET.ATG"
+#line 1825 "VBNET.ATG"
if (exprs.Count > 1) {
pexpr = new XmlDocumentExpression() { Expressions = exprs };
} else {
@@ -4736,34 +4744,34 @@ exprs);
}
void XmlContentExpression(
-#line 1830 "VBNET.ATG"
+#line 1833 "VBNET.ATG"
List exprs) {
-#line 1831 "VBNET.ATG"
+#line 1834 "VBNET.ATG"
XmlContentExpression expr = null;
if (la.kind == 16) {
lexer.NextToken();
-#line 1833 "VBNET.ATG"
+#line 1836 "VBNET.ATG"
expr = new XmlContentExpression(t.val, XmlContentType.Text);
} else if (la.kind == 18) {
lexer.NextToken();
-#line 1834 "VBNET.ATG"
+#line 1837 "VBNET.ATG"
expr = new XmlContentExpression(t.val, XmlContentType.CData);
} else if (la.kind == 17) {
lexer.NextToken();
-#line 1835 "VBNET.ATG"
+#line 1838 "VBNET.ATG"
expr = new XmlContentExpression(t.val, XmlContentType.Comment);
} else if (la.kind == 19) {
lexer.NextToken();
-#line 1836 "VBNET.ATG"
+#line 1839 "VBNET.ATG"
expr = new XmlContentExpression(t.val, XmlContentType.ProcessingInstruction);
} else SynErr(289);
-#line 1839 "VBNET.ATG"
+#line 1842 "VBNET.ATG"
expr.StartLocation = t.Location;
expr.EndLocation = t.EndLocation;
exprs.Add(expr);
@@ -4771,54 +4779,54 @@ List exprs) {
}
void XmlElement(
-#line 1865 "VBNET.ATG"
+#line 1868 "VBNET.ATG"
out XmlExpression expr) {
-#line 1866 "VBNET.ATG"
+#line 1869 "VBNET.ATG"
XmlElementExpression el = new XmlElementExpression();
Expect(10);
-#line 1869 "VBNET.ATG"
+#line 1872 "VBNET.ATG"
el.StartLocation = t.Location;
if (la.kind == 12) {
lexer.NextToken();
-#line 1870 "VBNET.ATG"
+#line 1873 "VBNET.ATG"
Expression innerExpression;
Expr(
-#line 1870 "VBNET.ATG"
+#line 1873 "VBNET.ATG"
out innerExpression);
Expect(13);
-#line 1871 "VBNET.ATG"
+#line 1874 "VBNET.ATG"
el.NameExpression = new XmlEmbeddedExpression() { InlineVBExpression = innerExpression };
} else if (StartOf(4)) {
Identifier();
-#line 1872 "VBNET.ATG"
+#line 1875 "VBNET.ATG"
el.XmlName = t.val;
} else SynErr(290);
while (StartOf(37)) {
XmlAttribute(
-#line 1872 "VBNET.ATG"
+#line 1875 "VBNET.ATG"
el.Attributes);
}
if (la.kind == 14) {
lexer.NextToken();
-#line 1873 "VBNET.ATG"
+#line 1876 "VBNET.ATG"
el.EndLocation = t.EndLocation;
} else if (la.kind == 11) {
lexer.NextToken();
while (StartOf(38)) {
-#line 1873 "VBNET.ATG"
+#line 1876 "VBNET.ATG"
XmlExpression child;
XmlNestedContent(
-#line 1873 "VBNET.ATG"
+#line 1876 "VBNET.ATG"
out child);
-#line 1873 "VBNET.ATG"
+#line 1876 "VBNET.ATG"
el.Children.Add(child);
}
Expect(15);
@@ -4827,73 +4835,73 @@ out child);
}
Expect(11);
-#line 1873 "VBNET.ATG"
+#line 1876 "VBNET.ATG"
el.EndLocation = t.EndLocation;
} else SynErr(291);
-#line 1875 "VBNET.ATG"
+#line 1878 "VBNET.ATG"
expr = el;
}
void XmlNestedContent(
-#line 1845 "VBNET.ATG"
+#line 1848 "VBNET.ATG"
out XmlExpression expr) {
-#line 1846 "VBNET.ATG"
+#line 1849 "VBNET.ATG"
XmlExpression tmpExpr = null; Location start = la.Location;
switch (la.kind) {
case 16: {
lexer.NextToken();
-#line 1849 "VBNET.ATG"
+#line 1852 "VBNET.ATG"
tmpExpr = new XmlContentExpression(t.val, XmlContentType.Text);
break;
}
case 18: {
lexer.NextToken();
-#line 1850 "VBNET.ATG"
+#line 1853 "VBNET.ATG"
tmpExpr = new XmlContentExpression(t.val, XmlContentType.CData);
break;
}
case 17: {
lexer.NextToken();
-#line 1851 "VBNET.ATG"
+#line 1854 "VBNET.ATG"
tmpExpr = new XmlContentExpression(t.val, XmlContentType.Comment);
break;
}
case 19: {
lexer.NextToken();
-#line 1852 "VBNET.ATG"
+#line 1855 "VBNET.ATG"
tmpExpr = new XmlContentExpression(t.val, XmlContentType.ProcessingInstruction);
break;
}
case 12: {
lexer.NextToken();
-#line 1853 "VBNET.ATG"
+#line 1856 "VBNET.ATG"
Expression innerExpression;
Expr(
-#line 1853 "VBNET.ATG"
+#line 1856 "VBNET.ATG"
out innerExpression);
Expect(13);
-#line 1853 "VBNET.ATG"
+#line 1856 "VBNET.ATG"
tmpExpr = new XmlEmbeddedExpression() { InlineVBExpression = innerExpression };
break;
}
case 10: {
XmlElement(
-#line 1854 "VBNET.ATG"
+#line 1857 "VBNET.ATG"
out tmpExpr);
break;
}
default: SynErr(292); break;
}
-#line 1857 "VBNET.ATG"
+#line 1860 "VBNET.ATG"
if (tmpExpr.StartLocation.IsEmpty)
tmpExpr.StartLocation = start;
if (tmpExpr.EndLocation.IsEmpty)
@@ -4903,401 +4911,401 @@ out tmpExpr);
}
void XmlAttribute(
-#line 1878 "VBNET.ATG"
+#line 1881 "VBNET.ATG"
List attrs) {
-#line 1879 "VBNET.ATG"
+#line 1882 "VBNET.ATG"
Location start = la.Location;
if (StartOf(4)) {
Identifier();
-#line 1881 "VBNET.ATG"
+#line 1884 "VBNET.ATG"
string name = t.val;
Expect(20);
-#line 1882 "VBNET.ATG"
+#line 1885 "VBNET.ATG"
string literalValue = null; Expression expressionValue = null; bool useDoubleQuotes = false;
if (la.kind == 3) {
lexer.NextToken();
-#line 1883 "VBNET.ATG"
+#line 1886 "VBNET.ATG"
literalValue = t.literalValue.ToString(); useDoubleQuotes = t.val[0] == '"';
} else if (la.kind == 12) {
lexer.NextToken();
Expr(
-#line 1883 "VBNET.ATG"
+#line 1886 "VBNET.ATG"
out expressionValue);
Expect(13);
} else SynErr(293);
-#line 1884 "VBNET.ATG"
+#line 1887 "VBNET.ATG"
attrs.Add(new XmlAttributeExpression() { Name = name, ExpressionValue = expressionValue, LiteralValue = literalValue, UseDoubleQuotes = useDoubleQuotes, StartLocation = start, EndLocation = t.EndLocation });
} else if (la.kind == 12) {
lexer.NextToken();
-#line 1886 "VBNET.ATG"
+#line 1889 "VBNET.ATG"
Expression innerExpression;
Expr(
-#line 1886 "VBNET.ATG"
+#line 1889 "VBNET.ATG"
out innerExpression);
Expect(13);
-#line 1887 "VBNET.ATG"
+#line 1890 "VBNET.ATG"
attrs.Add(new XmlEmbeddedExpression() { InlineVBExpression = innerExpression, StartLocation = start, EndLocation = t.EndLocation });
} else SynErr(294);
}
void ArgumentList(
-#line 2639 "VBNET.ATG"
+#line 2642 "VBNET.ATG"
out List arguments) {
-#line 2641 "VBNET.ATG"
+#line 2644 "VBNET.ATG"
arguments = new List();
Expression expr = null;
if (StartOf(24)) {
Argument(
-#line 2644 "VBNET.ATG"
+#line 2647 "VBNET.ATG"
out expr);
}
while (la.kind == 22) {
lexer.NextToken();
-#line 2645 "VBNET.ATG"
+#line 2648 "VBNET.ATG"
arguments.Add(expr ?? Expression.Null); expr = null;
if (StartOf(24)) {
Argument(
-#line 2646 "VBNET.ATG"
+#line 2649 "VBNET.ATG"
out expr);
}
-#line 2647 "VBNET.ATG"
+#line 2650 "VBNET.ATG"
if (expr == null) expr = Expression.Null;
}
-#line 2649 "VBNET.ATG"
+#line 2652 "VBNET.ATG"
if (expr != null) arguments.Add(expr);
}
void ConjunctionExpr(
-#line 1977 "VBNET.ATG"
+#line 1980 "VBNET.ATG"
out Expression outExpr) {
-#line 1979 "VBNET.ATG"
+#line 1982 "VBNET.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
Location startLocation = la.Location;
NotExpr(
-#line 1983 "VBNET.ATG"
+#line 1986 "VBNET.ATG"
out outExpr);
while (la.kind == 60 || la.kind == 61) {
if (la.kind == 60) {
lexer.NextToken();
-#line 1986 "VBNET.ATG"
+#line 1989 "VBNET.ATG"
op = BinaryOperatorType.BitwiseAnd;
} else {
lexer.NextToken();
-#line 1987 "VBNET.ATG"
+#line 1990 "VBNET.ATG"
op = BinaryOperatorType.LogicalAnd;
}
NotExpr(
-#line 1989 "VBNET.ATG"
+#line 1992 "VBNET.ATG"
out expr);
-#line 1989 "VBNET.ATG"
+#line 1992 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation };
}
}
void NotExpr(
-#line 1993 "VBNET.ATG"
+#line 1996 "VBNET.ATG"
out Expression outExpr) {
-#line 1994 "VBNET.ATG"
+#line 1997 "VBNET.ATG"
UnaryOperatorType uop = UnaryOperatorType.None;
while (la.kind == 164) {
lexer.NextToken();
-#line 1995 "VBNET.ATG"
+#line 1998 "VBNET.ATG"
uop = UnaryOperatorType.Not;
}
ComparisonExpr(
-#line 1996 "VBNET.ATG"
+#line 1999 "VBNET.ATG"
out outExpr);
-#line 1997 "VBNET.ATG"
+#line 2000 "VBNET.ATG"
if (uop != UnaryOperatorType.None)
outExpr = new UnaryOperatorExpression(outExpr, uop);
}
void ComparisonExpr(
-#line 2002 "VBNET.ATG"
+#line 2005 "VBNET.ATG"
out Expression outExpr) {
-#line 2004 "VBNET.ATG"
+#line 2007 "VBNET.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
Location startLocation = la.Location;
ShiftExpr(
-#line 2008 "VBNET.ATG"
+#line 2011 "VBNET.ATG"
out outExpr);
while (StartOf(40)) {
switch (la.kind) {
case 40: {
lexer.NextToken();
-#line 2011 "VBNET.ATG"
+#line 2014 "VBNET.ATG"
op = BinaryOperatorType.LessThan;
break;
}
case 39: {
lexer.NextToken();
-#line 2012 "VBNET.ATG"
+#line 2015 "VBNET.ATG"
op = BinaryOperatorType.GreaterThan;
break;
}
case 43: {
lexer.NextToken();
-#line 2013 "VBNET.ATG"
+#line 2016 "VBNET.ATG"
op = BinaryOperatorType.LessThanOrEqual;
break;
}
case 42: {
lexer.NextToken();
-#line 2014 "VBNET.ATG"
+#line 2017 "VBNET.ATG"
op = BinaryOperatorType.GreaterThanOrEqual;
break;
}
case 41: {
lexer.NextToken();
-#line 2015 "VBNET.ATG"
+#line 2018 "VBNET.ATG"
op = BinaryOperatorType.InEquality;
break;
}
case 20: {
lexer.NextToken();
-#line 2016 "VBNET.ATG"
+#line 2019 "VBNET.ATG"
op = BinaryOperatorType.Equality;
break;
}
case 150: {
lexer.NextToken();
-#line 2017 "VBNET.ATG"
+#line 2020 "VBNET.ATG"
op = BinaryOperatorType.Like;
break;
}
case 144: {
lexer.NextToken();
-#line 2018 "VBNET.ATG"
+#line 2021 "VBNET.ATG"
op = BinaryOperatorType.ReferenceEquality;
break;
}
case 145: {
lexer.NextToken();
-#line 2019 "VBNET.ATG"
+#line 2022 "VBNET.ATG"
op = BinaryOperatorType.ReferenceInequality;
break;
}
}
if (StartOf(41)) {
ShiftExpr(
-#line 2022 "VBNET.ATG"
+#line 2025 "VBNET.ATG"
out expr);
-#line 2022 "VBNET.ATG"
+#line 2025 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation };
} else if (la.kind == 164) {
-#line 2023 "VBNET.ATG"
+#line 2026 "VBNET.ATG"
Location startLocation2 = la.Location;
lexer.NextToken();
ShiftExpr(
-#line 2025 "VBNET.ATG"
+#line 2028 "VBNET.ATG"
out expr);
-#line 2025 "VBNET.ATG"
+#line 2028 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, new UnaryOperatorExpression(expr, UnaryOperatorType.Not) { StartLocation = startLocation2, EndLocation = t.EndLocation }) { StartLocation = startLocation, EndLocation = t.EndLocation };
} else SynErr(295);
}
}
void ShiftExpr(
-#line 2030 "VBNET.ATG"
+#line 2033 "VBNET.ATG"
out Expression outExpr) {
-#line 2032 "VBNET.ATG"
+#line 2035 "VBNET.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
Location startLocation = la.Location;
ConcatenationExpr(
-#line 2036 "VBNET.ATG"
+#line 2039 "VBNET.ATG"
out outExpr);
while (la.kind == 44 || la.kind == 45) {
if (la.kind == 44) {
lexer.NextToken();
-#line 2039 "VBNET.ATG"
+#line 2042 "VBNET.ATG"
op = BinaryOperatorType.ShiftLeft;
} else {
lexer.NextToken();
-#line 2040 "VBNET.ATG"
+#line 2043 "VBNET.ATG"
op = BinaryOperatorType.ShiftRight;
}
ConcatenationExpr(
-#line 2042 "VBNET.ATG"
+#line 2045 "VBNET.ATG"
out expr);
-#line 2042 "VBNET.ATG"
+#line 2045 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation };
}
}
void ConcatenationExpr(
-#line 2046 "VBNET.ATG"
+#line 2049 "VBNET.ATG"
out Expression outExpr) {
-#line 2047 "VBNET.ATG"
+#line 2050 "VBNET.ATG"
Expression expr; Location startLocation = la.Location;
AdditiveExpr(
-#line 2049 "VBNET.ATG"
+#line 2052 "VBNET.ATG"
out outExpr);
while (la.kind == 23) {
lexer.NextToken();
AdditiveExpr(
-#line 2049 "VBNET.ATG"
+#line 2052 "VBNET.ATG"
out expr);
-#line 2049 "VBNET.ATG"
+#line 2052 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Concat, expr) { StartLocation = startLocation, EndLocation = t.EndLocation };
}
}
void AdditiveExpr(
-#line 2052 "VBNET.ATG"
+#line 2055 "VBNET.ATG"
out Expression outExpr) {
-#line 2054 "VBNET.ATG"
+#line 2057 "VBNET.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
Location startLocation = la.Location;
ModuloExpr(
-#line 2058 "VBNET.ATG"
+#line 2061 "VBNET.ATG"
out outExpr);
while (la.kind == 30 || la.kind == 31) {
if (la.kind == 31) {
lexer.NextToken();
-#line 2061 "VBNET.ATG"
+#line 2064 "VBNET.ATG"
op = BinaryOperatorType.Add;
} else {
lexer.NextToken();
-#line 2062 "VBNET.ATG"
+#line 2065 "VBNET.ATG"
op = BinaryOperatorType.Subtract;
}
ModuloExpr(
-#line 2064 "VBNET.ATG"
+#line 2067 "VBNET.ATG"
out expr);
-#line 2064 "VBNET.ATG"
+#line 2067 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation };
}
}
void ModuloExpr(
-#line 2068 "VBNET.ATG"
+#line 2071 "VBNET.ATG"
out Expression outExpr) {
-#line 2069 "VBNET.ATG"
+#line 2072 "VBNET.ATG"
Expression expr; Location startLocation = la.Location;
IntegerDivisionExpr(
-#line 2071 "VBNET.ATG"
+#line 2074 "VBNET.ATG"
out outExpr);
while (la.kind == 154) {
lexer.NextToken();
IntegerDivisionExpr(
-#line 2071 "VBNET.ATG"
+#line 2074 "VBNET.ATG"
out expr);
-#line 2071 "VBNET.ATG"
+#line 2074 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Modulus, expr) { StartLocation = startLocation, EndLocation = t.EndLocation };
}
}
void IntegerDivisionExpr(
-#line 2074 "VBNET.ATG"
+#line 2077 "VBNET.ATG"
out Expression outExpr) {
-#line 2075 "VBNET.ATG"
+#line 2078 "VBNET.ATG"
Expression expr; Location startLocation = la.Location;
MultiplicativeExpr(
-#line 2077 "VBNET.ATG"
+#line 2080 "VBNET.ATG"
out outExpr);
while (la.kind == 25) {
lexer.NextToken();
MultiplicativeExpr(
-#line 2077 "VBNET.ATG"
+#line 2080 "VBNET.ATG"
out expr);
-#line 2077 "VBNET.ATG"
+#line 2080 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.DivideInteger, expr) { StartLocation = startLocation, EndLocation = t.EndLocation };
}
}
void MultiplicativeExpr(
-#line 2080 "VBNET.ATG"
+#line 2083 "VBNET.ATG"
out Expression outExpr) {
-#line 2082 "VBNET.ATG"
+#line 2085 "VBNET.ATG"
Expression expr;
BinaryOperatorType op = BinaryOperatorType.None;
Location startLocation = la.Location;
UnaryExpr(
-#line 2086 "VBNET.ATG"
+#line 2089 "VBNET.ATG"
out outExpr);
while (la.kind == 24 || la.kind == 34) {
if (la.kind == 34) {
lexer.NextToken();
-#line 2089 "VBNET.ATG"
+#line 2092 "VBNET.ATG"
op = BinaryOperatorType.Multiply;
} else {
lexer.NextToken();
-#line 2090 "VBNET.ATG"
+#line 2093 "VBNET.ATG"
op = BinaryOperatorType.Divide;
}
UnaryExpr(
-#line 2092 "VBNET.ATG"
+#line 2095 "VBNET.ATG"
out expr);
-#line 2092 "VBNET.ATG"
+#line 2095 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, op, expr) { StartLocation = startLocation, EndLocation = t.EndLocation };
}
}
void UnaryExpr(
-#line 2096 "VBNET.ATG"
+#line 2099 "VBNET.ATG"
out Expression uExpr) {
-#line 2098 "VBNET.ATG"
+#line 2101 "VBNET.ATG"
Expression expr;
UnaryOperatorType uop = UnaryOperatorType.None;
Location startLocation = la.Location;
@@ -5307,25 +5315,25 @@ out Expression uExpr) {
if (la.kind == 31) {
lexer.NextToken();
-#line 2103 "VBNET.ATG"
+#line 2106 "VBNET.ATG"
uop = UnaryOperatorType.Plus; isUOp = true;
} else if (la.kind == 30) {
lexer.NextToken();
-#line 2104 "VBNET.ATG"
+#line 2107 "VBNET.ATG"
uop = UnaryOperatorType.Minus; isUOp = true;
} else {
lexer.NextToken();
-#line 2105 "VBNET.ATG"
+#line 2108 "VBNET.ATG"
uop = UnaryOperatorType.Dereference; isUOp = true;
}
}
ExponentiationExpr(
-#line 2107 "VBNET.ATG"
+#line 2110 "VBNET.ATG"
out expr);
-#line 2109 "VBNET.ATG"
+#line 2112 "VBNET.ATG"
if (isUOp) {
uExpr = new UnaryOperatorExpression(expr, uop) { StartLocation = startLocation, EndLocation = t.EndLocation };
} else {
@@ -5335,107 +5343,107 @@ out expr);
}
void ExponentiationExpr(
-#line 2117 "VBNET.ATG"
+#line 2120 "VBNET.ATG"
out Expression outExpr) {
-#line 2118 "VBNET.ATG"
+#line 2121 "VBNET.ATG"
Expression expr; Location startLocation = la.Location;
SimpleExpr(
-#line 2120 "VBNET.ATG"
+#line 2123 "VBNET.ATG"
out outExpr);
while (la.kind == 32) {
lexer.NextToken();
SimpleExpr(
-#line 2120 "VBNET.ATG"
+#line 2123 "VBNET.ATG"
out expr);
-#line 2120 "VBNET.ATG"
+#line 2123 "VBNET.ATG"
outExpr = new BinaryOperatorExpression(outExpr, BinaryOperatorType.Power, expr) { StartLocation = startLocation, EndLocation = t.EndLocation };
}
}
void NormalOrReDimArgumentList(
-#line 2653 "VBNET.ATG"
+#line 2656 "VBNET.ATG"
out List arguments, out bool canBeNormal, out bool canBeRedim) {
-#line 2655 "VBNET.ATG"
+#line 2658 "VBNET.ATG"
arguments = new List();
canBeNormal = true; canBeRedim = !IsNamedAssign();
Expression expr = null;
if (StartOf(24)) {
Argument(
-#line 2660 "VBNET.ATG"
+#line 2663 "VBNET.ATG"
out expr);
if (la.kind == 216) {
lexer.NextToken();
-#line 2661 "VBNET.ATG"
+#line 2664 "VBNET.ATG"
EnsureIsZero(expr); canBeNormal = false;
Expr(
-#line 2662 "VBNET.ATG"
+#line 2665 "VBNET.ATG"
out expr);
}
}
while (la.kind == 22) {
lexer.NextToken();
-#line 2665 "VBNET.ATG"
+#line 2668 "VBNET.ATG"
if (expr == null) canBeRedim = false;
-#line 2666 "VBNET.ATG"
+#line 2669 "VBNET.ATG"
arguments.Add(expr ?? Expression.Null); expr = null;
-#line 2667 "VBNET.ATG"
+#line 2670 "VBNET.ATG"
canBeRedim &= !IsNamedAssign();
if (StartOf(24)) {
Argument(
-#line 2668 "VBNET.ATG"
+#line 2671 "VBNET.ATG"
out expr);
if (la.kind == 216) {
lexer.NextToken();
-#line 2669 "VBNET.ATG"
+#line 2672 "VBNET.ATG"
EnsureIsZero(expr); canBeNormal = false;
Expr(
-#line 2670 "VBNET.ATG"
+#line 2673 "VBNET.ATG"
out expr);
}
}
-#line 2672 "VBNET.ATG"
+#line 2675 "VBNET.ATG"
if (expr == null) { canBeRedim = false; expr = Expression.Null; }
}
-#line 2674 "VBNET.ATG"
+#line 2677 "VBNET.ATG"
if (expr != null) arguments.Add(expr); else canBeRedim = false;
}
void ArrayTypeModifiers(
-#line 2784 "VBNET.ATG"
+#line 2787 "VBNET.ATG"
out ArrayList arrayModifiers) {
-#line 2786 "VBNET.ATG"
+#line 2789 "VBNET.ATG"
arrayModifiers = new ArrayList();
int i = 0;
while (
-#line 2789 "VBNET.ATG"
+#line 2792 "VBNET.ATG"
IsDims()) {
Expect(37);
if (la.kind == 22 || la.kind == 38) {
RankList(
-#line 2791 "VBNET.ATG"
+#line 2794 "VBNET.ATG"
out i);
}
-#line 2793 "VBNET.ATG"
+#line 2796 "VBNET.ATG"
arrayModifiers.Add(i);
Expect(38);
}
-#line 2798 "VBNET.ATG"
+#line 2801 "VBNET.ATG"
if(arrayModifiers.Count == 0) {
arrayModifiers = null;
}
@@ -5443,10 +5451,10 @@ out i);
}
void MemberInitializer(
-#line 2620 "VBNET.ATG"
+#line 2623 "VBNET.ATG"
out MemberInitializerExpression memberInitializer) {
-#line 2622 "VBNET.ATG"
+#line 2625 "VBNET.ATG"
memberInitializer = new MemberInitializerExpression();
memberInitializer.StartLocation = la.Location;
Expression initExpr = null;
@@ -5456,19 +5464,19 @@ out MemberInitializerExpression memberInitializer) {
if (la.kind == 147) {
lexer.NextToken();
-#line 2628 "VBNET.ATG"
+#line 2631 "VBNET.ATG"
isKey = true;
}
Expect(26);
IdentifierOrKeyword(
-#line 2629 "VBNET.ATG"
+#line 2632 "VBNET.ATG"
out name);
Expect(20);
Expr(
-#line 2629 "VBNET.ATG"
+#line 2632 "VBNET.ATG"
out initExpr);
-#line 2631 "VBNET.ATG"
+#line 2634 "VBNET.ATG"
memberInitializer.Name = name;
memberInitializer.Expression = initExpr;
memberInitializer.IsKey = isKey;
@@ -5477,10 +5485,10 @@ out initExpr);
}
void SubLambdaExpression(
-#line 2219 "VBNET.ATG"
+#line 2222 "VBNET.ATG"
out LambdaExpression lambda) {
-#line 2221 "VBNET.ATG"
+#line 2224 "VBNET.ATG"
lambda = new LambdaExpression();
lambda.ReturnType = new TypeReference("System.Void", true);
Expression inner = null;
@@ -5492,7 +5500,7 @@ out LambdaExpression lambda) {
lexer.NextToken();
if (StartOf(6)) {
FormalParameterList(
-#line 2228 "VBNET.ATG"
+#line 2231 "VBNET.ATG"
lambda.Parameters);
}
Expect(38);
@@ -5500,20 +5508,20 @@ lambda.Parameters);
if (StartOf(42)) {
if (StartOf(24)) {
Expr(
-#line 2231 "VBNET.ATG"
+#line 2234 "VBNET.ATG"
out inner);
-#line 2233 "VBNET.ATG"
+#line 2236 "VBNET.ATG"
lambda.ExpressionBody = inner;
lambda.EndLocation = t.EndLocation; // la.Location?
lambda.ExtendedEndLocation = la.Location;
} else {
EmbeddedStatement(
-#line 2238 "VBNET.ATG"
+#line 2241 "VBNET.ATG"
out statement);
-#line 2240 "VBNET.ATG"
+#line 2243 "VBNET.ATG"
lambda.StatementBody = statement;
lambda.EndLocation = t.EndLocation;
lambda.ExtendedEndLocation = la.Location;
@@ -5522,12 +5530,12 @@ out statement);
} else if (la.kind == 1) {
lexer.NextToken();
Block(
-#line 2247 "VBNET.ATG"
+#line 2250 "VBNET.ATG"
out statement);
Expect(113);
Expect(210);
-#line 2250 "VBNET.ATG"
+#line 2253 "VBNET.ATG"
lambda.StatementBody = statement;
lambda.EndLocation = t.EndLocation;
lambda.ExtendedEndLocation = la.Location;
@@ -5536,10 +5544,10 @@ out statement);
}
void FunctionLambdaExpression(
-#line 2257 "VBNET.ATG"
+#line 2260 "VBNET.ATG"
out LambdaExpression lambda) {
-#line 2259 "VBNET.ATG"
+#line 2262 "VBNET.ATG"
lambda = new LambdaExpression();
TypeReference typeRef = null;
Expression inner = null;
@@ -5551,7 +5559,7 @@ out LambdaExpression lambda) {
lexer.NextToken();
if (StartOf(6)) {
FormalParameterList(
-#line 2266 "VBNET.ATG"
+#line 2269 "VBNET.ATG"
lambda.Parameters);
}
Expect(38);
@@ -5559,29 +5567,29 @@ lambda.Parameters);
if (la.kind == 63) {
lexer.NextToken();
TypeName(
-#line 2267 "VBNET.ATG"
+#line 2270 "VBNET.ATG"
out typeRef);
-#line 2267 "VBNET.ATG"
+#line 2270 "VBNET.ATG"
lambda.ReturnType = typeRef;
}
if (StartOf(42)) {
if (StartOf(24)) {
Expr(
-#line 2270 "VBNET.ATG"
+#line 2273 "VBNET.ATG"
out inner);
-#line 2272 "VBNET.ATG"
+#line 2275 "VBNET.ATG"
lambda.ExpressionBody = inner;
lambda.EndLocation = t.EndLocation;
lambda.ExtendedEndLocation = la.Location;
} else {
EmbeddedStatement(
-#line 2277 "VBNET.ATG"
+#line 2280 "VBNET.ATG"
out statement);
-#line 2279 "VBNET.ATG"
+#line 2282 "VBNET.ATG"
lambda.StatementBody = statement;
lambda.EndLocation = t.EndLocation;
lambda.ExtendedEndLocation = la.Location;
@@ -5590,12 +5598,12 @@ out statement);
} else if (la.kind == 1) {
lexer.NextToken();
Block(
-#line 2286 "VBNET.ATG"
+#line 2289 "VBNET.ATG"
out statement);
Expect(113);
Expect(127);
-#line 2289 "VBNET.ATG"
+#line 2292 "VBNET.ATG"
lambda.StatementBody = statement;
lambda.EndLocation = t.EndLocation;
lambda.ExtendedEndLocation = la.Location;
@@ -5604,10 +5612,10 @@ out statement);
}
void EmbeddedStatement(
-#line 3070 "VBNET.ATG"
+#line 3073 "VBNET.ATG"
out Statement statement) {
-#line 3072 "VBNET.ATG"
+#line 3075 "VBNET.ATG"
Statement embeddedStatement = null;
statement = null;
Expression expr = null;
@@ -5618,224 +5626,224 @@ out Statement statement) {
if (la.kind == 120) {
lexer.NextToken();
-#line 3080 "VBNET.ATG"
+#line 3083 "VBNET.ATG"
ExitType exitType = ExitType.None;
switch (la.kind) {
case 210: {
lexer.NextToken();
-#line 3082 "VBNET.ATG"
+#line 3085 "VBNET.ATG"
exitType = ExitType.Sub;
break;
}
case 127: {
lexer.NextToken();
-#line 3084 "VBNET.ATG"
+#line 3087 "VBNET.ATG"
exitType = ExitType.Function;
break;
}
case 186: {
lexer.NextToken();
-#line 3086 "VBNET.ATG"
+#line 3089 "VBNET.ATG"
exitType = ExitType.Property;
break;
}
case 108: {
lexer.NextToken();
-#line 3088 "VBNET.ATG"
+#line 3091 "VBNET.ATG"
exitType = ExitType.Do;
break;
}
case 124: {
lexer.NextToken();
-#line 3090 "VBNET.ATG"
+#line 3093 "VBNET.ATG"
exitType = ExitType.For;
break;
}
case 218: {
lexer.NextToken();
-#line 3092 "VBNET.ATG"
+#line 3095 "VBNET.ATG"
exitType = ExitType.Try;
break;
}
case 231: {
lexer.NextToken();
-#line 3094 "VBNET.ATG"
+#line 3097 "VBNET.ATG"
exitType = ExitType.While;
break;
}
case 197: {
lexer.NextToken();
-#line 3096 "VBNET.ATG"
+#line 3099 "VBNET.ATG"
exitType = ExitType.Select;
break;
}
default: SynErr(298); break;
}
-#line 3098 "VBNET.ATG"
+#line 3101 "VBNET.ATG"
statement = new ExitStatement(exitType);
} else if (la.kind == 218) {
TryStatement(
-#line 3099 "VBNET.ATG"
+#line 3102 "VBNET.ATG"
out statement);
} else if (la.kind == 89) {
lexer.NextToken();
-#line 3100 "VBNET.ATG"
+#line 3103 "VBNET.ATG"
ContinueType continueType = ContinueType.None;
if (la.kind == 108 || la.kind == 124 || la.kind == 231) {
if (la.kind == 108) {
lexer.NextToken();
-#line 3100 "VBNET.ATG"
+#line 3103 "VBNET.ATG"
continueType = ContinueType.Do;
} else if (la.kind == 124) {
lexer.NextToken();
-#line 3100 "VBNET.ATG"
+#line 3103 "VBNET.ATG"
continueType = ContinueType.For;
} else {
lexer.NextToken();
-#line 3100 "VBNET.ATG"
+#line 3103 "VBNET.ATG"
continueType = ContinueType.While;
}
}
-#line 3100 "VBNET.ATG"
+#line 3103 "VBNET.ATG"
statement = new ContinueStatement(continueType);
} else if (la.kind == 215) {
lexer.NextToken();
if (StartOf(24)) {
Expr(
-#line 3102 "VBNET.ATG"
+#line 3105 "VBNET.ATG"
out expr);
}
-#line 3102 "VBNET.ATG"
+#line 3105 "VBNET.ATG"
statement = new ThrowStatement(expr);
} else if (la.kind == 195) {
lexer.NextToken();
if (StartOf(24)) {
Expr(
-#line 3104 "VBNET.ATG"
+#line 3107 "VBNET.ATG"
out expr);
}
-#line 3104 "VBNET.ATG"
+#line 3107 "VBNET.ATG"
statement = new ReturnStatement(expr);
} else if (la.kind == 211) {
lexer.NextToken();
Expr(
-#line 3106 "VBNET.ATG"
+#line 3109 "VBNET.ATG"
out expr);
EndOfStmt();
Block(
-#line 3106 "VBNET.ATG"
+#line 3109 "VBNET.ATG"
out embeddedStatement);
Expect(113);
Expect(211);
-#line 3107 "VBNET.ATG"
+#line 3110 "VBNET.ATG"
statement = new LockStatement(expr, embeddedStatement);
} else if (la.kind == 189) {
lexer.NextToken();
Identifier();
-#line 3109 "VBNET.ATG"
+#line 3112 "VBNET.ATG"
name = t.val;
if (la.kind == 37) {
lexer.NextToken();
if (StartOf(43)) {
ArgumentList(
-#line 3110 "VBNET.ATG"
+#line 3113 "VBNET.ATG"
out p);
}
Expect(38);
}
-#line 3112 "VBNET.ATG"
+#line 3115 "VBNET.ATG"
statement = new RaiseEventStatement(name, p);
} else if (la.kind == 233) {
WithStatement(
-#line 3115 "VBNET.ATG"
+#line 3118 "VBNET.ATG"
out statement);
} else if (la.kind == 56) {
lexer.NextToken();
-#line 3117 "VBNET.ATG"
+#line 3120 "VBNET.ATG"
Expression handlerExpr = null;
Expr(
-#line 3118 "VBNET.ATG"
+#line 3121 "VBNET.ATG"
out expr);
Expect(22);
Expr(
-#line 3118 "VBNET.ATG"
+#line 3121 "VBNET.ATG"
out handlerExpr);
-#line 3120 "VBNET.ATG"
+#line 3123 "VBNET.ATG"
statement = new AddHandlerStatement(expr, handlerExpr);
} else if (la.kind == 193) {
lexer.NextToken();
-#line 3123 "VBNET.ATG"
+#line 3126 "VBNET.ATG"
Expression handlerExpr = null;
Expr(
-#line 3124 "VBNET.ATG"
+#line 3127 "VBNET.ATG"
out expr);
Expect(22);
Expr(
-#line 3124 "VBNET.ATG"
+#line 3127 "VBNET.ATG"
out handlerExpr);
-#line 3126 "VBNET.ATG"
+#line 3129 "VBNET.ATG"
statement = new RemoveHandlerStatement(expr, handlerExpr);
} else if (la.kind == 231) {
lexer.NextToken();
Expr(
-#line 3129 "VBNET.ATG"
+#line 3132 "VBNET.ATG"
out expr);
EndOfStmt();
Block(
-#line 3130 "VBNET.ATG"
+#line 3133 "VBNET.ATG"
out embeddedStatement);
Expect(113);
Expect(231);
-#line 3132 "VBNET.ATG"
+#line 3135 "VBNET.ATG"
statement = new DoLoopStatement(expr, embeddedStatement, ConditionType.While, ConditionPosition.Start);
} else if (la.kind == 108) {
lexer.NextToken();
-#line 3137 "VBNET.ATG"
+#line 3140 "VBNET.ATG"
ConditionType conditionType = ConditionType.None;
if (la.kind == 224 || la.kind == 231) {
WhileOrUntil(
-#line 3140 "VBNET.ATG"
+#line 3143 "VBNET.ATG"
out conditionType);
Expr(
-#line 3140 "VBNET.ATG"
+#line 3143 "VBNET.ATG"
out expr);
EndOfStmt();
Block(
-#line 3141 "VBNET.ATG"
+#line 3144 "VBNET.ATG"
out embeddedStatement);
Expect(152);
-#line 3144 "VBNET.ATG"
+#line 3147 "VBNET.ATG"
statement = new DoLoopStatement(expr,
embeddedStatement,
conditionType == ConditionType.While ? ConditionType.DoWhile : conditionType,
@@ -5844,26 +5852,26 @@ out embeddedStatement);
} else if (la.kind == 1 || la.kind == 21) {
EndOfStmt();
Block(
-#line 3151 "VBNET.ATG"
+#line 3154 "VBNET.ATG"
out embeddedStatement);
Expect(152);
if (la.kind == 224 || la.kind == 231) {
WhileOrUntil(
-#line 3152 "VBNET.ATG"
+#line 3155 "VBNET.ATG"
out conditionType);
Expr(
-#line 3152 "VBNET.ATG"
+#line 3155 "VBNET.ATG"
out expr);
}
-#line 3154 "VBNET.ATG"
+#line 3157 "VBNET.ATG"
statement = new DoLoopStatement(expr, embeddedStatement, conditionType, ConditionPosition.End);
} else SynErr(299);
} else if (la.kind == 124) {
lexer.NextToken();
-#line 3159 "VBNET.ATG"
+#line 3162 "VBNET.ATG"
Expression group = null;
TypeReference typeReference;
string typeName;
@@ -5871,24 +5879,24 @@ out expr);
if (la.kind == 110) {
lexer.NextToken();
LoopControlVariable(
-#line 3165 "VBNET.ATG"
+#line 3168 "VBNET.ATG"
out typeReference, out typeName);
Expect(138);
Expr(
-#line 3166 "VBNET.ATG"
+#line 3169 "VBNET.ATG"
out group);
EndOfStmt();
Block(
-#line 3167 "VBNET.ATG"
+#line 3170 "VBNET.ATG"
out embeddedStatement);
Expect(163);
if (StartOf(24)) {
Expr(
-#line 3168 "VBNET.ATG"
+#line 3171 "VBNET.ATG"
out expr);
}
-#line 3170 "VBNET.ATG"
+#line 3173 "VBNET.ATG"
statement = new ForeachStatement(typeReference,
typeName,
group,
@@ -5900,7 +5908,7 @@ out expr);
} else if (StartOf(44)) {
-#line 3181 "VBNET.ATG"
+#line 3184 "VBNET.ATG"
Expression start = null;
Expression end = null;
Expression step = null;
@@ -5909,59 +5917,59 @@ out expr);
List nextExpressions = null;
if (
-#line 3188 "VBNET.ATG"
+#line 3191 "VBNET.ATG"
IsLoopVariableDeclaration()) {
LoopControlVariable(
-#line 3189 "VBNET.ATG"
+#line 3192 "VBNET.ATG"
out typeReference, out typeName);
} else {
-#line 3191 "VBNET.ATG"
+#line 3194 "VBNET.ATG"
typeReference = null; typeName = null;
SimpleExpr(
-#line 3192 "VBNET.ATG"
+#line 3195 "VBNET.ATG"
out variableExpr);
}
Expect(20);
Expr(
-#line 3194 "VBNET.ATG"
+#line 3197 "VBNET.ATG"
out start);
Expect(216);
Expr(
-#line 3194 "VBNET.ATG"
+#line 3197 "VBNET.ATG"
out end);
if (la.kind == 205) {
lexer.NextToken();
Expr(
-#line 3194 "VBNET.ATG"
+#line 3197 "VBNET.ATG"
out step);
}
EndOfStmt();
Block(
-#line 3195 "VBNET.ATG"
+#line 3198 "VBNET.ATG"
out embeddedStatement);
Expect(163);
if (StartOf(24)) {
Expr(
-#line 3198 "VBNET.ATG"
+#line 3201 "VBNET.ATG"
out nextExpr);
-#line 3200 "VBNET.ATG"
+#line 3203 "VBNET.ATG"
nextExpressions = new List();
nextExpressions.Add(nextExpr);
while (la.kind == 22) {
lexer.NextToken();
Expr(
-#line 3203 "VBNET.ATG"
+#line 3206 "VBNET.ATG"
out nextExpr);
-#line 3203 "VBNET.ATG"
+#line 3206 "VBNET.ATG"
nextExpressions.Add(nextExpr);
}
}
-#line 3206 "VBNET.ATG"
+#line 3209 "VBNET.ATG"
statement = new ForNextStatement {
TypeReference = typeReference,
VariableName = typeName,
@@ -5977,27 +5985,27 @@ out nextExpr);
} else if (la.kind == 118) {
lexer.NextToken();
Expr(
-#line 3219 "VBNET.ATG"
+#line 3222 "VBNET.ATG"
out expr);
-#line 3219 "VBNET.ATG"
+#line 3222 "VBNET.ATG"
statement = new ErrorStatement(expr);
} else if (la.kind == 191) {
lexer.NextToken();
-#line 3221 "VBNET.ATG"
+#line 3224 "VBNET.ATG"
bool isPreserve = false;
if (la.kind == 184) {
lexer.NextToken();
-#line 3221 "VBNET.ATG"
+#line 3224 "VBNET.ATG"
isPreserve = true;
}
ReDimClause(
-#line 3222 "VBNET.ATG"
+#line 3225 "VBNET.ATG"
out expr);
-#line 3224 "VBNET.ATG"
+#line 3227 "VBNET.ATG"
ReDimStatement reDimStatement = new ReDimStatement(isPreserve);
statement = reDimStatement;
SafeAdd(reDimStatement, reDimStatement.ReDimClauses, expr as InvocationExpression);
@@ -6005,48 +6013,48 @@ out expr);
while (la.kind == 22) {
lexer.NextToken();
ReDimClause(
-#line 3228 "VBNET.ATG"
+#line 3231 "VBNET.ATG"
out expr);
-#line 3229 "VBNET.ATG"
+#line 3232 "VBNET.ATG"
SafeAdd(reDimStatement, reDimStatement.ReDimClauses, expr as InvocationExpression);
}
} else if (la.kind == 117) {
lexer.NextToken();
Expr(
-#line 3233 "VBNET.ATG"
+#line 3236 "VBNET.ATG"
out expr);
-#line 3235 "VBNET.ATG"
+#line 3238 "VBNET.ATG"
EraseStatement eraseStatement = new EraseStatement();
if (expr != null) { SafeAdd(eraseStatement, eraseStatement.Expressions, expr);}
while (la.kind == 22) {
lexer.NextToken();
Expr(
-#line 3238 "VBNET.ATG"
+#line 3241 "VBNET.ATG"
out expr);
-#line 3238 "VBNET.ATG"
+#line 3241 "VBNET.ATG"
if (expr != null) { SafeAdd(eraseStatement, eraseStatement.Expressions, expr); }
}
-#line 3239 "VBNET.ATG"
+#line 3242 "VBNET.ATG"
statement = eraseStatement;
} else if (la.kind == 206) {
lexer.NextToken();
-#line 3241 "VBNET.ATG"
+#line 3244 "VBNET.ATG"
statement = new StopStatement();
} else if (
-#line 3243 "VBNET.ATG"
+#line 3246 "VBNET.ATG"
la.kind == Tokens.If) {
Expect(135);
-#line 3244 "VBNET.ATG"
+#line 3247 "VBNET.ATG"
Location ifStartLocation = t.Location;
Expr(
-#line 3244 "VBNET.ATG"
+#line 3247 "VBNET.ATG"
out expr);
if (la.kind == 214) {
lexer.NextToken();
@@ -6054,46 +6062,46 @@ out expr);
if (la.kind == 1 || la.kind == 21) {
EndOfStmt();
Block(
-#line 3247 "VBNET.ATG"
+#line 3250 "VBNET.ATG"
out embeddedStatement);
-#line 3249 "VBNET.ATG"
+#line 3252 "VBNET.ATG"
IfElseStatement ifStatement = new IfElseStatement(expr, embeddedStatement);
ifStatement.StartLocation = ifStartLocation;
Location elseIfStart;
while (la.kind == 112 ||
-#line 3255 "VBNET.ATG"
+#line 3258 "VBNET.ATG"
IsElseIf()) {
if (
-#line 3255 "VBNET.ATG"
+#line 3258 "VBNET.ATG"
IsElseIf()) {
Expect(111);
-#line 3255 "VBNET.ATG"
+#line 3258 "VBNET.ATG"
elseIfStart = t.Location;
Expect(135);
} else {
lexer.NextToken();
-#line 3256 "VBNET.ATG"
+#line 3259 "VBNET.ATG"
elseIfStart = t.Location;
}
-#line 3258 "VBNET.ATG"
+#line 3261 "VBNET.ATG"
Expression condition = null; Statement block = null;
Expr(
-#line 3259 "VBNET.ATG"
+#line 3262 "VBNET.ATG"
out condition);
if (la.kind == 214) {
lexer.NextToken();
}
EndOfStmt();
Block(
-#line 3260 "VBNET.ATG"
+#line 3263 "VBNET.ATG"
out block);
-#line 3262 "VBNET.ATG"
+#line 3265 "VBNET.ATG"
ElseIfSection elseIfSection = new ElseIfSection(condition, block);
elseIfSection.StartLocation = elseIfStart;
elseIfSection.EndLocation = t.Location;
@@ -6107,39 +6115,39 @@ out block);
EndOfStmt();
}
Block(
-#line 3271 "VBNET.ATG"
+#line 3274 "VBNET.ATG"
out embeddedStatement);
-#line 3273 "VBNET.ATG"
+#line 3276 "VBNET.ATG"
ifStatement.FalseStatement.Add(embeddedStatement);
}
Expect(113);
Expect(135);
-#line 3277 "VBNET.ATG"
+#line 3280 "VBNET.ATG"
ifStatement.EndLocation = t.Location;
statement = ifStatement;
} else if (StartOf(45)) {
-#line 3282 "VBNET.ATG"
+#line 3285 "VBNET.ATG"
IfElseStatement ifStatement = new IfElseStatement(expr);
ifStatement.StartLocation = ifStartLocation;
SingleLineStatementList(
-#line 3285 "VBNET.ATG"
+#line 3288 "VBNET.ATG"
ifStatement.TrueStatement);
if (la.kind == 111) {
lexer.NextToken();
if (StartOf(45)) {
SingleLineStatementList(
-#line 3288 "VBNET.ATG"
+#line 3291 "VBNET.ATG"
ifStatement.FalseStatement);
}
}
-#line 3290 "VBNET.ATG"
+#line 3293 "VBNET.ATG"
ifStatement.EndLocation = t.Location; statement = ifStatement;
} else SynErr(301);
} else if (la.kind == 197) {
@@ -6148,82 +6156,82 @@ ifStatement.FalseStatement);
lexer.NextToken();
}
Expr(
-#line 3293 "VBNET.ATG"
+#line 3296 "VBNET.ATG"
out expr);
EndOfStmt();
-#line 3294 "VBNET.ATG"
+#line 3297 "VBNET.ATG"
List selectSections = new List();
Statement block = null;
while (la.kind == 74) {
-#line 3298 "VBNET.ATG"
+#line 3301 "VBNET.ATG"
List caseClauses = null; Location caseLocation = la.Location;
lexer.NextToken();
CaseClauses(
-#line 3299 "VBNET.ATG"
+#line 3302 "VBNET.ATG"
out caseClauses);
if (
-#line 3299 "VBNET.ATG"
+#line 3302 "VBNET.ATG"
IsNotStatementSeparator()) {
lexer.NextToken();
}
EndOfStmt();
-#line 3301 "VBNET.ATG"
+#line 3304 "VBNET.ATG"
SwitchSection selectSection = new SwitchSection(caseClauses);
selectSection.StartLocation = caseLocation;
Block(
-#line 3304 "VBNET.ATG"
+#line 3307 "VBNET.ATG"
out block);
-#line 3306 "VBNET.ATG"
+#line 3309 "VBNET.ATG"
selectSection.Children = block.Children;
selectSection.EndLocation = t.EndLocation;
selectSections.Add(selectSection);
}
-#line 3312 "VBNET.ATG"
+#line 3315 "VBNET.ATG"
statement = new SwitchStatement(expr, selectSections);
Expect(113);
Expect(197);
} else if (la.kind == 171) {
-#line 3315 "VBNET.ATG"
+#line 3318 "VBNET.ATG"
OnErrorStatement onErrorStatement = null;
OnErrorStatement(
-#line 3316 "VBNET.ATG"
+#line 3319 "VBNET.ATG"
out onErrorStatement);
-#line 3316 "VBNET.ATG"
+#line 3319 "VBNET.ATG"
statement = onErrorStatement;
} else if (la.kind == 132) {
-#line 3317 "VBNET.ATG"
+#line 3320 "VBNET.ATG"
GotoStatement goToStatement = null;
GotoStatement(
-#line 3318 "VBNET.ATG"
+#line 3321 "VBNET.ATG"
out goToStatement);
-#line 3318 "VBNET.ATG"
+#line 3321 "VBNET.ATG"
statement = goToStatement;
} else if (la.kind == 194) {
-#line 3319 "VBNET.ATG"
+#line 3322 "VBNET.ATG"
ResumeStatement resumeStatement = null;
ResumeStatement(
-#line 3320 "VBNET.ATG"
+#line 3323 "VBNET.ATG"
out resumeStatement);
-#line 3320 "VBNET.ATG"
+#line 3323 "VBNET.ATG"
statement = resumeStatement;
} else if (StartOf(44)) {
-#line 3323 "VBNET.ATG"
+#line 3326 "VBNET.ATG"
Expression val = null;
AssignmentOperatorType op;
Location startLoc = la.Location;
@@ -6232,28 +6240,28 @@ out resumeStatement);
la.kind == Tokens.Not || la.kind == Tokens.Times;
SimpleExpr(
-#line 3330 "VBNET.ATG"
+#line 3333 "VBNET.ATG"
out expr);
if (StartOf(46)) {
AssignmentOperator(
-#line 3332 "VBNET.ATG"
+#line 3335 "VBNET.ATG"
out op);
Expr(
-#line 3332 "VBNET.ATG"
+#line 3335 "VBNET.ATG"
out val);
-#line 3334 "VBNET.ATG"
+#line 3337 "VBNET.ATG"
expr = new AssignmentExpression(expr, op, val);
expr.StartLocation = startLoc;
expr.EndLocation = t.EndLocation;
} else if (StartOf(47)) {
-#line 3338 "VBNET.ATG"
+#line 3341 "VBNET.ATG"
if (mustBeAssignment) Error("error in assignment.");
} else SynErr(302);
-#line 3341 "VBNET.ATG"
+#line 3344 "VBNET.ATG"
// a field reference expression that stands alone is a
// invocation expression without parantheses and arguments
if(expr is MemberReferenceExpression || expr is IdentifierExpression) {
@@ -6267,58 +6275,58 @@ out val);
} else if (la.kind == 73) {
lexer.NextToken();
SimpleExpr(
-#line 3351 "VBNET.ATG"
+#line 3354 "VBNET.ATG"
out expr);
-#line 3351 "VBNET.ATG"
+#line 3354 "VBNET.ATG"
statement = new ExpressionStatement(expr);
} else if (la.kind == 226) {
lexer.NextToken();
-#line 3353 "VBNET.ATG"
+#line 3356 "VBNET.ATG"
Statement block;
if (
-#line 3354 "VBNET.ATG"
+#line 3357 "VBNET.ATG"
Peek(1).kind == Tokens.As) {
-#line 3355 "VBNET.ATG"
+#line 3358 "VBNET.ATG"
LocalVariableDeclaration resourceAquisition = new LocalVariableDeclaration(Modifiers.None);
VariableDeclarator(
-#line 3356 "VBNET.ATG"
+#line 3359 "VBNET.ATG"
resourceAquisition.Variables);
while (la.kind == 22) {
lexer.NextToken();
VariableDeclarator(
-#line 3358 "VBNET.ATG"
+#line 3361 "VBNET.ATG"
resourceAquisition.Variables);
}
Block(
-#line 3360 "VBNET.ATG"
+#line 3363 "VBNET.ATG"
out block);
-#line 3362 "VBNET.ATG"
+#line 3365 "VBNET.ATG"
statement = new UsingStatement(resourceAquisition, block);
} else if (StartOf(24)) {
Expr(
-#line 3364 "VBNET.ATG"
+#line 3367 "VBNET.ATG"
out expr);
Block(
-#line 3365 "VBNET.ATG"
+#line 3368 "VBNET.ATG"
out block);
-#line 3366 "VBNET.ATG"
+#line 3369 "VBNET.ATG"
statement = new UsingStatement(new ExpressionStatement(expr), block);
} else SynErr(303);
Expect(113);
Expect(226);
} else if (StartOf(48)) {
LocalDeclarationStatement(
-#line 3369 "VBNET.ATG"
+#line 3372 "VBNET.ATG"
out statement);
} else SynErr(304);
-#line 3372 "VBNET.ATG"
+#line 3375 "VBNET.ATG"
if (statement != null) {
statement.StartLocation = startLocation;
statement.EndLocation = t.EndLocation;
@@ -6327,35 +6335,35 @@ out statement);
}
void FromOrAggregateQueryOperator(
-#line 2309 "VBNET.ATG"
+#line 2312 "VBNET.ATG"
List middleClauses) {
-#line 2311 "VBNET.ATG"
+#line 2314 "VBNET.ATG"
QueryExpressionFromClause fromClause = null;
QueryExpressionAggregateClause aggregateClause = null;
if (la.kind == 126) {
FromQueryOperator(
-#line 2314 "VBNET.ATG"
+#line 2317 "VBNET.ATG"
out fromClause);
-#line 2315 "VBNET.ATG"
+#line 2318 "VBNET.ATG"
middleClauses.Add(fromClause);
} else if (la.kind == 58) {
AggregateQueryOperator(
-#line 2316 "VBNET.ATG"
+#line 2319 "VBNET.ATG"
out aggregateClause);
-#line 2317 "VBNET.ATG"
+#line 2320 "VBNET.ATG"
middleClauses.Add(aggregateClause);
} else SynErr(305);
}
void QueryOperator(
-#line 2320 "VBNET.ATG"
+#line 2323 "VBNET.ATG"
List middleClauses) {
-#line 2322 "VBNET.ATG"
+#line 2325 "VBNET.ATG"
QueryExpressionJoinVBClause joinClause = null;
QueryExpressionGroupVBClause groupByClause = null;
QueryExpressionPartitionVBClause partitionClause = null;
@@ -6365,94 +6373,94 @@ List middleClauses) {
if (la.kind == 126) {
FromQueryOperator(
-#line 2329 "VBNET.ATG"
+#line 2332 "VBNET.ATG"
out fromClause);
-#line 2330 "VBNET.ATG"
+#line 2333 "VBNET.ATG"
middleClauses.Add(fromClause);
} else if (la.kind == 58) {
AggregateQueryOperator(
-#line 2331 "VBNET.ATG"
+#line 2334 "VBNET.ATG"
out aggregateClause);
-#line 2332 "VBNET.ATG"
+#line 2335 "VBNET.ATG"
middleClauses.Add(aggregateClause);
} else if (la.kind == 197) {
SelectQueryOperator(
-#line 2333 "VBNET.ATG"
+#line 2336 "VBNET.ATG"
middleClauses);
} else if (la.kind == 107) {
DistinctQueryOperator(
-#line 2334 "VBNET.ATG"
+#line 2337 "VBNET.ATG"
middleClauses);
} else if (la.kind == 230) {
WhereQueryOperator(
-#line 2335 "VBNET.ATG"
+#line 2338 "VBNET.ATG"
middleClauses);
} else if (la.kind == 176) {
OrderByQueryOperator(
-#line 2336 "VBNET.ATG"
+#line 2339 "VBNET.ATG"
middleClauses);
} else if (la.kind == 203 || la.kind == 212) {
PartitionQueryOperator(
-#line 2337 "VBNET.ATG"
+#line 2340 "VBNET.ATG"
out partitionClause);
-#line 2338 "VBNET.ATG"
+#line 2341 "VBNET.ATG"
middleClauses.Add(partitionClause);
} else if (la.kind == 148) {
LetQueryOperator(
-#line 2339 "VBNET.ATG"
+#line 2342 "VBNET.ATG"
middleClauses);
} else if (la.kind == 146) {
JoinQueryOperator(
-#line 2340 "VBNET.ATG"
+#line 2343 "VBNET.ATG"
out joinClause);
-#line 2341 "VBNET.ATG"
+#line 2344 "VBNET.ATG"
middleClauses.Add(joinClause);
} else if (
-#line 2342 "VBNET.ATG"
+#line 2345 "VBNET.ATG"
la.kind == Tokens.Group && Peek(1).kind == Tokens.Join) {
GroupJoinQueryOperator(
-#line 2342 "VBNET.ATG"
+#line 2345 "VBNET.ATG"
out groupJoinClause);
-#line 2343 "VBNET.ATG"
+#line 2346 "VBNET.ATG"
middleClauses.Add(groupJoinClause);
} else if (la.kind == 133) {
GroupByQueryOperator(
-#line 2344 "VBNET.ATG"
+#line 2347 "VBNET.ATG"
out groupByClause);
-#line 2345 "VBNET.ATG"
+#line 2348 "VBNET.ATG"
middleClauses.Add(groupByClause);
} else SynErr(306);
}
void FromQueryOperator(
-#line 2420 "VBNET.ATG"
+#line 2423 "VBNET.ATG"
out QueryExpressionFromClause fromClause) {
-#line 2422 "VBNET.ATG"
+#line 2425 "VBNET.ATG"
fromClause = new QueryExpressionFromClause();
fromClause.StartLocation = la.Location;
Expect(126);
CollectionRangeVariableDeclarationList(
-#line 2425 "VBNET.ATG"
+#line 2428 "VBNET.ATG"
fromClause.Sources);
-#line 2427 "VBNET.ATG"
+#line 2430 "VBNET.ATG"
fromClause.EndLocation = t.EndLocation;
}
void AggregateQueryOperator(
-#line 2489 "VBNET.ATG"
+#line 2492 "VBNET.ATG"
out QueryExpressionAggregateClause aggregateClause) {
-#line 2491 "VBNET.ATG"
+#line 2494 "VBNET.ATG"
aggregateClause = new QueryExpressionAggregateClause();
aggregateClause.IntoVariables = new List();
aggregateClause.StartLocation = la.Location;
@@ -6460,77 +6468,77 @@ out QueryExpressionAggregateClause aggregateClause) {
Expect(58);
CollectionRangeVariableDeclaration(
-#line 2496 "VBNET.ATG"
+#line 2499 "VBNET.ATG"
out source);
-#line 2498 "VBNET.ATG"
+#line 2501 "VBNET.ATG"
aggregateClause.Source = source;
while (StartOf(31)) {
QueryOperator(
-#line 2501 "VBNET.ATG"
+#line 2504 "VBNET.ATG"
aggregateClause.MiddleClauses);
}
Expect(143);
ExpressionRangeVariableDeclarationList(
-#line 2503 "VBNET.ATG"
+#line 2506 "VBNET.ATG"
aggregateClause.IntoVariables);
-#line 2505 "VBNET.ATG"
+#line 2508 "VBNET.ATG"
aggregateClause.EndLocation = t.EndLocation;
}
void SelectQueryOperator(
-#line 2431 "VBNET.ATG"
+#line 2434 "VBNET.ATG"
List middleClauses) {
-#line 2433 "VBNET.ATG"
+#line 2436 "VBNET.ATG"
QueryExpressionSelectVBClause selectClause = new QueryExpressionSelectVBClause();
selectClause.StartLocation = la.Location;
Expect(197);
ExpressionRangeVariableDeclarationList(
-#line 2436 "VBNET.ATG"
+#line 2439 "VBNET.ATG"
selectClause.Variables);
-#line 2438 "VBNET.ATG"
+#line 2441 "VBNET.ATG"
selectClause.EndLocation = t.Location;
middleClauses.Add(selectClause);
}
void DistinctQueryOperator(
-#line 2443 "VBNET.ATG"
+#line 2446 "VBNET.ATG"
List middleClauses) {
-#line 2445 "VBNET.ATG"
+#line 2448 "VBNET.ATG"
QueryExpressionDistinctClause distinctClause = new QueryExpressionDistinctClause();
distinctClause.StartLocation = la.Location;
Expect(107);
-#line 2450 "VBNET.ATG"
+#line 2453 "VBNET.ATG"
distinctClause.EndLocation = t.EndLocation;
middleClauses.Add(distinctClause);
}
void WhereQueryOperator(
-#line 2455 "VBNET.ATG"
+#line 2458 "VBNET.ATG"
List middleClauses) {
-#line 2457 "VBNET.ATG"
+#line 2460 "VBNET.ATG"
QueryExpressionWhereClause whereClause = new QueryExpressionWhereClause();
whereClause.StartLocation = la.Location;
Expression operand = null;
Expect(230);
Expr(
-#line 2461 "VBNET.ATG"
+#line 2464 "VBNET.ATG"
out operand);
-#line 2463 "VBNET.ATG"
+#line 2466 "VBNET.ATG"
whereClause.Condition = operand;
whereClause.EndLocation = t.EndLocation;
@@ -6539,10 +6547,10 @@ out operand);
}
void OrderByQueryOperator(
-#line 2348 "VBNET.ATG"
+#line 2351 "VBNET.ATG"
List middleClauses) {
-#line 2350 "VBNET.ATG"
+#line 2353 "VBNET.ATG"
QueryExpressionOrderClause orderClause = new QueryExpressionOrderClause();
orderClause.StartLocation = la.Location;
List orderings = null;
@@ -6550,10 +6558,10 @@ List middleClauses) {
Expect(176);
Expect(70);
OrderExpressionList(
-#line 2354 "VBNET.ATG"
+#line 2357 "VBNET.ATG"
out orderings);
-#line 2356 "VBNET.ATG"
+#line 2359 "VBNET.ATG"
orderClause.Orderings = orderings;
orderClause.EndLocation = t.EndLocation;
middleClauses.Add(orderClause);
@@ -6561,10 +6569,10 @@ out orderings);
}
void PartitionQueryOperator(
-#line 2470 "VBNET.ATG"
+#line 2473 "VBNET.ATG"
out QueryExpressionPartitionVBClause partitionClause) {
-#line 2472 "VBNET.ATG"
+#line 2475 "VBNET.ATG"
partitionClause = new QueryExpressionPartitionVBClause();
partitionClause.StartLocation = la.Location;
Expression expr = null;
@@ -6572,60 +6580,60 @@ out QueryExpressionPartitionVBClause partitionClause) {
if (la.kind == 212) {
lexer.NextToken();
-#line 2477 "VBNET.ATG"
+#line 2480 "VBNET.ATG"
partitionClause.PartitionType = QueryExpressionPartitionType.Take;
if (la.kind == 231) {
lexer.NextToken();
-#line 2478 "VBNET.ATG"
+#line 2481 "VBNET.ATG"
partitionClause.PartitionType = QueryExpressionPartitionType.TakeWhile;
}
} else if (la.kind == 203) {
lexer.NextToken();
-#line 2479 "VBNET.ATG"
+#line 2482 "VBNET.ATG"
partitionClause.PartitionType = QueryExpressionPartitionType.Skip;
if (la.kind == 231) {
lexer.NextToken();
-#line 2480 "VBNET.ATG"
+#line 2483 "VBNET.ATG"
partitionClause.PartitionType = QueryExpressionPartitionType.SkipWhile;
}
} else SynErr(307);
Expr(
-#line 2482 "VBNET.ATG"
+#line 2485 "VBNET.ATG"
out expr);
-#line 2484 "VBNET.ATG"
+#line 2487 "VBNET.ATG"
partitionClause.Expression = expr;
partitionClause.EndLocation = t.EndLocation;
}
void LetQueryOperator(
-#line 2509 "VBNET.ATG"
+#line 2512 "VBNET.ATG"
List middleClauses) {
-#line 2511 "VBNET.ATG"
+#line 2514 "VBNET.ATG"
QueryExpressionLetVBClause letClause = new QueryExpressionLetVBClause();
letClause.StartLocation = la.Location;
Expect(148);
ExpressionRangeVariableDeclarationList(
-#line 2514 "VBNET.ATG"
+#line 2517 "VBNET.ATG"
letClause.Variables);
-#line 2516 "VBNET.ATG"
+#line 2519 "VBNET.ATG"
letClause.EndLocation = t.EndLocation;
middleClauses.Add(letClause);
}
void JoinQueryOperator(
-#line 2553 "VBNET.ATG"
+#line 2556 "VBNET.ATG"
out QueryExpressionJoinVBClause joinClause) {
-#line 2555 "VBNET.ATG"
+#line 2558 "VBNET.ATG"
joinClause = new QueryExpressionJoinVBClause();
joinClause.StartLocation = la.Location;
CollectionRangeVariable joinVariable = null;
@@ -6635,203 +6643,203 @@ out QueryExpressionJoinVBClause joinClause) {
Expect(146);
CollectionRangeVariableDeclaration(
-#line 2562 "VBNET.ATG"
+#line 2565 "VBNET.ATG"
out joinVariable);
-#line 2563 "VBNET.ATG"
+#line 2566 "VBNET.ATG"
joinClause.JoinVariable = joinVariable;
if (la.kind == 146) {
JoinQueryOperator(
-#line 2565 "VBNET.ATG"
+#line 2568 "VBNET.ATG"
out subJoin);
-#line 2566 "VBNET.ATG"
+#line 2569 "VBNET.ATG"
joinClause.SubJoin = subJoin;
}
Expect(171);
JoinCondition(
-#line 2569 "VBNET.ATG"
+#line 2572 "VBNET.ATG"
out condition);
-#line 2570 "VBNET.ATG"
+#line 2573 "VBNET.ATG"
SafeAdd(joinClause, joinClause.Conditions, condition);
while (la.kind == 60) {
lexer.NextToken();
JoinCondition(
-#line 2572 "VBNET.ATG"
+#line 2575 "VBNET.ATG"
out condition);
-#line 2573 "VBNET.ATG"
+#line 2576 "VBNET.ATG"
SafeAdd(joinClause, joinClause.Conditions, condition);
}
-#line 2576 "VBNET.ATG"
+#line 2579 "VBNET.ATG"
joinClause.EndLocation = t.EndLocation;
}
void GroupJoinQueryOperator(
-#line 2406 "VBNET.ATG"
+#line 2409 "VBNET.ATG"
out QueryExpressionGroupJoinVBClause groupJoinClause) {
-#line 2408 "VBNET.ATG"
+#line 2411 "VBNET.ATG"
groupJoinClause = new QueryExpressionGroupJoinVBClause();
groupJoinClause.StartLocation = la.Location;
QueryExpressionJoinVBClause joinClause = null;
Expect(133);
JoinQueryOperator(
-#line 2412 "VBNET.ATG"
+#line 2415 "VBNET.ATG"
out joinClause);
Expect(143);
ExpressionRangeVariableDeclarationList(
-#line 2413 "VBNET.ATG"
+#line 2416 "VBNET.ATG"
groupJoinClause.IntoVariables);
-#line 2415 "VBNET.ATG"
+#line 2418 "VBNET.ATG"
groupJoinClause.JoinClause = joinClause;
groupJoinClause.EndLocation = t.EndLocation;
}
void GroupByQueryOperator(
-#line 2393 "VBNET.ATG"
+#line 2396 "VBNET.ATG"
out QueryExpressionGroupVBClause groupByClause) {
-#line 2395 "VBNET.ATG"
+#line 2398 "VBNET.ATG"
groupByClause = new QueryExpressionGroupVBClause();
groupByClause.StartLocation = la.Location;
Expect(133);
ExpressionRangeVariableDeclarationList(
-#line 2398 "VBNET.ATG"
+#line 2401 "VBNET.ATG"
groupByClause.GroupVariables);
Expect(70);
ExpressionRangeVariableDeclarationList(
-#line 2399 "VBNET.ATG"
+#line 2402 "VBNET.ATG"
groupByClause.ByVariables);
Expect(143);
ExpressionRangeVariableDeclarationList(
-#line 2400 "VBNET.ATG"
+#line 2403 "VBNET.ATG"
groupByClause.IntoVariables);
-#line 2402 "VBNET.ATG"
+#line 2405 "VBNET.ATG"
groupByClause.EndLocation = t.EndLocation;
}
void OrderExpressionList(
-#line 2362 "VBNET.ATG"
+#line 2365 "VBNET.ATG"
out List orderings) {
-#line 2364 "VBNET.ATG"
+#line 2367 "VBNET.ATG"
orderings = new List();
QueryExpressionOrdering ordering = null;
OrderExpression(
-#line 2367 "VBNET.ATG"
+#line 2370 "VBNET.ATG"
out ordering);
-#line 2368 "VBNET.ATG"
+#line 2371 "VBNET.ATG"
orderings.Add(ordering);
while (la.kind == 22) {
lexer.NextToken();
OrderExpression(
-#line 2370 "VBNET.ATG"
+#line 2373 "VBNET.ATG"
out ordering);
-#line 2371 "VBNET.ATG"
+#line 2374 "VBNET.ATG"
orderings.Add(ordering);
}
}
void OrderExpression(
-#line 2375 "VBNET.ATG"
+#line 2378 "VBNET.ATG"
out QueryExpressionOrdering ordering) {
-#line 2377 "VBNET.ATG"
+#line 2380 "VBNET.ATG"
ordering = new QueryExpressionOrdering();
ordering.StartLocation = la.Location;
ordering.Direction = QueryExpressionOrderingDirection.None;
Expression orderExpr = null;
Expr(
-#line 2382 "VBNET.ATG"
+#line 2385 "VBNET.ATG"
out orderExpr);
-#line 2384 "VBNET.ATG"
+#line 2387 "VBNET.ATG"
ordering.Criteria = orderExpr;
if (la.kind == 64 || la.kind == 104) {
if (la.kind == 64) {
lexer.NextToken();
-#line 2387 "VBNET.ATG"
+#line 2390 "VBNET.ATG"
ordering.Direction = QueryExpressionOrderingDirection.Ascending;
} else {
lexer.NextToken();
-#line 2388 "VBNET.ATG"
+#line 2391 "VBNET.ATG"
ordering.Direction = QueryExpressionOrderingDirection.Descending;
}
}
-#line 2390 "VBNET.ATG"
+#line 2393 "VBNET.ATG"
ordering.EndLocation = t.EndLocation;
}
void ExpressionRangeVariableDeclarationList(
-#line 2521 "VBNET.ATG"
+#line 2524 "VBNET.ATG"
List variables) {
-#line 2523 "VBNET.ATG"
+#line 2526 "VBNET.ATG"
ExpressionRangeVariable variable = null;
ExpressionRangeVariableDeclaration(
-#line 2525 "VBNET.ATG"
+#line 2528 "VBNET.ATG"
out variable);
-#line 2526 "VBNET.ATG"
+#line 2529 "VBNET.ATG"
variables.Add(variable);
while (la.kind == 22) {
lexer.NextToken();
ExpressionRangeVariableDeclaration(
-#line 2527 "VBNET.ATG"
+#line 2530 "VBNET.ATG"
out variable);
-#line 2527 "VBNET.ATG"
+#line 2530 "VBNET.ATG"
variables.Add(variable);
}
}
void CollectionRangeVariableDeclarationList(
-#line 2580 "VBNET.ATG"
+#line 2583 "VBNET.ATG"
List rangeVariables) {
-#line 2581 "VBNET.ATG"
+#line 2584 "VBNET.ATG"
CollectionRangeVariable variableDeclaration;
CollectionRangeVariableDeclaration(
-#line 2583 "VBNET.ATG"
+#line 2586 "VBNET.ATG"
out variableDeclaration);
-#line 2584 "VBNET.ATG"
+#line 2587 "VBNET.ATG"
rangeVariables.Add(variableDeclaration);
while (la.kind == 22) {
lexer.NextToken();
CollectionRangeVariableDeclaration(
-#line 2585 "VBNET.ATG"
+#line 2588 "VBNET.ATG"
out variableDeclaration);
-#line 2585 "VBNET.ATG"
+#line 2588 "VBNET.ATG"
rangeVariables.Add(variableDeclaration);
}
}
void CollectionRangeVariableDeclaration(
-#line 2588 "VBNET.ATG"
+#line 2591 "VBNET.ATG"
out CollectionRangeVariable rangeVariable) {
-#line 2590 "VBNET.ATG"
+#line 2593 "VBNET.ATG"
rangeVariable = new CollectionRangeVariable();
rangeVariable.StartLocation = la.Location;
TypeReference typeName = null;
@@ -6839,71 +6847,71 @@ out CollectionRangeVariable rangeVariable) {
Identifier();
-#line 2595 "VBNET.ATG"
+#line 2598 "VBNET.ATG"
rangeVariable.Identifier = t.val;
if (la.kind == 63) {
lexer.NextToken();
TypeName(
-#line 2596 "VBNET.ATG"
+#line 2599 "VBNET.ATG"
out typeName);
-#line 2596 "VBNET.ATG"
+#line 2599 "VBNET.ATG"
rangeVariable.Type = typeName;
}
Expect(138);
Expr(
-#line 2597 "VBNET.ATG"
+#line 2600 "VBNET.ATG"
out inExpr);
-#line 2599 "VBNET.ATG"
+#line 2602 "VBNET.ATG"
rangeVariable.Expression = inExpr;
rangeVariable.EndLocation = t.EndLocation;
}
void ExpressionRangeVariableDeclaration(
-#line 2530 "VBNET.ATG"
+#line 2533 "VBNET.ATG"
out ExpressionRangeVariable variable) {
-#line 2532 "VBNET.ATG"
+#line 2535 "VBNET.ATG"
variable = new ExpressionRangeVariable();
variable.StartLocation = la.Location;
Expression rhs = null;
TypeReference typeName = null;
if (
-#line 2538 "VBNET.ATG"
+#line 2541 "VBNET.ATG"
IsIdentifiedExpressionRange()) {
Identifier();
-#line 2539 "VBNET.ATG"
+#line 2542 "VBNET.ATG"
variable.Identifier = t.val;
if (la.kind == 63) {
lexer.NextToken();
TypeName(
-#line 2541 "VBNET.ATG"
+#line 2544 "VBNET.ATG"
out typeName);
-#line 2542 "VBNET.ATG"
+#line 2545 "VBNET.ATG"
variable.Type = typeName;
}
Expect(20);
}
Expr(
-#line 2546 "VBNET.ATG"
+#line 2549 "VBNET.ATG"
out rhs);
-#line 2548 "VBNET.ATG"
+#line 2551 "VBNET.ATG"
variable.Expression = rhs;
variable.EndLocation = t.EndLocation;
}
void JoinCondition(
-#line 2604 "VBNET.ATG"
+#line 2607 "VBNET.ATG"
out QueryExpressionJoinConditionVB condition) {
-#line 2606 "VBNET.ATG"
+#line 2609 "VBNET.ATG"
condition = new QueryExpressionJoinConditionVB();
condition.StartLocation = la.Location;
@@ -6911,14 +6919,14 @@ out QueryExpressionJoinConditionVB condition) {
Expression rhs = null;
Expr(
-#line 2612 "VBNET.ATG"
+#line 2615 "VBNET.ATG"
out lhs);
Expect(116);
Expr(
-#line 2612 "VBNET.ATG"
+#line 2615 "VBNET.ATG"
out rhs);
-#line 2614 "VBNET.ATG"
+#line 2617 "VBNET.ATG"
condition.LeftSide = lhs;
condition.RightSide = rhs;
condition.EndLocation = t.EndLocation;
@@ -6926,69 +6934,69 @@ out rhs);
}
void Argument(
-#line 2678 "VBNET.ATG"
+#line 2681 "VBNET.ATG"
out Expression argumentexpr) {
-#line 2680 "VBNET.ATG"
+#line 2683 "VBNET.ATG"
Expression expr;
argumentexpr = null;
string name;
Location startLocation = la.Location;
if (
-#line 2685 "VBNET.ATG"
+#line 2688 "VBNET.ATG"
IsNamedAssign()) {
Identifier();
-#line 2685 "VBNET.ATG"
+#line 2688 "VBNET.ATG"
name = t.val;
Expect(55);
Expr(
-#line 2685 "VBNET.ATG"
+#line 2688 "VBNET.ATG"
out expr);
-#line 2687 "VBNET.ATG"
+#line 2690 "VBNET.ATG"
argumentexpr = new NamedArgumentExpression(name, expr) { StartLocation = startLocation, EndLocation = t.EndLocation };
} else if (StartOf(24)) {
Expr(
-#line 2690 "VBNET.ATG"
+#line 2693 "VBNET.ATG"
out argumentexpr);
} else SynErr(308);
}
void QualIdentAndTypeArguments(
-#line 2758 "VBNET.ATG"
+#line 2761 "VBNET.ATG"
out TypeReference typeref, bool canBeUnbound) {
-#line 2759 "VBNET.ATG"
+#line 2762 "VBNET.ATG"
string name; typeref = null;
Qualident(
-#line 2761 "VBNET.ATG"
+#line 2764 "VBNET.ATG"
out name);
-#line 2762 "VBNET.ATG"
+#line 2765 "VBNET.ATG"
typeref = new TypeReference(name);
if (
-#line 2763 "VBNET.ATG"
+#line 2766 "VBNET.ATG"
la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) {
lexer.NextToken();
Expect(169);
if (
-#line 2765 "VBNET.ATG"
+#line 2768 "VBNET.ATG"
canBeUnbound && (la.kind == Tokens.CloseParenthesis || la.kind == Tokens.Comma)) {
-#line 2766 "VBNET.ATG"
+#line 2769 "VBNET.ATG"
typeref.GenericTypes.Add(NullTypeReference.Instance);
while (la.kind == 22) {
lexer.NextToken();
-#line 2767 "VBNET.ATG"
+#line 2770 "VBNET.ATG"
typeref.GenericTypes.Add(NullTypeReference.Instance);
}
} else if (StartOf(8)) {
TypeArgumentList(
-#line 2768 "VBNET.ATG"
+#line 2771 "VBNET.ATG"
typeref.GenericTypes);
} else SynErr(309);
Expect(38);
@@ -6996,24 +7004,24 @@ typeref.GenericTypes);
}
void RankList(
-#line 2805 "VBNET.ATG"
+#line 2808 "VBNET.ATG"
out int i) {
-#line 2806 "VBNET.ATG"
+#line 2809 "VBNET.ATG"
i = 0;
while (la.kind == 22) {
lexer.NextToken();
-#line 2807 "VBNET.ATG"
+#line 2810 "VBNET.ATG"
++i;
}
}
void Attribute(
-#line 2846 "VBNET.ATG"
+#line 2849 "VBNET.ATG"
out ASTAttribute attribute) {
-#line 2848 "VBNET.ATG"
+#line 2851 "VBNET.ATG"
string name;
List positional = new List();
List named = new List();
@@ -7024,43 +7032,43 @@ out ASTAttribute attribute) {
Expect(26);
}
Qualident(
-#line 2854 "VBNET.ATG"
+#line 2857 "VBNET.ATG"
out name);
if (la.kind == 37) {
AttributeArguments(
-#line 2855 "VBNET.ATG"
+#line 2858 "VBNET.ATG"
positional, named);
}
-#line 2857 "VBNET.ATG"
+#line 2860 "VBNET.ATG"
attribute = new ASTAttribute(name, positional, named) { StartLocation = startLocation, EndLocation = t.EndLocation };
}
void AttributeArguments(
-#line 2862 "VBNET.ATG"
+#line 2865 "VBNET.ATG"
List positional, List named) {
-#line 2864 "VBNET.ATG"
+#line 2867 "VBNET.ATG"
bool nameFound = false;
string name = "";
Expression expr;
Expect(37);
if (
-#line 2870 "VBNET.ATG"
+#line 2873 "VBNET.ATG"
IsNotClosingParenthesis()) {
-#line 2871 "VBNET.ATG"
+#line 2874 "VBNET.ATG"
Location startLocation = la.Location;
if (
-#line 2873 "VBNET.ATG"
+#line 2876 "VBNET.ATG"
IsNamedAssign()) {
-#line 2873 "VBNET.ATG"
+#line 2876 "VBNET.ATG"
nameFound = true;
IdentifierOrKeyword(
-#line 2874 "VBNET.ATG"
+#line 2877 "VBNET.ATG"
out name);
if (la.kind == 55) {
lexer.NextToken();
@@ -7069,10 +7077,10 @@ out name);
} else SynErr(310);
}
Expr(
-#line 2876 "VBNET.ATG"
+#line 2879 "VBNET.ATG"
out expr);
-#line 2878 "VBNET.ATG"
+#line 2881 "VBNET.ATG"
if (expr != null) {
if (string.IsNullOrEmpty(name)) { positional.Add(expr); }
else { named.Add(new NamedArgumentExpression(name, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }); name = ""; }
@@ -7081,13 +7089,13 @@ out expr);
while (la.kind == 22) {
lexer.NextToken();
if (
-#line 2886 "VBNET.ATG"
+#line 2889 "VBNET.ATG"
IsNamedAssign()) {
-#line 2886 "VBNET.ATG"
+#line 2889 "VBNET.ATG"
nameFound = true;
IdentifierOrKeyword(
-#line 2887 "VBNET.ATG"
+#line 2890 "VBNET.ATG"
out name);
if (la.kind == 55) {
lexer.NextToken();
@@ -7096,14 +7104,14 @@ out name);
} else SynErr(311);
} else if (StartOf(24)) {
-#line 2889 "VBNET.ATG"
+#line 2892 "VBNET.ATG"
if (nameFound) Error("no positional argument after named argument");
} else SynErr(312);
Expr(
-#line 2890 "VBNET.ATG"
+#line 2893 "VBNET.ATG"
out expr);
-#line 2890 "VBNET.ATG"
+#line 2893 "VBNET.ATG"
if (expr != null) { if(name == "") positional.Add(expr);
else { named.Add(new NamedArgumentExpression(name, expr) { StartLocation = startLocation, EndLocation = t.EndLocation }); name = ""; }
}
@@ -7114,34 +7122,34 @@ out expr);
}
void ParameterModifier(
-#line 3701 "VBNET.ATG"
+#line 3704 "VBNET.ATG"
ParamModifierList m) {
if (la.kind == 72) {
lexer.NextToken();
-#line 3702 "VBNET.ATG"
+#line 3705 "VBNET.ATG"
m.Add(ParameterModifiers.In);
} else if (la.kind == 69) {
lexer.NextToken();
-#line 3703 "VBNET.ATG"
+#line 3706 "VBNET.ATG"
m.Add(ParameterModifiers.Ref);
} else if (la.kind == 174) {
lexer.NextToken();
-#line 3704 "VBNET.ATG"
+#line 3707 "VBNET.ATG"
m.Add(ParameterModifiers.Optional);
} else if (la.kind == 182) {
lexer.NextToken();
-#line 3705 "VBNET.ATG"
+#line 3708 "VBNET.ATG"
m.Add(ParameterModifiers.Params);
} else SynErr(313);
}
void Statement() {
-#line 3017 "VBNET.ATG"
+#line 3020 "VBNET.ATG"
Statement stmt = null;
Location startPos = la.Location;
string label = String.Empty;
@@ -7149,27 +7157,27 @@ ParamModifierList m) {
if (la.kind == 1 || la.kind == 21) {
} else if (
-#line 3023 "VBNET.ATG"
+#line 3026 "VBNET.ATG"
IsLabel()) {
LabelName(
-#line 3023 "VBNET.ATG"
+#line 3026 "VBNET.ATG"
out label);
-#line 3025 "VBNET.ATG"
+#line 3028 "VBNET.ATG"
AddChild(new LabelStatement(t.val));
Expect(21);
Statement();
} else if (StartOf(49)) {
EmbeddedStatement(
-#line 3028 "VBNET.ATG"
+#line 3031 "VBNET.ATG"
out stmt);
-#line 3028 "VBNET.ATG"
+#line 3031 "VBNET.ATG"
AddChild(stmt);
} else SynErr(314);
-#line 3031 "VBNET.ATG"
+#line 3034 "VBNET.ATG"
if (stmt != null) {
stmt.StartLocation = startPos;
stmt.EndLocation = t.Location;
@@ -7178,30 +7186,30 @@ out stmt);
}
void LabelName(
-#line 3471 "VBNET.ATG"
+#line 3474 "VBNET.ATG"
out string name) {
-#line 3473 "VBNET.ATG"
+#line 3476 "VBNET.ATG"
name = String.Empty;
if (StartOf(4)) {
Identifier();
-#line 3475 "VBNET.ATG"
+#line 3478 "VBNET.ATG"
name = t.val;
} else if (la.kind == 5) {
lexer.NextToken();
-#line 3476 "VBNET.ATG"
+#line 3479 "VBNET.ATG"
name = t.val;
} else SynErr(315);
}
void LocalDeclarationStatement(
-#line 3039 "VBNET.ATG"
+#line 3042 "VBNET.ATG"
out Statement statement) {
-#line 3041 "VBNET.ATG"
+#line 3044 "VBNET.ATG"
ModifierList m = new ModifierList();
LocalVariableDeclaration localVariableDeclaration;
bool dimfound = false;
@@ -7210,22 +7218,22 @@ out Statement statement) {
if (la.kind == 88) {
lexer.NextToken();
-#line 3047 "VBNET.ATG"
+#line 3050 "VBNET.ATG"
m.Add(Modifiers.Const, t.Location);
} else if (la.kind == 204) {
lexer.NextToken();
-#line 3048 "VBNET.ATG"
+#line 3051 "VBNET.ATG"
m.Add(Modifiers.Static, t.Location);
} else {
lexer.NextToken();
-#line 3049 "VBNET.ATG"
+#line 3052 "VBNET.ATG"
dimfound = true;
}
}
-#line 3052 "VBNET.ATG"
+#line 3055 "VBNET.ATG"
if(dimfound && (m.Modifier & Modifiers.Const) != 0) {
Error("Dim is not allowed on constants.");
}
@@ -7238,135 +7246,135 @@ out Statement statement) {
localVariableDeclaration.StartLocation = t.Location;
VariableDeclarator(
-#line 3063 "VBNET.ATG"
+#line 3066 "VBNET.ATG"
localVariableDeclaration.Variables);
while (la.kind == 22) {
lexer.NextToken();
VariableDeclarator(
-#line 3064 "VBNET.ATG"
+#line 3067 "VBNET.ATG"
localVariableDeclaration.Variables);
}
-#line 3066 "VBNET.ATG"
+#line 3069 "VBNET.ATG"
statement = localVariableDeclaration;
}
void TryStatement(
-#line 3589 "VBNET.ATG"
+#line 3592 "VBNET.ATG"
out Statement tryStatement) {
-#line 3591 "VBNET.ATG"
+#line 3594 "VBNET.ATG"
Statement blockStmt = null, finallyStmt = null;List catchClauses = null;
Expect(218);
EndOfStmt();
Block(
-#line 3594 "VBNET.ATG"
+#line 3597 "VBNET.ATG"
out blockStmt);
if (la.kind == 75 || la.kind == 113 || la.kind == 123) {
CatchClauses(
-#line 3595 "VBNET.ATG"
+#line 3598 "VBNET.ATG"
out catchClauses);
}
if (la.kind == 123) {
lexer.NextToken();
EndOfStmt();
Block(
-#line 3596 "VBNET.ATG"
+#line 3599 "VBNET.ATG"
out finallyStmt);
}
Expect(113);
Expect(218);
-#line 3599 "VBNET.ATG"
+#line 3602 "VBNET.ATG"
tryStatement = new TryCatchStatement(blockStmt, catchClauses, finallyStmt);
}
void WithStatement(
-#line 3569 "VBNET.ATG"
+#line 3572 "VBNET.ATG"
out Statement withStatement) {
-#line 3571 "VBNET.ATG"
+#line 3574 "VBNET.ATG"
Statement blockStmt = null;
Expression expr = null;
Expect(233);
-#line 3574 "VBNET.ATG"
+#line 3577 "VBNET.ATG"
Location start = t.Location;
Expr(
-#line 3575 "VBNET.ATG"
+#line 3578 "VBNET.ATG"
out expr);
EndOfStmt();
-#line 3577 "VBNET.ATG"
+#line 3580 "VBNET.ATG"
withStatement = new WithStatement(expr);
withStatement.StartLocation = start;
Block(
-#line 3580 "VBNET.ATG"
+#line 3583 "VBNET.ATG"
out blockStmt);
-#line 3582 "VBNET.ATG"
+#line 3585 "VBNET.ATG"
((WithStatement)withStatement).Body = (BlockStatement)blockStmt;
Expect(113);
Expect(233);
-#line 3585 "VBNET.ATG"
+#line 3588 "VBNET.ATG"
withStatement.EndLocation = t.Location;
}
void WhileOrUntil(
-#line 3562 "VBNET.ATG"
+#line 3565 "VBNET.ATG"
out ConditionType conditionType) {
-#line 3563 "VBNET.ATG"
+#line 3566 "VBNET.ATG"
conditionType = ConditionType.None;
if (la.kind == 231) {
lexer.NextToken();
-#line 3564 "VBNET.ATG"
+#line 3567 "VBNET.ATG"
conditionType = ConditionType.While;
} else if (la.kind == 224) {
lexer.NextToken();
-#line 3565 "VBNET.ATG"
+#line 3568 "VBNET.ATG"
conditionType = ConditionType.Until;
} else SynErr(316);
}
void LoopControlVariable(
-#line 3393 "VBNET.ATG"
+#line 3396 "VBNET.ATG"
out TypeReference type, out string name) {
-#line 3394 "VBNET.ATG"
+#line 3397 "VBNET.ATG"
ArrayList arrayModifiers = null;
type = null;
Qualident(
-#line 3398 "VBNET.ATG"
+#line 3401 "VBNET.ATG"
out name);
if (
-#line 3399 "VBNET.ATG"
+#line 3402 "VBNET.ATG"
IsDims()) {
ArrayTypeModifiers(
-#line 3399 "VBNET.ATG"
+#line 3402 "VBNET.ATG"
out arrayModifiers);
}
if (la.kind == 63) {
lexer.NextToken();
TypeName(
-#line 3400 "VBNET.ATG"
+#line 3403 "VBNET.ATG"
out type);
-#line 3400 "VBNET.ATG"
+#line 3403 "VBNET.ATG"
if (name.IndexOf('.') > 0) { Error("No type def for 'for each' member indexer allowed."); }
}
-#line 3402 "VBNET.ATG"
+#line 3405 "VBNET.ATG"
if (type != null) {
if(type.RankSpecifier != null && arrayModifiers != null) {
Error("array rank only allowed one time");
@@ -7378,34 +7386,34 @@ out type);
}
void ReDimClause(
-#line 3480 "VBNET.ATG"
+#line 3483 "VBNET.ATG"
out Expression expr) {
SimpleNonInvocationExpression(
-#line 3482 "VBNET.ATG"
+#line 3485 "VBNET.ATG"
out expr);
ReDimClauseInternal(
-#line 3483 "VBNET.ATG"
+#line 3486 "VBNET.ATG"
ref expr);
}
void SingleLineStatementList(
-#line 3379 "VBNET.ATG"
+#line 3382 "VBNET.ATG"
List list) {
-#line 3380 "VBNET.ATG"
+#line 3383 "VBNET.ATG"
Statement embeddedStatement = null;
if (la.kind == 113) {
lexer.NextToken();
-#line 3382 "VBNET.ATG"
+#line 3385 "VBNET.ATG"
embeddedStatement = new EndStatement() { StartLocation = t.Location, EndLocation = t.EndLocation };
} else if (StartOf(49)) {
EmbeddedStatement(
-#line 3383 "VBNET.ATG"
+#line 3386 "VBNET.ATG"
out embeddedStatement);
} else SynErr(317);
-#line 3384 "VBNET.ATG"
+#line 3387 "VBNET.ATG"
if (embeddedStatement != null) list.Add(embeddedStatement);
while (la.kind == 21) {
lexer.NextToken();
@@ -7415,49 +7423,49 @@ out embeddedStatement);
if (la.kind == 113) {
lexer.NextToken();
-#line 3386 "VBNET.ATG"
+#line 3389 "VBNET.ATG"
embeddedStatement = new EndStatement() { StartLocation = t.Location, EndLocation = t.EndLocation };
} else if (StartOf(49)) {
EmbeddedStatement(
-#line 3387 "VBNET.ATG"
+#line 3390 "VBNET.ATG"
out embeddedStatement);
} else SynErr(318);
-#line 3388 "VBNET.ATG"
+#line 3391 "VBNET.ATG"
if (embeddedStatement != null) list.Add(embeddedStatement);
}
}
void CaseClauses(
-#line 3522 "VBNET.ATG"
+#line 3525 "VBNET.ATG"
out List caseClauses) {
-#line 3524 "VBNET.ATG"
+#line 3527 "VBNET.ATG"
caseClauses = new List();
CaseLabel caseClause = null;
CaseClause(
-#line 3527 "VBNET.ATG"
+#line 3530 "VBNET.ATG"
out caseClause);
-#line 3527 "VBNET.ATG"
+#line 3530 "VBNET.ATG"
if (caseClause != null) { caseClauses.Add(caseClause); }
while (la.kind == 22) {
lexer.NextToken();
CaseClause(
-#line 3528 "VBNET.ATG"
+#line 3531 "VBNET.ATG"
out caseClause);
-#line 3528 "VBNET.ATG"
+#line 3531 "VBNET.ATG"
if (caseClause != null) { caseClauses.Add(caseClause); }
}
}
void OnErrorStatement(
-#line 3413 "VBNET.ATG"
+#line 3416 "VBNET.ATG"
out OnErrorStatement stmt) {
-#line 3415 "VBNET.ATG"
+#line 3418 "VBNET.ATG"
stmt = null;
Location startLocation = la.Location;
GotoStatement goToStatement = null;
@@ -7465,13 +7473,13 @@ out OnErrorStatement stmt) {
Expect(171);
Expect(118);
if (
-#line 3422 "VBNET.ATG"
+#line 3425 "VBNET.ATG"
IsNegativeLabelName()) {
Expect(132);
Expect(30);
Expect(5);
-#line 3424 "VBNET.ATG"
+#line 3427 "VBNET.ATG"
long intLabel = Int64.Parse(t.val);
if(intLabel != 1) {
Error("invalid label in on error statement.");
@@ -7480,10 +7488,10 @@ IsNegativeLabelName()) {
} else if (la.kind == 132) {
GotoStatement(
-#line 3430 "VBNET.ATG"
+#line 3433 "VBNET.ATG"
out goToStatement);
-#line 3432 "VBNET.ATG"
+#line 3435 "VBNET.ATG"
string val = goToStatement.Label;
// if value is numeric, make sure that is 0
@@ -7500,12 +7508,12 @@ out goToStatement);
lexer.NextToken();
Expect(163);
-#line 3446 "VBNET.ATG"
+#line 3449 "VBNET.ATG"
stmt = new OnErrorStatement(new ResumeStatement(true));
} else SynErr(319);
-#line 3450 "VBNET.ATG"
+#line 3453 "VBNET.ATG"
if (stmt != null) {
stmt.StartLocation = startLocation;
stmt.EndLocation = t.EndLocation;
@@ -7514,17 +7522,17 @@ out goToStatement);
}
void GotoStatement(
-#line 3458 "VBNET.ATG"
+#line 3461 "VBNET.ATG"
out GotoStatement goToStatement) {
-#line 3459 "VBNET.ATG"
+#line 3462 "VBNET.ATG"
string label = String.Empty; Location startLocation = la.Location;
Expect(132);
LabelName(
-#line 3461 "VBNET.ATG"
+#line 3464 "VBNET.ATG"
out label);
-#line 3463 "VBNET.ATG"
+#line 3466 "VBNET.ATG"
goToStatement = new GotoStatement(label) {
StartLocation = startLocation,
EndLocation = t.EndLocation
@@ -7533,57 +7541,57 @@ out label);
}
void ResumeStatement(
-#line 3511 "VBNET.ATG"
+#line 3514 "VBNET.ATG"
out ResumeStatement resumeStatement) {
-#line 3513 "VBNET.ATG"
+#line 3516 "VBNET.ATG"
resumeStatement = null;
string label = String.Empty;
if (
-#line 3516 "VBNET.ATG"
+#line 3519 "VBNET.ATG"
IsResumeNext()) {
Expect(194);
Expect(163);
-#line 3517 "VBNET.ATG"
+#line 3520 "VBNET.ATG"
resumeStatement = new ResumeStatement(true);
} else if (la.kind == 194) {
lexer.NextToken();
if (StartOf(50)) {
LabelName(
-#line 3518 "VBNET.ATG"
+#line 3521 "VBNET.ATG"
out label);
}
-#line 3518 "VBNET.ATG"
+#line 3521 "VBNET.ATG"
resumeStatement = new ResumeStatement(label);
} else SynErr(320);
}
void ReDimClauseInternal(
-#line 3486 "VBNET.ATG"
+#line 3489 "VBNET.ATG"
ref Expression expr) {
-#line 3487 "VBNET.ATG"
+#line 3490 "VBNET.ATG"
List arguments; bool canBeNormal; bool canBeRedim; string name; Location startLocation = la.Location;
while (la.kind == 26 ||
-#line 3490 "VBNET.ATG"
+#line 3493 "VBNET.ATG"
la.kind == Tokens.OpenParenthesis && Peek(1).kind == Tokens.Of) {
if (la.kind == 26) {
lexer.NextToken();
IdentifierOrKeyword(
-#line 3489 "VBNET.ATG"
+#line 3492 "VBNET.ATG"
out name);
-#line 3489 "VBNET.ATG"
+#line 3492 "VBNET.ATG"
expr = new MemberReferenceExpression(expr, name) { StartLocation = startLocation, EndLocation = t.EndLocation };
} else {
InvocationExpression(
-#line 3491 "VBNET.ATG"
+#line 3494 "VBNET.ATG"
ref expr);
-#line 3493 "VBNET.ATG"
+#line 3496 "VBNET.ATG"
expr.StartLocation = startLocation;
expr.EndLocation = t.EndLocation;
@@ -7591,11 +7599,11 @@ ref expr);
}
Expect(37);
NormalOrReDimArgumentList(
-#line 3498 "VBNET.ATG"
+#line 3501 "VBNET.ATG"
out arguments, out canBeNormal, out canBeRedim);
Expect(38);
-#line 3500 "VBNET.ATG"
+#line 3503 "VBNET.ATG"
expr = new InvocationExpression(expr, arguments);
if (canBeRedim == false || canBeNormal && (la.kind == Tokens.Dot || la.kind == Tokens.OpenParenthesis)) {
if (this.Errors.Count == 0) {
@@ -7607,10 +7615,10 @@ out arguments, out canBeNormal, out canBeRedim);
}
void CaseClause(
-#line 3532 "VBNET.ATG"
+#line 3535 "VBNET.ATG"
out CaseLabel caseClause) {
-#line 3534 "VBNET.ATG"
+#line 3537 "VBNET.ATG"
Expression expr = null;
Expression sexpr = null;
BinaryOperatorType op = BinaryOperatorType.None;
@@ -7619,7 +7627,7 @@ out CaseLabel caseClause) {
if (la.kind == 111) {
lexer.NextToken();
-#line 3540 "VBNET.ATG"
+#line 3543 "VBNET.ATG"
caseClause = new CaseLabel();
} else if (StartOf(51)) {
if (la.kind == 144) {
@@ -7629,76 +7637,76 @@ out CaseLabel caseClause) {
case 40: {
lexer.NextToken();
-#line 3544 "VBNET.ATG"
+#line 3547 "VBNET.ATG"
op = BinaryOperatorType.LessThan;
break;
}
case 39: {
lexer.NextToken();
-#line 3545 "VBNET.ATG"
+#line 3548 "VBNET.ATG"
op = BinaryOperatorType.GreaterThan;
break;
}
case 43: {
lexer.NextToken();
-#line 3546 "VBNET.ATG"
+#line 3549 "VBNET.ATG"
op = BinaryOperatorType.LessThanOrEqual;
break;
}
case 42: {
lexer.NextToken();
-#line 3547 "VBNET.ATG"
+#line 3550 "VBNET.ATG"
op = BinaryOperatorType.GreaterThanOrEqual;
break;
}
case 20: {
lexer.NextToken();
-#line 3548 "VBNET.ATG"
+#line 3551 "VBNET.ATG"
op = BinaryOperatorType.Equality;
break;
}
case 41: {
lexer.NextToken();
-#line 3549 "VBNET.ATG"
+#line 3552 "VBNET.ATG"
op = BinaryOperatorType.InEquality;
break;
}
default: SynErr(321); break;
}
Expr(
-#line 3551 "VBNET.ATG"
+#line 3554 "VBNET.ATG"
out expr);
-#line 3553 "VBNET.ATG"
+#line 3556 "VBNET.ATG"
caseClause = new CaseLabel(op, expr);
} else if (StartOf(24)) {
Expr(
-#line 3555 "VBNET.ATG"
+#line 3558 "VBNET.ATG"
out expr);
if (la.kind == 216) {
lexer.NextToken();
Expr(
-#line 3555 "VBNET.ATG"
+#line 3558 "VBNET.ATG"
out sexpr);
}
-#line 3557 "VBNET.ATG"
+#line 3560 "VBNET.ATG"
caseClause = new CaseLabel(expr, sexpr);
} else SynErr(322);
}
void CatchClauses(
-#line 3604 "VBNET.ATG"
+#line 3607 "VBNET.ATG"
out List catchClauses) {
-#line 3606 "VBNET.ATG"
+#line 3609 "VBNET.ATG"
catchClauses = new List();
TypeReference type = null;
Statement blockStmt = null;
@@ -7710,27 +7718,27 @@ out List catchClauses) {
if (StartOf(4)) {
Identifier();
-#line 3614 "VBNET.ATG"
+#line 3617 "VBNET.ATG"
name = t.val;
if (la.kind == 63) {
lexer.NextToken();
TypeName(
-#line 3614 "VBNET.ATG"
+#line 3617 "VBNET.ATG"
out type);
}
}
if (la.kind == 229) {
lexer.NextToken();
Expr(
-#line 3615 "VBNET.ATG"
+#line 3618 "VBNET.ATG"
out expr);
}
EndOfStmt();
Block(
-#line 3617 "VBNET.ATG"
+#line 3620 "VBNET.ATG"
out blockStmt);
-#line 3618 "VBNET.ATG"
+#line 3621 "VBNET.ATG"
catchClauses.Add(new CatchClause(type, name, blockStmt, expr));
}
}
diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG
index ed814fad0b..75548a906f 100644
--- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG
+++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNET.ATG
@@ -1263,6 +1263,7 @@ StructureMemberDecl attributes>
Parameters = parameters,
TypeReference = returnType,
OverloadableOperator = operatorType,
+ Name = GetReflectionNameForOperator(operatorType, opConversionType),
ConversionType = opConversionType,
Body = (BlockStatement)stmt,
StartLocation = m.GetDeclarationLocation(startPos),
@@ -1299,6 +1300,8 @@ OverloadableOperator
|
"Xor" (. operatorType = OverloadableOperatorType.ExclusiveOr; .)
|
+ "Not" (. operatorType = OverloadableOperatorType.BitNot; .)
+ |
"^" (. operatorType = OverloadableOperatorType.Power; .)
|
"<<" (. operatorType = OverloadableOperatorType.ShiftLeft; .)
diff --git a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNetParser.cs b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNetParser.cs
index 2765fa7e74..ca7aca494c 100644
--- a/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNetParser.cs
+++ b/src/Libraries/NRefactory/Project/Src/Parser/VBNet/VBNetParser.cs
@@ -300,6 +300,7 @@ namespace ICSharpCode.NRefactory.Parser.VB
// look for attributes
while (tn.kind == Tokens.LessThan) {
while (braceCount > 0 || tn.kind != Tokens.GreaterThan) {
+ if (tn.kind == Tokens.EOF) return false;
tn = lexer.Peek();
if (tn.kind == Tokens.OpenParenthesis)
braceCount++;
@@ -384,5 +385,74 @@ namespace ICSharpCode.NRefactory.Parser.VB
item.Parent = parent;
}
}
+
+ internal static string GetReflectionNameForOperator(OverloadableOperatorType op, ConversionType conversion)
+ {
+ switch (op) {
+ case OverloadableOperatorType.Add:
+ return "op_Addition";
+ case OverloadableOperatorType.BitNot:
+ return "op_OnesComplement";
+ case OverloadableOperatorType.BitwiseAnd:
+ return "op_BitwiseAnd";
+ case OverloadableOperatorType.BitwiseOr:
+ return "op_BitwiseOr";
+ case OverloadableOperatorType.Concat:
+ return "op_Concatenate";
+ case OverloadableOperatorType.CType:
+ switch (conversion) {
+ case ConversionType.Implicit:
+ return "op_Implicit";
+ case ConversionType.Explicit:
+ return "op_Explicit";
+ default:
+ return "op_unknown";
+ }
+ case OverloadableOperatorType.Divide:
+ return "op_Division";
+ case OverloadableOperatorType.DivideInteger:
+ return "op_IntegerDivision";
+ case OverloadableOperatorType.Equality:
+ return "op_Equality";
+ case OverloadableOperatorType.ExclusiveOr:
+ return "op_ExclusiveOr";
+ case OverloadableOperatorType.GreaterThan:
+ return "op_GreaterThan";
+ case OverloadableOperatorType.GreaterThanOrEqual:
+ return "op_GreaterThanOrEqual";
+ case OverloadableOperatorType.InEquality:
+ return "op_Inequality";
+ case OverloadableOperatorType.IsFalse:
+ return "op_False";
+ case OverloadableOperatorType.IsTrue:
+ return "op_True";
+ case OverloadableOperatorType.LessThan:
+ return "op_LessThan";
+ case OverloadableOperatorType.LessThanOrEqual:
+ return "op_LessThanOrEqual";
+ case OverloadableOperatorType.Like:
+ return "op_Like";
+ case OverloadableOperatorType.Modulus:
+ return "op_Modulus";
+ case OverloadableOperatorType.Multiply:
+ return "op_Multiply";
+ case OverloadableOperatorType.Not:
+ return "op_LogicalNot";
+ case OverloadableOperatorType.Power:
+ return "op_Exponent";
+ case OverloadableOperatorType.ShiftLeft:
+ return "op_LeftShift";
+ case OverloadableOperatorType.ShiftRight:
+ return "op_RightShift";
+ case OverloadableOperatorType.Subtract:
+ return "op_Subtraction";
+ case OverloadableOperatorType.UnaryMinus:
+ return "op_UnaryNegation";
+ case OverloadableOperatorType.UnaryPlus:
+ return "op_UnaryPlus";
+ default:
+ return "op_unknown";
+ }
+ }
}
}
diff --git a/src/Libraries/NRefactory/Test/Lexer/CSharp/NumberLexerTest.cs b/src/Libraries/NRefactory/Test/Lexer/CSharp/NumberLexerTest.cs
index c317f51390..43bd4698d1 100644
--- a/src/Libraries/NRefactory/Test/Lexer/CSharp/NumberLexerTest.cs
+++ b/src/Libraries/NRefactory/Test/Lexer/CSharp/NumberLexerTest.cs
@@ -173,5 +173,16 @@ namespace ICSharpCode.NRefactory.Tests.Lexer.CSharp
CheckToken(@"'\x0041'", '\x0041');
CheckToken(@"'\U00000041'", '\U00000041');
}
+
+ [Test]
+ public void TestInvalidStringLiteral2()
+ {
+ ILexer l = GenerateLexer(new StringReader(@"""\u{0}"""));
+ Token t = l.NextToken();
+ Assert.AreEqual(Tokens.Literal, t.Kind);
+ Assert.AreEqual(new Location(1, 1), t.Location);
+ Assert.AreEqual(new Location(8, 1), t.EndLocation);
+ Assert.AreEqual(1, l.Errors.Count);
+ }
}
}
diff --git a/src/Libraries/NRefactory/Test/Lexer/VBNet/XmlModeLexerTests.cs b/src/Libraries/NRefactory/Test/Lexer/VBNet/XmlModeLexerTests.cs
index 287cb12990..e4ff7815fd 100644
--- a/src/Libraries/NRefactory/Test/Lexer/VBNet/XmlModeLexerTests.cs
+++ b/src/Libraries/NRefactory/Test/Lexer/VBNet/XmlModeLexerTests.cs
@@ -783,7 +783,7 @@ End If";
public void SelectStatement()
{
string statement = @"Select Case
- Case ,
+ Case < 1, ()
Case Else
End Select";
@@ -792,8 +792,8 @@ End Select";
CheckHead(lexer);
CheckTokens(lexer, Tokens.Select, Tokens.Case, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.EOL,
- Tokens.Case, Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.Comma,
- Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.EOL,
+ Tokens.Case, Tokens.LessThan, Tokens.LiteralInteger, Tokens.Comma, Tokens.OpenParenthesis,
+ Tokens.XmlOpenTag, Tokens.Identifier, Tokens.XmlCloseTagEmptyElement, Tokens.CloseParenthesis, Tokens.EOL,
Tokens.Case, Tokens.Else, Tokens.EOL,
Tokens.End, Tokens.Select
);
diff --git a/src/Libraries/NRefactory/Test/Parser/Statements/SwitchStatementTests.cs b/src/Libraries/NRefactory/Test/Parser/Statements/SwitchStatementTests.cs
index 73de1122ee..997fbaaa5f 100644
--- a/src/Libraries/NRefactory/Test/Parser/Statements/SwitchStatementTests.cs
+++ b/src/Libraries/NRefactory/Test/Parser/Statements/SwitchStatementTests.cs
@@ -39,6 +39,20 @@ namespace ICSharpCode.NRefactory.Tests.Ast
SwitchSection sec = switchStmt.SwitchSections[0];
Assert.AreEqual(0, sec.SwitchLabels.Count);
}
+
+ [Test]
+ public void SpecialCaseStatement()
+ {
+ SwitchStatement stmt = ParseUtilVBNet.ParseStatement("Select Case a\nCase < 50\nCase > 20, < 10\nEnd Select");
+ Assert.AreEqual("a", ((IdentifierExpression)stmt.SwitchExpression).Identifier);
+ }
+
+ [Test]
+ public void SpecialCaseStatement2()
+ {
+ SwitchStatement stmt = ParseUtilVBNet.ParseStatement("Select Case a\nCase < 50\nEnd Select");
+ Assert.AreEqual("a", ((IdentifierExpression)stmt.SwitchExpression).Identifier);
+ }
#endregion
}
}
diff --git a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs
index 508c5e945f..2812375b11 100644
--- a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs
+++ b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Analysis/ControlFlow.cs
@@ -1,4 +1,4 @@
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
@@ -21,9 +21,10 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
-
using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.CSharp.TypeSystem;
using ICSharpCode.NRefactory.Semantics;
+using ICSharpCode.NRefactory.TypeSystem;
using ICSharpCode.NRefactory.TypeSystem.Implementation;
namespace ICSharpCode.NRefactory.CSharp.Analysis
@@ -112,7 +113,7 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
/// Gets the try-finally statements that this control flow edge is leaving.
///
public IEnumerable TryFinallyStatements {
- get { return jumpOutOfTryFinally ?? EmptyList.Instance; }
+ get { return jumpOutOfTryFinally ?? Enumerable.Empty(); }
}
}
@@ -156,7 +157,8 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
}
Statement rootStatement;
- CSharpAstResolver resolver;
+ CSharpTypeResolveContext typeResolveContext;
+ Func resolver;
List nodes;
Dictionary labels;
List gotoStatements;
@@ -164,6 +166,8 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
public IList BuildControlFlowGraph(Statement statement, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (statement == null)
+ throw new ArgumentNullException("statement");
CSharpResolver r = new CSharpResolver(MinimalCorlib.Instance.CreateCompilation());
return BuildControlFlowGraph(statement, new CSharpAstResolver(r, statement), cancellationToken);
}
@@ -174,7 +178,11 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
throw new ArgumentNullException("statement");
if (resolver == null)
throw new ArgumentNullException("resolver");
-
+ return BuildControlFlowGraph(statement, resolver.Resolve, resolver.TypeResolveContext, cancellationToken);
+ }
+
+ internal IList BuildControlFlowGraph(Statement statement, Func resolver, CSharpTypeResolveContext typeResolveContext, CancellationToken cancellationToken)
+ {
NodeCreationVisitor nodeCreationVisitor = new NodeCreationVisitor();
nodeCreationVisitor.builder = this;
try {
@@ -183,6 +191,7 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
this.gotoStatements = new List();
this.rootStatement = statement;
this.resolver = resolver;
+ this.typeResolveContext = typeResolveContext;
this.cancellationToken = cancellationToken;
ControlFlowNode entryPoint = CreateStartNode(statement);
@@ -205,6 +214,7 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
this.gotoStatements = null;
this.rootStatement = null;
this.resolver = null;
+ this.typeResolveContext = null;
this.cancellationToken = CancellationToken.None;
}
}
@@ -288,7 +298,7 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
if (!(expr is PrimitiveExpression || expr is NullReferenceExpression))
return null;
}
- return resolver.Resolve(expr, cancellationToken);
+ return resolver(expr, cancellationToken);
}
///
@@ -308,7 +318,7 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
{
if (c1 == null || c2 == null || !c1.IsCompileTimeConstant || !c2.IsCompileTimeConstant)
return false;
- CSharpResolver r = new CSharpResolver(resolver.TypeResolveContext);
+ CSharpResolver r = new CSharpResolver(typeResolveContext);
ResolveResult c = r.ResolveBinaryOperator(BinaryOperatorType.Equality, c1, c2);
return c.IsCompileTimeConstant && (c.ConstantValue as bool?) == true;
}
@@ -410,7 +420,8 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
falseEnd = ifElseStatement.FalseStatement.AcceptVisitor(this, falseBegin);
}
ControlFlowNode end = builder.CreateEndNode(ifElseStatement);
- Connect(trueEnd, end);
+ if (trueEnd != null)
+ Connect(trueEnd, end);
if (falseEnd != null) {
Connect(falseEnd, end);
} else if (cond != true) {
diff --git a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Analysis/DefiniteAssignmentAnalysis.cs b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Analysis/DefiniteAssignmentAnalysis.cs
index 8d0832bed8..fdcc4d717c 100644
--- a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Analysis/DefiniteAssignmentAnalysis.cs
+++ b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Analysis/DefiniteAssignmentAnalysis.cs
@@ -304,54 +304,53 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
return DefiniteAssignmentStatus.PotentiallyAssigned;
}
- void ChangeNodeStatus(DefiniteAssignmentNode node, DefiniteAssignmentStatus inputStatus)
+ void ChangeNodeStatus (DefiniteAssignmentNode node, DefiniteAssignmentStatus inputStatus)
{
if (node.NodeStatus == inputStatus)
return;
node.NodeStatus = inputStatus;
DefiniteAssignmentStatus outputStatus;
switch (node.Type) {
- case ControlFlowNodeType.StartNode:
- case ControlFlowNodeType.BetweenStatements:
- if (node.NextStatement is IfElseStatement) {
- // Handle if-else as a condition node
+ case ControlFlowNodeType.StartNode:
+ case ControlFlowNodeType.BetweenStatements:
+ if (node.NextStatement is IfElseStatement) {
+ // Handle if-else as a condition node
goto case ControlFlowNodeType.LoopCondition;
- }
- if (inputStatus == DefiniteAssignmentStatus.DefinitelyAssigned) {
- // There isn't any way to un-assign variables, so we don't have to check the expression
- // if the status already is definitely assigned.
- outputStatus = DefiniteAssignmentStatus.DefinitelyAssigned;
- } else {
- outputStatus = CleanSpecialValues(node.NextStatement.AcceptVisitor(visitor, inputStatus));
- }
- break;
- case ControlFlowNodeType.EndNode:
- outputStatus = inputStatus;
- if (node.PreviousStatement.Role == TryCatchStatement.FinallyBlockRole
- && (outputStatus == DefiniteAssignmentStatus.DefinitelyAssigned || outputStatus == DefiniteAssignmentStatus.PotentiallyAssigned))
- {
- TryCatchStatement tryFinally = (TryCatchStatement)node.PreviousStatement.Parent;
- // Changing the status on a finally block potentially changes the status of all edges leaving that finally block:
- foreach (ControlFlowEdge edge in allNodes.SelectMany(n => n.Outgoing)) {
- if (edge.IsLeavingTryFinally && edge.TryFinallyStatements.Contains(tryFinally)) {
- DefiniteAssignmentStatus s = edgeStatus[edge];
- if (s == DefiniteAssignmentStatus.PotentiallyAssigned) {
- ChangeEdgeStatus(edge, outputStatus);
- }
+ }
+ if (inputStatus == DefiniteAssignmentStatus.DefinitelyAssigned) {
+ // There isn't any way to un-assign variables, so we don't have to check the expression
+ // if the status already is definitely assigned.
+ outputStatus = DefiniteAssignmentStatus.DefinitelyAssigned;
+ } else {
+ outputStatus = CleanSpecialValues (node.NextStatement.AcceptVisitor (visitor, inputStatus));
+ }
+ break;
+ case ControlFlowNodeType.EndNode:
+ outputStatus = inputStatus;
+ if (node.PreviousStatement.Role == TryCatchStatement.FinallyBlockRole
+ && (outputStatus == DefiniteAssignmentStatus.DefinitelyAssigned || outputStatus == DefiniteAssignmentStatus.PotentiallyAssigned)) {
+ TryCatchStatement tryFinally = (TryCatchStatement)node.PreviousStatement.Parent;
+ // Changing the status on a finally block potentially changes the status of all edges leaving that finally block:
+ foreach (ControlFlowEdge edge in allNodes.SelectMany(n => n.Outgoing)) {
+ if (edge.IsLeavingTryFinally && edge.TryFinallyStatements.Contains (tryFinally)) {
+ DefiniteAssignmentStatus s = edgeStatus [edge];
+ if (s == DefiniteAssignmentStatus.PotentiallyAssigned) {
+ ChangeEdgeStatus (edge, outputStatus);
}
}
}
+ }
+ break;
+ case ControlFlowNodeType.LoopCondition:
+ ForeachStatement foreachStmt = node.NextStatement as ForeachStatement;
+ if (foreachStmt != null) {
+ outputStatus = CleanSpecialValues (foreachStmt.InExpression.AcceptVisitor (visitor, inputStatus));
+ if (foreachStmt.VariableName == this.variableName)
+ outputStatus = DefiniteAssignmentStatus.DefinitelyAssigned;
break;
- case ControlFlowNodeType.LoopCondition:
- ForeachStatement foreachStmt = node.NextStatement as ForeachStatement;
- if (foreachStmt != null) {
- outputStatus = CleanSpecialValues(foreachStmt.InExpression.AcceptVisitor(visitor, inputStatus));
- if (foreachStmt.VariableName == this.variableName)
- outputStatus = DefiniteAssignmentStatus.DefinitelyAssigned;
- break;
- } else {
- Debug.Assert(node.NextStatement is IfElseStatement || node.NextStatement is WhileStatement || node.NextStatement is ForStatement || node.NextStatement is DoWhileStatement);
- Expression condition = node.NextStatement.GetChildByRole(AstNode.Roles.Condition);
+ } else {
+ Debug.Assert (node.NextStatement is IfElseStatement || node.NextStatement is WhileStatement || node.NextStatement is ForStatement || node.NextStatement is DoWhileStatement);
+ Expression condition = node.NextStatement.GetChildByRole (Roles.Condition);
if (condition.IsNull)
outputStatus = inputStatus;
else
diff --git a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Analysis/ReachabilityAnalysis.cs b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Analysis/ReachabilityAnalysis.cs
new file mode 100644
index 0000000000..ebb8d419d3
--- /dev/null
+++ b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Analysis/ReachabilityAnalysis.cs
@@ -0,0 +1,91 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
+// to whom the Software is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all copies or
+// substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using ICSharpCode.NRefactory.CSharp.Resolver;
+using ICSharpCode.NRefactory.CSharp.TypeSystem;
+using ICSharpCode.NRefactory.Semantics;
+
+namespace ICSharpCode.NRefactory.CSharp.Analysis
+{
+ ///
+ /// Statement reachability analysis.
+ ///
+ public sealed class ReachabilityAnalysis
+ {
+ HashSet reachableStatements = new HashSet();
+ HashSet reachableEndPoints = new HashSet();
+ HashSet visitedNodes = new HashSet();
+ Stack stack = new Stack();
+
+ private ReachabilityAnalysis() {}
+
+ public static ReachabilityAnalysis Create(Statement statement, CSharpAstResolver resolver = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ var cfgBuilder = new ControlFlowGraphBuilder();
+ var cfg = cfgBuilder.BuildControlFlowGraph(statement, resolver, cancellationToken);
+ return Create(cfg, cancellationToken);
+ }
+
+ internal static ReachabilityAnalysis Create(Statement statement, Func resolver, CSharpTypeResolveContext typeResolveContext, CancellationToken cancellationToken)
+ {
+ var cfgBuilder = new ControlFlowGraphBuilder();
+ var cfg = cfgBuilder.BuildControlFlowGraph(statement, resolver, typeResolveContext, cancellationToken);
+ return Create(cfg, cancellationToken);
+ }
+
+ public static ReachabilityAnalysis Create(IList controlFlowGraph, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (controlFlowGraph == null)
+ throw new ArgumentNullException("controlFlowGraph");
+ ReachabilityAnalysis ra = new ReachabilityAnalysis();
+ ra.stack.Push(controlFlowGraph[0]);
+ while (ra.stack.Count > 0) {
+ cancellationToken.ThrowIfCancellationRequested();
+ ra.MarkReachable(ra.stack.Pop());
+ }
+ ra.stack = null;
+ ra.visitedNodes = null;
+ return ra;
+ }
+
+ void MarkReachable(ControlFlowNode node)
+ {
+ if (node.PreviousStatement != null)
+ reachableEndPoints.Add(node.PreviousStatement);
+ if (node.NextStatement != null)
+ reachableStatements.Add(node.NextStatement);
+ foreach (var edge in node.Outgoing) {
+ if (visitedNodes.Add(edge.To))
+ stack.Push(edge.To);
+ }
+ }
+
+ public bool IsReachable(Statement statement)
+ {
+ return reachableStatements.Contains(statement);
+ }
+
+ public bool IsEndpointReachable(Statement statement)
+ {
+ return reachableEndPoints.Contains(statement);
+ }
+ }
+}
diff --git a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs
index b7ea446ef4..bc4d27de03 100644
--- a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs
+++ b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs
@@ -1,4 +1,4 @@
-//
+//
// AstNode.cs
//
// Author:
@@ -33,8 +33,11 @@ using System.Threading;
namespace ICSharpCode.NRefactory.CSharp
{
- public abstract class AstNode : AbstractAnnotatable, PatternMatching.INode
+ public abstract class AstNode : AbstractAnnotatable, ICSharpCode.NRefactory.TypeSystem.IFreezable, PatternMatching.INode
{
+ // the Root role must be available when creating the null nodes, so we can't put it in the Roles class
+ internal static readonly Role RootRole = new Role ("Root");
+
#region Null
public static readonly AstNode Null = new NullAstNode ();
@@ -52,7 +55,16 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
- public override S AcceptVisitor (IAstVisitor visitor, T data = default(T))
+ public override void AcceptVisitor (IAstVisitor visitor)
+ {
+ }
+
+ public override T AcceptVisitor (IAstVisitor visitor)
+ {
+ return default (T);
+ }
+
+ public override S AcceptVisitor (IAstVisitor visitor, T data)
{
return default (S);
}
@@ -83,7 +95,17 @@ namespace ICSharpCode.NRefactory.CSharp
get { return NodeType.Pattern; }
}
- public override S AcceptVisitor (IAstVisitor visitor, T data = default(T))
+ public override void AcceptVisitor (IAstVisitor visitor)
+ {
+ visitor.VisitPatternPlaceholder (this, child);
+ }
+
+ public override T AcceptVisitor (IAstVisitor visitor)
+ {
+ return visitor.VisitPatternPlaceholder (this, child);
+ }
+
+ public override S AcceptVisitor (IAstVisitor visitor, T data)
{
return visitor.VisitPatternPlaceholder (this, child, data);
}
@@ -105,7 +127,42 @@ namespace ICSharpCode.NRefactory.CSharp
AstNode nextSibling;
AstNode firstChild;
AstNode lastChild;
- Role role = RootRole;
+
+ // Flags, from least significant to most significant bits:
+ // - Role.RoleIndexBits: role index
+ // - 1 bit: IsFrozen
+ protected uint flags = RootRole.Index;
+ // Derived classes may also use a few bits,
+ // for example Identifier uses 1 bit for IsVerbatim
+
+ const uint roleIndexMask = (1u << Role.RoleIndexBits) - 1;
+ const uint frozenBit = 1u << Role.RoleIndexBits;
+ protected const int AstNodeFlagsUsedBits = Role.RoleIndexBits + 1;
+
+ protected AstNode()
+ {
+ if (IsNull)
+ Freeze();
+ }
+
+ public bool IsFrozen {
+ get { return (flags & frozenBit) != 0; }
+ }
+
+ public void Freeze()
+ {
+ if (!IsFrozen) {
+ for (AstNode child = firstChild; child != null; child = child.nextSibling)
+ child.Freeze();
+ flags |= frozenBit;
+ }
+ }
+
+ protected void ThrowIfFrozen()
+ {
+ if (IsFrozen)
+ throw new InvalidOperationException("Cannot mutate frozen " + GetType().Name);
+ }
public abstract NodeType NodeType {
get;
@@ -135,12 +192,39 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
+ ///
+ /// Gets the region from StartLocation to EndLocation for this node.
+ /// The file name of the region is set based on the parent CompilationUnit's file name.
+ /// If this node is not connected to a whole compilation, the file name will be null.
+ ///
+ public ICSharpCode.NRefactory.TypeSystem.DomRegion GetRegion()
+ {
+ var cu = (this.Ancestors.LastOrDefault() ?? this) as CompilationUnit;
+ string fileName = (cu != null ? cu.FileName : null);
+ return new ICSharpCode.NRefactory.TypeSystem.DomRegion(fileName, this.StartLocation, this.EndLocation);
+ }
+
public AstNode Parent {
get { return parent; }
}
public Role Role {
- get { return role; }
+ get {
+ return Role.GetByIndex(flags & roleIndexMask);
+ }
+ set {
+ if (value == null)
+ throw new ArgumentNullException("value");
+ if (!value.IsValid(this))
+ throw new ArgumentException("This node is not valid in the new role.");
+ ThrowIfFrozen();
+ SetRole(value);
+ }
+ }
+
+ void SetRole(Role role)
+ {
+ flags = (flags & ~roleIndexMask) | role.Index;
}
public AstNode NextSibling {
@@ -159,6 +243,12 @@ namespace ICSharpCode.NRefactory.CSharp
get { return lastChild; }
}
+ public bool HasChildren {
+ get {
+ return firstChild != null;
+ }
+ }
+
public IEnumerable Children {
get {
AstNode next;
@@ -183,6 +273,17 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
+ ///
+ /// Gets the ancestors of this node (including this node itself)
+ ///
+ public IEnumerable AncestorsAndSelf {
+ get {
+ for (AstNode cur = this; cur != null; cur = cur.parent) {
+ yield return cur;
+ }
+ }
+ }
+
///
/// Gets all descendants of this node (excluding this node itself).
///
@@ -205,17 +306,23 @@ namespace ICSharpCode.NRefactory.CSharp
/// Gets the first child with the specified role.
/// Returns the role's null object if the child is not found.
///
- public T GetChildByRole (Role role) where T : AstNode
+ public T GetChildByRole(Role role) where T : AstNode
{
if (role == null)
throw new ArgumentNullException ("role");
+ uint roleIndex = role.Index;
for (var cur = firstChild; cur != null; cur = cur.nextSibling) {
- if (cur.role == role)
+ if ((cur.flags & roleIndexMask) == roleIndex)
return (T)cur;
}
return role.NullObject;
}
+ public T GetParent() where T : AstNode
+ {
+ return Ancestors.OfType().FirstOrDefault();
+ }
+
public AstNodeCollection GetChildrenByRole (Role role) where T : AstNode
{
return new AstNodeCollection (this, role);
@@ -236,10 +343,11 @@ namespace ICSharpCode.NRefactory.CSharp
throw new ArgumentNullException ("role");
if (child == null || child.IsNull)
return;
- if (this.IsNull)
- throw new InvalidOperationException ("Cannot add children to null nodes");
+ ThrowIfFrozen();
if (child.parent != null)
throw new ArgumentException ("Node is already used in another tree.", "child");
+ if (child.IsFrozen)
+ throw new ArgumentException ("Cannot add a frozen node.", "child");
AddChildUnsafe (child, role);
}
@@ -249,7 +357,7 @@ namespace ICSharpCode.NRefactory.CSharp
void AddChildUnsafe (AstNode child, Role role)
{
child.parent = this;
- child.role = role;
+ child.SetRole(role);
if (firstChild == null) {
lastChild = firstChild = child;
} else {
@@ -258,6 +366,13 @@ namespace ICSharpCode.NRefactory.CSharp
lastChild = child;
}
}
+
+ public void InsertChildsBefore(AstNode nextSibling, Role role, params T[] child) where T : AstNode
+ {
+ foreach (var cur in child) {
+ InsertChildBefore(nextSibling, cur, role);
+ }
+ }
public void InsertChildBefore (AstNode nextSibling, T child, Role role) where T : AstNode
{
@@ -270,8 +385,11 @@ namespace ICSharpCode.NRefactory.CSharp
if (child == null || child.IsNull)
return;
+ ThrowIfFrozen();
if (child.parent != null)
throw new ArgumentException ("Node is already used in another tree.", "child");
+ if (child.IsFrozen)
+ throw new ArgumentException ("Cannot add a frozen node.", "child");
if (nextSibling.parent != this)
throw new ArgumentException ("NextSibling is not a child of this node.", "nextSibling");
// No need to test for "Cannot add children to null nodes",
@@ -282,7 +400,7 @@ namespace ICSharpCode.NRefactory.CSharp
void InsertChildBeforeUnsafe (AstNode nextSibling, AstNode child, Role role)
{
child.parent = this;
- child.role = role;
+ child.SetRole(role);
child.nextSibling = nextSibling;
child.prevSibling = nextSibling.prevSibling;
@@ -307,6 +425,7 @@ namespace ICSharpCode.NRefactory.CSharp
public void Remove ()
{
if (parent != null) {
+ ThrowIfFrozen();
if (prevSibling != null) {
Debug.Assert (prevSibling.nextSibling == this);
prevSibling.nextSibling = nextSibling;
@@ -322,7 +441,6 @@ namespace ICSharpCode.NRefactory.CSharp
parent.lastChild = prevSibling;
}
parent = null;
- role = Roles.Root;
prevSibling = null;
nextSibling = null;
}
@@ -342,10 +460,11 @@ namespace ICSharpCode.NRefactory.CSharp
if (parent == null) {
throw new InvalidOperationException (this.IsNull ? "Cannot replace the null nodes" : "Cannot replace the root node");
}
+ ThrowIfFrozen();
// Because this method doesn't statically check the new node's type with the role,
// we perform a runtime test:
- if (!role.IsValid (newNode)) {
- throw new ArgumentException (string.Format ("The new node '{0}' is not valid in the role {1}", newNode.GetType ().Name, role.ToString ()), "newNode");
+ if (!this.Role.IsValid (newNode)) {
+ throw new ArgumentException (string.Format ("The new node '{0}' is not valid in the role {1}", newNode.GetType ().Name, this.Role.ToString ()), "newNode");
}
if (newNode.parent != null) {
// newNode is used within this tree?
@@ -357,9 +476,11 @@ namespace ICSharpCode.NRefactory.CSharp
throw new ArgumentException ("Node is already used in another tree.", "newNode");
}
}
+ if (newNode.IsFrozen)
+ throw new ArgumentException ("Cannot add a frozen node.", "newNode");
newNode.parent = parent;
- newNode.role = role;
+ newNode.SetRole(this.Role);
newNode.prevSibling = prevSibling;
newNode.nextSibling = nextSibling;
if (parent != null) {
@@ -380,7 +501,6 @@ namespace ICSharpCode.NRefactory.CSharp
parent = null;
prevSibling = null;
nextSibling = null;
- role = Roles.Root;
}
}
@@ -393,7 +513,7 @@ namespace ICSharpCode.NRefactory.CSharp
}
AstNode oldParent = parent;
AstNode oldSuccessor = nextSibling;
- Role oldRole = role;
+ Role oldRole = this.Role;
Remove ();
AstNode replacement = replaceFunction (this);
if (oldSuccessor != null && oldSuccessor.parent != oldParent)
@@ -422,26 +542,28 @@ namespace ICSharpCode.NRefactory.CSharp
AstNode copy = (AstNode)MemberwiseClone ();
// First, reset the shallow pointer copies
copy.parent = null;
- copy.role = Roles.Root;
copy.firstChild = null;
copy.lastChild = null;
copy.prevSibling = null;
copy.nextSibling = null;
+ copy.flags &= ~frozenBit; // unfreeze the copy
// Then perform a deep copy:
for (AstNode cur = firstChild; cur != null; cur = cur.nextSibling) {
- copy.AddChildUnsafe (cur.Clone (), cur.role);
+ copy.AddChildUnsafe (cur.Clone (), cur.Role);
}
// Finally, clone the annotation, if necessary
- ICloneable copiedAnnotations = copy.annotations as ICloneable; // read from copy (for thread-safety)
- if (copiedAnnotations != null)
- copy.annotations = copiedAnnotations.Clone();
+ copy.CloneAnnotations();
return copy;
}
- public abstract S AcceptVisitor (IAstVisitor visitor, T data = default(T));
+ public abstract void AcceptVisitor (IAstVisitor visitor);
+
+ public abstract T AcceptVisitor (IAstVisitor visitor);
+
+ public abstract S AcceptVisitor (IAstVisitor visitor, T data);
#region Pattern Matching
protected static bool MatchString (string pattern, string text)
@@ -491,7 +613,6 @@ namespace ICSharpCode.NRefactory.CSharp
return Parent.GetPrevNode ();
return null;
}
-
// filters all non c# nodes (comments, white spaces or pre processor directives)
public AstNode GetCSharpNodeBefore (AstNode node)
{
@@ -504,11 +625,22 @@ namespace ICSharpCode.NRefactory.CSharp
return null;
}
+ #region GetNodeAt
+ ///
+ /// Gets the node specified by T at the location line, column. This is useful for getting a specific node from the tree. For example searching
+ /// the current method declaration.
+ /// (End exclusive)
+ ///
public AstNode GetNodeAt (int line, int column, Predicate pred = null)
{
return GetNodeAt (new TextLocation (line, column), pred);
}
+ ///
+ /// Gets the node specified by pred at location. This is useful for getting a specific node from the tree. For example searching
+ /// the current method declaration.
+ /// (End exclusive)
+ ///
public AstNode GetNodeAt (TextLocation location, Predicate pred = null)
{
AstNode result = null;
@@ -531,14 +663,20 @@ namespace ICSharpCode.NRefactory.CSharp
return result;
}
+ ///
+ /// Gets the node specified by T at the location line, column. This is useful for getting a specific node from the tree. For example searching
+ /// the current method declaration.
+ /// (End exclusive)
+ ///
public T GetNodeAt (int line, int column) where T : AstNode
{
return GetNodeAt (new TextLocation (line, column));
}
///
- /// Gets the node specified by T at location. This is useful for getting a specific node from the tree. For example searching
+ /// Gets the node specified by T at location. This is useful for getting a specific node from the tree. For example searching
/// the current method declaration.
+ /// (End exclusive)
///
public T GetNodeAt (TextLocation location) where T : AstNode
{
@@ -561,6 +699,97 @@ namespace ICSharpCode.NRefactory.CSharp
}
return result;
}
+
+ #endregion
+
+ #region GetAdjacentNodeAt
+ ///
+ /// Gets the node specified by pred at the location line, column. This is useful for getting a specific node from the tree. For example searching
+ /// the current method declaration.
+ /// (End inclusive)
+ ///
+ public AstNode GetAdjacentNodeAt(int line, int column, Predicate pred = null)
+ {
+ return GetAdjacentNodeAt (new TextLocation (line, column), pred);
+ }
+
+ ///
+ /// Gets the node specified by pred at location. This is useful for getting a specific node from the tree. For example searching
+ /// the current method declaration.
+ /// (End inclusive)
+ ///
+ public AstNode GetAdjacentNodeAt (TextLocation location, Predicate pred = null)
+ {
+ AstNode result = null;
+ AstNode node = this;
+ while (node.FirstChild != null) {
+ var child = node.FirstChild;
+ while (child != null) {
+ if (child.StartLocation <= location && location <= child.EndLocation) {
+ if (pred == null || pred (child))
+ result = child;
+ node = child;
+ break;
+ }
+ child = child.NextSibling;
+ }
+ // found no better child node - therefore the parent is the right one.
+ if (child == null)
+ break;
+ }
+ return result;
+ }
+
+ ///
+ /// Gets the node specified by T at the location line, column. This is useful for getting a specific node from the tree. For example searching
+ /// the current method declaration.
+ /// (End inclusive)
+ ///
+ public T GetAdjacentNodeAt(int line, int column) where T : AstNode
+ {
+ return GetAdjacentNodeAt (new TextLocation (line, column));
+ }
+
+ ///
+ /// Gets the node specified by T at location. This is useful for getting a specific node from the tree. For example searching
+ /// the current method declaration.
+ /// (End inclusive)
+ ///
+ public T GetAdjacentNodeAt (TextLocation location) where T : AstNode
+ {
+ T result = null;
+ AstNode node = this;
+ while (node.FirstChild != null) {
+ var child = node.FirstChild;
+ while (child != null) {
+ if (child.StartLocation <= location && location < child.EndLocation) {
+ if (child is T)
+ result = (T)child;
+ node = child;
+ break;
+ }
+ child = child.NextSibling;
+ }
+ // found no better child node - therefore the parent is the right one.
+ if (child == null)
+ break;
+ }
+ return result;
+ }
+ #endregion
+
+
+ ///
+ /// Gets the node that fully contains the range from startLocation to endLocation.
+ ///
+ public AstNode GetNodeContaining(TextLocation startLocation, TextLocation endLocation)
+ {
+ for (AstNode child = firstChild; child != null; child = child.nextSibling) {
+ if (child.StartLocation <= startLocation && endLocation <= child.EndLocation)
+ return child.GetNodeContaining(startLocation, endLocation);
+ }
+ return this;
+ }
public IEnumerable GetNodesBetween (int startLine, int startColumn, int endLine, int endColumn)
{
@@ -579,7 +808,7 @@ namespace ICSharpCode.NRefactory.CSharp
yield return node;
} else {
if (node.EndLocation <= start) {
- next = node.NextSibling;
+ next = node.NextSibling;
} else {
next = node.FirstChild;
}
@@ -591,16 +820,65 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
+ ///
+ /// Gets the node as formatted C# output.
+ ///
+ ///
+ /// Formatting options.
+ ///
+ public virtual string GetText (CSharpFormattingOptions formattingOptions = null)
+ {
+ if (IsNull)
+ return "";
+ var w = new StringWriter ();
+ AcceptVisitor (new CSharpOutputVisitor (w, formattingOptions ?? FormattingOptionsFactory.CreateMono ()));
+ return w.ToString ();
+ }
+
+ ///
+ /// Returns true, if the given coordinates (line, column) are in the node.
+ ///
+ ///
+ /// True, if the given coordinates are between StartLocation and EndLocation (exclusive); otherwise, false.
+ ///
public bool Contains (int line, int column)
{
return Contains (new TextLocation (line, column));
}
-
+
+ ///
+ /// Returns true, if the given coordinates are in the node.
+ ///
+ ///
+ /// True, if location is between StartLocation and EndLocation (exclusive); otherwise, false.
+ ///
public bool Contains (TextLocation location)
{
return this.StartLocation <= location && location < this.EndLocation;
}
+ ///
+ /// Returns true, if the given coordinates (line, column) are in the node.
+ ///
+ ///
+ /// True, if the given coordinates are between StartLocation and EndLocation (inclusive); otherwise, false.
+ ///
+ public bool IsInside (int line, int column)
+ {
+ return IsInside (new TextLocation (line, column));
+ }
+
+ ///
+ /// Returns true, if the given coordinates are in the node.
+ ///
+ ///
+ /// True, if location is between StartLocation and EndLocation (inclusive); otherwise, false.
+ ///
+ public bool IsInside (TextLocation location)
+ {
+ return this.StartLocation <= location && location <= this.EndLocation;
+ }
+
public override void AddAnnotation (object annotation)
{
if (this.IsNull)
@@ -612,60 +890,12 @@ namespace ICSharpCode.NRefactory.CSharp
{
if (IsNull)
return "Null";
- StringWriter w = new StringWriter();
- AcceptVisitor(new CSharpOutputVisitor(w, new CSharpFormattingOptions()), null);
- string text = w.ToString().TrimEnd().Replace("\t", "").Replace(w.NewLine, " ");
+ string text = GetText();
+ text = text.TrimEnd().Replace("\t", "").Replace(Environment.NewLine, " ");
if (text.Length > 100)
return text.Substring(0, 97) + "...";
else
return text;
}
-
- // the Root role must be available when creating the null nodes, so we can't put it in the Roles class
- static readonly Role RootRole = new Role ("Root");
-
- public static class Roles
- {
- ///
- /// Root of an abstract syntax tree.
- ///
- public static readonly Role Root = RootRole;
-
- // some pre defined constants for common roles
- public static readonly Role Identifier = new Role ("Identifier", CSharp.Identifier.Null);
- public static readonly Role Body = new Role ("Body", CSharp.BlockStatement.Null);
- public static readonly Role Parameter = new Role ("Parameter");
- public static readonly Role Argument = new Role ("Argument", CSharp.Expression.Null);
- public static readonly Role Type = new Role ("Type", CSharp.AstType.Null);
- public static readonly Role Expression = new Role ("Expression", CSharp.Expression.Null);
- public static readonly Role TargetExpression = new Role ("Target", CSharp.Expression.Null);
- public readonly static Role Condition = new Role ("Condition", CSharp.Expression.Null);
- public static readonly Role TypeParameter = new Role ("TypeParameter");
- public static readonly Role TypeArgument = new Role ("TypeArgument", CSharp.AstType.Null);
- public readonly static Role Constraint = new Role ("Constraint");
- public static readonly Role Variable = new Role ("Variable");
- public static readonly Role EmbeddedStatement = new Role ("EmbeddedStatement", CSharp.Statement.Null);
- public static readonly Role Keyword = new Role ("Keyword", CSharpTokenNode.Null);
- public static readonly Role InKeyword = new Role ("InKeyword", CSharpTokenNode.Null);
-
- // some pre defined constants for most used punctuation
- public static readonly Role LPar = new Role ("LPar", CSharpTokenNode.Null);
- public static readonly Role RPar = new Role ("RPar", CSharpTokenNode.Null);
- public static readonly Role LBracket = new Role ("LBracket", CSharpTokenNode.Null);
- public static readonly Role RBracket = new Role ("RBracket", CSharpTokenNode.Null);
- public static readonly Role LBrace = new Role ("LBrace", CSharpTokenNode.Null);
- public static readonly Role RBrace = new Role ("RBrace", CSharpTokenNode.Null);
- public static readonly Role LChevron = new Role ("LChevron", CSharpTokenNode.Null);
- public static readonly Role RChevron = new Role ("RChevron", CSharpTokenNode.Null);
- public static readonly Role Comma = new Role ("Comma", CSharpTokenNode.Null);
- public static readonly Role Dot = new Role ("Dot", CSharpTokenNode.Null);
- public static readonly Role Semicolon = new Role ("Semicolon", CSharpTokenNode.Null);
- public static readonly Role Assign = new Role ("Assign", CSharpTokenNode.Null);
- public static readonly Role Colon = new Role ("Colon", CSharpTokenNode.Null);
- public static readonly Role Comment = new Role ("Comment");
- public static readonly Role PreProcessorDirective = new Role ("PreProcessorDirective");
- public static readonly Role Error = new Role ("Error");
-
- }
}
}
diff --git a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNodeCollection.cs b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNodeCollection.cs
index 1f1236e9cb..4e28849be4 100644
--- a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNodeCollection.cs
+++ b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstNodeCollection.cs
@@ -85,12 +85,16 @@ namespace ICSharpCode.NRefactory.CSharp
if (nodes != null)
nodes = nodes.ToList();
Clear();
- foreach (T node in nodes)
- Add(node);
+ if (nodes != null) {
+ foreach (T node in nodes)
+ Add(node);
+ }
}
public void MoveTo(ICollection targetCollection)
{
+ if (targetCollection == null)
+ throw new ArgumentNullException("targetCollection");
foreach (T node in this) {
node.Remove();
targetCollection.Add(node);
@@ -124,6 +128,31 @@ namespace ICSharpCode.NRefactory.CSharp
item.Remove();
}
+ ///
+ /// Returns the first element for which the predicate returns true,
+ /// or the null node (AstNode with IsNull=true) if no such object is found.
+ ///
+ public T FirstOrNullObject(Func predicate = null)
+ {
+ foreach (T item in this)
+ if (predicate == null || predicate(item))
+ return item;
+ return role.NullObject;
+ }
+
+ ///
+ /// Returns the last element for which the predicate returns true,
+ /// or the null node (AstNode with IsNull=true) if no such object is found.
+ ///
+ public T LastOrNullObject(Func predicate = null)
+ {
+ T result = role.NullObject;
+ foreach (T item in this)
+ if (predicate == null || predicate(item))
+ result = item;
+ return result;
+ }
+
bool ICollection.IsReadOnly {
get { return false; }
}
diff --git a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs
index 12925b60ba..71d8357091 100644
--- a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs
+++ b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/AstType.cs
@@ -18,6 +18,7 @@
using System;
using System.Collections.Generic;
+using ICSharpCode.NRefactory.CSharp.Resolver;
using ICSharpCode.NRefactory.TypeSystem;
namespace ICSharpCode.NRefactory.CSharp
@@ -38,7 +39,16 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
- public override S AcceptVisitor (IAstVisitor visitor, T data = default(T))
+ public override void AcceptVisitor (IAstVisitor visitor)
+ {
+ }
+
+ public override T AcceptVisitor (IAstVisitor visitor)
+ {
+ return default (T);
+ }
+
+ public override S AcceptVisitor (IAstVisitor visitor, T data)
{
return default (S);
}
@@ -47,6 +57,11 @@ namespace ICSharpCode.NRefactory.CSharp
{
return other == null || other.IsNull;
}
+
+ public override ITypeReference ToTypeReference(SimpleNameLookupMode lookupMode)
+ {
+ return SpecialType.UnknownType;
+ }
}
#endregion
@@ -69,9 +84,24 @@ namespace ICSharpCode.NRefactory.CSharp
get { return NodeType.Pattern; }
}
- public override S AcceptVisitor(IAstVisitor visitor, T data = default(T))
+ public override void AcceptVisitor (IAstVisitor visitor)
{
- return visitor.VisitPatternPlaceholder(this, child, data);
+ visitor.VisitPatternPlaceholder (this, child);
+ }
+
+ public override T AcceptVisitor (IAstVisitor visitor)
+ {
+ return visitor.VisitPatternPlaceholder (this, child);
+ }
+
+ public override S AcceptVisitor(IAstVisitor visitor, T data)
+ {
+ return visitor.VisitPatternPlaceholder (this, child, data);
+ }
+
+ public override ITypeReference ToTypeReference(SimpleNameLookupMode lookupMode)
+ {
+ throw new NotSupportedException();
}
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
@@ -95,6 +125,18 @@ namespace ICSharpCode.NRefactory.CSharp
return (AstType)base.Clone();
}
+ ///
+ /// Create an ITypeReference for this AstType.
+ ///
+ ///
+ /// The resulting type reference will read the context information from the
+ /// :
+ /// For resolving type parameters, the CurrentTypeDefinition/CurrentMember is used.
+ /// For resolving simple names, the current namespace and usings from the CurrentUsingScope
+ /// (on CSharpTypeResolveContext only) is used.
+ ///
+ public abstract ITypeReference ToTypeReference(SimpleNameLookupMode lookupMode = SimpleNameLookupMode.Type);
+
///
/// Creates a pointer type from this type by nesting it in a .
/// If this type already is a pointer type, this method just increases the PointerRank of the existing pointer type.
@@ -130,6 +172,26 @@ namespace ICSharpCode.NRefactory.CSharp
return new TypeReferenceExpression { Type = this }.Member(memberName);
}
+ ///
+ /// Builds an expression that can be used to access a static member on this type.
+ ///
+ public MemberType MemberType(string memberName, params AstType[] typeArguments)
+ {
+ var memberType = new MemberType(this, memberName);
+ memberType.TypeArguments.AddRange(typeArguments);
+ return memberType;
+ }
+
+ ///
+ /// Builds an expression that can be used to access a static member on this type.
+ ///
+ public MemberType MemberType(string memberName, IEnumerable typeArguments)
+ {
+ var memberType = new MemberType(this, memberName);
+ memberType.TypeArguments.AddRange(typeArguments);
+ return memberType;
+ }
+
///
/// Builds an invocation expression using this type as target.
///
@@ -153,42 +215,5 @@ namespace ICSharpCode.NRefactory.CSharp
{
return new TypeReferenceExpression { Type = this }.Invoke(methodName, typeArguments, arguments);
}
-
- public static AstType Create(Type type)
- {
- switch (Type.GetTypeCode(type)) {
- case TypeCode.Object:
- return new PrimitiveType("object");
- case TypeCode.Boolean:
- return new PrimitiveType("bool");
- case TypeCode.Char:
- return new PrimitiveType("char");
- case TypeCode.SByte:
- return new PrimitiveType("sbyte");
- case TypeCode.Byte:
- return new PrimitiveType("byte");
- case TypeCode.Int16:
- return new PrimitiveType("short");
- case TypeCode.UInt16:
- return new PrimitiveType("ushort");
- case TypeCode.Int32:
- return new PrimitiveType("int");
- case TypeCode.UInt32:
- return new PrimitiveType("uint");
- case TypeCode.Int64:
- return new PrimitiveType("long");
- case TypeCode.UInt64:
- return new PrimitiveType("ulong");
- case TypeCode.Single:
- return new PrimitiveType("float");
- case TypeCode.Double:
- return new PrimitiveType("double");
- case TypeCode.Decimal:
- return new PrimitiveType("decimal");
- case TypeCode.String:
- return new PrimitiveType("string");
- }
- return new SimpleType(type.FullName); // TODO: implement this correctly
- }
}
}
diff --git a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpModifierToken.cs b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpModifierToken.cs
index e9cc00ebe9..ac59c72460 100644
--- a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpModifierToken.cs
+++ b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpModifierToken.cs
@@ -29,19 +29,29 @@ using System.Linq;
namespace ICSharpCode.NRefactory.CSharp
{
-
public class CSharpModifierToken : CSharpTokenNode
{
Modifiers modifier;
public Modifiers Modifier {
get { return modifier; }
- set {
- this.tokenLength = GetModifierName(value).Length;
- this.modifier = value;
+ set {
+ ThrowIfFrozen();
+ this.modifier = value;
}
}
+ protected override int TokenLength {
+ get {
+ return GetModifierName (modifier).Length;
+ }
+ }
+
+ public override string GetText (CSharpFormattingOptions formattingOptions = null)
+ {
+ return GetModifierName (Modifier);
+ }
+
protected internal override bool DoMatch(AstNode other, PatternMatching.Match match)
{
CSharpModifierToken o = other as CSharpModifierToken;
@@ -65,7 +75,7 @@ namespace ICSharpCode.NRefactory.CSharp
get { return allModifiers; }
}
- public CSharpModifierToken (TextLocation location, Modifiers modifier) : base (location, 0)
+ public CSharpModifierToken (TextLocation location, Modifiers modifier) : base (location)
{
this.Modifier = modifier;
}
diff --git a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs
index 00bf53dfd2..04910ae181 100644
--- a/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs
+++ b/src/Libraries/NewNRefactory/ICSharpCode.NRefactory.CSharp/Ast/CSharpTokenNode.cs
@@ -27,7 +27,13 @@ using System;
namespace ICSharpCode.NRefactory.CSharp
{
- public class CSharpTokenNode : AstNode, IRelocatable
+ ///
+ /// Represents a token in C#. Note that the type of the token is defined through the TokenRole.
+ ///
+ ///
+ /// In all non null c# token nodes the Role of a CSharpToken must be a TokenRole.
+ ///
+ public class CSharpTokenNode : AstNode
{
public static new readonly CSharpTokenNode Null = new NullCSharpTokenNode ();
class NullCSharpTokenNode : CSharpTokenNode
@@ -38,11 +44,20 @@ namespace ICSharpCode.NRefactory.CSharp
}
}
- public NullCSharpTokenNode () : base (TextLocation.Empty, 0)
+ public NullCSharpTokenNode () : base (TextLocation.Empty)
{
}
- public override S AcceptVisitor (IAstVisitor visitor, T data = default(T))
+ public override void AcceptVisitor (IAstVisitor visitor)
+ {
+ }
+
+ public override T AcceptVisitor