diff --git a/SharpDevelop.Tests.sln b/SharpDevelop.Tests.sln
index 79b5b6de6df..56ccf4014b7 100644
--- a/SharpDevelop.Tests.sln
+++ b/SharpDevelop.Tests.sln
@@ -6,110 +6,110 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{256F5C28-5
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation.Tests", "src\Main\ICSharpCode.Core.Presentation\Test\ICSharpCode.Core.Presentation.Tests.csproj", "{FFA7988E-7348-4669-9E9D-27E629C873A2}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "src\Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom.Tests", "src\Main\ICSharpCode.SharpDevelop.Dom\Tests\ICSharpCode.SharpDevelop.Dom.Tests\ICSharpCode.SharpDevelop.Dom.Tests.csproj", "{7DB80259-24D4-46C3-A024-53FF1987733D}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "src\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Tests", "src\Main\Base\Test\ICSharpCode.SharpDevelop.Tests.csproj", "{4980B743-B32F-4aba-AABD-45E2CAD3568D}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "src\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Tests", "src\Main\Core\Test\ICSharpCode.Core.Tests.csproj", "{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "src\Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "src\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation", "src\Main\ICSharpCode.Core.Presentation\ICSharpCode.Core.Presentation.csproj", "{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "src\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "src\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "src\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "src\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation", "src\Main\ICSharpCode.Core.Presentation\ICSharpCode.Core.Presentation.csproj", "{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "src\Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "src\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Tests", "src\Main\Core\Test\ICSharpCode.Core.Tests.csproj", "{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "src\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Tests", "src\Main\Base\Test\ICSharpCode.SharpDevelop.Tests.csproj", "{4980B743-B32F-4aba-AABD-45E2CAD3568D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "src\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom.Tests", "src\Main\ICSharpCode.SharpDevelop.Dom\Tests\ICSharpCode.SharpDevelop.Dom.Tests\ICSharpCode.SharpDevelop.Dom.Tests.csproj", "{7DB80259-24D4-46C3-A024-53FF1987733D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "src\Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation.Tests", "src\Main\ICSharpCode.Core.Presentation\Test\ICSharpCode.Core.Presentation.Tests.csproj", "{FFA7988E-7348-4669-9E9D-27E629C873A2}"
+EndProject
Project("{00000000-0000-0000-0000-000000000000}") = "Tools", "src\Tools\Tools.build", "{3DF4060F-5EE0-41CF-8096-F27355FD5511}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{2A232EF1-EB95-41C6-B63A-C106E0C95D3C}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "src\Libraries\SharpTreeView\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit.Tests", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit.Tests\ICSharpCode.AvalonEdit.Tests.csproj", "{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "src\Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}"
+ ProjectSection(SolutionItems) = postProject
+ EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "src\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryTests", "src\Libraries\NRefactory\Test\NRefactoryTests.csproj", "{870115DD-960A-4406-A6B9-600BCDC36A03}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Build.Tasks", "src\Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryASTGenerator", "src\Libraries\NRefactory\NRefactoryASTGenerator\NRefactoryASTGenerator.csproj", "{B22522AA-B5BF-4A58-AC6D-D4B45805521F}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "src\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDock", "src\Libraries\AvalonDock\AvalonDock.csproj", "{2FF700C2-A38A-48BD-A637-8CAFD4FE6237}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}"
- ProjectSection(SolutionItems) = postProject
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "src\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryASTGenerator", "src\Libraries\NRefactory\NRefactoryASTGenerator\NRefactoryASTGenerator.csproj", "{B22522AA-B5BF-4A58-AC6D-D4B45805521F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Build.Tasks", "src\Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryTests", "src\Libraries\NRefactory\Test\NRefactoryTests.csproj", "{870115DD-960A-4406-A6B9-600BCDC36A03}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "src\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit.Tests", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit.Tests\ICSharpCode.AvalonEdit.Tests.csproj", "{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "src\Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "src\Libraries\SharpTreeView\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
@@ -118,132 +118,110 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{393278
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{F355E45F-F54F-4B42-8916-9A633A392789}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Language Bindings", "{E0646C25-36F2-4524-969F-FA621353AB94}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "src\AddIns\Misc\UnitTesting\Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}"
- ProjectSection(ProjectDependencies) = postProject
- {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
- EndProjectSection
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding.Tests", "src\AddIns\BackendBindings\VBNetBinding\Test\VBNetBinding.Tests.csproj", "{50A89267-A28B-4DF3-8E62-912E005143B8}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceAnalysis", "src\AddIns\Misc\SourceAnalysis\SourceAnalysis.csproj", "{CE498514-D12D-4B6E-AE0E-FEC29BD43748}"
- ProjectSection(ProjectDependencies) = postProject
- {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{97B3B514-AB0E-4FE1-89DE-8A945F5112AE}"
+ ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "src\AddIns\Misc\CodeCoverage\Project\CodeCoverage.csproj", "{08CE9972-283B-44F4-82FA-966F7DFA6B7A}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding.Tests", "src\AddIns\BackendBindings\Boo\BooBinding\Test\BooBinding.Tests.csproj", "{6FA16499-896F-4C02-BB43-1AF5C6C7C713}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\AddIns\Misc\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "src\AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "src\AddIns\Misc\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "src\AddIns\Misc\CodeCoverage\Test\CodeCoverage.Tests.csproj", "{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter.Tests", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Test\NRefactoryToBooConverter.Tests.csproj", "{C9DE556D-325C-4544-B29F-16A9EB7C9830}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{D599885D-E161-4CCE-A66E-7A40C8C4F4CC}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{CA76F702-5B4E-4918-B8D8-7FF8382434FF}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "src\AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}"
- ProjectSection(ProjectDependencies) = postProject
- {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "src\AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}"
- ProjectSection(ProjectDependencies) = postProject
- {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "src\AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "src\AddIns\BackendBindings\Python\PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}"
- ProjectSection(SolutionItems) = postProject
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor.Tests", "src\AddIns\DisplayBindings\XmlEditor\Test\XmlEditor.Tests.csproj", "{FC0FE702-A87D-4D70-A9B6-1ECCD611125F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks.Tests", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Test\Python.Build.Tasks.Tests.csproj", "{833904AB-3CD4-4071-9B48-5770E44685AA}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0773ED53-08E2-4495-A3BE-CA0B5D413C15}"
- ProjectSection(SolutionItems) = postProject
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "src\AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "src\AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "src\AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "src\AddIns\DisplayBindings\HexEditor\Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILAsmBinding", "src\AddIns\BackendBindings\ILAsmBinding\Project\ILAsmBinding.csproj", "{6E59AF58-F635-459A-9A35-C9AC41C00339}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "src\AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{E1B288A2-08EE-4318-8BBB-8AB72C69E33E}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkflowDesigner", "src\AddIns\DisplayBindings\WorkflowDesigner\Project\WorkflowDesigner.csproj", "{533F4684-DBA6-4518-B005-C84F22A2DD57}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "src\AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "src\AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "src\AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "src\AddIns\BackendBindings\XamlBinding\XamlBinding\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "src\AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{DCA2703D-250A-463E-A68A-07ED105AE6BD}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding.Tests", "src\AddIns\BackendBindings\XamlBinding\XamlBinding.Tests\XamlBinding.Tests.csproj", "{F390DA70-1FE1-4715-81A0-389AB010C130}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "src\AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding.Tests", "src\AddIns\BackendBindings\WixBinding\Test\WixBinding.Tests.csproj", "{388E7B64-0393-4EB4-A3E3-5C474F141853}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{BFA3BF26-33BD-4A65-B84D-C7F30D131668}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "src\AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Tests", "src\AddIns\Misc\Debugger\Debugger.Tests\Project\Debugger.Tests.csproj", "{A4C858C8-51B6-4265-A695-A20FCEBA1D19}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "src\AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "src\AddIns\Misc\Debugger\Debugger.Core\Project\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "src\AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "src\AddIns\Misc\Debugger\Debugger.AddIn\Project\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
@@ -252,37 +230,39 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{F3662720-9
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace.Tests", "src\AddIns\Misc\SearchAndReplace\Test\SearchAndReplace.Tests.csproj", "{A569DCC1-C608-45FD-B770-4F79335EF154}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShortcutsManagement", "src\AddIns\Misc\ShortcutsManagement\ShortcutsManagement\ShortcutsManagement.csproj", "{745869FF-80E9-4589-A366-E775D2103843}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit.Tests", "src\AddIns\Misc\ResourceToolkit\Test\ResourceToolkit.Tests.csproj", "{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectorAddIn", "src\AddIns\Misc\ReflectorAddIn\ReflectorAddIn\Project\ReflectorAddIn.csproj", "{8AA421C8-D7AF-4957-9F43-5135328ACB24}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "src\AddIns\Misc\SubversionAddIn\Project\SubversionAddIn.csproj", "{17F4D7E0-6933-4C2E-8714-FD7E98D625D5}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "src\AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "src\AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit", "src\AddIns\Misc\ResourceToolkit\Project\ResourceToolkit.csproj", "{461606BD-E824-4D0A-8CBA-01810B1F5E02}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "src\AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "src\AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "src\AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "src\AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlHelp2", "src\AddIns\Misc\HtmlHelp2\Project\HtmlHelp2.csproj", "{918487B7-2153-4618-BBB3-344DBDDF2A2A}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
@@ -292,150 +272,170 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HtmlHelp2JScriptGlobals", "
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlHelp2", "src\AddIns\Misc\HtmlHelp2\Project\HtmlHelp2.csproj", "{918487B7-2153-4618-BBB3-344DBDDF2A2A}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "src\AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "src\AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "src\AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "src\AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit", "src\AddIns\Misc\ResourceToolkit\Project\ResourceToolkit.csproj", "{461606BD-E824-4D0A-8CBA-01810B1F5E02}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "src\AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "src\AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "src\AddIns\Misc\SubversionAddIn\Project\SubversionAddIn.csproj", "{17F4D7E0-6933-4C2E-8714-FD7E98D625D5}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectorAddIn", "src\AddIns\Misc\ReflectorAddIn\ReflectorAddIn\Project\ReflectorAddIn.csproj", "{8AA421C8-D7AF-4957-9F43-5135328ACB24}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit.Tests", "src\AddIns\Misc\ResourceToolkit\Test\ResourceToolkit.Tests.csproj", "{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace.Tests", "src\AddIns\Misc\SearchAndReplace\Test\SearchAndReplace.Tests.csproj", "{A569DCC1-C608-45FD-B770-4F79335EF154}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShortcutsManagement", "src\AddIns\Misc\ShortcutsManagement\ShortcutsManagement\ShortcutsManagement.csproj", "{745869FF-80E9-4589-A366-E775D2103843}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}"
+ ProjectSection(SolutionItems) = postProject
+ EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{BFA3BF26-33BD-4A65-B84D-C7F30D131668}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "src\AddIns\Misc\Debugger\Debugger.AddIn\Project\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "src\AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "src\AddIns\Misc\Debugger\Debugger.Core\Project\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "src\AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Tests", "src\AddIns\Misc\Debugger\Debugger.Tests\Project\Debugger.Tests.csproj", "{A4C858C8-51B6-4265-A695-A20FCEBA1D19}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "src\AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Language Bindings", "{E0646C25-36F2-4524-969F-FA621353AB94}"
- ProjectSection(SolutionItems) = postProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "src\AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}"
+ ProjectSection(ProjectDependencies) = postProject
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding.Tests", "src\AddIns\BackendBindings\WixBinding\Test\WixBinding.Tests.csproj", "{388E7B64-0393-4EB4-A3E3-5C474F141853}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "src\AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{DCA2703D-250A-463E-A68A-07ED105AE6BD}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding.Tests", "src\AddIns\BackendBindings\XamlBinding\XamlBinding.Tests\XamlBinding.Tests.csproj", "{F390DA70-1FE1-4715-81A0-389AB010C130}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "src\AddIns\BackendBindings\XamlBinding\XamlBinding\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "src\AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "src\AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkflowDesigner", "src\AddIns\DisplayBindings\WorkflowDesigner\Project\WorkflowDesigner.csproj", "{533F4684-DBA6-4518-B005-C84F22A2DD57}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "src\AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "src\AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{E1B288A2-08EE-4318-8BBB-8AB72C69E33E}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "src\AddIns\DisplayBindings\HexEditor\Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILAsmBinding", "src\AddIns\BackendBindings\ILAsmBinding\Project\ILAsmBinding.csproj", "{6E59AF58-F635-459A-9A35-C9AC41C00339}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0773ED53-08E2-4495-A3BE-CA0B5D413C15}"
+ ProjectSection(SolutionItems) = postProject
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "src\AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{CA76F702-5B4E-4918-B8D8-7FF8382434FF}"
- ProjectSection(SolutionItems) = postProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "src\AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}"
+ ProjectSection(ProjectDependencies) = postProject
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "src\AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor.Tests", "src\AddIns\DisplayBindings\XmlEditor\Test\XmlEditor.Tests.csproj", "{FC0FE702-A87D-4D70-A9B6-1ECCD611125F}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{D599885D-E161-4CCE-A66E-7A40C8C4F4CC}"
+ ProjectSection(SolutionItems) = postProject
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "src\AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks.Tests", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Test\Python.Build.Tasks.Tests.csproj", "{833904AB-3CD4-4071-9B48-5770E44685AA}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "src\AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "src\AddIns\BackendBindings\Python\PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "src\AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{97B3B514-AB0E-4FE1-89DE-8A945F5112AE}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{F355E45F-F54F-4B42-8916-9A633A392789}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter.Tests", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Test\NRefactoryToBooConverter.Tests.csproj", "{C9DE556D-325C-4544-B29F-16A9EB7C9830}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "src\AddIns\Misc\CodeCoverage\Test\CodeCoverage.Tests.csproj", "{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "src\AddIns\Misc\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "src\AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\AddIns\Misc\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding.Tests", "src\AddIns\BackendBindings\Boo\BooBinding\Test\BooBinding.Tests.csproj", "{6FA16499-896F-4C02-BB43-1AF5C6C7C713}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "src\AddIns\Misc\CodeCoverage\Project\CodeCoverage.csproj", "{08CE9972-283B-44F4-82FA-966F7DFA6B7A}"
ProjectSection(ProjectDependencies) = postProject
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding.Tests", "src\AddIns\BackendBindings\VBNetBinding\Test\VBNetBinding.Tests.csproj", "{50A89267-A28B-4DF3-8E62-912E005143B8}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceAnalysis", "src\AddIns\Misc\SourceAnalysis\SourceAnalysis.csproj", "{CE498514-D12D-4B6E-AE0E-FEC29BD43748}"
+ ProjectSection(ProjectDependencies) = postProject
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "src\AddIns\Misc\UnitTesting\Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}"
+ ProjectSection(ProjectDependencies) = postProject
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
+ EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -768,95 +768,95 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {7DB80259-24D4-46C3-A024-53FF1987733D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
- {4980B743-B32F-4aba-AABD-45E2CAD3568D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
- {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
- {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
- {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
- {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
- {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
- {80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
- {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
- {8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
- {1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{FFA7988E-7348-4669-9E9D-27E629C873A2} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
- {6222A3A1-83CE-47A3-A4E4-A018F82D44D8} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
- {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
- {2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
- {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
- {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
- {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
- {E73BB233-D88B-44A7-A98F-D71EE158381D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
+ {1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
+ {8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
+ {80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
+ {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
+ {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
+ {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
+ {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
+ {4980B743-B32F-4aba-AABD-45E2CAD3568D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
+ {7DB80259-24D4-46C3-A024-53FF1987733D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
- {870115DD-960A-4406-A6B9-600BCDC36A03} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
- {B22522AA-B5BF-4A58-AC6D-D4B45805521F} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
+ {E73BB233-D88B-44A7-A98F-D71EE158381D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
+ {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
+ {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
+ {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
+ {2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
+ {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
+ {6222A3A1-83CE-47A3-A4E4-A018F82D44D8} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
- {E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
- {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
- {F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
- {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
- {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
+ {B22522AA-B5BF-4A58-AC6D-D4B45805521F} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
+ {870115DD-960A-4406-A6B9-600BCDC36A03} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{F355E45F-F54F-4B42-8916-9A633A392789} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
- {A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {F355E45F-F54F-4B42-8916-9A633A392789}
- {1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789}
- {3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789}
- {08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789}
- {CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789}
- {44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {F355E45F-F54F-4B42-8916-9A633A392789}
- {000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
- {E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
- {869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
- {BFA3BF26-33BD-4A65-B84D-C7F30D131668} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
- {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
- {DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
- {0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
- {CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
- {533F4684-DBA6-4518-B005-C84F22A2DD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
- {85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
- {E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
- {0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
- {FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
- {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15}
- {DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15}
- {0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
- {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
- {08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
- {745869FF-80E9-4589-A366-E775D2103843} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {8AA421C8-D7AF-4957-9F43-5135328ACB24} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {918487B7-2153-4618-BBB3-344DBDDF2A2A} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {E54A5AD2-418D-4A85-BA5E-CD803DE38715} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {DD9AE6A5-2B9D-443A-BC71-38BE578C36BD} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {A569DCC1-C608-45FD-B770-4F79335EF154} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
- {A4C858C8-51B6-4265-A695-A20FCEBA1D19} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
- {1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
- {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
- {50A89267-A28B-4DF3-8E62-912E005143B8} = {E0646C25-36F2-4524-969F-FA621353AB94}
- {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94}
- {CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94}
- {6E59AF58-F635-459A-9A35-C9AC41C00339} = {E0646C25-36F2-4524-969F-FA621353AB94}
- {E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94}
- {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94}
- {BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94}
- {7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94}
- {F390DA70-1FE1-4715-81A0-389AB010C130} = {E0646C25-36F2-4524-969F-FA621353AB94}
+ {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
+ {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
+ {F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
+ {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
+ {E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{388E7B64-0393-4EB4-A3E3-5C474F141853} = {E0646C25-36F2-4524-969F-FA621353AB94}
- {23B517C9-1ECC-4419-A13F-0B7136D085CB} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
- {833904AB-3CD4-4071-9B48-5770E44685AA} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
- {D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
- {8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
- {6FA16499-896F-4C02-BB43-1AF5C6C7C713} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
- {4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
- {DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
+ {F390DA70-1FE1-4715-81A0-389AB010C130} = {E0646C25-36F2-4524-969F-FA621353AB94}
+ {7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94}
+ {BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94}
+ {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94}
+ {E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94}
+ {6E59AF58-F635-459A-9A35-C9AC41C00339} = {E0646C25-36F2-4524-969F-FA621353AB94}
+ {CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94}
+ {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94}
+ {50A89267-A28B-4DF3-8E62-912E005143B8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{C9DE556D-325C-4544-B29F-16A9EB7C9830} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
+ {DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
+ {4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
+ {6FA16499-896F-4C02-BB43-1AF5C6C7C713} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
+ {8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
+ {D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
+ {833904AB-3CD4-4071-9B48-5770E44685AA} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
+ {23B517C9-1ECC-4419-A13F-0B7136D085CB} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
+ {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
+ {1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
+ {A4C858C8-51B6-4265-A695-A20FCEBA1D19} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
+ {A569DCC1-C608-45FD-B770-4F79335EF154} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {DD9AE6A5-2B9D-443A-BC71-38BE578C36BD} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {E54A5AD2-418D-4A85-BA5E-CD803DE38715} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {918487B7-2153-4618-BBB3-344DBDDF2A2A} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {8AA421C8-D7AF-4957-9F43-5135328ACB24} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {745869FF-80E9-4589-A366-E775D2103843} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
+ {0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
+ {E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
+ {85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
+ {533F4684-DBA6-4518-B005-C84F22A2DD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
+ {CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
+ {0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
+ {DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
+ {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
+ {BFA3BF26-33BD-4A65-B84D-C7F30D131668} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
+ {08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
+ {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
+ {0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
+ {DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15}
+ {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15}
+ {869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
+ {E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
+ {000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC}
+ {44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {F355E45F-F54F-4B42-8916-9A633A392789}
+ {CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789}
+ {08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789}
+ {3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789}
+ {1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789}
+ {A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {F355E45F-F54F-4B42-8916-9A633A392789}
EndGlobalSection
EndGlobal
diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/TextAreaDefaultInputHandlers.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/TextAreaDefaultInputHandlers.cs
index ed669ed385f..6ac0cf37137 100644
--- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/TextAreaDefaultInputHandlers.cs
+++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Editing/TextAreaDefaultInputHandlers.cs
@@ -68,11 +68,6 @@ public TextAreaDefaultInputHandler(TextArea textArea) : base(textArea)
this.NestedInputHandlers.Add(CaretNavigation = CaretNavigationCommandHandler.Create(textArea));
this.NestedInputHandlers.Add(Editing = EditingCommandHandler.Create(textArea));
this.NestedInputHandlers.Add(MouseSelection = new SelectionMouseHandler(textArea));
-
- // TODO: DELETE
-
- // this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Undo, ExecuteUndo, CanExecuteUndo));
- // this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Redo, ExecuteRedo, CanExecuteRedo));
}
#region Undo / Redo
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingGroup.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingGroup.cs
index 235f492cd59..d8305e99672 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingGroup.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingGroup.cs
@@ -1,4 +1,5 @@
using System;
+using System.Linq;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
@@ -9,109 +10,159 @@
namespace ICSharpCode.Core.Presentation
{
- ///
- /// Description of BindingGroup.
- ///
- public class BindingGroup
- {
- private HashSet _attachedInstances = new HashSet(new WeakReferenceEqualirtyComparer());
-
- private List _nestedGroups = new List();
-
-
- public string Name
- {
- get; set;
- }
-
- public bool IsAttachedTo(UIElement instance)
- {
- return _attachedInstances.Contains(new WeakReference(instance));
- }
-
- public void AttachTo(UIElement instance)
- {
- AttachToWithoutInvoke(instance);
- InvokeBindingUpdateHandlers(instance);
- }
-
- private void AttachToWithoutInvoke(UIElement instance)
- {
- _attachedInstances.Add(new WeakReference(instance));
-
- foreach(var nestedGroup in _nestedGroups) {
- nestedGroup.AttachToWithoutInvoke(instance);
- }
- }
-
- public void DetachFromWithoutInvoke(UIElement instance)
- {
- _attachedInstances.Remove(new WeakReference(instance));
-
- foreach(var nestedGroup in _nestedGroups) {
- nestedGroup.DetachFrom(instance);
- }
- }
-
- public void DetachFrom(UIElement instance)
- {
- DetachFromWithoutInvoke(instance);
- InvokeBindingUpdateHandlers(instance);
- }
-
- private void InvokeBindingUpdateHandlers(UIElement instance)
- {
- var i = 0;
-
- // Invoke class wide and instance update handlers
- var instanceNames = CommandManager.GetUIElementNameCollection(instance);
- var typeNames = CommandManager.GetUITypeNameCollection(instance.GetType());
-
- var bindingInfoTemplates = new BindingInfoTemplate[instanceNames.Count + typeNames.Count];
-
- foreach(var instanceName in instanceNames) {
- bindingInfoTemplates[i++] = new BindingInfoTemplate { OwnerInstanceName = instanceName };
- }
-
- foreach(var typeName in typeNames) {
- bindingInfoTemplates[i++] = new BindingInfoTemplate { OwnerTypeName = typeName };
- }
-
- CommandManager.InvokeCommandBindingUpdateHandlers(
- BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
- bindingInfoTemplates);
-
- CommandManager.InvokeInputBindingUpdateHandlers(
- BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
- bindingInfoTemplates);
- }
-
- public List NestedGroups
- {
- get {
- return _nestedGroups;
- }
- }
-
- public ICollection FlatNestedGroups
- {
- get {
- var foundNestedGroups = new HashSet();
- FlattenNestedGroups(this, foundNestedGroups);
-
- return foundNestedGroups;
- }
- }
-
- internal void FlattenNestedGroups(BindingGroup rootGroup, HashSet foundGroups)
- {
- foundGroups.Add(rootGroup);
-
- foreach(var nestedGroup in NestedGroups) {
- if(foundGroups.Add(nestedGroup)) {
- FlattenNestedGroups(nestedGroup, foundGroups);
- }
- }
- }
+ ///
+ /// Description of BindingGroup.
+ ///
+ public class BindingGroup
+ {
+ private HashSet _attachedInstances = new HashSet(new WeakReferenceEqualirtyComparer());
+
+ private List _nestedGroups = new List();
+
+ public string Name
+ {
+ get; set;
+ }
+
+ public bool IsAttachedTo(UIElement instance)
+ {
+ foreach(var nestedGroup in FlatNestedGroups) {
+ if(nestedGroup._attachedInstances.Contains(new WeakReference(instance))) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public void AttachTo(UIElement instance)
+ {
+ AttachToWithoutInvoke(instance);
+ InvokeBindingUpdateHandlers(instance, true);
+ }
+
+ private void AttachToWithoutInvoke(UIElement instance)
+ {
+ _attachedInstances.Add(new WeakReference(instance));
+
+ foreach(var nestedGroup in _nestedGroups) {
+ nestedGroup.AttachToWithoutInvoke(instance);
+ }
+ }
+
+ public void DetachFromWithoutInvoke(UIElement instance)
+ {
+ _attachedInstances.Remove(new WeakReference(instance));
+
+ foreach(var nestedGroup in _nestedGroups) {
+ nestedGroup.DetachFrom(instance);
+ }
+ }
+
+ public void DetachFrom(UIElement instance)
+ {
+ DetachFromWithoutInvoke(instance);
+ InvokeBindingUpdateHandlers(instance, false);
+ }
+
+ private void InvokeBindingUpdateHandlers(UIElement instance, bool attaching)
+ {
+ var type = instance.GetType();
+
+ // Invoke class wide and instance update handlers
+ var instanceNames = CommandManager.GetUIElementNameCollection(instance);
+ var typeNames = CommandManager.GetUITypeNameCollection(type);
+
+ var bindingInfoTemplates = new IBindingInfoTemplate[instanceNames.Count + typeNames.Count + 1];
+
+ var i = 0;
+
+ bindingInfoTemplates[i++] = new BindingInfoTemplate { Groups = new BindingGroupCollection { this } };
+
+ foreach(var instanceName in instanceNames) {
+ bindingInfoTemplates[i++] = new BindingInfoTemplate { OwnerInstanceName = instanceName};
+ }
+
+ foreach(var typeName in typeNames) {
+ bindingInfoTemplates[i++] = new BindingInfoTemplate { OwnerTypeName = typeName};
+ }
+
+ var args = new BindingsUpdatedHandlerArgs();
+ if(attaching) {
+ args.AddedInstances = new List{ instance };
+ } else {
+ args.RemovedInstances = new List{ instance };
+ }
+
+ CommandManager.InvokeCommandBindingUpdateHandlers(
+ this,
+ args,
+ BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
+ bindingInfoTemplates);
+
+ CommandManager.InvokeInputBindingUpdateHandlers(
+ this,
+ args,
+ BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
+ bindingInfoTemplates);
+ }
+
+ public ICollection GetAttachedInstances(ICollection types)
+ {
+ var attachedInstances = new HashSet();
+ foreach(var nestedGroup in FlatNestedGroups) {
+ foreach(var wr in nestedGroup._attachedInstances) {
+ var wrTarget = (UIElement)wr.Target;
+ if(wrTarget != null && types.Any(t => t.IsInstanceOfType(wrTarget))) {
+ attachedInstances.Add(wrTarget);
+ }
+ }
+ }
+
+ return attachedInstances;
+ }
+
+ public ICollection GetAttachedInstances(ICollection instances)
+ {
+ var attachedInstances = new HashSet();
+ foreach(var nestedGroup in FlatNestedGroups) {
+ foreach(var wr in nestedGroup._attachedInstances) {
+ var wrTarget = (UIElement)wr.Target;
+ if(wrTarget != null && instances.Contains(wrTarget)) {
+ attachedInstances.Add(wrTarget);
+ }
+ }
+ }
+
+ return attachedInstances;
+ }
+
+ public List NestedGroups
+ {
+ get {
+ return _nestedGroups;
+ }
+ }
+
+ public ICollection FlatNestedGroups
+ {
+ get {
+ var foundNestedGroups = new HashSet();
+ FlattenNestedGroups(this, foundNestedGroups);
+
+ return foundNestedGroups;
+ }
+ }
+
+ internal void FlattenNestedGroups(BindingGroup rootGroup, HashSet foundGroups)
+ {
+ foundGroups.Add(rootGroup);
+
+ foreach(var nestedGroup in NestedGroups) {
+ if(foundGroups.Add(nestedGroup)) {
+ FlattenNestedGroups(nestedGroup, foundGroups);
+ }
+ }
+ }
}
}
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingGroupCollection.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingGroupCollection.cs
index 7e91c0c9bdd..bb3fb8bc576 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingGroupCollection.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingGroupCollection.cs
@@ -9,16 +9,20 @@
namespace ICSharpCode.Core.Presentation
{
- public class BindingGroupCollection : ICollection
+ public class BindingGroupCollection : IObservableCollection
{
private ObservableCollection _bindingGroups = new ObservableCollection();
+ private event NotifyCollectionChangedEventHandler _bindingGroupsCollectionChanged;
+
public event NotifyCollectionChangedEventHandler CollectionChanged
{
add {
+ _bindingGroupsCollectionChanged += value;
_bindingGroups.CollectionChanged += value;
}
remove {
+ _bindingGroupsCollectionChanged -= value;
_bindingGroups.CollectionChanged -= value;
}
}
@@ -62,6 +66,30 @@ public bool IsAttachedToAny(ICollection instances)
return false;
}
+ public ICollection GetAttachedInstances(ICollection types)
+ {
+ var instances = new HashSet();
+ foreach(var group in FlatNesteGroups) {
+ foreach(var instance in group.GetAttachedInstances(types)) {
+ instances.Add(instance);
+ }
+ }
+
+ return instances;
+ }
+
+ public ICollection GetAttachedInstances(ICollection instances)
+ {
+ var attachedInstances = new HashSet();
+ foreach(var group in FlatNesteGroups) {
+ foreach(var instance in group.GetAttachedInstances(instances)) {
+ attachedInstances.Add(instance);
+ }
+ }
+
+ return attachedInstances;
+ }
+
public int Count {
get {
return _bindingGroups.Count;
@@ -87,7 +115,20 @@ public void Add(BindingGroup bindingGroup)
public void Clear()
{
- _bindingGroups.Clear();
+ var itemsBackup = _bindingGroups;
+
+ _bindingGroups = new ObservableCollection();
+ foreach(NotifyCollectionChangedEventHandler handler in _bindingGroupsCollectionChanged.GetInvocationList()) {
+ _bindingGroups.CollectionChanged += handler;
+ }
+
+ if(_bindingGroupsCollectionChanged != null) {
+ _bindingGroupsCollectionChanged.Invoke(
+ this,
+ new NotifyCollectionChangedEventArgs(
+ NotifyCollectionChangedAction.Remove,
+ itemsBackup));
+ }
}
public bool ContainsNestedAny(BindingGroupCollection bindingGroups)
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoBase.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoBase.cs
new file mode 100644
index 00000000000..4c0930ee960
--- /dev/null
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoBase.cs
@@ -0,0 +1,270 @@
+using System;
+using System.Linq;
+using System.Windows;
+using System.Windows.Input;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Collections.ObjectModel;
+using SDCommandManager=ICSharpCode.Core.Presentation.CommandManager;
+
+namespace ICSharpCode.Core.Presentation
+{
+ ///
+ /// Description of BindingInfoBase.
+ ///
+ abstract public class BindingInfoBase : IBindingInfo, IBindingInfoTemplate
+ {
+ private BindingGroupCollection _groups;
+
+ public BindingGroupCollection Groups
+ {
+ get {
+ return _groups;
+ }
+ set {
+ if(value == null) {
+ throw new ArgumentNullException("value");
+ }
+
+ _groups = value;
+ }
+ }
+
+ public string _ownerInstanceName;
+
+ ///
+ /// Stores name of named instance to which this binding belongs. When this binding is registered a
+ /// is assigned to owner instance
+ ///
+ /// If this attribute is used , and
+ /// can not be set
+ ///
+ public virtual string OwnerInstanceName {
+ get {
+ return _ownerInstanceName;
+ }
+ set {
+ if(_ownerInstanceName != null || _ownerTypeName != null) {
+ throw new ArgumentException("This binding already has an owner");
+ }
+
+ _ownerInstanceName = value;
+ }
+ }
+
+ ///
+ /// Stores owner instance to which this binding belongs. When this binding is registered a
+ /// is assigned to owner instance
+ ///
+ /// If this attribute is used , and
+ /// can not be set
+ ///
+ public ICollection OwnerInstances {
+ get {
+ if(_ownerInstanceName != null) {
+ return SDCommandManager.GetNamedUIElementCollection(_ownerInstanceName);
+ }
+
+ return null;
+ }
+ }
+
+ private string _ownerTypeName;
+
+ ///
+ /// Stores name of owner type. Full name with assembly should be used. When this binding is
+ /// registered is assigned to all instances of provided class
+ ///
+ /// If this attribute is used , and
+ /// can not be set
+ ///
+ public virtual string OwnerTypeName
+ {
+ get {
+ return _ownerTypeName;
+ }
+ set {
+ if(_ownerInstanceName != null || _ownerTypeName != null) {
+ throw new ArgumentException("This binding already has an owner");
+ }
+
+ _ownerTypeName = value;
+ }
+ }
+
+ ///
+ /// Stores owner type. When this binding is registered
+ /// is assigned to all instances of provided class
+ ///
+ /// If this attribute is used , and
+ /// can not be set
+ ///
+ public ICollection OwnerTypes {
+ get {
+ if(_ownerTypeName != null) {
+ return SDCommandManager.GetNamedUITypeCollection(_ownerTypeName);
+ }
+
+ return null;
+ }
+ }
+
+ ///
+ /// Routed command text
+ ///
+ /// Override routed command text when displaying to user
+ ///
+ ///
+ public string RoutedCommandText {
+ get; set;
+ }
+
+ private string routedCommandName;
+
+ ///
+ /// Name of the routed command which will be invoked when this binding is triggered
+ ///
+ public virtual string RoutedCommandName {
+ get {
+ return routedCommandName;
+ }
+ set {
+ routedCommandName = value;
+ }
+ }
+
+ ///
+ /// Routed command instance which will be invoked when this binding is triggered
+ ///
+ public RoutedUICommand RoutedCommand {
+ get {
+ return SDCommandManager.GetRoutedUICommand(RoutedCommandName);
+ }
+ }
+
+ public bool IsRegistered
+ {
+ get; set;
+ }
+
+ ///
+ /// Add-in to which registered this input binding
+ ///
+ public AddIn AddIn {
+ get; set;
+ }
+
+ public InputBindingIdentifier Identifier {
+ get {
+ var identifier = new InputBindingIdentifier();
+ identifier.OwnerInstanceName = OwnerInstanceName;
+ identifier.OwnerTypeName = OwnerTypeName;
+ identifier.RoutedCommandName = RoutedCommandName;
+
+ return identifier;
+ }
+ }
+
+ public void SetCollectionChanged(IObservableCollection oldObservableCollection, IObservableCollection newObservableCollection, NotifyCollectionChangedEventHandler handler)
+ {
+ newObservableCollection.CollectionChanged += handler;
+
+ if(oldObservableCollection != null) {
+ oldObservableCollection.CollectionChanged -= handler;
+
+ var oldItems = new System.Collections.ArrayList();
+ foreach(var oldItem in oldObservableCollection) {
+ oldItems.Add(oldItem);
+ }
+
+ var newItems = new System.Collections.ArrayList();
+ foreach(var newItem in newObservableCollection) {
+ newItems.Add(newItem);
+ }
+
+ handler.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, newItems, oldItems, 0));
+ }
+ }
+
+ private BindingsUpdatedHandler defaultCommandBindingHandler;
+
+ ///
+ /// Updates owner bindings
+ ///
+ public BindingsUpdatedHandler DefaultBindingsUpdateHandler
+ {
+ get {
+ if(defaultCommandBindingHandler == null && OwnerTypeName != null) {
+ defaultCommandBindingHandler = delegate(object sender, BindingsUpdatedHandlerArgs args) {
+ var ownerTypes = OwnerTypes;
+
+ if(RoutedCommand != null && OwnerTypes != null && IsRegistered) {
+ GenerateBindings();
+
+ if(Groups.Count == 0) {
+ var groupInstances = Groups.GetAttachedInstances(ownerTypes);
+ SetInstanceBindings(groupInstances, null);
+
+ var removedOwnerTypes = new List(ownerTypes);
+ if(args.RemovedTypes != null) {
+ removedOwnerTypes.AddRange(args.RemovedTypes);
+ }
+
+ SetClassBindings(removedOwnerTypes, ownerTypes);
+ } else {
+ SetClassBindings(ownerTypes, null);
+
+ var groupInstances = Groups.GetAttachedInstances(ownerTypes);
+ var removedOwnerInstances = new List(groupInstances);
+ if(args.RemovedInstances != null) {
+ removedOwnerInstances.AddRange(args.RemovedInstances);
+ }
+
+ SetInstanceBindings(removedOwnerInstances, groupInstances);
+ }
+ }
+ };
+ } else if(defaultCommandBindingHandler == null && OwnerInstanceName != null) {
+ defaultCommandBindingHandler = delegate(object sender, BindingsUpdatedHandlerArgs args) {
+ if(RoutedCommand != null && OwnerInstances != null && IsRegistered) {
+ GenerateBindings();
+
+ if(Groups.Count == 0) {
+ SetInstanceBindings(OwnerInstances, OwnerInstances);
+ } else {
+ var removedInstances = new List(OwnerInstances);
+ if(args.RemovedInstances != null) {
+ removedInstances.AddRange(args.RemovedInstances);
+ }
+
+ SetInstanceBindings(removedInstances, Groups.GetAttachedInstances(OwnerInstances));
+ }
+ }
+ };
+ }
+
+ return defaultCommandBindingHandler;
+ }
+ }
+
+ public void RemoveActiveBindings()
+ {
+ if(OwnerTypeName != null) {
+ if(Groups.Count > 0) {
+ SetInstanceBindings(Groups.GetAttachedInstances(OwnerTypes), null);
+ }
+
+ SetClassBindings(OwnerTypes, null);
+ } else if(OwnerInstanceName != null) {
+ SetInstanceBindings(OwnerInstances, null);
+ }
+ }
+
+ protected abstract void GenerateBindings();
+
+ protected abstract void SetInstanceBindings(ICollection oldInstances, ICollection newInstances);
+
+ protected abstract void SetClassBindings(ICollection oldTypes, ICollection newtTypes);
+ }
+}
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoTemplate.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoTemplate.cs
index 64e6a6b55f5..3979969ae07 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoTemplate.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoTemplate.cs
@@ -1,4 +1,5 @@
using System;
+using System.Linq;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Input;
@@ -6,28 +7,8 @@
namespace ICSharpCode.Core.Presentation
{
- ///
- /// Description of BindingInfoTemplate.
- ///
- public struct BindingInfoTemplate
+ public class BindingInfoTemplate : IBindingInfoTemplate
{
- static List properties;
-
- static PropertyInfo OwnerInstanceNameProperty;
- static PropertyInfo OwnerTypeNameProperty;
- static PropertyInfo RoutedCommandNameProperty;
- static PropertyInfo GroupProperty;
-
- static BindingInfoTemplate()
- {
- var t = typeof(BindingInfoTemplate);
- properties = new List(4);
- properties.Add(OwnerInstanceNameProperty = t.GetProperty("OwnerInstanceName"));
- properties.Add(OwnerTypeNameProperty = t.GetProperty("OwnerTypeName"));
- properties.Add(RoutedCommandNameProperty = t.GetProperty("RoutedCommandName"));
- properties.Add(GroupProperty = t.GetProperty("Group"));
- }
-
public string OwnerInstanceName
{
get; set;
@@ -43,96 +24,167 @@ public string RoutedCommandName
get; set;
}
- public BindingGroup Group
+ public BindingGroupCollection Groups
{
get; set;
}
-
- public List GetWildCardTemplates()
+
+ public BindingInfoTemplate()
{
- var notNullProperties = GetNotNullProperties();
- var notNullPropertiesCopy = new List(notNullProperties);
- var generatedTemplates = new List((int)Math.Pow(2, notNullProperties.Count));
- generatedTemplates.Add(this);
- GetWildCardTemplatesRecursive(notNullPropertiesCopy, this, generatedTemplates);
-
- return generatedTemplates;
}
- private void GetWildCardTemplatesRecursive(List notNullPropertiesCollection, BindingInfoTemplate rootTemplate, List generatedTemplates)
+ public BindingInfoTemplate(IBindingInfoTemplate template, bool includeGroup)
{
- foreach(var property in notNullPropertiesCollection) {
- var nestedNotNullPropertiesCollection = new List(notNullPropertiesCollection);
- nestedNotNullPropertiesCollection.Remove(property);
-
- var template = new BindingInfoTemplate();
-
- template.OwnerInstanceName = rootTemplate.OwnerInstanceName;
- template.OwnerTypeName = rootTemplate.OwnerTypeName;
- template.RoutedCommandName = rootTemplate.RoutedCommandName;
- template.Group = rootTemplate.Group;
-
- if(property == OwnerInstanceNameProperty) {
- template.OwnerInstanceName = null;
- } else if(property == OwnerTypeNameProperty) {
- template.OwnerTypeName = null;
- } else if(property == RoutedCommandNameProperty) {
- template.RoutedCommandName = null;
- } else if(property == GroupProperty) {
- template.Group = null;
- }
-
- generatedTemplates.Add(template);
-
- GetWildCardTemplatesRecursive(nestedNotNullPropertiesCollection, template, generatedTemplates);
- GetWildCardTemplatesRecursive(nestedNotNullPropertiesCollection, rootTemplate, generatedTemplates);
+ OwnerInstanceName = template.OwnerInstanceName;
+ OwnerTypeName = template.OwnerTypeName;
+ RoutedCommandName = template.RoutedCommandName;
+ if(includeGroup) {
+ Groups = template.Groups;
}
}
+ }
+
+ public interface IBindingInfoTemplate
+ {
+ string OwnerInstanceName
+ {
+ get; set;
+ }
+
+ string OwnerTypeName
+ {
+ get; set;
+ }
+
+ string RoutedCommandName
+ {
+ get; set;
+ }
- public bool IsTemplateFor(IBindingInfo binding, BindingInfoMatchType matchType)
+ BindingGroupCollection Groups
+ {
+ get; set;
+ }
+
+// public List GetWildCardTemplates()
+// {
+// var notNullProperties = GetNotNullProperties();
+// var notNullPropertiesCopy = new List(notNullProperties);
+// var generatedTemplates = new List((int)Math.Pow(2, notNullProperties.Count));
+// generatedTemplates.Add(this);
+//
+// GetWildCardTemplatesRecursive(notNullPropertiesCopy, this, generatedTemplates);
+//
+// return generatedTemplates;
+// }
+//
+// static List properties;
+//
+// static PropertyInfo OwnerInstanceNameProperty;
+// static PropertyInfo OwnerTypeNameProperty;
+// static PropertyInfo RoutedCommandNameProperty;
+// static PropertyInfo GroupProperty;
+//
+// static BindingInfoTemplate()
+// {
+// var t = typeof(BindingInfoTemplate);
+// properties = new List(4);
+// properties.Add(OwnerInstanceNameProperty = t.GetProperty("OwnerInstanceName"));
+// properties.Add(OwnerTypeNameProperty = t.GetProperty("OwnerTypeName"));
+// properties.Add(RoutedCommandNameProperty = t.GetProperty("RoutedCommandName"));
+// properties.Add(GroupProperty = t.GetProperty("Group"));
+// }
+//
+// private void GetWildCardTemplatesRecursive(List notNullPropertiesCollection, BindingInfoTemplate rootTemplate, List generatedTemplates)
+// {
+// foreach(var property in notNullPropertiesCollection) {
+// var nestedNotNullPropertiesCollection = new List(notNullPropertiesCollection);
+// nestedNotNullPropertiesCollection.Remove(property);
+//
+// var template = new BindingInfoTemplate();
+//
+// template.OwnerInstanceName = rootTemplate.OwnerInstanceName;
+// template.OwnerTypeName = rootTemplate.OwnerTypeName;
+// template.RoutedCommandName = rootTemplate.RoutedCommandName;
+// template.Group = rootTemplate.Group;
+//
+// if(property == OwnerInstanceNameProperty) {
+// template.OwnerInstanceName = null;
+// } else if(property == OwnerTypeNameProperty) {
+// template.OwnerTypeName = null;
+// } else if(property == RoutedCommandNameProperty) {
+// template.RoutedCommandName = null;
+// } else if(property == GroupProperty) {
+// template.Group = null;
+// }
+//
+// generatedTemplates.Add(template);
+//
+// GetWildCardTemplatesRecursive(nestedNotNullPropertiesCollection, template, generatedTemplates);
+// GetWildCardTemplatesRecursive(nestedNotNullPropertiesCollection, rootTemplate, generatedTemplates);
+// }
+// }
+//
+// public List GetNotNullProperties()
+// {
+// var notNullProperties = new List();
+// foreach(var property in properties) {
+// if(property.GetValue(this, null) != null) {
+// notNullProperties.Add(property);
+// }
+// }
+//
+// return notNullProperties;
+// }
+ }
+
+ public static class IBindingInfoTemplateExtensions
+ {
+ public static bool IsTemplateFor(this IBindingInfoTemplate thisTemplate, IBindingInfoTemplate binding, BindingInfoMatchType matchType)
{
var bindingOwnerInstanceName = binding.OwnerInstanceName;
var bindingOwnerTypeName = binding.OwnerTypeName;
var bindingRoutedCommandName = binding.RoutedCommandName;
var bindingGroups = binding.Groups;
- var templateOwnerInstanceName = this.OwnerInstanceName;
- var templateOwnerTypeName = this.OwnerTypeName;
- var templateRoutedCommandName = this.RoutedCommandName;
- var templateGroup = this.Group;
+ var templateOwnerInstanceName = thisTemplate.OwnerInstanceName;
+ var templateOwnerTypeName = thisTemplate.OwnerTypeName;
+ var templateRoutedCommandName = thisTemplate.RoutedCommandName;
+ var templateGroups = thisTemplate.Groups;
+
+ if(bindingOwnerTypeName == "ICSharpCode.AvalonEdit.Editing.TextArea, ICSharpCode.AvalonEdit")
+ {
+
+ }
+
+ var groupsOverlap = templateGroups != null && bindingGroups != null && bindingGroups.ContainsAnyFromCollection(templateGroups);
+
+ var exactMatch = false;
+ if((matchType & BindingInfoMatchType.Exact) == BindingInfoMatchType.Exact) {
+ exactMatch = templateOwnerInstanceName == bindingOwnerInstanceName
+ && templateOwnerTypeName == bindingOwnerTypeName
+ && templateRoutedCommandName == bindingRoutedCommandName
+ && ((templateGroups == null && bindingGroups == null) || groupsOverlap);
+ }
- var groupsOverlap = templateGroup != null && bindingGroups != null && bindingGroups.Contains(templateGroup);
-
var superSetMatch = false;
if((matchType & BindingInfoMatchType.SuperSet) == BindingInfoMatchType.SuperSet) {
superSetMatch = (templateOwnerInstanceName == null || templateOwnerInstanceName == bindingOwnerInstanceName)
&& (templateOwnerTypeName == null || templateOwnerTypeName == bindingOwnerTypeName)
&& (templateRoutedCommandName == null || templateRoutedCommandName == bindingRoutedCommandName)
- && (templateGroup == null || groupsOverlap);
+ && (templateGroups == null || templateGroups.Count == 0 || groupsOverlap);
}
var subSetMatch = false;
if((matchType & BindingInfoMatchType.SubSet) == BindingInfoMatchType.SubSet) {
- subSetMatch = (templateOwnerInstanceName != null && templateOwnerInstanceName == bindingOwnerInstanceName)
- || (templateOwnerTypeName != null && templateOwnerTypeName == bindingOwnerTypeName)
- || (templateRoutedCommandName != null && templateRoutedCommandName == bindingRoutedCommandName)
- || (templateGroup != null && groupsOverlap);
+ subSetMatch = (bindingOwnerInstanceName == null || templateOwnerInstanceName == bindingOwnerInstanceName)
+ && (bindingOwnerTypeName == null || templateOwnerTypeName == bindingOwnerTypeName)
+ && (bindingRoutedCommandName == null || templateRoutedCommandName == bindingRoutedCommandName)
+ && (bindingGroups == null || bindingGroups.Count == 0 || groupsOverlap);
}
return subSetMatch || superSetMatch;
}
-
- public List GetNotNullProperties()
- {
- var notNullProperties = new List();
- foreach(var property in properties) {
- if(property.GetValue(this, null) != null) {
- notNullProperties.Add(property);
- }
- }
-
- return notNullProperties;
- }
- }
+ }
}
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoTemplateDictionary.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoTemplateDictionary.cs
index c9e2f2924da..334894b5014 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoTemplateDictionary.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingInfoTemplateDictionary.cs
@@ -12,27 +12,18 @@ namespace ICSharpCode.Core.Presentation
///
public class BindingInfoTemplateDictionary
{
- private Dictionary> superSetDictionary = new Dictionary>();
- private Dictionary> subSetDictionary = new Dictionary>();
-
- public void Add(BindingInfoTemplate template, T item)
+ private Dictionary> dictionary = new Dictionary>(new IBindingInfoTemplateEqualityComparer());
+
+ public void Add(IBindingInfoTemplate template, T item)
{
- if(!superSetDictionary.ContainsKey(template)) {
- superSetDictionary.Add(template, new HashSet());
+ if(!dictionary.ContainsKey(template)) {
+ dictionary.Add(template, new HashSet());
}
- superSetDictionary[template].Add(item);
-
- foreach(var wildCardTemplate in template.GetWildCardTemplates()) {
- if(!subSetDictionary.ContainsKey(wildCardTemplate)) {
- subSetDictionary.Add(wildCardTemplate, new HashSet());
- }
-
- subSetDictionary[wildCardTemplate].Add(item);
- }
+ dictionary[template].Add(item);
}
- public HashSet FindItems(BindingInfoTemplate template, BindingInfoMatchType matchType)
+ public HashSet FindItems(IBindingInfoTemplate template, BindingInfoMatchType matchType)
{
var allItems = new HashSet();
@@ -45,50 +36,23 @@ public HashSet FindItems(BindingInfoTemplate template, BindingInfoMatchType m
return allItems;
}
- public IEnumerable> FindBuckets(BindingInfoTemplate template, BindingInfoMatchType matchType)
+ public IEnumerable> FindBuckets(IBindingInfoTemplate template, BindingInfoMatchType matchType)
{
- if((matchType & BindingInfoMatchType.Exact) == BindingInfoMatchType.Exact) {
- HashSet items;
- superSetDictionary.TryGetValue(template, out items);
-
- if(items != null) {
- yield return items;
- }
- }
-
- if((matchType & BindingInfoMatchType.SubSet) == BindingInfoMatchType.SubSet) {
- foreach(var wildCardTemplate in template.GetWildCardTemplates()) {
- HashSet items;
- superSetDictionary.TryGetValue(wildCardTemplate, out items);
-
- if(items != null) {
- yield return items;
- }
- }
- }
-
- if((matchType & BindingInfoMatchType.SuperSet) == BindingInfoMatchType.SuperSet) {
- HashSet items;
- subSetDictionary.TryGetValue(template, out items);
-
- if(items != null) {
- yield return items;
+ foreach(var pair in dictionary) {
+ if(template.IsTemplateFor(pair.Key, matchType)) {
+ yield return pair.Value;
}
}
}
public void Remove(T item)
{
- foreach(var pair in subSetDictionary) {
- pair.Value.Remove(item);
- }
-
- foreach(var pair in superSetDictionary) {
+ foreach(var pair in dictionary) {
pair.Value.Remove(item);
}
}
- public void Remove(BindingInfoTemplate template, BindingInfoMatchType matchType, T item)
+ public void Remove(IBindingInfoTemplate template, BindingInfoMatchType matchType, T item)
{
foreach(var bucket in FindBuckets(template, matchType)) {
bucket.Remove(item);
@@ -97,8 +61,7 @@ public void Remove(BindingInfoTemplate template, BindingInfoMatchType matchType,
public void Clear()
{
- superSetDictionary.Clear();
- subSetDictionary.Clear();
+ dictionary.Clear();
}
}
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingsUpdatedHandler.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingsUpdatedHandler.cs
index ffdbcc9a39a..e745d2112e8 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingsUpdatedHandler.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/BindingsUpdatedHandler.cs
@@ -1,4 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Windows;
+using ICSharpCode.Core.Presentation;
+
+
namespace ICSharpCode.Core.Presentation
{
- public delegate void BindingsUpdatedHandler();
+ public delegate void BindingsUpdatedHandler(object sender, BindingsUpdatedHandlerArgs args);
+
+ public class BindingsUpdatedHandlerArgs
+ {
+ public ICollection RemovedInstances
+ {
+ get; set;
+ }
+
+ public ICollection AddedInstances
+ {
+ get; set;
+ }
+
+ public ICollection RemovedTypes
+ {
+ get; set;
+ }
+
+ public ICollection AddedTypes
+ {
+ get; set;
+ }
+ }
}
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandBindingInfo.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandBindingInfo.cs
index d3cb77a7145..9fb792b890c 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandBindingInfo.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandBindingInfo.cs
@@ -13,7 +13,7 @@ namespace ICSharpCode.Core.Presentation
///
/// Stores details about
///
- public class CommandBindingInfo : IBindingInfo
+ public class CommandBindingInfo : BindingInfoBase
{
///
/// Creates new instance of
@@ -26,97 +26,38 @@ public CommandBindingInfo()
Groups = new BindingGroupCollection();
}
- private BindingGroupCollection _groups;
-
public BindingGroupCollection Groups
{
get {
- return _groups;
+ return base.Groups;
}
set {
- if(value == null) {
- throw new ArgumentException("Groups collection can not be null");
- }
-
- var oldValue = _groups;
- _groups = value;
- _groups.CollectionChanged += Groups_CollectionChanged;
+ var oldGroups = base.Groups;
+ base.Groups = value;
- if(oldValue != null) {
- var oldItemsList = new System.Collections.ArrayList();
- foreach(var oldItem in oldValue) {
- oldItemsList.Add(oldItem);
- }
-
- var newItemsList = new System.Collections.ArrayList();
- foreach(var newItem in value) {
- newItemsList.Add(newItem);
- }
-
- var args = new NotifyCollectionChangedEventArgs(
- NotifyCollectionChangedAction.Replace,
- newItemsList,
- oldItemsList,
- 0);
-
- Groups_CollectionChanged(this, args);
- }
+ SetCollectionChanged(oldGroups, value, Groups_CollectionChanged);
}
}
private void Groups_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) {
if(IsRegistered) {
- if(e.OldItems != null) {
- foreach(BindingGroup oldGroup in e.OldItems) {
- var template = this.GenerateTemplates(false).First();
- template.Group = oldGroup;
- CommandManager.UnregisterCommandBindingsUpdateHandler(
- DefaultBindingsUpdateHandler,
- BindingInfoMatchType.Exact,
- template);
- }
+ var modifiedGroups = new BindingGroupCollection();
+ if(e.NewItems != null) {
+ modifiedGroups.AddRange(e.NewItems.Cast());
}
- if(e.NewItems != null) {
- foreach(BindingGroup newGroup in e.NewItems) {
- var template = this.GenerateTemplates(false).First();
- template.Group = newGroup;
- CommandManager.RegisterCommandBindingsUpdateHandler(template, DefaultBindingsUpdateHandler);
- }
+ if(e.OldItems != null) {
+ modifiedGroups.AddRange(e.OldItems.Cast());
}
+
+ SDCommandManager.InvokeCommandBindingUpdateHandlers(
+ this,
+ new BindingsUpdatedHandlerArgs(),
+ BindingInfoMatchType.SubSet,
+ new BindingInfoTemplate(this, false) { Groups = modifiedGroups });
}
}
- private string routedCommandName;
-
- ///
- /// Name of the routed command which will be invoked when this binding is triggered
- ///
- public string RoutedCommandName {
- get {
- return routedCommandName;
- }
- set {
- routedCommandName = value;
- }
- }
-
- ///
- /// Routed command instance which will be invoked when this binding is triggered
- ///
- public RoutedUICommand RoutedCommand {
- get {
- return SDCommandManager.GetRoutedUICommand(RoutedCommandName);
- }
- }
-
- ///
- /// Add-in to which binding belongs
- ///
- public AddIn AddIn {
- get; set;
- }
-
private string commandTypeName;
///
@@ -222,159 +163,43 @@ public CanExecuteRoutedEventHandler CanExecuteEventHandler
canExecuteEventHandler = value;
}
}
-
- public string _ownerInstanceName;
-
- ///
- /// Stores name of named instance to which this binding belongs. When this binding is registered a
- /// is assigned to owner instance
- ///
- /// If this attribute is used , and
- /// can not be set
- ///
- public string OwnerInstanceName {
- get {
- return _ownerInstanceName;
- }
- set {
- if(_ownerInstanceName != null || _ownerTypeName != null) {
- throw new ArgumentException("This binding already has an owner");
- }
-
- _ownerInstanceName = value;
- }
- }
-
- ///
- /// Stores owner instance to which this binding belongs. When this binding is registered a
- /// is assigned to owner instance
- ///
- /// If this attribute is used , and
- /// can not be set
- ///
- public ICollection OwnerInstances {
- get {
- if(_ownerInstanceName != null) {
- return SDCommandManager.GetNamedUIElementCollection(_ownerInstanceName);
- }
-
- return null;
- }
- }
-
- private string _ownerTypeName;
- ///
- /// Stores name of owner type. Full name with assembly should be used. When this binding is
- /// registered is assigned to all instances of provided class
- ///
- /// If this attribute is used , and
- /// can not be set
- ///
- public string OwnerTypeName{
- get {
- return _ownerTypeName;
- }
- set {
- if(_ownerInstanceName != null || _ownerTypeName != null) {
- throw new ArgumentException("This binding already has an owner");
+ protected override void SetInstanceBindings(ICollection newInstances, ICollection oldInstances)
+ {
+ if(oldInstances != null) {
+ foreach(var ownerInstance in oldInstances) {
+ foreach(CommandBinding binding in OldCommandBindings) {
+ ownerInstance.CommandBindings.Remove(binding);
+ }
}
-
- _ownerTypeName = value;
}
- }
-
- ///
- /// Stores owner type. When this binding is registered
- /// is assigned to all instances of provided class
- ///
- /// If this attribute is used , and
- /// can not be set
- ///
- public ICollection OwnerTypes {
- get {
- if(_ownerTypeName != null) {
- return SDCommandManager.GetNamedUITypeCollection(_ownerTypeName);
+
+ if(newInstances != null) {
+ foreach(var ownerInstance in newInstances) {
+ ownerInstance.CommandBindings.AddRange(ActiveCommandBindings);
}
-
- return null;
}
}
- public bool IsRegistered
+ protected override void SetClassBindings(ICollection oldTypes, ICollection newTypes)
{
- get; set;
- }
-
- public void RemoveActiveBindings()
- {
- if(_ownerTypeName != null) {
- if(OwnerTypes != null) {
- foreach(var ownerType in OwnerTypes) {
- foreach(CommandBinding binding in ActiveCommandBindings) {
- SDCommandManager.RemoveClassCommandBinding(ownerType, binding);
- }
- }
- }
- } else if(_ownerInstanceName != null) {
- if(OwnerInstances != null) {
- foreach(var ownerInstance in OwnerInstances) {
- foreach(CommandBinding binding in ActiveCommandBindings) {
- ownerInstance.CommandBindings.Remove(binding);
- }
+ if(oldTypes != null) {
+ foreach(var ownerType in oldTypes) {
+ foreach(CommandBinding binding in OldCommandBindings) {
+ SDCommandManager.RemoveClassCommandBinding(ownerType, binding);
}
}
}
- }
- private BindingsUpdatedHandler defaultCommandBindingHandler;
-
- ///
- /// Updates owner bindings
- ///
- public BindingsUpdatedHandler DefaultBindingsUpdateHandler
- {
- get {
- if(defaultCommandBindingHandler == null && OwnerTypeName != null) {
- defaultCommandBindingHandler = delegate {
- var routedCommand = RoutedCommand;
- var ownerTypes = OwnerTypes;
- var isRegistered = IsRegistered;
-
- if(routedCommand != null && ownerTypes != null && isRegistered) {
- GenerateCommandBindings();
-
- foreach(var ownerType in ownerTypes) {
- foreach(CommandBinding binding in OldCommandBindings) {
- SDCommandManager.RemoveClassCommandBinding(ownerType, binding);
- }
-
- foreach(CommandBinding binding in ActiveCommandBindings) {
- System.Windows.Input.CommandManager.RegisterClassCommandBinding(ownerType, binding);
- }
- }
- }
- };
- } else if(defaultCommandBindingHandler == null && OwnerInstanceName != null) {
- defaultCommandBindingHandler = delegate {
- if(RoutedCommand != null && OwnerInstances != null && IsRegistered) {
- GenerateCommandBindings();
-
- foreach(var ownerInstance in OwnerInstances) {
- foreach(CommandBinding binding in OldCommandBindings) {
- ownerInstance.CommandBindings.Remove(binding);
- }
-
- ownerInstance.CommandBindings.AddRange(ActiveCommandBindings);
- }
- }
- };
+ if(newTypes != null) {
+ foreach(var ownerType in newTypes) {
+ foreach(CommandBinding binding in ActiveCommandBindings) {
+ System.Windows.Input.CommandManager.RegisterClassCommandBinding(ownerType, binding);
+ }
}
-
- return defaultCommandBindingHandler;
}
}
-
+
///
/// Lazy load
///
@@ -390,18 +215,16 @@ public BindingsUpdatedHandler DefaultBindingsUpdateHandler
///
/// Re-generate from
///
- internal void GenerateCommandBindings()
+ protected override void GenerateBindings()
{
OldCommandBindings = ActiveCommandBindings;
ActiveCommandBindings = new CommandBindingCollection();
- if(Groups.Count > 0 && Groups.IsAttachedToAny(OwnerInstances)) {
- var commandBinding = new CommandBinding(RoutedCommand);
- commandBinding.CanExecute += GenerateCanExecuteEventHandler;
- commandBinding.Executed += GenerateExecutedEventHandler;
- ActiveCommandBindings.Add(commandBinding);
- }
+ var commandBinding = new CommandBinding(RoutedCommand);
+ commandBinding.CanExecute += GenerateCanExecuteEventHandler;
+ commandBinding.Executed += GenerateExecutedEventHandler;
+ ActiveCommandBindings.Add(commandBinding);
}
///
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandManager.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandManager.cs
index 17a7e276de1..3870190a664 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandManager.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandManager.cs
@@ -73,11 +73,18 @@ public static void RegisterNamedUIElement(string instanceName, UIElement element
var container = new WeakReference(element);
if(namedUIInstances.Add(instanceName, container)) {
+ var args = new BindingsUpdatedHandlerArgs();
+ args.AddedInstances = new [] { element };
+
InvokeCommandBindingUpdateHandlers(
+ null,
+ args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerInstanceName = instanceName });
InvokeInputBindingUpdateHandlers(
+ null,
+ args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerInstanceName = instanceName });
}
@@ -94,11 +101,18 @@ public static void UnregisterNamedUIElement(string instanceName, UIElement insta
var container = new WeakReference(instance);
if(namedUIInstances.Remove(instanceName, container)) {
+ var args = new BindingsUpdatedHandlerArgs();
+ args.RemovedInstances = new []{ instance };
+
InvokeCommandBindingUpdateHandlers(
+ null,
+ args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerInstanceName = instanceName });
InvokeInputBindingUpdateHandlers(
+ null,
+ args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerInstanceName = instanceName });
}
@@ -143,11 +157,18 @@ public static void RegisterNamedUIType(string typeName, Type type)
}
if(namedUITypes.Add(typeName, type)) {
+ var args = new BindingsUpdatedHandlerArgs();
+ args.AddedTypes = new [] { type };
+
InvokeCommandBindingUpdateHandlers(
+ null,
+ args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerTypeName = typeName });
InvokeInputBindingUpdateHandlers(
+ null,
+ args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerTypeName = typeName });
}
@@ -163,11 +184,18 @@ public static void UnregisterNamedUIType(string typeName, Type type)
}
if(namedUITypes.Remove(typeName, type)) {
+ var args = new BindingsUpdatedHandlerArgs();
+ args.RemovedTypes = new [] { type };
+
InvokeCommandBindingUpdateHandlers(
+ null,
+ args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerTypeName = typeName });
InvokeInputBindingUpdateHandlers(
+ null,
+ args,
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { OwnerTypeName = typeName });
}
@@ -214,10 +242,14 @@ public static ICollection GetUITypeNameCollection(Type type)
routedCommands.Add(routedCommandName, routedCommand);
InvokeCommandBindingUpdateHandlers(
+ null,
+ new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
InvokeInputBindingUpdateHandlers(
+ null,
+ new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
@@ -242,10 +274,14 @@ public static ICollection GetUITypeNameCollection(Type type)
routedCommands.Add(routedCommandName, existingRoutedUICommand);
InvokeCommandBindingUpdateHandlers(
+ null,
+ new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
InvokeInputBindingUpdateHandlers(
+ null,
+ new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
}
@@ -260,10 +296,14 @@ public static ICollection GetUITypeNameCollection(Type type)
routedCommands.Remove(routedCommandName);
InvokeCommandBindingUpdateHandlers(
+ null,
+ new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
InvokeInputBindingUpdateHandlers(
+ null,
+ new BindingsUpdatedHandlerArgs(),
BindingInfoMatchType.SubSet | BindingInfoMatchType.SuperSet,
new BindingInfoTemplate { RoutedCommandName = routedCommandName });
}
@@ -296,13 +336,8 @@ public static void RegisterInputBinding(InputBindingInfo inputBindingInfo)
throw new ArgumentException("Routed command name must be specified");
}
- if(inputBindingInfo.RoutedCommandName == "EditingCommands.MoveLeftByCharacter")
- {
-
- }
-
- var similarBindingTemplate = inputBindingInfo.GenerateTemplates(false).First();
- var similarInputBinding = FindInputBindingInfos(BindingInfoMatchType.SuperSet, similarBindingTemplate).FirstOrDefault();
+ var similarTemplate = new BindingInfoTemplate(inputBindingInfo, false);
+ var similarInputBinding = FindInputBindingInfos(BindingInfoMatchType.SuperSet, similarTemplate).FirstOrDefault();
if(similarInputBinding != null) {
foreach(InputGesture gesture in inputBindingInfo.DefaultGestures) {
@@ -315,17 +350,17 @@ public static void RegisterInputBinding(InputBindingInfo inputBindingInfo)
similarInputBinding.Categories.AddRange(inputBindingInfo.Categories);
similarInputBinding.Groups.AddRange(inputBindingInfo.Groups);
} else {
- similarInputBinding = inputBindingInfo;
-
- inputBidnings.Add(similarBindingTemplate, similarInputBinding);
- similarInputBinding.IsRegistered = true;
+ inputBidnings.Add(inputBindingInfo, inputBindingInfo);
+ inputBindingInfo.IsRegistered = true;
- foreach(var template in similarInputBinding.GenerateTemplates(true)) {
- RegisterInputBindingsUpdateHandler(template, similarInputBinding.DefaultBindingsUpdateHandler);
- }
+ RegisterInputBindingsUpdateHandler(inputBindingInfo, inputBindingInfo.DefaultBindingsUpdateHandler);
}
- InvokeInputBindingUpdateHandlers(BindingInfoMatchType.SubSet, similarInputBinding.GenerateTemplates(true));
+ InvokeInputBindingUpdateHandlers(
+ null,
+ new BindingsUpdatedHandlerArgs(),
+ BindingInfoMatchType.SubSet,
+ inputBindingInfo);
}
///
@@ -372,16 +407,17 @@ public static void RemoveClassCommandBinding(Type ownerType, CommandBinding comm
if(commandBindingInfo.RoutedCommandName == null) {
throw new ArgumentException("Routed command name must be specified");
}
-
- var bindingInfoTemplate = commandBindingInfo.GenerateTemplates(false).First();
- commandBindings.Add(bindingInfoTemplate, commandBindingInfo);
+
+ commandBindings.Add(commandBindingInfo, commandBindingInfo);
commandBindingInfo.IsRegistered = true;
- foreach(var template in commandBindingInfo.GenerateTemplates(false)) {
- RegisterCommandBindingsUpdateHandler(template, commandBindingInfo.DefaultBindingsUpdateHandler);
- }
+ RegisterCommandBindingsUpdateHandler(commandBindingInfo, commandBindingInfo.DefaultBindingsUpdateHandler);
- InvokeCommandBindingUpdateHandlers(BindingInfoMatchType.SubSet, commandBindingInfo.GenerateTemplates(true));
+ InvokeCommandBindingUpdateHandlers(
+ null,
+ new BindingsUpdatedHandlerArgs(),
+ BindingInfoMatchType.SubSet,
+ commandBindingInfo);
}
#region Register update handler
@@ -391,7 +427,7 @@ public static void RemoveClassCommandBinding(Type ownerType, CommandBinding comm
///
/// Owner type name
/// Update handler
- public static void RegisterCommandBindingsUpdateHandler(BindingInfoTemplate template, BindingsUpdatedHandler handler)
+ public static void RegisterCommandBindingsUpdateHandler(IBindingInfoTemplate template, BindingsUpdatedHandler handler)
{
RegisterBindingsUpdateHandler(commandBindingUpdatedHandlers, template, handler);
}
@@ -402,12 +438,12 @@ public static void RegisterCommandBindingsUpdateHandler(BindingInfoTemplate temp
///
/// Owner type name
/// Update handler
- public static void RegisterInputBindingsUpdateHandler(BindingInfoTemplate template, BindingsUpdatedHandler handler)
+ public static void RegisterInputBindingsUpdateHandler(IBindingInfoTemplate template, BindingsUpdatedHandler handler)
{
RegisterBindingsUpdateHandler(inputBindingUpdatedHandlers, template, handler);
}
- private static void RegisterBindingsUpdateHandler(BindingInfoTemplateDictionary updateHanlders, BindingInfoTemplate template, BindingsUpdatedHandler handler)
+ private static void RegisterBindingsUpdateHandler(BindingInfoTemplateDictionary updateHanlders, IBindingInfoTemplate template, BindingsUpdatedHandler handler)
{
updateHanlders.Add(template, handler);
}
@@ -415,18 +451,18 @@ private static void RegisterBindingsUpdateHandler(BindingInfoTemplateDictionary<
#region Unregister update handler
- public static void UnregisterInputBindingsUpdateHandler(BindingsUpdatedHandler handler, BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ public static void UnregisterInputBindingsUpdateHandler(BindingsUpdatedHandler handler, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
UnregisterdBindingsUpdateHandler(inputBindingUpdatedHandlers, handler, matchType, templates);
}
- public static void UnregisterCommandBindingsUpdateHandler(BindingsUpdatedHandler handler, BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ public static void UnregisterCommandBindingsUpdateHandler(BindingsUpdatedHandler handler, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
UnregisterdBindingsUpdateHandler(commandBindingUpdatedHandlers, handler, matchType, templates);
}
- private static void UnregisterdBindingsUpdateHandler(BindingInfoTemplateDictionary updateHandlers, BindingsUpdatedHandler handler, BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ private static void UnregisterdBindingsUpdateHandler(BindingInfoTemplateDictionary updateHandlers, BindingsUpdatedHandler handler, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
if(handler == null) {
throw new ArgumentNullException("handler");
@@ -440,23 +476,23 @@ private static void UnregisterdBindingsUpdateHandler(BindingInfoTemplateDictiona
#region Invoke binding update handlers
- public static void InvokeCommandBindingUpdateHandlers(BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ public static void InvokeCommandBindingUpdateHandlers(object sender, BindingsUpdatedHandlerArgs args, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
- InvokeBindingUpdateHandlers(commandBindingUpdatedHandlers, matchType, templates);
+ InvokeBindingUpdateHandlers(commandBindingUpdatedHandlers, sender, args, matchType, templates);
}
- public static void InvokeInputBindingUpdateHandlers(BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ public static void InvokeInputBindingUpdateHandlers(object sender, BindingsUpdatedHandlerArgs args, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
- InvokeBindingUpdateHandlers(inputBindingUpdatedHandlers, matchType, templates);
+ InvokeBindingUpdateHandlers(inputBindingUpdatedHandlers, sender, args, matchType, templates);
}
- private static void InvokeBindingUpdateHandlers(BindingInfoTemplateDictionary updateHandlerDictionary, BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ private static void InvokeBindingUpdateHandlers(BindingInfoTemplateDictionary updateHandlerDictionary, object sender, BindingsUpdatedHandlerArgs args, BindingInfoMatchType matchType, IBindingInfoTemplate[] templates)
{
if(!SuspendUpdateHandlers) {
foreach(var template in templates) {
foreach(var handler in updateHandlerDictionary.FindItems(template, matchType)) {
if(handler != null) {
- handler.Invoke();
+ handler.Invoke(null, args);
}
}
}
@@ -507,7 +543,7 @@ private static void InvokeBindingUpdateHandlers(BindingInfoTemplateDictionary
/// Input binding parameters
- public static void UnregisterInputBinding(BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ public static void UnregisterInputBinding(BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
UnregisterBindingInfo(inputBidnings, inputBindingUpdatedHandlers, matchType, templates);
}
@@ -516,32 +552,33 @@ public static void UnregisterInputBinding(BindingInfoMatchType matchType, param
/// Unregister command binding
///
/// Command binding parameters
- public static void UnregisterCommandBinding(BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ public static void UnregisterCommandBinding(BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
UnregisterBindingInfo(commandBindings, commandBindingUpdatedHandlers, matchType, templates);
}
- private static void UnregisterBindingInfo(BindingInfoTemplateDictionary bindingInfoDictionary, BindingInfoTemplateDictionary updateHandlerDictionary, BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ private static void UnregisterBindingInfo(BindingInfoTemplateDictionary bindingInfoDictionary, BindingInfoTemplateDictionary updateHandlerDictionary, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
foreach(var similarBindingInfo in FindBindingInfos(bindingInfoDictionary, matchType, templates).ToArray()) {
- var bindingInfoTemplate = similarBindingInfo.GenerateTemplates(false).First();
-
BindingsUpdatedHandler defaultUpdatesHandler;
if(similarBindingInfo is InputBindingInfo) {
- defaultUpdatesHandler = ((InputBindingInfo)similarBindingInfo).DefaultBindingsUpdateHandler;
((InputBindingInfo)similarBindingInfo).IsRegistered = false;
} else {
- defaultUpdatesHandler = ((CommandBindingInfo)similarBindingInfo).DefaultBindingsUpdateHandler;
((CommandBindingInfo)similarBindingInfo).IsRegistered = false;
}
- bindingInfoDictionary.Remove(bindingInfoTemplate, BindingInfoMatchType.Exact, similarBindingInfo);
- updateHandlerDictionary.Remove(bindingInfoTemplate, BindingInfoMatchType.Exact, defaultUpdatesHandler);
+ bindingInfoDictionary.Remove((IBindingInfoTemplate)similarBindingInfo, BindingInfoMatchType.Exact, similarBindingInfo);
+ updateHandlerDictionary.Remove((IBindingInfoTemplate)similarBindingInfo, BindingInfoMatchType.Exact, similarBindingInfo.DefaultBindingsUpdateHandler);
similarBindingInfo.RemoveActiveBindings();
}
- InvokeBindingUpdateHandlers(updateHandlerDictionary, BindingInfoMatchType.SuperSet | BindingInfoMatchType.SubSet, templates);
+ InvokeBindingUpdateHandlers(
+ updateHandlerDictionary,
+ null,
+ new BindingsUpdatedHandlerArgs(),
+ BindingInfoMatchType.SuperSet | BindingInfoMatchType.SubSet,
+ templates);
}
#endregion
@@ -558,21 +595,21 @@ private static void UnregisterBindingInfo(BindingInfoTemplateDictionaryContext class full name
/// Context class full name
/// Collection of managed command bindings
- public static IEnumerable FindCommandBindingInfos(BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ public static IEnumerable FindCommandBindingInfos(BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
var bindings = FindBindingInfos(commandBindings, matchType, templates).ToList();
return bindings.Cast();
}
- public static IEnumerable FindInputBindingInfos(BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ public static IEnumerable FindInputBindingInfos(BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
var bindings = FindBindingInfos(inputBidnings, matchType, templates).ToList();
return bindings.Cast();
}
- private static IEnumerable FindBindingInfos(BindingInfoTemplateDictionary bindingInfos, BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ private static IEnumerable FindBindingInfos(BindingInfoTemplateDictionary bindingInfos, BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
foreach(var template in templates) {
foreach(var item in bindingInfos.FindItems(template, matchType)) {
@@ -583,7 +620,7 @@ private static IEnumerable FindBindingInfos(BindingInfoTemplateDic
}
}
- public static CommandBindingCollection FindCommandBindings(BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ public static CommandBindingCollection FindCommandBindings(BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
var commandBindingInfoCollection = FindCommandBindingInfos(matchType, templates);
var commandBindingCollection = new CommandBindingCollection();
@@ -594,7 +631,7 @@ public static CommandBindingCollection FindCommandBindings(BindingInfoMatchType
return commandBindingCollection;
}
- public static InputBindingCollection FindInputBindings(BindingInfoMatchType matchType, params BindingInfoTemplate[] templates)
+ public static InputBindingCollection FindInputBindings(BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates)
{
var inputBindingInfoCollection = FindInputBindingInfos(matchType, templates);
@@ -615,7 +652,7 @@ public static InputBindingCollection FindInputBindings(BindingInfoMatchType matc
/// Get gestures assigned only to specific context
/// Routed UI command name
/// Gesture
- public static InputGestureCollection FindInputGestures(BindingInfoMatchType matchType, params BindingInfoTemplate[] templates) {
+ public static InputGestureCollection FindInputGestures(BindingInfoMatchType matchType, params IBindingInfoTemplate[] templates) {
var bindings = FindInputBindingInfos(matchType, templates);
var gestures = new InputGestureCollection();
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandsService.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandsService.cs
index 21fee96d820..10dc637c01f 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandsService.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandsService.cs
@@ -223,7 +223,7 @@ public static void RegisterInputBindings(object caller, string path)
var gestures = (InputGestureCollection)new InputGestureCollectionConverter().ConvertFromString(desc.Gestures);
var inputBindingInfo = new InputBindingInfo();
-
+
if(!string.IsNullOrEmpty(desc.OwnerInstanceName)) {
inputBindingInfo.OwnerInstanceName = desc.OwnerInstanceName;
} else if(!string.IsNullOrEmpty(desc.OwnerTypeName)) {
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/IBindingInfo.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/IBindingInfo.cs
index cca8c3e2f83..89793369f1a 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/IBindingInfo.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/IBindingInfo.cs
@@ -59,29 +59,29 @@ BindingsUpdatedHandler DefaultBindingsUpdateHandler
internal static class IBindingInfoExtensions
{
- public static BindingInfoTemplate[] GenerateTemplates(this IBindingInfo thisObject, bool includeGroup)
- {
- var invokeTemplates = new BindingInfoTemplate[thisObject.Groups.Count == 0 || !includeGroup ? 1 : thisObject.Groups.Count];
- var groupEnumerator = thisObject.Groups.Count == 0 ? null : thisObject.Groups.GetEnumerator();
- var groupCounter = 0;
- while(groupEnumerator == null || groupEnumerator.MoveNext()) {
- var invokeTemplate = new BindingInfoTemplate();
- invokeTemplate.RoutedCommandName = thisObject.RoutedCommandName;
- invokeTemplate.OwnerInstanceName = thisObject.OwnerInstanceName;
- invokeTemplate.OwnerTypeName = thisObject.OwnerTypeName;
- if(includeGroup && groupEnumerator != null) {
- invokeTemplate.Group = groupEnumerator.Current;
- }
-
- invokeTemplates[groupCounter++] = invokeTemplate;
-
- if(groupEnumerator == null || !includeGroup) {
- break;
- }
- }
-
- return invokeTemplates;
- }
+// public static IBindingInfoTemplate[] GenerateTemplates(this IBindingInfo thisObject, bool includeGroup)
+// {
+// var invokeTemplates = new BindingInfoTemplate[thisObject.Groups.Count == 0 || !includeGroup ? 1 : thisObject.Groups.Count];
+// var groupEnumerator = thisObject.Groups.Count == 0 ? null : thisObject.Groups.GetEnumerator();
+// var groupCounter = 0;
+// while(groupEnumerator == null || groupEnumerator.MoveNext()) {
+// var invokeTemplate = new BindingInfoTemplate();
+// invokeTemplate.RoutedCommandName = thisObject.RoutedCommandName;
+// invokeTemplate.OwnerInstanceName = thisObject.OwnerInstanceName;
+// invokeTemplate.OwnerTypeName = thisObject.OwnerTypeName;
+// if(includeGroup && groupEnumerator != null) {
+// invokeTemplate.Group = groupEnumerator.Current;
+// }
+//
+// invokeTemplates[groupCounter++] = invokeTemplate;
+//
+// if(groupEnumerator == null || !includeGroup) {
+// break;
+// }
+// }
+//
+// return invokeTemplates;
+// }
}
[FlagsAttribute]
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingCategoryCollection.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingCategoryCollection.cs
index b48700f46f9..98f7a4fc139 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingCategoryCollection.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingCategoryCollection.cs
@@ -1,11 +1,3 @@
-/*
- * Created by SharpDevelop.
- * User: Administrator
- * Date: 7/4/2009
- * Time: 9:02 PM
- *
- * To change this template use Tools | Options | Coding | Edit Standard Headers.
- */
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
@@ -16,14 +8,10 @@ namespace ICSharpCode.Core.Presentation
///
/// Description of InputBindingCategoryCollection.
///
- public class InputBindingCategoryCollection : ICollection
+ public class InputBindingCategoryCollection : IObservableCollection
{
private ObservableCollection categories = new ObservableCollection();
- public InputBindingCategoryCollection()
- {
- }
-
public int Count {
get {
return categories.Count;
@@ -36,12 +24,16 @@ public InputBindingCategoryCollection()
}
}
+ private event NotifyCollectionChangedEventHandler categoriesCollectionChanged;
+
public event NotifyCollectionChangedEventHandler CollectionChanged
{
add {
+ categoriesCollectionChanged += value;
categories.CollectionChanged += value;
}
remove {
+ categoriesCollectionChanged -= value;
categories.CollectionChanged -= value;
}
}
@@ -59,7 +51,20 @@ public void Add(InputBindingCategory category)
public void Clear()
{
- categories.Clear();
+ var categoriesBackup = categories;
+
+ categories =new ObservableCollection();
+ foreach(NotifyCollectionChangedEventHandler handler in categoriesCollectionChanged.GetInvocationList()) {
+ categories.CollectionChanged += handler;
+ }
+
+ if(categoriesCollectionChanged != null) {
+ categoriesCollectionChanged.Invoke(
+ this,
+ new NotifyCollectionChangedEventArgs(
+ NotifyCollectionChangedAction.Remove,
+ categoriesBackup));
+ }
}
public bool Contains(InputBindingCategory category)
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingInfo.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingInfo.cs
index 5fa6ac74afb..da586d004cb 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingInfo.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/InputBindingInfo.cs
@@ -14,7 +14,7 @@ namespace ICSharpCode.Core.Presentation
///
/// Stores details about input binding
///
- public class InputBindingInfo : IBindingInfo
+ public class InputBindingInfo : BindingInfoBase
{
///
/// Creates new instance of
@@ -28,46 +28,19 @@ public InputBindingInfo()
Groups = new BindingGroupCollection();
}
- private BindingGroupCollection _groups;
-
public BindingGroupCollection Groups
{
get {
- return _groups;
+ return base.Groups;
}
set {
- if(value == null) {
- throw new ArgumentException("Groups collection can not be null");
- }
-
- var oldValue = _groups;
- _groups = value;
- _groups.CollectionChanged += Groups_CollectionChanged;
+ var oldGroups = base.Groups;
+ base.Groups = value;
- if(oldValue != null) {
- var oldItemsList = new System.Collections.ArrayList();
- foreach(var oldItem in oldValue) {
- oldItemsList.Add(oldItem);
- }
-
- var newItemsList = new System.Collections.ArrayList();
- foreach(var newItem in value) {
- newItemsList.Add(newItem);
- }
-
- var args = new NotifyCollectionChangedEventArgs(
- NotifyCollectionChangedAction.Replace,
- newItemsList,
- oldItemsList,
- 0);
-
- Groups_CollectionChanged(this, args);
- }
+ SetCollectionChanged(oldGroups, value, Groups_CollectionChanged);
}
}
- public string _ownerInstanceName;
-
///
/// Stores name of named instance to which this binding belongs. When this binding is registered a
/// is assigned to owner instance
@@ -75,42 +48,17 @@ public BindingGroupCollection Groups
/// If this attribute is used , and
/// can not be set
///
- public string OwnerInstanceName {
+ public override string OwnerInstanceName {
get {
- return _ownerInstanceName;
+ return base.OwnerInstanceName;
}
set {
- var backup = _ownerInstanceName;
-
- if(_ownerInstanceName != null || _ownerTypeName != null) {
- throw new ArgumentException("This binding already has an owner");
- }
-
- _ownerInstanceName = value;
+ base.OwnerInstanceName = value;
- SetActiveGesturesChanged(RoutedCommandName, _ownerTypeName, OwnerTypeName);
+ SetActiveGesturesChanged(RoutedCommandName, value, OwnerTypeName);
}
}
- ///
- /// Stores owner instance to which this binding belongs. When this binding is registered a
- /// is assigned to owner instance
- ///
- /// If this attribute is used , and
- /// can not be set
- ///
- public ICollection OwnerInstances {
- get {
- if(_ownerInstanceName != null) {
- return SDCommandManager.GetNamedUIElementCollection(_ownerInstanceName);
- }
-
- return null;
- }
- }
-
- private string _ownerTypeName;
-
///
/// Stores name of owner type. Full name with assembly should be used. When this binding is
/// registered is assigned to all instances of provided class
@@ -118,57 +66,18 @@ public BindingGroupCollection Groups
/// If this attribute is used , and
/// can not be set
///
- public string OwnerTypeName
+ public override string OwnerTypeName
{
get {
- return _ownerTypeName;
+ return base.OwnerTypeName;
}
set {
- var backup = _ownerTypeName;
-
- if(_ownerInstanceName != null || _ownerTypeName != null) {
- throw new ArgumentException("This binding already has an owner");
- }
-
- _ownerTypeName = value;
- SetActiveGesturesChanged(RoutedCommandName, OwnerInstanceName, _ownerTypeName);
- }
- }
-
- ///
- /// Stores owner type. When this binding is registered
- /// is assigned to all instances of provided class
- ///
- /// If this attribute is used , and
- /// can not be set
- ///
- public ICollection OwnerTypes {
- get {
- if(_ownerTypeName != null) {
- return SDCommandManager.GetNamedUITypeCollection(_ownerTypeName);
- }
+ base.OwnerTypeName = value;
- return null;
+ SetActiveGesturesChanged(RoutedCommandName, OwnerInstanceName, value);
}
}
- ///
- /// Routed command text
- ///
- /// Override routed command text when displaying to user
- ///
- ///
- public string RoutedCommandText {
- get; set;
- }
-
- ///
- /// Add-in to which registered this input binding
- ///
- public AddIn AddIn {
- get; set;
- }
-
private ObservableInputGestureCollection _defaultGestures;
///
@@ -186,20 +95,14 @@ public string OwnerTypeName
_defaultGestures.CollectionChanged += delegate(object sender, NotifyCollectionChangedEventArgs e) {
// Check for active profile but no custom shortcut
if(UserDefinedGesturesManager.CurrentProfile == null) {
- var innerArgs = new InputBindingGesturesChangedArgs();
- innerArgs.InputBindingIdentifier = Identifier;
-
- ActiveGesturesChanged(this, innerArgs);
+ ActiveGesturesChanged(this, new InputBindingGesturesChangedArgs { InputBindingIdentifier = Identifier });
}
};
}
- if(routedCommandName != null && (_ownerInstanceName != null || _ownerTypeName != null)) {
- var args = new InputBindingGesturesChangedArgs();
- args.InputBindingIdentifier = Identifier;
- if(UserDefinedGesturesManager.CurrentProfile == null) {
- ActiveGesturesChanged(this, args);
- }
+
+ if(UserDefinedGesturesManager.CurrentProfile == null) {
+ ActiveGesturesChanged(this, new InputBindingGesturesChangedArgs { InputBindingIdentifier = Identifier });
}
}
}
@@ -218,28 +121,18 @@ public string OwnerTypeName
}
}
- private string routedCommandName;
-
///
/// Name of the routed command which will be invoked when this binding is triggered
///
- public string RoutedCommandName {
+ public override string RoutedCommandName {
get {
- return routedCommandName;
+ return base.RoutedCommandName;
}
set {
- var backup = routedCommandName;
- routedCommandName = value;
- SetActiveGesturesChanged(backup, OwnerInstanceName, OwnerTypeName);
- }
- }
-
- ///
- /// Routed command instance which will be invoked when this binding is triggered
- ///
- public RoutedUICommand RoutedCommand {
- get {
- return SDCommandManager.GetRoutedUICommand(RoutedCommandName);
+ var oldValue = base.RoutedCommandName;
+ base.RoutedCommandName = value;
+
+ SetActiveGesturesChanged(oldValue, OwnerInstanceName, OwnerTypeName);
}
}
@@ -260,35 +153,10 @@ public InputBindingCategoryCollection Categories
var oldValue = _categories;
_categories = value;
- _categories.CollectionChanged += Categories_CollectionChanged;
- if(oldValue != null) {
- var oldItemsList = new System.Collections.ArrayList();
- foreach(var oldItem in oldValue) {
- oldItemsList.Add(oldItem);
- }
-
- var newItemsList = new System.Collections.ArrayList();
- foreach(var newItem in value) {
- newItemsList.Add(newItem);
- }
-
- var args = new NotifyCollectionChangedEventArgs(
- NotifyCollectionChangedAction.Replace,
- newItemsList,
- oldItemsList,
- 0);
-
- Categories_CollectionChanged(this, args);
- }
+ SetCollectionChanged(oldValue, value, Categories_CollectionChanged);
}
}
-
-
- public bool IsRegistered
- {
- get; set;
- }
public event ActiveInputBindingsChangedHandler ActiveInputBindingsChanged;
@@ -299,18 +167,73 @@ public InputBindingCollection ActiveInputBindings
{
get; set;
}
+
+ protected override void SetInstanceBindings(ICollection oldInstances, ICollection newInstances)
+ {
+ if(oldInstances != null) {
+ foreach(var ownerInstance in oldInstances) {
+ foreach(InputBinding binding in OldInputBindings) {
+ ownerInstance.InputBindings.Remove(binding);
+ }
+ }
+ }
+
+ if(newInstances != null) {
+ foreach(var ownerInstance in newInstances) {
+ ownerInstance.InputBindings.AddRange(ActiveInputBindings);
+
+ // Sorting input bindings. This may be slow
+ if(ownerInstance.InputBindings != null) {
+ ownerInstance.InputBindings.SortByChords();
+ }
+ }
+ }
+ }
- public InputBindingIdentifier Identifier {
- get {
- var identifier = new InputBindingIdentifier();
- identifier.OwnerInstanceName = OwnerInstanceName;
- identifier.OwnerTypeName = OwnerTypeName;
- identifier.RoutedCommandName = RoutedCommandName;
+ protected override void SetClassBindings(ICollection oldTypes, ICollection newTypes)
+ {
+ if(oldTypes != null) {
+ foreach(var ownerType in oldTypes) {
+ foreach(InputBinding binding in OldInputBindings) {
+ SDCommandManager.RemoveClassInputBinding(ownerType, binding);
+ }
+ }
+ }
+
+ if(newTypes != null) {
+ foreach(var ownerType in newTypes) {
+ foreach(InputBinding binding in ActiveInputBindings) {
+ System.Windows.Input.CommandManager.RegisterClassInputBinding(ownerType, binding);
+ }
+
+ var fieldInfo = typeof(System.Windows.Input.CommandManager).GetField("_classInputBindings", BindingFlags.Static | BindingFlags.NonPublic);
+ var fieldData = (HybridDictionary)fieldInfo.GetValue(null);
+ var classInputBindings = (InputBindingCollection)fieldData[ownerType];
- return identifier;
+ // Sorting input bindings. This may be slow
+ if(classInputBindings != null) {
+ classInputBindings.SortByChords();
+ }
+ }
}
+
+ if(ActiveInputBindingsChanged != null) {
+ ActiveInputBindingsChanged.Invoke(this);
+ }
+ }
+
+ ///
+ /// Old input bindings which where assigned to owner when before
+ /// was modified.
+ ///
+ /// When new s are generated these bindings are removed from the owner
+ ///
+ internal InputBindingCollection OldInputBindings
+ {
+ get; set;
}
+
private void Categories_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if(e.NewItems != null) {
@@ -325,24 +248,20 @@ private void Categories_CollectionChanged(object sender, NotifyCollectionChanged
private void Groups_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if(IsRegistered) {
- if(e.OldItems != null) {
- foreach(BindingGroup oldGroup in e.OldItems) {
- var template = this.GenerateTemplates(false).First();
- template.Group = oldGroup;
- CommandManager.UnregisterInputBindingsUpdateHandler(
- DefaultBindingsUpdateHandler,
- BindingInfoMatchType.Exact,
- template);
- }
+ var modifiedGroups = new BindingGroupCollection();
+ if(e.NewItems != null) {
+ modifiedGroups.AddRange(e.NewItems.Cast());
}
- if(e.NewItems != null) {
- foreach(BindingGroup newGroup in e.NewItems) {
- var template = this.GenerateTemplates(false).First();
- template.Group = newGroup;
- CommandManager.RegisterInputBindingsUpdateHandler(template, DefaultBindingsUpdateHandler);
- }
+ if(e.OldItems != null) {
+ modifiedGroups.AddRange(e.OldItems.Cast());
}
+
+ SDCommandManager.InvokeInputBindingUpdateHandlers(
+ this,
+ new BindingsUpdatedHandlerArgs(),
+ BindingInfoMatchType.SubSet,
+ new BindingInfoTemplate(this, false) { Groups = modifiedGroups });
}
}
@@ -353,119 +272,27 @@ private void ActiveGesturesChanged(object sender, InputBindingGesturesChangedArg
template.OwnerTypeName = OwnerTypeName;
template.RoutedCommandName = RoutedCommandName;
- SDCommandManager.InvokeInputBindingUpdateHandlers(BindingInfoMatchType.SubSet, template);
+ SDCommandManager.InvokeInputBindingUpdateHandlers(
+ null,
+ new BindingsUpdatedHandlerArgs(),
+ BindingInfoMatchType.SubSet,
+ template);
}
///
/// Re-generate from
///
- private void GenerateInputBindings()
+ protected override void GenerateBindings()
{
OldInputBindings = ActiveInputBindings;
ActiveInputBindings = new InputBindingCollection();
- if(Groups.Count > 0 && Groups.IsAttachedToAny(OwnerInstances)) {
- foreach(InputGesture gesture in ActiveGestures) {
- var inputBinding = new InputBinding(RoutedCommand, gesture);
- ActiveInputBindings.Add(inputBinding);
- }
+ foreach(InputGesture gesture in ActiveGestures) {
+ var inputBinding = new InputBinding(RoutedCommand, gesture);
+ ActiveInputBindings.Add(inputBinding);
}
}
- public void RemoveActiveBindings()
- {
- if(_ownerTypeName != null) {
- if(OwnerTypes != null) {
- foreach(var ownerType in OwnerTypes) {
- foreach(InputBinding binding in ActiveInputBindings) {
- SDCommandManager.RemoveClassInputBinding(ownerType, binding);
- }
- }
- }
- } else if(_ownerInstanceName != null) {
- if(OwnerInstances != null) {
- foreach(var ownerInstance in OwnerInstances) {
- foreach(InputBinding binding in ActiveInputBindings) {
- ownerInstance.InputBindings.Remove(binding);
- }
- }
- }
- }
- }
-
- private BindingsUpdatedHandler defaultInputBindingHandler;
-
- ///
- /// Updates owner bindings
- ///
- public BindingsUpdatedHandler DefaultBindingsUpdateHandler
- {
- get {
- if(defaultInputBindingHandler == null && OwnerTypeName != null) {
- defaultInputBindingHandler = delegate {
- if(RoutedCommand != null && OwnerTypes != null && IsRegistered) {
- GenerateInputBindings();
-
- foreach(var ownerType in OwnerTypes) {
- foreach(InputBinding binding in OldInputBindings) {
- SDCommandManager.RemoveClassInputBinding(ownerType, binding);
- }
-
- foreach(InputBinding binding in ActiveInputBindings) {
- System.Windows.Input.CommandManager.RegisterClassInputBinding(ownerType, binding);
- }
-
- var fieldInfo = typeof(System.Windows.Input.CommandManager).GetField("_classInputBindings", BindingFlags.Static | BindingFlags.NonPublic);
- var fieldData = (HybridDictionary)fieldInfo.GetValue(null);
- var classInputBindings = (InputBindingCollection)fieldData[ownerType];
-
- // Sorting input bindings. This may be slow
- if(classInputBindings != null) {
- classInputBindings.SortByChords();
- }
- }
-
- if(ActiveInputBindingsChanged != null) {
- ActiveInputBindingsChanged.Invoke(this);
- }
- }
- };
- } else if(defaultInputBindingHandler == null && OwnerInstanceName != null){
- defaultInputBindingHandler = delegate {
- if(RoutedCommand != null && OwnerInstances != null && IsRegistered) {
- GenerateInputBindings();
-
- foreach(var ownerInstance in OwnerInstances) {
- foreach(InputBinding binding in OldInputBindings) {
- ownerInstance.InputBindings.Remove(binding);
- }
-
- ownerInstance.InputBindings.AddRange(ActiveInputBindings);
-
- // Sorting input bindings. This may be slow
- if(ownerInstance.InputBindings != null) {
- ownerInstance.InputBindings.SortByChords();
- }
- }
- }
- };
- }
-
- return defaultInputBindingHandler;
- }
- }
-
- ///
- /// Old input bindings which where assigned to owner when before
- /// was modified.
- ///
- /// When new s are generated these bindings are removed from the owner
- ///
- internal InputBindingCollection OldInputBindings
- {
- get; set;
- }
-
private void SetActiveGesturesChanged(string oldRoutedCommandName, string oldOwnerInstanceName, string oldOwnerTypeName)
{
if(oldRoutedCommandName != null && (oldOwnerInstanceName != null || oldOwnerTypeName != null)) {
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/RelationshipMap.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/RelationshipMap.cs
index 4467ed51744..a50eb781eea 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/RelationshipMap.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/RelationshipMap.cs
@@ -14,6 +14,9 @@ public class RelationshipMap
private static Dictionary> forwardMap;
private static Dictionary> backwardMap;
+ private IEqualityComparer t1Comparer;
+ private IEqualityComparer t2Comparer;
+
public RelationshipMap()
{
forwardMap = new Dictionary>();
@@ -22,6 +25,9 @@ public RelationshipMap()
public RelationshipMap(IEqualityComparer t1Comparer, IEqualityComparer t2Comparer)
{
+ this.t1Comparer = t1Comparer;
+ this.t2Comparer = t2Comparer;
+
forwardMap = new Dictionary>(t1Comparer);
backwardMap = new Dictionary>(t2Comparer);
}
@@ -29,11 +35,11 @@ public RelationshipMap(IEqualityComparer t1Comparer, IEqualityComparer t
public bool Add(T1 item1, T2 item2)
{
if(!forwardMap.ContainsKey(item1)){
- forwardMap.Add(item1, new HashSet());
+ forwardMap.Add(item1, new HashSet(t2Comparer));
}
if(!backwardMap.ContainsKey(item2)) {
- backwardMap.Add(item2, new HashSet());
+ backwardMap.Add(item2, new HashSet(t1Comparer));
}
var forwardRemoveResult = forwardMap[item1].Add(item2);
@@ -59,8 +65,11 @@ public bool Add(T1 item1, T2 item2)
public bool Remove(T1 item1, T2 item2)
{
- var forwardRemoveResult = MapForward(item1).Remove(item2);
- var backwardRemoveResult = MapBackward(item2).Remove(item1);
+ var forwardBucket = MapForward(item1);
+ var forwardRemoveResult = forwardBucket.Remove(item2);
+
+ var backwardBucket = MapBackward(item2);
+ var backwardRemoveResult = backwardBucket.Remove(item1);
return forwardRemoveResult || backwardRemoveResult;
}
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/Utils/IBindingInfoEqualityComparer.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/Utils/IBindingInfoEqualityComparer.cs
new file mode 100644
index 00000000000..5e0b8c6ffc2
--- /dev/null
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/Utils/IBindingInfoEqualityComparer.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+
+namespace ICSharpCode.Core.Presentation
+{
+ public class IBindingInfoTemplateEqualityComparer : IEqualityComparer
+ {
+ bool IEqualityComparer.Equals(IBindingInfoTemplate key, IBindingInfoTemplate comparedValue)
+ {
+ return key.OwnerInstanceName == comparedValue.OwnerInstanceName
+ && key.OwnerTypeName == comparedValue.OwnerTypeName
+ && key.RoutedCommandName == comparedValue.RoutedCommandName;
+ }
+
+ int IEqualityComparer.GetHashCode(IBindingInfoTemplate value)
+ {
+ var instanceNameHashCode = value.OwnerInstanceName != null ? value.OwnerInstanceName.GetHashCode() : 0;
+ var typeNameHashCode = value.OwnerTypeName != null ? value.OwnerTypeName.GetHashCode() : 0;
+ var routedCommandNameHashCode = value.RoutedCommandName != null ? value.RoutedCommandName.GetHashCode() : 0;
+ var groupsHashCode = 0;
+ if(value.Groups != null) {
+ foreach(var group in value.Groups) {
+ groupsHashCode ^= group != null ? group.GetHashCode() : 0;
+ }
+ }
+
+ return instanceNameHashCode ^ typeNameHashCode ^ routedCommandNameHashCode ^ groupsHashCode;
+ }
+ }
+}
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/Utils/IObservableCollection.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/Utils/IObservableCollection.cs
new file mode 100644
index 00000000000..605b3753d6c
--- /dev/null
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/Utils/IObservableCollection.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+
+namespace ICSharpCode.Core.Presentation
+{
+ public interface IObservableCollection : ICollection, INotifyCollectionChanged
+ {
+ }
+}
diff --git a/src/Main/ICSharpCode.Core.Presentation/CommandsService/Utils/WeakReferenceEqualirtyComparer.cs b/src/Main/ICSharpCode.Core.Presentation/CommandsService/Utils/WeakReferenceEqualirtyComparer.cs
index d97e0901db9..97ba20550f9 100644
--- a/src/Main/ICSharpCode.Core.Presentation/CommandsService/Utils/WeakReferenceEqualirtyComparer.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/CommandsService/Utils/WeakReferenceEqualirtyComparer.cs
@@ -3,7 +3,7 @@
namespace ICSharpCode.Core.Presentation
{
- internal class WeakReferenceEqualirtyComparer : IEqualityComparer
+ public class WeakReferenceEqualirtyComparer : IEqualityComparer
{
bool IEqualityComparer.Equals(WeakReference container1, WeakReference container2)
{
diff --git a/src/Main/ICSharpCode.Core.Presentation/ICSharpCode.Core.Presentation.csproj b/src/Main/ICSharpCode.Core.Presentation/ICSharpCode.Core.Presentation.csproj
index 4d4248c49fb..41e3a8c2005 100644
--- a/src/Main/ICSharpCode.Core.Presentation/ICSharpCode.Core.Presentation.csproj
+++ b/src/Main/ICSharpCode.Core.Presentation/ICSharpCode.Core.Presentation.csproj
@@ -67,6 +67,7 @@
Properties\GlobalAssemblyInfo.cs
+
@@ -83,6 +84,8 @@
+
+
diff --git a/src/Main/ICSharpCode.Core.Presentation/Menu/MenuCommand.cs b/src/Main/ICSharpCode.Core.Presentation/Menu/MenuCommand.cs
index 3336a113f0d..f6840999b9c 100644
--- a/src/Main/ICSharpCode.Core.Presentation/Menu/MenuCommand.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/Menu/MenuCommand.cs
@@ -147,7 +147,7 @@ public MenuCommand(UIElement inputBindingOwner, Codon codon, object caller, bool
this.InputGestureText = (string)new InputGestureCollectionConverter().ConvertToInvariantString(updatedGestures);
};
- gesturesUpdateHandler.Invoke();
+ gesturesUpdateHandler.Invoke(this, new BindingsUpdatedHandlerArgs());
var bindingTemplate = new BindingInfoTemplate();
if(codon.Properties.Contains("ownerinstance")) {
diff --git a/src/Main/ICSharpCode.Core.Presentation/Test/BindingGroupTests.cs b/src/Main/ICSharpCode.Core.Presentation/Test/BindingGroupTests.cs
index ab14b3e0555..8afb56f0a53 100644
--- a/src/Main/ICSharpCode.Core.Presentation/Test/BindingGroupTests.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/Test/BindingGroupTests.cs
@@ -23,7 +23,7 @@ public void TestFixtureSetUp()
[SetUp]
public void SetUp()
{
- bindingGroup = new BindingGroup();
+ bindingGroup = new BindingGroup { Name = "BindingGroupTests" };
uiElement = new UIElement();
SDCommandManager.RegisterNamedUIElement("NamedInstance", uiElement);
@@ -50,14 +50,14 @@ public void AttachGroupMethod()
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate(),
- delegate() { results.Add("SubSetTest"); });
+ delegate { results.Add("SubSetTest"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate {
RoutedCommandName = "ApplicationCommands.Copy",
OwnerInstanceName = "NamedInstance",
- Group = bindingGroup },
- delegate() { results.Add("SuperSetTest"); });
+ Groups = new BindingGroupCollection { bindingGroup } },
+ delegate { results.Add("SuperSetTest"); });
Assert.AreEqual(0, uiElement.InputBindings.Count);
@@ -84,14 +84,14 @@ public void DetachGroupMethod()
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate(),
- delegate() { results.Add("SuperSetTest"); });
+ delegate { results.Add("SuperSetTest"); });
SDCommandManager.RegisterInputBindingsUpdateHandler(
new BindingInfoTemplate {
RoutedCommandName = "ApplicationCommands.Copy",
OwnerInstanceName = "NamedInstance",
- Group = bindingGroup },
- delegate() { results.Add("SubSetTest"); });
+ Groups = new BindingGroupCollection { bindingGroup } },
+ delegate { results.Add("SubSetTest"); });
bindingGroup.DetachFrom(uiElement);
Assert.AreEqual(0, uiElement.InputBindings.Count);
@@ -100,22 +100,129 @@ public void DetachGroupMethod()
}
[Test]
- public void AddGroupTest()
+ public void AddAttachedGroupTest()
{
var results = new List();
SDCommandManager.RegisterInputBindingsUpdateHandler(
- new BindingInfoTemplate { Group = bindingGroup },
- delegate() { results.Add("SuperSetTest"); });
+ new BindingInfoTemplate { Groups = new BindingGroupCollection { bindingGroup } },
+ delegate { results.Add("SuperSetTest"); });
var bindingInfo = new InputBindingInfo();
bindingInfo.RoutedCommandName = "ApplicationCommands.Copy";
bindingInfo.OwnerInstanceName = "NamedInstance";
bindingInfo.DefaultGestures.Add(new KeyGesture(Key.C, ModifierKeys.Alt));
- bindingInfo.Groups.Add(bindingGroup);
SDCommandManager.RegisterInputBinding(bindingInfo);
+ Assert.IsFalse(results.Contains("SuperSetTest"));
+
+ bindingGroup.AttachTo(uiElement);
+
+ bindingInfo.Groups.Add(bindingGroup);
Assert.Contains("SuperSetTest", results);
+ Assert.IsTrue(uiElement.InputBindings[0].Command == ApplicationCommands.Copy);
+ }
+
+ [Test]
+ public void RegisterNamedInstanceAfterGroupAttachTest()
+ {
+ var results = new List();
+
+ var otherUIElement = new UIElement();
+
+ var bindingInfo = new InputBindingInfo();
+ bindingInfo.RoutedCommandName = "ApplicationCommands.Copy";
+ bindingInfo.OwnerInstanceName = "OtherNamedInstance";
+ bindingInfo.DefaultGestures.Add(new KeyGesture(Key.C, ModifierKeys.Alt));
+ bindingInfo.Groups.Add(bindingGroup);
+ SDCommandManager.RegisterInputBinding(bindingInfo);
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate(),
+ delegate { results.Add("SubSetTest"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate {
+ RoutedCommandName = "ApplicationCommands.Copy",
+ OwnerInstanceName = "OtherNamedInstance",
+ Groups = new BindingGroupCollection { bindingGroup } },
+ delegate { results.Add("OtherSuperSetTest"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate {
+ RoutedCommandName = "ApplicationCommands.Copy",
+ OwnerInstanceName = "NamedInstance",
+ Groups = new BindingGroupCollection { bindingGroup } },
+ delegate { results.Add("SuperSetTest"); });
+
+ bindingGroup.AttachTo(otherUIElement);
+ Assert.AreEqual(0, uiElement.InputBindings.Count);
+ Assert.IsFalse(results.Contains("SubSetTest"));
+ Assert.IsFalse(results.Contains("OtherSuperSetTest"));
+ Assert.IsFalse(results.Contains("SuperSetTest"));
+
+ SDCommandManager.RegisterNamedUIElement("OtherNamedInstance", otherUIElement);
+ Assert.AreEqual(1, otherUIElement.InputBindings.Count);
+ Assert.IsTrue(results.Contains("SubSetTest"));
+ Assert.IsTrue(results.Contains("OtherSuperSetTest"));
+ Assert.IsFalse(results.Contains("SuperSetTest"));
+ }
+ [Test]
+ public void UnregisterNamedInstanceAttachedToGroupTest()
+ {
+ var results = new List();
+
+ var otherUIElement = new UIElement();
+
+ var bindingInfo = new InputBindingInfo();
+ bindingInfo.RoutedCommandName = "ApplicationCommands.Copy";
+ bindingInfo.OwnerInstanceName = "OtherNamedInstance";
+ bindingInfo.DefaultGestures.Add(new KeyGesture(Key.C, ModifierKeys.Alt));
+ bindingInfo.Groups.Add(bindingGroup);
+ SDCommandManager.RegisterInputBinding(bindingInfo);
+
+ bindingGroup.AttachTo(otherUIElement);
+ SDCommandManager.RegisterNamedUIElement("OtherNamedInstance", otherUIElement);
+ Assert.AreEqual(1, otherUIElement.InputBindings.Count);
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate(),
+ delegate { results.Add("SubSetTest"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate {
+ RoutedCommandName = "ApplicationCommands.Copy",
+ OwnerInstanceName = "OtherNamedInstance",
+ Groups = new BindingGroupCollection { bindingGroup } },
+ delegate { results.Add("OtherSuperSetTest"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate {
+ RoutedCommandName = "ApplicationCommands.Copy",
+ OwnerInstanceName = "NamedInstance",
+ Groups = new BindingGroupCollection { bindingGroup } },
+ delegate { results.Add("SuperSetTest"); });
+
+ SDCommandManager.UnregisterNamedUIElement("OtherNamedInstance", otherUIElement);
+
+ Assert.AreEqual(0, otherUIElement.InputBindings.Count);
+ Assert.IsTrue(results.Contains("SubSetTest"));
+ Assert.IsTrue(results.Contains("OtherSuperSetTest"));
+ Assert.IsFalse(results.Contains("SuperSetTest"));
+ }
+
+ [Test]
+ public void BindingGroupCollectionClearTest()
+ {
+ var group = new BindingGroup();
+ var groups = new BindingGroupCollection{ group };
+
+ var result = false;
+ groups.CollectionChanged += delegate { result = true; };
+
+ Assert.IsFalse(result);
+ groups.Clear();
+ Assert.IsTrue(result);
}
}
}
diff --git a/src/Main/ICSharpCode.Core.Presentation/Test/BindingInfoTemplateDictionaryTests.cs b/src/Main/ICSharpCode.Core.Presentation/Test/BindingInfoTemplateDictionaryTests.cs
index 2d92094eb8e..4a91a09a615 100644
--- a/src/Main/ICSharpCode.Core.Presentation/Test/BindingInfoTemplateDictionaryTests.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/Test/BindingInfoTemplateDictionaryTests.cs
@@ -20,23 +20,23 @@ public void FindAllSuperSetsTest()
dictionary.Add(
new BindingInfoTemplate { },
- new CommandBindingInfo { RoutedCommandName = "SuccessfullTest" });
+ new CommandBindingInfo { RoutedCommandName = "SuccessfullTest", OwnerInstanceName = "1" });
dictionary.Add(
new BindingInfoTemplate { RoutedCommandName = "TestCommands.DoSomething" },
- new CommandBindingInfo { RoutedCommandName = "SuccessfullTest" });
+ new CommandBindingInfo { RoutedCommandName = "SuccessfullTest", OwnerInstanceName = "2" });
dictionary.Add(
new BindingInfoTemplate { OwnerTypeName = "Global2", RoutedCommandName = "TestCommands.DoSomething" },
- new CommandBindingInfo { RoutedCommandName = "SuccessfullTest" });
+ new CommandBindingInfo { RoutedCommandName = "SuccessfullTest", OwnerInstanceName = "3" });
dictionary.Add(
- new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething2", Group = new BindingGroup() },
- new CommandBindingInfo { RoutedCommandName = "SuccessfullTest" });
+ new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething2", Groups = new BindingGroupCollection { new BindingGroup() } },
+ new CommandBindingInfo { RoutedCommandName = "SuccessfullTest", OwnerInstanceName = "4" });
- var doSomethingBindingInfos = dictionary.FindItems(new BindingInfoTemplate(), BindingInfoMatchType.SuperSet);
- Assert.AreEqual(4, doSomethingBindingInfos.Count());
- Assert.IsTrue(doSomethingBindingInfos.All(i => i.RoutedCommandName == "SuccessfullTest"));
+ var allBindingInfos = dictionary.FindItems(new BindingInfoTemplate(), BindingInfoMatchType.SuperSet);
+ Assert.AreEqual(4, allBindingInfos.Count());
+ Assert.IsTrue(allBindingInfos.All(i => i.RoutedCommandName == "SuccessfullTest"));
}
[Test]
@@ -57,7 +57,7 @@ public void FindSuperSetWithRoutedCommandTest()
new CommandBindingInfo { RoutedCommandName = "SuccessfullTest" });
dictionary.Add(
- new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething", Group = new BindingGroup() },
+ new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething", Groups = new BindingGroupCollection { new BindingGroup() } },
new CommandBindingInfo { RoutedCommandName = "SuccessfullTest" });
dictionary.Add(
@@ -87,7 +87,7 @@ public void FindSuperSetWithTwoAttributesTest()
new CommandBindingInfo { RoutedCommandName = "SuccessfullTest" });
dictionary.Add(
- new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething", Group = new BindingGroup() },
+ new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething", Groups = new BindingGroupCollection { new BindingGroup() } },
new CommandBindingInfo { RoutedCommandName = "SuccessfullTest" });
dictionary.Add(
@@ -122,7 +122,7 @@ public void FindAllSubSetsTest()
new CommandBindingInfo { RoutedCommandName = "UnsuccessfullTest" });
dictionary.Add(
- new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething2", Group = new BindingGroup() },
+ new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething2", Groups = new BindingGroupCollection { new BindingGroup() } },
new CommandBindingInfo { RoutedCommandName = "UnsuccessfullTest" });
var doSomethingBindingInfos = dictionary.FindItems(new BindingInfoTemplate(), BindingInfoMatchType.SubSet);
@@ -141,22 +141,22 @@ public void FindSubSetWithGroupTest()
new CommandBindingInfo { RoutedCommandName = "SuccessfullTest" });
dictionary.Add(
- new BindingInfoTemplate { Group = group },
+ new BindingInfoTemplate { Groups = new BindingGroupCollection { group } },
new CommandBindingInfo { RoutedCommandName = "SuccessfullTest" });
dictionary.Add(
- new BindingInfoTemplate { OwnerTypeName = "Global", Group = group },
+ new BindingInfoTemplate { OwnerTypeName = "Global", Groups = new BindingGroupCollection { group } },
new CommandBindingInfo { RoutedCommandName = "UnsuccessfullTest" });
dictionary.Add(
- new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething", Group = group },
+ new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething", Groups = new BindingGroupCollection { group } },
new CommandBindingInfo { RoutedCommandName = "UnsuccessfullTest" });
dictionary.Add(
- new BindingInfoTemplate { OwnerTypeName = "Global", Group = new BindingGroup() },
+ new BindingInfoTemplate { OwnerTypeName = "Global", Groups = new BindingGroupCollection { new BindingGroup() } },
new CommandBindingInfo { RoutedCommandName = "UnsuccessfullTest" });
- var doSomethingBindingInfos = dictionary.FindItems(new BindingInfoTemplate { Group = group }, BindingInfoMatchType.SubSet);
+ var doSomethingBindingInfos = dictionary.FindItems(new BindingInfoTemplate { Groups = new BindingGroupCollection { group } }, BindingInfoMatchType.SubSet);
Assert.AreEqual(2, doSomethingBindingInfos.Count());
Assert.IsTrue(doSomethingBindingInfos.All(i => i.RoutedCommandName == "SuccessfullTest"));
}
@@ -179,7 +179,7 @@ public void FindSubSetWithTwoAttributesTest()
new CommandBindingInfo { RoutedCommandName = "SuccessfullTest" });
dictionary.Add(
- new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething", Group = new BindingGroup() },
+ new BindingInfoTemplate { OwnerTypeName = "Global", RoutedCommandName = "TestCommands.DoSomething", Groups = new BindingGroupCollection { new BindingGroup() } },
new CommandBindingInfo { RoutedCommandName = "UnsuccessfullTest" });
dictionary.Add(
diff --git a/src/Main/ICSharpCode.Core.Presentation/Test/BindingInfoTemplateTests.cs b/src/Main/ICSharpCode.Core.Presentation/Test/BindingInfoTemplateTests.cs
index 4bd4c2fe862..ecfd5696c8b 100644
--- a/src/Main/ICSharpCode.Core.Presentation/Test/BindingInfoTemplateTests.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/Test/BindingInfoTemplateTests.cs
@@ -1,12 +1,30 @@
using System;
using NUnit.Framework;
using ICSharpCode.Core.Presentation;
+using SDCommandManager=ICSharpCode.Core.Presentation.CommandManager;
namespace ICSharpCode.Core.Presentation.Tests
{
[TestFixture]
public class BindingInfoTemplateTests
- {
+ {
+ [TestFixtureSetUp]
+ public void TestFixtureSetUp()
+ {
+ PropertyService.InitializeServiceForUnitTests();
+ }
+
+ [SetUp]
+ public void SetuUp()
+ {
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ SDCommandManager.Reset();
+ }
+
[TestAttribute]
public void IsTemplateForSupersetsTests()
{
@@ -52,18 +70,14 @@ public void IsTemplateForSubsetsTests()
var emptyTemplate = new BindingInfoTemplate();
Assert.IsFalse(emptyTemplate.IsTemplateFor(source, BindingInfoMatchType.SubSet));
- var matchingTemplate = new BindingInfoTemplate();
- matchingTemplate.RoutedCommandName = "TestCommand";
- Assert.IsTrue(matchingTemplate.IsTemplateFor(source, BindingInfoMatchType.SubSet));
-
- var unmatchingTemplate = new BindingInfoTemplate();
- unmatchingTemplate.RoutedCommandName = "OtherTestCommand";
- Assert.IsFalse(unmatchingTemplate.IsTemplateFor(source, BindingInfoMatchType.SubSet));
+ var smallerTemplate = new BindingInfoTemplate();
+ smallerTemplate.RoutedCommandName = "TestCommand";
+ Assert.IsFalse(smallerTemplate.IsTemplateFor(source, BindingInfoMatchType.SubSet));
var overlappingTemplate = new BindingInfoTemplate();
overlappingTemplate.RoutedCommandName = "TestCommand";
overlappingTemplate.OwnerInstanceName = "TestOwnerInstance";
- Assert.IsTrue(overlappingTemplate.IsTemplateFor(source, BindingInfoMatchType.SubSet));
+ Assert.IsFalse(overlappingTemplate.IsTemplateFor(source, BindingInfoMatchType.SubSet));
var biggerTemplate = new BindingInfoTemplate();
biggerTemplate.RoutedCommandName = "TestCommand";
@@ -98,7 +112,7 @@ public void IsTemplateForPartlyMatchingTests()
var overlappingTemplate = new BindingInfoTemplate();
overlappingTemplate.RoutedCommandName = "TestCommand";
overlappingTemplate.OwnerInstanceName = "TestOwnerInstance";
- Assert.IsTrue(overlappingTemplate.IsTemplateFor(source, BindingInfoMatchType.SuperSet | BindingInfoMatchType.SubSet));
+ Assert.IsFalse(overlappingTemplate.IsTemplateFor(source, BindingInfoMatchType.SuperSet | BindingInfoMatchType.SubSet));
var biggerTemplate = new BindingInfoTemplate();
biggerTemplate.RoutedCommandName = "TestCommand";
diff --git a/src/Main/ICSharpCode.Core.Presentation/Test/CommandManagerTests.cs b/src/Main/ICSharpCode.Core.Presentation/Test/CommandManagerTests.cs
index e8c1437586e..a1985dbf227 100644
--- a/src/Main/ICSharpCode.Core.Presentation/Test/CommandManagerTests.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/Test/CommandManagerTests.cs
@@ -35,8 +35,15 @@ public void InvokeInputBindingUpdateHandlersManually()
{
var testResult = false;
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest" }, () => testResult = true);
- SDCommandManager.InvokeInputBindingUpdateHandlers(BindingInfoMatchType.SubSet, new BindingInfoTemplate { RoutedCommandName = "InvokeTest" });
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
+ delegate { testResult = true; });
+
+ SDCommandManager.InvokeInputBindingUpdateHandlers(
+ null,
+ new BindingsUpdatedHandlerArgs(),
+ BindingInfoMatchType.SubSet,
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest" });
Assert.IsTrue(testResult);
}
@@ -48,13 +55,27 @@ public void InvokeInputBindingUpdateHandlersWithTwoParamsManually()
System.IO.File.AppendAllText("C:/test.txt", "Add" + Environment.NewLine);
-
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "InvokeOwner" }, () => testResults.Add("TwoExactAttributes"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest" }, () => testResults.Add("LessMatchingAttributes"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest2" }, () => testResults.Add("LessNotMatchingAttributes"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate(), () => testResults.Add("NoAttributes"));
-
- SDCommandManager.InvokeInputBindingUpdateHandlers(BindingInfoMatchType.SubSet, new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "InvokeOwner" });
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "InvokeOwner" },
+ delegate { testResults.Add("TwoExactAttributes"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
+ delegate { testResults.Add("LessMatchingAttributes"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest2" },
+ delegate { testResults.Add("LessNotMatchingAttributes"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate(),
+ delegate { testResults.Add("NoAttributes"); });
+
+ SDCommandManager.InvokeInputBindingUpdateHandlers(
+ null,
+ new BindingsUpdatedHandlerArgs(),
+ BindingInfoMatchType.SubSet,
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "InvokeOwner" });
Assert.IsTrue(testResults.Contains("TwoExactAttributes"));
Assert.IsTrue(testResults.Contains("LessMatchingAttributes"));
@@ -67,9 +88,18 @@ public void InvokeInputBindingsOnRoutedCommandRegistration()
{
var testResults = new HashSet();
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest" }, () => testResults.Add("test1"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" }, () => testResults.Add("test2"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "ApplicationCommands.Copy" }, () => testResults.Add("ApplicationCommands.Copy"));
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
+ delegate { testResults.Add("test1"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" },
+ delegate { testResults.Add("test2"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "ApplicationCommands.Copy" },
+ delegate { testResults.Add("ApplicationCommands.Copy"); });
+
SDCommandManager.RegisterRoutedUICommand("InvokeTest", "text");
@@ -87,9 +117,17 @@ public void InvokeCommandBindingsOnRoutedCommandRegistration()
{
var testResults = new HashSet();
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest" }, () => testResults.Add("test1"));
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" }, () => testResults.Add("test2"));
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "ApplicationCommands.Copy" }, () => testResults.Add("ApplicationCommands.Copy"));
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
+ delegate { testResults.Add("test1"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" },
+ delegate { testResults.Add("test2"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "ApplicationCommands.Copy" },
+ delegate { testResults.Add("ApplicationCommands.Copy"); });
SDCommandManager.RegisterRoutedUICommand("InvokeTest", "text");
@@ -107,8 +145,13 @@ public void InvokeInputBindingsOnOwnerTypeRegistration()
{
var testResults = new HashSet();
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { OwnerTypeName = "TestOwnerType" }, () => testResults.Add("TestOwnerType1"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerTypeName = "TestOwnerType" }, () => testResults.Add("TestOwnerType2"));
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { OwnerTypeName = "TestOwnerType" },
+ delegate { testResults.Add("TestOwnerType1"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerTypeName = "TestOwnerType" },
+ delegate { testResults.Add("TestOwnerType2"); });
SDCommandManager.RegisterNamedUIType("TestOwnerType", typeof(UserControl));
@@ -121,14 +164,41 @@ public void InvokeCommandBindingsOnOwnerTypeRegistration()
{
var testResults = new HashSet();
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { OwnerTypeName = "TestOwnerType" }, () => testResults.Add("TestOwnerType1"));
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerTypeName = "TestOwnerType" }, () => testResults.Add("TestOwnerType2"));
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { OwnerTypeName = "TestOwnerType" },
+ delegate { testResults.Add("TestOwnerType1"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerTypeName = "TestOwnerType" },
+ delegate { testResults.Add("TestOwnerType2"); });
+
SDCommandManager.RegisterNamedUIType("TestOwnerType", typeof(UserControl));
Assert.IsTrue(testResults.Contains("TestOwnerType1"));
Assert.IsTrue(testResults.Contains("TestOwnerType2"));
}
+ [Test]
+ public void InvokeCommandBindingsOnOwnerTypeUnregistration()
+ {
+ var testResults = new HashSet();
+
+ SDCommandManager.RegisterNamedUIType("TestOwnerType", typeof(UserControl));
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { OwnerTypeName = "TestOwnerType" },
+ delegate { testResults.Add("TestOwnerType1"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerTypeName = "TestOwnerType" },
+ delegate { testResults.Add("TestOwnerType2"); });
+
+ SDCommandManager.UnregisterNamedUIType("TestOwnerType", typeof(UserControl));
+
+ Assert.IsTrue(testResults.Contains("TestOwnerType1"));
+ Assert.IsTrue(testResults.Contains("TestOwnerType2"));
+ }
+
[Test]
public void InvokeInputBindingsOnOwnerInstanceRegistration()
{
@@ -136,8 +206,13 @@ public void InvokeInputBindingsOnOwnerInstanceRegistration()
var uiElement = new UIElement();
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { OwnerInstanceName = "TestOwnerInstance" }, () => testResults.Add("TestOwnerInstance1"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerInstanceName = "TestOwnerInstance" }, () => testResults.Add("TestOwnerInstance2"));
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { OwnerInstanceName = "TestOwnerInstance" },
+ delegate { testResults.Add("TestOwnerInstance1"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerInstanceName = "TestOwnerInstance" },
+ delegate { testResults.Add("TestOwnerInstance2"); });
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", new UIElement());
@@ -152,10 +227,40 @@ public void InvokeCommandBindingsOnOwnerInstanceRegistration()
var uiElement = new UIElement();
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { OwnerInstanceName = "TestOwnerInstance" }, () => testResults.Add("TestOwnerInstance1"));
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerInstanceName = "TestOwnerInstance" }, () => testResults.Add("TestOwnerInstance2"));
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { OwnerInstanceName = "TestOwnerInstance" },
+ delegate { testResults.Add("TestOwnerInstance1"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerInstanceName = "TestOwnerInstance" },
+ delegate { testResults.Add("TestOwnerInstance2"); });
+
+
+ SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", new UIElement());
+
+ Assert.IsTrue(testResults.Contains("TestOwnerInstance1"));
+ Assert.IsTrue(testResults.Contains("TestOwnerInstance2"));
+ }
+
+
+ [Test]
+ public void InvokeCommandBindingsOnOwnerInstanceUnregistration()
+ {
+ var testResults = new HashSet();
+ var uiElement = new UIElement();
+ SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", uiElement);
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", new UIElement());
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { OwnerInstanceName = "TestOwnerInstance" },
+ delegate { testResults.Add("TestOwnerInstance1"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "RoutedCommand", OwnerInstanceName = "TestOwnerInstance" },
+ delegate { testResults.Add("TestOwnerInstance2"); });
+
+ SDCommandManager.UnregisterNamedUIElement("TestOwnerInstance", uiElement);
+
Assert.IsTrue(testResults.Contains("TestOwnerInstance1"));
Assert.IsTrue(testResults.Contains("TestOwnerInstance2"));
}
@@ -169,9 +274,17 @@ public void InvokeBindingsUpdateHandlersOnInputBindingInfoRegistration()
SDCommandManager.RegisterRoutedUICommand("RoutedCommandName", "RoutedCommandText");
var routedCommand = SDCommandManager.GetRoutedUICommand("RoutedCommandName");
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" }, () => testResults.Add("commandTest0"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName" }, () => testResults.Add("commandTest1"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName", OwnerTypeName = "TestOwner" }, () => testResults.Add("commandTest2"));
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
+ delegate { testResults.Add("commandTest0"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName" },
+ delegate { testResults.Add("commandTest1"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName", OwnerTypeName = "TestOwner" },
+ delegate { testResults.Add("commandTest2"); });
SDCommandManager.RegisterInputBinding(new InputBindingInfo {
RoutedCommandName = "RoutedCommandName",
@@ -186,9 +299,17 @@ public void InvokeBindingsUpdateHandlersOnInputBindingInfoRegistration()
var testType = typeof(UserControl);
SDCommandManager.RegisterNamedUIType("TestOwner", testType);
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" }, () => testResults.Add("typeTest0"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest" }, () => testResults.Add("typeTest1"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" }, () => testResults.Add("typeTest2"));
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
+ delegate { testResults.Add("typeTest0"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
+ delegate { testResults.Add("typeTest1"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" },
+ delegate { testResults.Add("typeTest2"); });
SDCommandManager.RegisterInputBinding(new InputBindingInfo {
RoutedCommandName = "InvokeTest",
@@ -203,9 +324,17 @@ public void InvokeBindingsUpdateHandlersOnInputBindingInfoRegistration()
var testInstance = new UIElement();
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", testInstance);
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" }, () => testResults.Add("instanceTest0"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest" }, () => testResults.Add("instanceTest1"));
- SDCommandManager.RegisterInputBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerInstanceName = "TestOwnerInstance" }, () => testResults.Add("instanceTest2"));
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
+ delegate { testResults.Add("instanceTest0"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
+ delegate { testResults.Add("instanceTest1"); });
+
+ SDCommandManager.RegisterInputBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerInstanceName = "TestOwnerInstance" },
+ delegate { testResults.Add("instanceTest2"); });
SDCommandManager.RegisterInputBinding(new InputBindingInfo {
RoutedCommandName = "InvokeTest",
@@ -226,9 +355,16 @@ public void InvokeBindingsUpdateHandlersOnCommandBindingInfoRegistration()
SDCommandManager.RegisterRoutedUICommand("RoutedCommandName", "RoutedCommandText");
var routedCommand = SDCommandManager.GetRoutedUICommand("RoutedCommandName");
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" }, () => testResults.Add("commandTest0"));
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName" }, () => testResults.Add("commandTest1"));
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName", OwnerTypeName = "TestOwner" }, () => testResults.Add("commandTest2"));
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
+ delegate { testResults.Add("commandTest0"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName" },
+ delegate { testResults.Add("commandTest1"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "RoutedCommandName", OwnerTypeName = "TestOwner" }, delegate { testResults.Add("commandTest2"); });
SDCommandManager.RegisterCommandBinding(new CommandBindingInfo {
RoutedCommandName = "RoutedCommandName",
@@ -243,9 +379,17 @@ public void InvokeBindingsUpdateHandlersOnCommandBindingInfoRegistration()
var testType = typeof(UserControl);
SDCommandManager.RegisterNamedUIType("TestOwner", testType);
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" }, () => testResults.Add("typeTest0"));
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest" }, () => testResults.Add("typeTest1"));
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" }, () => testResults.Add("typeTest2"));
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
+ delegate { testResults.Add("typeTest0"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
+ delegate { testResults.Add("typeTest1"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerTypeName = "TestOwner" },
+ delegate { testResults.Add("typeTest2"); });
SDCommandManager.RegisterCommandBinding(new CommandBindingInfo {
RoutedCommandName = "InvokeTest",
@@ -260,9 +404,17 @@ public void InvokeBindingsUpdateHandlersOnCommandBindingInfoRegistration()
var testInstance = new UIElement();
SDCommandManager.RegisterNamedUIElement("TestOwnerInstance", testInstance);
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" }, () => testResults.Add("instanceTest0"));
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest" }, () => testResults.Add("instanceTest1"));
- SDCommandManager.RegisterCommandBindingsUpdateHandler(new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerInstanceName = "TestOwnerInstance" }, () => testResults.Add("instanceTest2"));
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeSomethingUnrelatedTest" },
+ delegate { testResults.Add("instanceTest0"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest" },
+ delegate { testResults.Add("instanceTest1"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { RoutedCommandName = "InvokeTest", OwnerInstanceName = "TestOwnerInstance" },
+ delegate { testResults.Add("instanceTest2"); });
SDCommandManager.RegisterCommandBinding(new CommandBindingInfo {
RoutedCommandName = "InvokeTest",
@@ -273,6 +425,60 @@ public void InvokeBindingsUpdateHandlersOnCommandBindingInfoRegistration()
Assert.IsTrue(testResults.Contains("instanceTest2"));
}
+ [Test]
+ public void InvokeUpdateHandlersOnGroupsSetTest()
+ {
+ var testResults = new HashSet();
+
+ var removedGroup = new BindingGroup { Name = "Removed" };
+ var addedGroup = new BindingGroup { Name = "Added" };
+
+ var bindingInfo = new CommandBindingInfo {
+ RoutedCommandName = "RoutedCommandName",
+ OwnerTypeName = "SomeOwner",
+ Groups = new BindingGroupCollection { removedGroup }
+ };
+
+ SDCommandManager.RegisterCommandBinding(bindingInfo);
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { Groups = new BindingGroupCollection { removedGroup } },
+ delegate { testResults.Add("removedGroup"); });
+
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { Groups = new BindingGroupCollection { addedGroup } },
+ delegate { testResults.Add("addedGroup"); });
+
+ bindingInfo.Groups = new BindingGroupCollection { addedGroup };
+
+ Assert.IsTrue(testResults.Contains("addedGroup"));
+ Assert.IsTrue(testResults.Contains("removedGroup"));
+ }
+
+ [Test]
+ public void InvokeUpdateHandlersOnGroupsClearTest()
+ {
+ var testResults = new HashSet();
+
+ var removedGroup = new BindingGroup();
+ var addedGroup = new BindingGroup();
+
+ var bindingInfo = new CommandBindingInfo {
+ RoutedCommandName = "RoutedCommandName",
+ OwnerTypeName = "SomeOwner",
+ Groups = new BindingGroupCollection { removedGroup }
+ };
+
+ SDCommandManager.RegisterCommandBinding(bindingInfo);
+ SDCommandManager.RegisterCommandBindingsUpdateHandler(
+ new BindingInfoTemplate { Groups = new BindingGroupCollection { removedGroup } },
+ delegate { testResults.Add("removedGroup"); });
+
+ bindingInfo.Groups.Clear();
+
+ Assert.IsTrue(testResults.Contains("removedGroup"));
+ }
+
[Test]
public void NamedUIElementOperationsTest()
{
diff --git a/src/Main/ICSharpCode.Core.Presentation/Test/InputBindingCategoryTests.cs b/src/Main/ICSharpCode.Core.Presentation/Test/InputBindingCategoryTests.cs
index c5fa9694cca..3648e0c089b 100644
--- a/src/Main/ICSharpCode.Core.Presentation/Test/InputBindingCategoryTests.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/Test/InputBindingCategoryTests.cs
@@ -13,6 +13,12 @@ namespace ICSharpCode.Core.Presentation.Tests
[TestFixture]
public class InputBindingCategoryTests
{
+ [TestFixtureSetUp]
+ public void TestFixtureSetUp()
+ {
+ PropertyService.InitializeServiceForUnitTests();
+ }
+
[SetUp]
public void SetuUp()
@@ -76,5 +82,19 @@ public void AssignInputBindingCategoryCollectionWithUnregistredCategoryTests()
SDCommandManager.RegisterInputBindingCategory(category);
Assert.DoesNotThrow(delegate { bindingInfo.Categories = categoryCollection; });
}
+
+ [Test]
+ public void InputBindingCategoryCollectionClearTest()
+ {
+ var category = new InputBindingCategory("/test", "Test");
+ var categories = new InputBindingCategoryCollection { category };
+
+ var result = false;
+ categories.CollectionChanged += delegate { result = true; };
+
+ Assert.IsFalse(result);
+ categories.Clear();
+ Assert.IsTrue(result);
+ }
}
}
diff --git a/src/Main/ICSharpCode.Core.Presentation/Test/RelationshipMapTests.cs b/src/Main/ICSharpCode.Core.Presentation/Test/RelationshipMapTests.cs
index d4060af387e..46014ff62b3 100644
--- a/src/Main/ICSharpCode.Core.Presentation/Test/RelationshipMapTests.cs
+++ b/src/Main/ICSharpCode.Core.Presentation/Test/RelationshipMapTests.cs
@@ -24,5 +24,22 @@ public void WeakReferenceSupportTest()
Assert.IsNull(map.MapForward("test").First().Target);
Assert.AreEqual(1, map.MapBackward(container).Count);
}
+
+ [Test]
+ public void WeakEqualityComparerSupportTest()
+ {
+ var map = new RelationshipMap(null, new WeakReferenceEqualirtyComparer());
+ var uiElement = new UIElement();
+ var container = new WeakReference(uiElement);
+ map.Add("test", container);
+
+ Assert.AreEqual(1, map.MapForward("test").Count);
+ Assert.AreEqual(1, map.MapBackward(new WeakReference(uiElement)).Count);
+
+ map.Remove("test", new WeakReference(uiElement));
+
+ Assert.AreEqual(0, map.MapForward("test").Count);
+ Assert.AreEqual(0, map.MapBackward(new WeakReference(uiElement)).Count);
+ }
}
}