Browse Source

Merge remote-tracking branch 'refs/remotes/icsharpcode/master'

pull/741/head
devgopher 10 years ago
parent
commit
dad76eb372
  1. 12
      .gitmodules
  2. 11
      CONTRIBUTING.md
  3. 46
      SharpDevelop.Tests.sln
  4. 97
      SharpDevelop.sln
  5. 3
      clean.bat
  6. 3
      debugbuild.bat
  7. 3
      doc/Dependencies.html
  8. 3
      releasebuild.bat
  9. 13
      samples/XamlDesigner/App.xaml
  10. 106
      samples/XamlDesigner/App.xaml.cs
  11. 32
      samples/XamlDesigner/BitmapButton.xaml
  12. 45
      samples/XamlDesigner/BitmapButton.xaml.cs
  13. 33
      samples/XamlDesigner/Configuration/AssemblyInfo.cs
  14. 119
      samples/XamlDesigner/Configuration/Settings.Designer.cs
  15. 55
      samples/XamlDesigner/Configuration/Settings.settings
  16. 51
      samples/XamlDesigner/Configuration/app.config
  17. 29
      samples/XamlDesigner/Configuration/app.manifest
  18. 66
      samples/XamlDesigner/Converters.cs
  19. 253
      samples/XamlDesigner/Document.cs
  20. 22
      samples/XamlDesigner/DocumentView.xaml
  21. 68
      samples/XamlDesigner/DocumentView.xaml.cs
  22. 7
      samples/XamlDesigner/EnumBar.xaml
  23. 72
      samples/XamlDesigner/EnumBar.xaml.cs
  24. 26
      samples/XamlDesigner/EnumButton.cs
  25. 23
      samples/XamlDesigner/ErrorListView.xaml
  26. 33
      samples/XamlDesigner/ErrorListView.xaml.cs
  27. 102
      samples/XamlDesigner/ExtensionMethods.cs
  28. BIN
      samples/XamlDesigner/Images/Error.png
  29. BIN
      samples/XamlDesigner/Images/Reference.png
  30. BIN
      samples/XamlDesigner/Images/Tag.png
  31. 133
      samples/XamlDesigner/MainWindow.xaml
  32. 191
      samples/XamlDesigner/MainWindow.xaml.cs
  33. 177
      samples/XamlDesigner/MainWindow_Commands.cs
  34. 49
      samples/XamlDesigner/MyTypeFinder.cs
  35. 4
      samples/XamlDesigner/NewFileTemplate.xaml
  36. 260
      samples/XamlDesigner/Shell.cs
  37. 27
      samples/XamlDesigner/SimpleCommand.cs
  38. 31
      samples/XamlDesigner/TestFiles/1.xaml
  39. 53
      samples/XamlDesigner/TestFiles/2.xaml
  40. 16
      samples/XamlDesigner/TestFiles/3.xaml
  41. 16
      samples/XamlDesigner/TestFiles/4.xaml
  42. 6
      samples/XamlDesigner/Themes/Generic.xaml
  43. 109
      samples/XamlDesigner/Toolbox.cs
  44. 31
      samples/XamlDesigner/ToolboxView.xaml
  45. 94
      samples/XamlDesigner/ToolboxView.xaml.cs
  46. 214
      samples/XamlDesigner/XamlDesigner.csproj
  47. 47
      samples/XamlDesigner/XamlDesigner.sln
  48. 203
      samples/XamlDesigner/XamlFormatter.cs
  49. 6
      samples/XamlDesigner/app.config
  50. 13
      src/AddIns/Analysis/CodeCoverage/Project/Src/CodeCoverageClassTreeNode.cs
  51. 3
      src/AddIns/Analysis/CodeCoverage/Project/Src/CodeCoverageMethodsTreeNode.cs
  52. 5
      src/AddIns/Analysis/CodeCoverage/Project/Src/CodeCoverageResults.cs
  53. 2
      src/AddIns/Analysis/CodeQuality/CodeQuality.csproj
  54. 2
      src/AddIns/Analysis/Profiler/Controller/Profiler.Controller.csproj
  55. 2
      src/AddIns/Analysis/UnitTesting/Test/UnitTesting.Tests.csproj
  56. 3
      src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin
  57. 2
      src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj
  58. 76
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpCompletionBinding.cs
  59. 24
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpCompletionContext.cs
  60. 2
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/CSharpSymbolSearch.cs
  61. 2
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/CreatePropertiesDialog.xaml.cs
  62. 2
      src/AddIns/BackendBindings/CSharpBinding/Tests/CSharpBinding.Tests.csproj
  63. 120
      src/AddIns/BackendBindings/JavaScriptBinding/JavaScriptBinding.sln
  64. 31
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Configuration/AssemblyInfo.cs
  65. 32
      src/AddIns/BackendBindings/JavaScriptBinding/Project/JavaScriptBinding.addin
  66. 99
      src/AddIns/BackendBindings/JavaScriptBinding/Project/JavaScriptBinding.csproj
  67. 52
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/CommonTreeExtensions.cs
  68. 1324
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ES3/ES3.g3
  69. 184
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ES3/ES3Lexer.Action.cs
  70. 192
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ES3/ES3Parser.Action.cs
  71. 8149
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ES3/Generated/ES3Lexer.cs
  72. 12382
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ES3/Generated/ES3Parser.cs
  73. 42
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ITokenExtensions.cs
  74. 55
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptAst.cs
  75. 53
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptAstFactory.cs
  76. 78
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptAstWalker.cs
  77. 60
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptCompilationUnit.cs
  78. 56
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptFunctionDefinition.cs
  79. 45
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptGlobalClass.cs
  80. 92
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptMethodRegion.cs
  81. 88
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptParser.cs
  82. 57
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptRegion.cs
  83. 49
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptRegionEnd.cs
  84. 66
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptRegionStart.cs
  85. 79
      src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptRegionWalker.cs
  86. BIN
      src/AddIns/BackendBindings/JavaScriptBinding/RequiredLibraries/Antlr3.Runtime.dll
  87. 29
      src/AddIns/BackendBindings/JavaScriptBinding/RequiredLibraries/AntlrCSharp3-license.txt
  88. 3
      src/AddIns/BackendBindings/JavaScriptBinding/RequiredLibraries/AntlrCSharp3Runtime-readme.txt
  89. 30
      src/AddIns/BackendBindings/JavaScriptBinding/RequiredLibraries/ES3Grammar-license.txt
  90. 28
      src/AddIns/BackendBindings/JavaScriptBinding/RequiredLibraries/ES3Grammar-readme.txt
  91. 31
      src/AddIns/BackendBindings/JavaScriptBinding/Test/Configuration/AssemblyInfo.cs
  92. 66
      src/AddIns/BackendBindings/JavaScriptBinding/Test/JavaScriptBinding.Tests.csproj
  93. 77
      src/AddIns/BackendBindings/JavaScriptBinding/Test/Src/Helpers/FakeTextBuffer.cs
  94. 522
      src/AddIns/BackendBindings/JavaScriptBinding/Test/Src/JavaScriptParserTests.cs
  95. 31
      src/AddIns/BackendBindings/TypeScript/Project/Configuration/AssemblyInfo.cs
  96. 127
      src/AddIns/BackendBindings/TypeScript/Project/Resources/ImageResources.resx
  97. BIN
      src/AddIns/BackendBindings/TypeScript/Project/Resources/TypeScript.ProjectBrowser.File.png
  98. BIN
      src/AddIns/BackendBindings/TypeScript/Project/Resources/TypeScript.Template.EmptyFile.png
  99. 137
      src/AddIns/BackendBindings/TypeScript/Project/Resources/TypeScript.xshd
  100. 55
      src/AddIns/BackendBindings/TypeScript/Project/Scripts/TypeScript-License.txt
  101. Some files were not shown because too many files have changed in this diff Show More

12
.gitmodules vendored

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
[submodule "src/Libraries/AvalonEdit"]
path = src/Libraries/AvalonEdit
url = https://github.com/icsharpcode/AvalonEdit.git
[submodule "src/Libraries/NRefactory"]
path = src/Libraries/NRefactory
url = https://github.com/icsharpcode/NRefactory.git
[submodule "src/Libraries/cecil"]
path = src/Libraries/cecil
url = https://github.com/jbevain/cecil.git
[submodule "src/Libraries/WpfDesigner"]
path = src/Libraries/WpfDesigner
url = https://github.com/icsharpcode/WpfDesigner.git

11
CONTRIBUTING.md

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
# Contributing to SharpDevelop
Thanks for helping to improve SharpDevelop.
In order for your changes to be accepted you can either sign the [Joint Copyright Assignment](http://www.icsharpcode.net/TechNotes/JointCopyrightAssignment.pdf) or add the following statement to your pull request:
_I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the #develop open source product (the "Contribution"). My Contribution is licensed under the MIT License._
Unless we have a Joint Copyright Agreement on file or this statement is in your pull request, we cannot accept it.
More information is available on [joining the team](https://github.com/icsharpcode/SharpDevelop/wiki/Joining-the-Team).

46
SharpDevelop.Tests.sln

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# SharpDevelop 5.0
# SharpDevelop 5.1
VisualStudioVersion = 12.0.20827.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{256F5C28-532C-44C0-8AB8-D8EC5E492E01}"
@ -94,6 +94,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding.Tests", "src\Ad @@ -94,6 +94,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding.Tests", "src\Ad
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VBBinding", "src\AddIns\BackendBindings\VBBinding\Project\VBBinding.vbproj", "{6D209CBB-D8C1-478A-BC30-D3FC87B7858F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeScriptBinding", "src\AddIns\BackendBindings\TypeScript\Project\TypeScriptBinding.csproj", "{94BBCA55-A20E-4782-93B0-3566D185F7C1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeScriptBinding.Tests", "src\AddIns\BackendBindings\TypeScript\Test\TypeScriptBinding.Tests.csproj", "{6F22CECC-2ABA-4D5D-A3F8-1C4F4A46C915}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{F3662720-9EA2-4591-BBC6-97361DCE50A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpViewer", "src\AddIns\Misc\HelpViewer\HelpViewer.csproj", "{80F76D10-0B44-4D55-B4BD-DAEB5464090C}"
@ -178,15 +182,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.SQLServer" @@ -178,15 +182,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.SQLServer"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{83BAB756-1010-4A2F-9B9D-7F9EBCB288F5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "src\Libraries\WpfDesigner\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "src\Libraries\WpfDesigner\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "src\Libraries\WpfDesigner\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "src\Libraries\WpfDesigner\WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}"
EndProject
@ -398,6 +402,14 @@ Global @@ -398,6 +402,14 @@ Global
{6D209CBB-D8C1-478A-BC30-D3FC87B7858F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D209CBB-D8C1-478A-BC30-D3FC87B7858F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D209CBB-D8C1-478A-BC30-D3FC87B7858F}.Release|Any CPU.Build.0 = Release|Any CPU
{94BBCA55-A20E-4782-93B0-3566D185F7C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94BBCA55-A20E-4782-93B0-3566D185F7C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94BBCA55-A20E-4782-93B0-3566D185F7C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94BBCA55-A20E-4782-93B0-3566D185F7C1}.Release|Any CPU.Build.0 = Release|Any CPU
{6F22CECC-2ABA-4D5D-A3F8-1C4F4A46C915}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6F22CECC-2ABA-4D5D-A3F8-1C4F4A46C915}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6F22CECC-2ABA-4D5D-A3F8-1C4F4A46C915}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6F22CECC-2ABA-4D5D-A3F8-1C4F4A46C915}.Release|Any CPU.Build.0 = Release|Any CPU
{80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -534,18 +546,14 @@ Global @@ -534,18 +546,14 @@ Global
{AFE34868-AFA1-4E1C-9450-47AB4BE329D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AFE34868-AFA1-4E1C-9450-47AB4BE329D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AFE34868-AFA1-4E1C-9450-47AB4BE329D5}.Release|Any CPU.Build.0 = Release|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Any CPU.Build.0 = Release|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|Any CPU.Build.0 = Release|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.Build.0 = Release|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Any CPU.Build.0 = Release|Any CPU
{78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -554,6 +562,10 @@ Global @@ -554,6 +562,10 @@ Global
{88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|Any CPU.Build.0 = Release|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.Build.0 = Release|Any CPU
{85226AFB-CE71-4851-9A75-7EEC663A8E8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85226AFB-CE71-4851-9A75-7EEC663A8E8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85226AFB-CE71-4851-9A75-7EEC663A8E8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -685,6 +697,8 @@ Global @@ -685,6 +697,8 @@ Global
{85C09AD8-183B-403A-869A-7226646218A9} = {E0646C25-36F2-4524-969F-FA621353AB94}
{F390DA70-1FE1-4715-81A0-389AB010C130} = {E0646C25-36F2-4524-969F-FA621353AB94}
{6D209CBB-D8C1-478A-BC30-D3FC87B7858F} = {E0646C25-36F2-4524-969F-FA621353AB94}
{94BBCA55-A20E-4782-93B0-3566D185F7C1} = {E0646C25-36F2-4524-969F-FA621353AB94}
{6F22CECC-2ABA-4D5D-A3F8-1C4F4A46C915} = {E0646C25-36F2-4524-969F-FA621353AB94}
{F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{80F76D10-0B44-4D55-B4BD-DAEB5464090C} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
@ -727,11 +741,11 @@ Global @@ -727,11 +741,11 @@ Global
{EEF5E054-4192-4A57-8FBF-E860D808A51D} = {0F5192F2-0744-4BA9-A074-6BE82D111B8D}
{AFE34868-AFA1-4E1C-9450-47AB4BE329D5} = {0F5192F2-0744-4BA9-A074-6BE82D111B8D}
{83BAB756-1010-4A2F-9B9D-7F9EBCB288F5} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F} = {83BAB756-1010-4A2F-9B9D-7F9EBCB288F5}
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {83BAB756-1010-4A2F-9B9D-7F9EBCB288F5}
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1} = {83BAB756-1010-4A2F-9B9D-7F9EBCB288F5}
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F} = {83BAB756-1010-4A2F-9B9D-7F9EBCB288F5}
{78CC29AC-CC79-4355-B1F2-97936DF198AC} = {83BAB756-1010-4A2F-9B9D-7F9EBCB288F5}
{88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {83BAB756-1010-4A2F-9B9D-7F9EBCB288F5}
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1} = {83BAB756-1010-4A2F-9B9D-7F9EBCB288F5}
{85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}

97
SharpDevelop.sln

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# SharpDevelop 4.3
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# SharpDevelop 5.1
VisualStudioVersion = 12.0.20827.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{256F5C28-532C-44C0-8AB8-D8EC5E492E01}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker35", "src\Main\ICSharpCode.SharpDevelop.BuildWorker35\ICSharpCode.SharpDevelop.BuildWorker35.csproj", "{B5F54272-49F0-40DB-845A-8D837875D3BA}"
EndProject
@ -25,8 +25,6 @@ EndProject @@ -25,8 +25,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker120", "src\Main\ICSharpCode.SharpDevelop.BuildWorker120\ICSharpCode.SharpDevelop.BuildWorker120.csproj", "{6F273DA5-E10C-45A6-9071-7313ECD98C90}"
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}") = "Mono.Cecil", "src\Libraries\cecil\Mono.Cecil.csproj", "{D68133BD-1E63-496E-9EDE-4FBDBF77B486}"
EndProject
@ -56,20 +54,14 @@ EndProject @@ -56,20 +54,14 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Decompiler", "src\Libraries\ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj", "{984CC812-9470-4A13-AFF9-CC44068D666C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{39327899-ED91-4F7F-988C-4FE4E17C014D}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Version Control", "Version Control", "{F208FF4F-E5D8-41D5-A7C7-B463976F156E}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitAddIn", "src\AddIns\VersionControl\GitAddIn\GitAddIn.csproj", "{83F15BA7-8478-4664-81BB-A82F146D88B3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "src\AddIns\VersionControl\SubversionAddIn\SubversionAddIn.csproj", "{17F4D7E0-6933-4C2E-8714-FD7E98D625D5}"
EndProject
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}") = "CSharpBinding", "src\AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}"
EndProject
@ -87,9 +79,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Scripting", "sr @@ -87,9 +79,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Scripting", "sr
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VBBinding", "src\AddIns\BackendBindings\VBBinding\Project\VBBinding.vbproj", "{6D209CBB-D8C1-478A-BC30-D3FC87B7858F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeScriptBinding", "src\AddIns\BackendBindings\TypeScript\Project\TypeScriptBinding.csproj", "{94BBCA55-A20E-4782-93B0-3566D185F7C1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{F3662720-9EA2-4591-BBC6-97361DCE50A9}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}"
EndProject
@ -98,8 +90,6 @@ EndProject @@ -98,8 +90,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "src\AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UsageDataCollector", "UsageDataCollector", "{59A30AA6-D600-41AB-B7A1-9543469DBE36}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector\UsageDataCollector.csproj", "{6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}"
EndProject
@ -114,8 +104,6 @@ EndProject @@ -114,8 +104,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextTemplating", "src\AddIns\Misc\TextTemplating\Project\TextTemplating.csproj", "{B5D8C3E6-42EC-4D4B-AD05-3644B32563EF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PackageManagement", "PackageManagement", "{87D549AF-8FCD-4E84-9C33-3DB6E42FEF6D}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackageManagement", "src\AddIns\Misc\PackageManagement\Project\PackageManagement.csproj", "{AE4AB0FA-6087-4480-AF37-0FA1452B3DA1}"
EndProject
@ -128,16 +116,12 @@ EndProject @@ -128,16 +116,12 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager2", "src\AddIns\Misc\AddInManager2\Project\AddInManager2.csproj", "{60480C2F-F228-4D86-B98F-AF75A7DCEC34}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Reports", "Reports", "{4ABB8D1E-3439-44C8-ACCE-1FA678ABBFB3}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Reporting", "src\AddIns\Misc\Reporting\ICSharpCode.Reporting\ICSharpCode.Reporting.csproj", "{40CA84D4-ACFC-4646-9CDD-B87262D34093}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Reporting.Addin", "src\AddIns\Misc\Reporting\ICSharpCode.Reporting.Addin\ICSharpCode.Reporting.Addin.csproj", "{0502FCF7-72F4-4587-936B-D0238CD0E072}"
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}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}"
EndProject
@ -152,8 +136,6 @@ EndProject @@ -152,8 +136,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{5FB020B2-B64B-4016-999A-CB8FD9274D72}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Addin", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Addin\ICSharpCode.Data.Addin.csproj", "{A9F12710-24E4-46D4-832C-6ECB395B9EAD}"
EndProject
@ -168,24 +150,20 @@ EndProject @@ -168,24 +150,20 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.SQLServer", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.SQLServer\ICSharpCode.Data.SQLServer.csproj", "{AFE34868-AFA1-4E1C-9450-47AB4BE329D5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{D54BEB89-8CBE-475C-8BB9-836D2FD71260}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "src\Libraries\WpfDesigner\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "src\Libraries\WpfDesigner\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "src\Libraries\WpfDesigner\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "src\AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "src\AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{7019F43E-DFD7-4D1C-8C96-E75D55646DE7}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "src\AddIns\Analysis\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}"
EndProject
@ -200,8 +178,6 @@ EndProject @@ -200,8 +178,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeQuality", "src\AddIns\Analysis\CodeQuality\CodeQuality.csproj", "{3C532D80-32B4-40E5-B5FE-BC6BAE1A00E7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Profiler", "Profiler", "{E9BF2761-031F-4CDC-A7E6-F66F3B347311}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controller", "src\AddIns\Analysis\Profiler\Controller\Profiler.Controller.csproj", "{72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}"
EndProject
@ -212,8 +188,6 @@ EndProject @@ -212,8 +188,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controls", "src\AddIns\Analysis\Profiler\Frontend\Controls\Profiler.Controls.csproj", "{BDA49550-5ED1-4C6B-B648-657B2CACD8E0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{49CE38B8-0460-46BF-9DFF-5B33A0F9EB5E}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "src\AddIns\Debugger\Debugger.Core\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
EndProject
@ -347,6 +321,10 @@ Global @@ -347,6 +321,10 @@ Global
{6D209CBB-D8C1-478A-BC30-D3FC87B7858F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D209CBB-D8C1-478A-BC30-D3FC87B7858F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D209CBB-D8C1-478A-BC30-D3FC87B7858F}.Release|Any CPU.Build.0 = Release|Any CPU
{94BBCA55-A20E-4782-93B0-3566D185F7C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94BBCA55-A20E-4782-93B0-3566D185F7C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94BBCA55-A20E-4782-93B0-3566D185F7C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94BBCA55-A20E-4782-93B0-3566D185F7C1}.Release|Any CPU.Build.0 = Release|Any CPU
{9196DD8A-B4D4-4780-8742-C5762E547FC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9196DD8A-B4D4-4780-8742-C5762E547FC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9196DD8A-B4D4-4780-8742-C5762E547FC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -463,10 +441,6 @@ Global @@ -463,10 +441,6 @@ Global
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Any CPU.Build.0 = Release|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|Any CPU.Build.0 = Release|Any CPU
{88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -475,6 +449,10 @@ Global @@ -475,6 +449,10 @@ Global
{78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|Any CPU.Build.0 = Release|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|Any CPU.Build.0 = Release|Any CPU
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -551,24 +529,20 @@ Global @@ -551,24 +529,20 @@ Global
{6F273DA5-E10C-45A6-9071-7313ECD98C90} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{D68133BD-1E63-496E-9EDE-4FBDBF77B486} = {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}
{DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{984CC812-9470-4A13-AFF9-CC44068D666C} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{3B2A5653-EC97-4001-BB9B-D90F1AF2C371} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{53DCA265-3C3C-42F9-B647-F72BA678122B} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{DC393B66-92ED-4CAD-AB25-CFEF23F3D7C6} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{2A705FC6-1A9E-4941-9E47-254D79F2D9D5} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{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}
{DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{984CC812-9470-4A13-AFF9-CC44068D666C} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{F208FF4F-E5D8-41D5-A7C7-B463976F156E} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{E0646C25-36F2-4524-969F-FA621353AB94} = {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}
{7019F43E-DFD7-4D1C-8C96-E75D55646DE7} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{49CE38B8-0460-46BF-9DFF-5B33A0F9EB5E} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{83F15BA7-8478-4664-81BB-A82F146D88B3} = {F208FF4F-E5D8-41D5-A7C7-B463976F156E}
{17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F208FF4F-E5D8-41D5-A7C7-B463976F156E}
{E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94}
{E954F3CB-A446-492F-A664-2B376EBC86E8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{70966F84-74C9-4067-A379-0C674A929233} = {E0646C25-36F2-4524-969F-FA621353AB94}
@ -577,25 +551,28 @@ Global @@ -577,25 +551,28 @@ Global
{E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94}
{7048AE18-EB93-4A84-82D0-DD60EB58ADBD} = {E0646C25-36F2-4524-969F-FA621353AB94}
{6D209CBB-D8C1-478A-BC30-D3FC87B7858F} = {E0646C25-36F2-4524-969F-FA621353AB94}
{94BBCA55-A20E-4782-93B0-3566D185F7C1} = {E0646C25-36F2-4524-969F-FA621353AB94}
{F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{59A30AA6-D600-41AB-B7A1-9543469DBE36} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0} = {59A30AA6-D600-41AB-B7A1-9543469DBE36}
{0008FCE9-9EB4-4E2E-979B-553278E5BBA6} = {59A30AA6-D600-41AB-B7A1-9543469DBE36}
{D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{80F76D10-0B44-4D55-B4BD-DAEB5464090C} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{B5D8C3E6-42EC-4D4B-AD05-3644B32563EF} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{87D549AF-8FCD-4E84-9C33-3DB6E42FEF6D} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{60480C2F-F228-4D86-B98F-AF75A7DCEC34} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{4ABB8D1E-3439-44C8-ACCE-1FA678ABBFB3} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0} = {59A30AA6-D600-41AB-B7A1-9543469DBE36}
{0008FCE9-9EB4-4E2E-979B-553278E5BBA6} = {59A30AA6-D600-41AB-B7A1-9543469DBE36}
{AE4AB0FA-6087-4480-AF37-0FA1452B3DA1} = {87D549AF-8FCD-4E84-9C33-3DB6E42FEF6D}
{A406803B-C584-43A3-BCEE-A0BB3132CB5F} = {87D549AF-8FCD-4E84-9C33-3DB6E42FEF6D}
{1B753D7F-7C77-4D5E-B928-02982690879C} = {87D549AF-8FCD-4E84-9C33-3DB6E42FEF6D}
{E0A5E80A-003B-4335-A9DC-A76E2E46D38D} = {87D549AF-8FCD-4E84-9C33-3DB6E42FEF6D}
{60480C2F-F228-4D86-B98F-AF75A7DCEC34} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{4ABB8D1E-3439-44C8-ACCE-1FA678ABBFB3} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{40CA84D4-ACFC-4646-9CDD-B87262D34093} = {4ABB8D1E-3439-44C8-ACCE-1FA678ABBFB3}
{0502FCF7-72F4-4587-936B-D0238CD0E072} = {4ABB8D1E-3439-44C8-ACCE-1FA678ABBFB3}
{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
@ -603,19 +580,20 @@ Global @@ -603,19 +580,20 @@ Global
{8AA421C8-D7AF-4957-9F43-5135328ACB24} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{5FB020B2-B64B-4016-999A-CB8FD9274D72} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{D54BEB89-8CBE-475C-8BB9-836D2FD71260} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{A9F12710-24E4-46D4-832C-6ECB395B9EAD} = {5FB020B2-B64B-4016-999A-CB8FD9274D72}
{B7823AE9-4B43-4859-8796-2EBDC116FBB8} = {5FB020B2-B64B-4016-999A-CB8FD9274D72}
{BAD94D6E-4159-4CB6-B991-486F412D9BB6} = {5FB020B2-B64B-4016-999A-CB8FD9274D72}
{5C70D6AB-0A33-43F9-B8B5-54558C35BBB1} = {5FB020B2-B64B-4016-999A-CB8FD9274D72}
{EEF5E054-4192-4A57-8FBF-E860D808A51D} = {5FB020B2-B64B-4016-999A-CB8FD9274D72}
{AFE34868-AFA1-4E1C-9450-47AB4BE329D5} = {5FB020B2-B64B-4016-999A-CB8FD9274D72}
{D54BEB89-8CBE-475C-8BB9-836D2FD71260} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F} = {D54BEB89-8CBE-475C-8BB9-836D2FD71260}
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {D54BEB89-8CBE-475C-8BB9-836D2FD71260}
{88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {D54BEB89-8CBE-475C-8BB9-836D2FD71260}
{78CC29AC-CC79-4355-B1F2-97936DF198AC} = {D54BEB89-8CBE-475C-8BB9-836D2FD71260}
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {D54BEB89-8CBE-475C-8BB9-836D2FD71260}
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{7019F43E-DFD7-4D1C-8C96-E75D55646DE7} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{1F261725-6318-4434-A1B1-6C70CE4CD324} = {7019F43E-DFD7-4D1C-8C96-E75D55646DE7}
{3EAA45A9-735C-4AC7-A799-947B93EA449D} = {7019F43E-DFD7-4D1C-8C96-E75D55646DE7}
{C16BEA37-FEE8-4792-B860-48F5BFBD39A9} = {7019F43E-DFD7-4D1C-8C96-E75D55646DE7}
@ -627,6 +605,7 @@ Global @@ -627,6 +605,7 @@ Global
{D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B} = {E9BF2761-031F-4CDC-A7E6-F66F3B347311}
{FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {E9BF2761-031F-4CDC-A7E6-F66F3B347311}
{BDA49550-5ED1-4C6B-B648-657B2CACD8E0} = {E9BF2761-031F-4CDC-A7E6-F66F3B347311}
{49CE38B8-0460-46BF-9DFF-5B33A0F9EB5E} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {49CE38B8-0460-46BF-9DFF-5B33A0F9EB5E}
{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {49CE38B8-0460-46BF-9DFF-5B33A0F9EB5E}
EndGlobalSection

3
clean.bat

@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
@set PROGFILES=%PROGRAMFILES%
@if exist "%PROGRAMFILES(x86)%" set PROGFILES=%PROGRAMFILES(x86)%
@if not exist "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit.sln" (
git submodule update --init || exit /b 1
)
"%PROGFILES%\MSBuild\12.0\Bin\msbuild" /m SharpDevelop.sln /t:clean "/p:Platform=Any CPU" /p:Configuration=Debug
@IF %ERRORLEVEL% NEQ 0 PAUSE
"%PROGFILES%\MSBuild\12.0\Bin\msbuild" /m SharpDevelop.sln /t:clean "/p:Platform=Any CPU" /p:Configuration=Release

3
debugbuild.bat

@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
@set PROGFILES=%PROGRAMFILES%
@if exist "%PROGRAMFILES(x86)%" set PROGFILES=%PROGRAMFILES(x86)%
@if not exist "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit.sln" (
git submodule update --init || exit /b 1
)
"%PROGFILES%\MSBuild\12.0\Bin\msbuild" /m SharpDevelop.sln /p:Configuration=Debug "/p:Platform=Any CPU" %*
@IF %ERRORLEVEL% NEQ 0 GOTO err
@exit /B 0

3
doc/Dependencies.html

@ -33,6 +33,9 @@ @@ -33,6 +33,9 @@
<li>
<a href="http://shfb.codeplex.com/">SHFB</a> for documentation generation support.
</li>
<li>
<a href="https://www.microsoft.com/en-us/download/details.aspx?id=5555">Visual C++ 2010 Runtime</a> for TypeScript support.
</li>
<li>
<a href="http://wixtoolset.org/">WiX</a> for building installers.
</li>

3
releasebuild.bat

@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
@set PROGFILES=%PROGRAMFILES%
@if exist "%PROGRAMFILES(x86)%" set PROGFILES=%PROGRAMFILES(x86)%
@if not exist "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit.sln" (
git submodule update --init || exit /b 1
)
"%PROGFILES%\MSBuild\12.0\Bin\msbuild" /m SharpDevelop.sln /p:Configuration=Release "/p:Platform=Any CPU" %*
@IF %ERRORLEVEL% NEQ 0 GOTO err
@exit /B 0

13
samples/XamlDesigner/App.xaml

@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
<Application x:Class="ICSharpCode.XamlDesigner.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Converters="clr-namespace:ICSharpCode.XamlDesigner.Converters"
StartupUri="MainWindow.xaml"
ShutdownMode="OnMainWindowClose">
<Application.Resources>
<Converters:CollapsedWhenFalse x:Key="CollapsedWhenFalse" />
<Converters:FalseWhenZero x:Key="FalseWhenZero" />
</Application.Resources>
</Application>

106
samples/XamlDesigner/App.xaml.cs

@ -1,106 +0,0 @@ @@ -1,106 +0,0 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Windows;
using System.Windows.Threading;
using ICSharpCode.WpfDesign.Designer;
using ICSharpCode.XamlDesigner.Configuration;
namespace ICSharpCode.XamlDesigner
{
public partial class App
{
public static string[] Args;
protected override void OnStartup(StartupEventArgs e)
{
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AppDomain_CurrentDomain_AssemblyResolve);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomain_CurrentDomain_UnhandledException);
DragDropExceptionHandler.UnhandledException += new ThreadExceptionEventHandler(DragDropExceptionHandler_UnhandledException);
DispatcherUnhandledException += App_DispatcherUnhandledException;
Args = e.Args;
base.OnStartup(e);
}
private static bool internalLoad = false;
private static string lastRequesting = null;
Assembly AppDomain_CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
var assList = AppDomain.CurrentDomain.GetAssemblies();
var loaded = assList.FirstOrDefault(x => x.FullName == args.Name);
if (loaded != null)
{
return loaded;
}
if (internalLoad)
return null;
if (args.Name.Split(new [] { ',' })[0].Trim().EndsWith(".resources"))
return null;
internalLoad = true;
Assembly ass = null;
try {
ass = Assembly.Load(args.Name);
}
catch (Exception) { }
if (ass == null && args.RequestingAssembly != null) {
lastRequesting = args.RequestingAssembly.Location;
var dir = Path.GetDirectoryName(args.RequestingAssembly.Location);
var file = args.Name.Split(new [] { ',' })[0].Trim() + ".dll";
try {
ass = Assembly.LoadFrom(Path.Combine(dir, file));
}
catch (Exception) { }
}
else if (lastRequesting != null) {
var dir = Path.GetDirectoryName(lastRequesting);
var file = args.Name.Split(new [] { ',' })[0].Trim() + ".dll";
try {
ass = Assembly.LoadFrom(Path.Combine(dir, file));
}
catch (Exception) { }
}
internalLoad = false;
return ass;
}
void DragDropExceptionHandler_UnhandledException(object sender, ThreadExceptionEventArgs e)
{
Shell.ReportException(e.Exception);
}
void AppDomain_CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Shell.ReportException(e.ExceptionObject as Exception);
}
void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
Shell.ReportException(e.Exception);
e.Handled = true;
}
protected override void OnExit(ExitEventArgs e)
{
Settings.Default.Save();
base.OnExit(e);
}
}
}

32
samples/XamlDesigner/BitmapButton.xaml

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
<Button x:Class="ICSharpCode.XamlDesigner.BitmapButton"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Focusable="False">
<Button.Template>
<ControlTemplate TargetType="Button">
<Image x:Name="image1"
Stretch="None"
Source="{Binding ImageNormal}" />
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Source"
Value="{Binding ImageHover}"
TargetName="image1" />
</Trigger>
<Trigger Property="IsPressed"
Value="True">
<Setter Property="Source"
Value="{Binding ImagePressed}"
TargetName="image1" />
</Trigger>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Source"
Value="{Binding ImageDisabled}"
TargetName="image1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>

45
samples/XamlDesigner/BitmapButton.xaml.cs

@ -1,45 +0,0 @@ @@ -1,45 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ICSharpCode.XamlDesigner
{
public partial class BitmapButton
{
public BitmapButton()
{
InitializeComponent();
DataContext = this;
}
public string ImageHover {
get { return "Images/" + GetType().Name + ".Hover.png"; }
}
public string ImageNormal {
get { return "Images/" + GetType().Name + ".Normal.png"; }
}
public string ImagePressed {
get { return "Images/" + GetType().Name + ".Pressed.png"; }
}
public string ImageDisabled {
get { return "Images/" + GetType().Name + ".Disabled.png"; }
}
}
class CloseButton : BitmapButton
{
}
}

33
samples/XamlDesigner/Configuration/AssemblyInfo.cs

@ -1,33 +0,0 @@ @@ -1,33 +0,0 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("XamlDesigner")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

119
samples/XamlDesigner/Configuration/Settings.Designer.cs generated

@ -1,119 +0,0 @@ @@ -1,119 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3031
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ICSharpCode.XamlDesigner.Configuration {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0,0,0,0")]
public global::System.Windows.Rect MainWindowRect {
get {
return ((global::System.Windows.Rect)(this["MainWindowRect"]));
}
set {
this["MainWindowRect"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute(@"<DockingManager version=""1.3.0"">
<ResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""0,0"" Orientation=""Vertical"">
<ResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1920,1153.04"" Orientation=""Horizontal"">
<ResizingPanel ResizeWidth=""250"" ResizeHeight=""*"" EffectiveSize=""250,1153.04"" Orientation=""Vertical"">
<DockablePane ResizeWidth=""0.742440632565806*"" ResizeHeight=""0.742440632565806*"" EffectiveSize=""250,851.609103178282"" ID=""bb7a5fd3-be24-4636-8fd6-a50a09e65e69"" Anchor=""Left"" IsAutoHidden=""false"">
<DockableContent Name=""content1"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""315"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
<DockablePane ResizeWidth=""0.257559367434194*"" ResizeHeight=""0.257559367434194*"" EffectiveSize=""250,295.430896821718"" ID=""17cd1941-1004-4ed9-8cda-03c254681289"" Anchor=""Left"" IsAutoHidden=""false"">
<DockableContent Name=""content2"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""328"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
</ResizingPanel>
<ResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1408,1153.04"" Orientation=""Vertical"">
<DocumentPaneResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1408,965.04"" Orientation=""Vertical"">
<DocumentPane IsMain=""true"" ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1408,965.04"" />
</DocumentPaneResizingPanel>
<DockablePane ResizeWidth=""*"" ResizeHeight=""182"" EffectiveSize=""1408,182"" ID=""ebd34b7e-6a89-42c6-b172-0e666b0d8a0a"" Anchor=""Bottom"" IsAutoHidden=""false"">
<DockableContent Name=""content3"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""1920"" Height=""400"" Anchor=""Bottom"" State=""Docked"" />
</DockablePane>
</ResizingPanel>
<ResizingPanel ResizeWidth=""250"" ResizeHeight=""*"" EffectiveSize=""250,1153.04"" Orientation=""Vertical"">
<DockablePane ResizeWidth=""0.145251345356991*"" ResizeHeight=""0.145251345356991*"" EffectiveSize=""250,166.609103178283"" ID=""aa545474-48b3-49a6-b76c-b0c625e79e4c"" Anchor=""Right"" IsAutoHidden=""false"">
<DockableContent Name=""content5"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""550.666666666667"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
<DockablePane ResizeWidth=""0.854748654643009*"" ResizeHeight=""0.854748654643009*"" EffectiveSize=""250,980.430896821717"" ID=""64e5518b-2c83-4e22-908d-a510a6995c27"" Anchor=""Right"" IsAutoHidden=""false"">
<DockableContent Name=""content4"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""399.967430639324"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
</ResizingPanel>
</ResizingPanel>
</ResizingPanel>
<Hidden />
<Windows />
</DockingManager>")]
public string AvalonDockLayout {
get {
return ((string)(this["AvalonDockLayout"]));
}
set {
this["AvalonDockLayout"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Collections.Specialized.StringCollection RecentFiles {
get {
return ((global::System.Collections.Specialized.StringCollection)(this["RecentFiles"]));
}
set {
this["RecentFiles"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute(@"<?xml version=""1.0"" encoding=""utf-16""?>
<ArrayOfString xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
<string>%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.0\PresentationFramework.dll</string>
</ArrayOfString>")]
public global::System.Collections.Specialized.StringCollection AssemblyList {
get {
return ((global::System.Collections.Specialized.StringCollection)(this["AssemblyList"]));
}
set {
this["AssemblyList"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Maximized")]
public global::System.Windows.WindowState MainWindowState {
get {
return ((global::System.Windows.WindowState)(this["MainWindowState"]));
}
set {
this["MainWindowState"] = value;
}
}
}
}

55
samples/XamlDesigner/Configuration/Settings.settings

@ -1,55 +0,0 @@ @@ -1,55 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="ICSharpCode.XamlDesigner.Configuration" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="MainWindowRect" Type="System.Windows.Rect" Scope="User">
<Value Profile="(Default)">0,0,0,0</Value>
</Setting>
<Setting Name="AvalonDockLayout" Type="System.String" Scope="User">
<Value Profile="(Default)">&lt;DockingManager version="1.3.0"&gt;
&lt;ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="0,0" Orientation="Vertical"&gt;
&lt;ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1920,1153.04" Orientation="Horizontal"&gt;
&lt;ResizingPanel ResizeWidth="250" ResizeHeight="*" EffectiveSize="250,1153.04" Orientation="Vertical"&gt;
&lt;DockablePane ResizeWidth="0.742440632565806*" ResizeHeight="0.742440632565806*" EffectiveSize="250,851.609103178282" ID="bb7a5fd3-be24-4636-8fd6-a50a09e65e69" Anchor="Left" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content1" FloatingWindowSize="250,400" ChildIndex="0" Width="315" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;DockablePane ResizeWidth="0.257559367434194*" ResizeHeight="0.257559367434194*" EffectiveSize="250,295.430896821718" ID="17cd1941-1004-4ed9-8cda-03c254681289" Anchor="Left" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content2" FloatingWindowSize="250,400" ChildIndex="0" Width="328" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1408,1153.04" Orientation="Vertical"&gt;
&lt;DocumentPaneResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1408,965.04" Orientation="Vertical"&gt;
&lt;DocumentPane IsMain="true" ResizeWidth="*" ResizeHeight="*" EffectiveSize="1408,965.04" /&gt;
&lt;/DocumentPaneResizingPanel&gt;
&lt;DockablePane ResizeWidth="*" ResizeHeight="182" EffectiveSize="1408,182" ID="ebd34b7e-6a89-42c6-b172-0e666b0d8a0a" Anchor="Bottom" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content3" FloatingWindowSize="250,400" ChildIndex="0" Width="1920" Height="400" Anchor="Bottom" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;ResizingPanel ResizeWidth="250" ResizeHeight="*" EffectiveSize="250,1153.04" Orientation="Vertical"&gt;
&lt;DockablePane ResizeWidth="0.145251345356991*" ResizeHeight="0.145251345356991*" EffectiveSize="250,166.609103178283" ID="aa545474-48b3-49a6-b76c-b0c625e79e4c" Anchor="Right" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content5" FloatingWindowSize="250,400" ChildIndex="0" Width="550.666666666667" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;DockablePane ResizeWidth="0.854748654643009*" ResizeHeight="0.854748654643009*" EffectiveSize="250,980.430896821717" ID="64e5518b-2c83-4e22-908d-a510a6995c27" Anchor="Right" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content4" FloatingWindowSize="250,400" ChildIndex="0" Width="399.967430639324" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;/ResizingPanel&gt;
&lt;/ResizingPanel&gt;
&lt;Hidden /&gt;
&lt;Windows /&gt;
&lt;/DockingManager&gt;</Value>
</Setting>
<Setting Name="RecentFiles" Type="System.Collections.Specialized.StringCollection" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="AssemblyList" Type="System.Collections.Specialized.StringCollection" Scope="User">
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;string&gt;%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.0\PresentationFramework.dll&lt;/string&gt;
&lt;/ArrayOfString&gt;</Value>
</Setting>
<Setting Name="MainWindowState" Type="System.Windows.WindowState" Scope="User">
<Value Profile="(Default)">Maximized</Value>
</Setting>
</Settings>
</SettingsFile>

51
samples/XamlDesigner/Configuration/app.config

@ -1,51 +0,0 @@ @@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="ICSharpCode.XamlDesigner.Configuration.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<ICSharpCode.XamlDesigner.Configuration.Settings>
<setting name="MainWindowRect" serializeAs="String">
<value>0,0,0,0</value>
</setting>
<setting name="AvalonDockLayout" serializeAs="String">
<value>&lt;DockingManager&gt;
&lt;ResizingPanel Orientation="Horizontal"&gt;
&lt;ResizingPanel ResizeWidth="200" Orientation="Vertical"&gt;
&lt;DockablePane ResizeHeight="441.36166666666668" Anchor="Left"&gt;
&lt;DockableContent Name="content1" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
&lt;DockablePane ResizeWidth="200" Anchor="Left"&gt;
&lt;DockableContent Name="content2" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;ResizingPanel Orientation="Vertical"&gt;
&lt;DocumentPanePlaceHolder /&gt;
&lt;DockablePane ResizeHeight="138" Anchor="Bottom"&gt;
&lt;DockableContent Name="content3" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;DockablePane ResizeWidth="271" Anchor="Right"&gt;
&lt;DockableContent Name="content4" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;Hidden /&gt;
&lt;Windows /&gt;
&lt;/DockingManager&gt;</value>
</setting>
<setting name="AssemblyList" serializeAs="Xml">
<value>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<string>%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.0\PresentationFramework.dll</string>
</ArrayOfString>
</value>
</setting>
<setting name="MainWindowState" serializeAs="String">
<value>Maximized</value>
</setting>
</ICSharpCode.XamlDesigner.Configuration.Settings>
</userSettings>
</configuration>

29
samples/XamlDesigner/Configuration/app.manifest

@ -1,29 +0,0 @@ @@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
</dependentAssembly>
</dependency>
</asmv1:assembly>

66
samples/XamlDesigner/Converters.cs

@ -1,66 +0,0 @@ @@ -1,66 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Globalization;
using System.Windows;
using System.Collections;
namespace ICSharpCode.XamlDesigner.Converters
{
public class EnumToIntConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return (int)value;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
}
public class CollapsedWhenFalse : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return (bool)value ? Visibility.Visible : Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
public class FalseWhenZero : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null || (int)value == 0) {
return false;
}
return true;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
public class LevelConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return new Thickness(5 + 19 * (int)value, 0, 5, 0);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

253
samples/XamlDesigner/Document.cs

@ -1,253 +0,0 @@ @@ -1,253 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.IO;
using ICSharpCode.WpfDesign.Designer;
using ICSharpCode.WpfDesign.Designer.Xaml;
using ICSharpCode.WpfDesign.Designer.OutlineView;
using System.Xml;
using ICSharpCode.WpfDesign;
using ICSharpCode.WpfDesign.Designer.Services;
using System.Diagnostics;
using ICSharpCode.WpfDesign.XamlDom;
namespace ICSharpCode.XamlDesigner
{
public class Document : INotifyPropertyChanged
{
public Document(string tempName, string text)
{
this.tempName = tempName;
Text = text;
IsDirty = false;
}
public Document(string filePath)
{
this.filePath = filePath;
ReloadFile();
}
string tempName;
DesignSurface designSurface = new DesignSurface();
string text;
public string Text {
get {
return text;
}
set {
if (text != value) {
text = value;
IsDirty = true;
RaisePropertyChanged("Text");
}
}
}
DocumentMode mode;
public DocumentMode Mode {
get {
return mode;
}
set {
mode = value;
if (InDesignMode) {
UpdateDesign();
}
else {
UpdateXaml();
}
RaisePropertyChanged("Mode");
RaisePropertyChanged("InXamlMode");
RaisePropertyChanged("InDesignMode");
}
}
public bool InXamlMode {
get { return Mode == DocumentMode.Xaml; }
}
public bool InDesignMode {
get { return Mode == DocumentMode.Design; }
}
string filePath;
public string FilePath {
get {
return filePath;
}
private set {
filePath = value;
RaisePropertyChanged("FilePath");
RaisePropertyChanged("FileName");
RaisePropertyChanged("Title");
RaisePropertyChanged("Name");
}
}
bool isDirty;
public bool IsDirty {
get {
return isDirty;
}
private set {
isDirty = value;
RaisePropertyChanged("IsDirty");
RaisePropertyChanged("Name");
RaisePropertyChanged("Title");
}
}
public string FileName {
get {
if (FilePath == null) return null;
return Path.GetFileName(FilePath);
}
}
public string Name {
get {
return FileName ?? tempName;
}
}
public string Title {
get {
return IsDirty ? Name + "*" : Name;
}
}
public DesignSurface DesignSurface {
get { return designSurface; }
}
public DesignContext DesignContext {
get { return designSurface.DesignContext; }
}
public UndoService UndoService {
get { return DesignContext.Services.GetService<UndoService>(); }
}
public ISelectionService SelectionService {
get {
if (InDesignMode) {
return DesignContext.Services.Selection;
}
return null;
}
}
public XamlErrorService XamlErrorService {
get {
if (DesignContext != null) {
return DesignContext.Services.GetService<XamlErrorService>();
}
return null;
}
}
IOutlineNode outlineRoot;
public IOutlineNode OutlineRoot {
get {
return outlineRoot;
}
private set {
outlineRoot = value;
RaisePropertyChanged("OutlineRoot");
}
}
void ReloadFile()
{
Text = File.ReadAllText(FilePath);
UpdateDesign();
IsDirty = false;
}
public void Save()
{
if (InDesignMode) {
UpdateXaml();
}
File.WriteAllText(FilePath, Text);
IsDirty = false;
}
public void SaveAs(string filePath)
{
FilePath = filePath;
Save();
}
public void Refresh()
{
UpdateXaml();
UpdateDesign();
}
void UpdateXaml()
{
var sb = new StringBuilder();
using (var xmlWriter = new XamlXmlWriter(sb)) {
DesignSurface.SaveDesigner(xmlWriter);
Text = XamlFormatter.Format(sb.ToString());
}
}
void UpdateDesign()
{
OutlineRoot = null;
using (var xmlReader = XmlReader.Create(new StringReader(Text))) {
XamlLoadSettings settings = new XamlLoadSettings();
foreach (var assNode in Toolbox.Instance.AssemblyNodes)
{
settings.DesignerAssemblies.Add(assNode.Assembly);
}
settings.TypeFinder = MyTypeFinder.Instance;
DesignSurface.LoadDesigner(xmlReader, settings);
}
if (DesignContext.RootItem != null) {
OutlineRoot = OutlineNode.Create(DesignContext.RootItem);
UndoService.UndoStackChanged += new EventHandler(UndoService_UndoStackChanged);
}
RaisePropertyChanged("SelectionService");
RaisePropertyChanged("XamlErrorService");
}
void UndoService_UndoStackChanged(object sender, EventArgs e)
{
IsDirty = true;
if (InXamlMode) {
UpdateXaml();
}
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
void RaisePropertyChanged(string name)
{
if (PropertyChanged != null) {
PropertyChanged(this, new PropertyChangedEventArgs(name));
}
}
#endregion
}
public enum DocumentMode
{
Xaml, Design
}
}

22
samples/XamlDesigner/DocumentView.xaml

@ -1,22 +0,0 @@ @@ -1,22 +0,0 @@
<UserControl
x:Class="ICSharpCode.XamlDesigner.DocumentView"
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Default="clr-namespace:ICSharpCode.XamlDesigner"
xmlns:DesignerControls="clr-namespace:ICSharpCode.WpfDesign.Designer.Controls;assembly=ICSharpCode.WpfDesign.Designer"
xmlns:AvalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
>
<DockPanel>
<DesignerControls:EnumBar
Value="{Binding Mode}"
DockPanel.Dock="Bottom"/>
<Grid>
<AvalonEdit:TextEditor
x:Name="uxTextEditor"
SyntaxHighlighting="XML" ShowLineNumbers="True"
Visibility="{Binding InXamlMode, Converter={StaticResource CollapsedWhenFalse}}" />
<ContentPresenter Content="{Binding DesignSurface}"
Visibility="{Binding InDesignMode, Converter={StaticResource CollapsedWhenFalse}}"/>
</Grid>
</DockPanel>
</UserControl>

68
samples/XamlDesigner/DocumentView.xaml.cs

@ -1,68 +0,0 @@ @@ -1,68 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
using ICSharpCode.WpfDesign.Designer.Services;
namespace ICSharpCode.XamlDesigner
{
public partial class DocumentView
{
public DocumentView(Document doc)
{
InitializeComponent();
Document = doc;
Shell.Instance.Views[doc] = this;
//uxTextEditor.DataBindings.Add("Text", doc, "Text", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
Document.Mode = DocumentMode.Design;
Document.PropertyChanged += new PropertyChangedEventHandler(Document_PropertyChanged);
uxTextEditor.TextChanged += new EventHandler(uxTextEditor_TextChanged);
}
void uxTextEditor_TextChanged(object sender, EventArgs e)
{
Document.Text = uxTextEditor.Text;
}
void Document_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "Text" && Document.Text != uxTextEditor.Text)
uxTextEditor.Text = Document.Text;
}
public Document Document { get; private set; }
public void JumpToError(XamlError error)
{
Document.Mode = DocumentMode.Xaml;
try {
uxTextEditor.ScrollTo(error.Line, error.Column);
uxTextEditor.CaretOffset = uxTextEditor.Document.GetOffset(error.Line, error.Column);
int n = 0;
char chr;
while ((chr = uxTextEditor.Document.GetCharAt(uxTextEditor.CaretOffset + n)) != ' ' && chr != '.' && chr != '<' && chr != '>' && chr != '"')
{ n++; }
uxTextEditor.SelectionLength = n;
}
catch (ArgumentException) {
// invalid line number
}
}
}
}

7
samples/XamlDesigner/EnumBar.xaml

@ -1,7 +0,0 @@ @@ -1,7 +0,0 @@
<UserControl
x:Class="ICSharpCode.XamlDesigner.EnumBar"
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel x:Name="uxPanel"
Orientation="Horizontal" />
</UserControl>

72
samples/XamlDesigner/EnumBar.xaml.cs

@ -1,72 +0,0 @@ @@ -1,72 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls.Primitives;
namespace ICSharpCode.XamlDesigner
{
public partial class EnumBar
{
public EnumBar()
{
InitializeComponent();
}
Type currentEnumType;
public static readonly DependencyProperty ValueProperty =
DependencyProperty.Register("Value", typeof(object), typeof(EnumBar),
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
public object Value {
get { return (object)GetValue(ValueProperty); }
set { SetValue(ValueProperty, value); }
}
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
{
base.OnPropertyChanged(e);
if (e.Property == ValueProperty) {
var type = e.NewValue.GetType();
if (currentEnumType != type) {
currentEnumType = type;
uxPanel.Children.Clear();
foreach (var v in Enum.GetValues(type)) {
var b = new EnumButton();
b.Value = v;
b.Content = Enum.GetName(type, v);
b.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(button_PreviewMouseLeftButtonDown);
uxPanel.Children.Add(b);
}
}
foreach (EnumButton c in uxPanel.Children) {
if (c.Value.Equals(Value)) {
c.IsChecked = true;
}
else {
c.IsChecked = false;
}
}
}
}
void button_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
Value = (sender as EnumButton).Value;
e.Handled = true;
}
}
}

26
samples/XamlDesigner/EnumButton.cs

@ -1,26 +0,0 @@ @@ -1,26 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls.Primitives;
using System.Windows;
namespace ICSharpCode.XamlDesigner
{
public class EnumButton : ToggleButton
{
static EnumButton()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(EnumButton),
new FrameworkPropertyMetadata(typeof(EnumButton)));
}
public static readonly DependencyProperty ValueProperty =
DependencyProperty.Register("Value", typeof(object), typeof(EnumButton));
public object Value {
get { return (object)GetValue(ValueProperty); }
set { SetValue(ValueProperty, value); }
}
}
}

23
samples/XamlDesigner/ErrorListView.xaml

@ -1,23 +0,0 @@ @@ -1,23 +0,0 @@
<ListBox x:Class="ICSharpCode.XamlDesigner.ErrorListView"
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Services="clr-namespace:ICSharpCode.WpfDesign.Designer.Services;assembly=ICSharpCode.WpfDesign.Designer">
<Control.Resources>
<DataTemplate DataType="{x:Type Services:XamlError}">
<StackPanel Orientation="Horizontal">
<Image Source="Images/Error.png"
Stretch="None"
Margin="2"/>
<TextBlock TextAlignment="Right" Text="{Binding Line}" Width="25"
VerticalAlignment="Center"/>
<TextBlock Text=" / "
VerticalAlignment="Center"/>
<TextBlock Text="{Binding Column}" Width="25"
VerticalAlignment="Center"/>
<TextBlock Text=" - " />
<TextBlock Text="{Binding Message}"
VerticalAlignment="Center"/>
</StackPanel>
</DataTemplate>
</Control.Resources>
</ListBox>

33
samples/XamlDesigner/ErrorListView.xaml.cs

@ -1,33 +0,0 @@ @@ -1,33 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ICSharpCode.WpfDesign.Designer.Services;
namespace ICSharpCode.XamlDesigner
{
public partial class ErrorListView
{
public ErrorListView()
{
InitializeComponent();
}
protected override void OnMouseDoubleClick(MouseButtonEventArgs e)
{
var error = e.GetDataContext() as XamlError;
if (error != null) {
Shell.Instance.JumpToError(error);
}
}
}
}

102
samples/XamlDesigner/ExtensionMethods.cs

@ -1,102 +0,0 @@ @@ -1,102 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Media;
using System.IO;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Collections;
namespace ICSharpCode.XamlDesigner
{
static class ExtensionMethods
{
public static IEnumerable<string> Paths(this IDataObject data)
{
string[] paths = (string[])data.GetData(DataFormats.FileDrop);
if (paths != null) {
foreach (var path in paths) {
yield return path;
}
}
}
public static T GetObject<T>(this IDataObject data)
{
return (T)data.GetData(typeof(T).FullName);
}
public static Stream ToStream(this string s)
{
return new MemoryStream(Encoding.UTF8.GetBytes(s));
}
public static void AddRange<T>(this ObservableCollection<T> col, IEnumerable<T> items)
{
foreach (var item in items) {
col.Add(item);
}
}
public static void KeepSyncronizedWith<S>(this IList target, ObservableCollection<S> source, Func<S, object> convert)
{
target.Clear();
foreach (var item in source) {
target.Add(convert(item));
}
source.CollectionChanged += delegate(object sender, NotifyCollectionChangedEventArgs e) {
switch (e.Action) {
case NotifyCollectionChangedAction.Add:
target.Add(convert((S)e.NewItems[0]));
break;
case NotifyCollectionChangedAction.Remove:
target.RemoveAt(e.OldStartingIndex);
break;
case NotifyCollectionChangedAction.Move:
target.RemoveAt(e.OldStartingIndex);
target.Insert(e.NewStartingIndex, e.NewItems[0]);
break;
case NotifyCollectionChangedAction.Replace:
target[e.NewStartingIndex] = convert((S)e.NewItems[0]);
break;
case NotifyCollectionChangedAction.Reset:
target.Clear();
break;
}
};
}
public static object GetDataContext(this RoutedEventArgs e)
{
var f = e.OriginalSource as FrameworkElement;
if (f != null) return f.DataContext;
return null;
}
}
}

BIN
samples/XamlDesigner/Images/Error.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

BIN
samples/XamlDesigner/Images/Reference.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
samples/XamlDesigner/Images/Tag.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 B

133
samples/XamlDesigner/MainWindow.xaml

@ -1,133 +0,0 @@ @@ -1,133 +0,0 @@
<Window x:Class="ICSharpCode.XamlDesigner.MainWindow"
x:Name="root"
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sd="http://sharpdevelop.net"
xmlns:AvalonDock="clr-namespace:AvalonDock;assembly=AvalonDock"
xmlns:Outline="clr-namespace:ICSharpCode.WpfDesign.Designer.OutlineView;assembly=ICSharpCode.WpfDesign.Designer"
xmlns:Default="clr-namespace:ICSharpCode.XamlDesigner"
SnapsToDevicePixels="True"
AllowDrop="True"
Title="{Binding Title}">
<Window.CommandBindings>
<CommandBinding Command="New"
Executed="NewCommand_Executed" />
<CommandBinding Command="Open"
Executed="OpenCommand_Executed" />
<CommandBinding Command="Close"
Executed="CloseCommand_Executed"
CanExecute="CurrentDocument_CanExecute"
PreviewExecuted="CloseCommand_PreviewExecuted"/>
<CommandBinding Command="Default:MainWindow.CloseAllCommand"
Executed="CloseAllCommand_Executed"
CanExecute="CurrentDocument_CanExecute" />
<CommandBinding Command="Save"
Executed="SaveCommand_Executed"
CanExecute="CurrentDocument_CanExecute" />
<CommandBinding Command="SaveAs"
Executed="SaveAsCommand_Executed"
CanExecute="CurrentDocument_CanExecute" />
<CommandBinding Command="Default:MainWindow.SaveAllCommand"
Executed="SaveAllCommand_Executed"
CanExecute="CurrentDocument_CanExecute" />
<CommandBinding Command="Default:MainWindow.ExitCommand"
Executed="ExitCommand_Executed" />
<CommandBinding Command="Default:MainWindow.RunCommand"
Executed="RunCommand_Executed" />
<CommandBinding Command="Default:MainWindow.RenderToBitmapCommand"
Executed="RenderToBitmapCommand_Executed" />
</Window.CommandBindings>
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Header="File">
<MenuItem Command="New" />
<MenuItem Command="Open" />
<Separator />
<MenuItem Command="Close" />
<MenuItem Command="Default:MainWindow.CloseAllCommand" />
<Separator />
<MenuItem Command="Save" />
<MenuItem Command="SaveAs" />
<MenuItem Command="Default:MainWindow.SaveAllCommand" />
<Separator />
<MenuItem Header="Recent Files"
ItemsSource="{Binding RecentFiles}"
IsEnabled="{Binding RecentFiles.Count, Converter={StaticResource FalseWhenZero}}"
Click="RecentFiles_Click"/>
<Separator />
<MenuItem Command="Default:MainWindow.ExitCommand" />
</MenuItem>
<MenuItem Header="Edit">
<MenuItem Command="Undo" />
<MenuItem Command="Redo" />
<Separator />
<MenuItem Command="Cut" />
<MenuItem Command="Copy" />
<MenuItem Command="Paste" />
<MenuItem Command="Delete" />
<MenuItem Command="SelectAll" />
<Separator />
<MenuItem Command="Default:MainWindow.RefreshCommand" />
<MenuItem Command="Find" />
</MenuItem>
<MenuItem Header="Test">
<MenuItem Command="Default:MainWindow.RunCommand" />
<MenuItem Command="Default:MainWindow.RenderToBitmapCommand" />
</MenuItem>
</Menu>
<AvalonDock:DockingManager x:Name="uxDockingManager">
<AvalonDock:ResizingPanel>
<AvalonDock:DocumentPane x:Name="uxDocumentPane"
SelectedValue="{Binding CurrentDocument}"
SelectedValuePath="DataContext"/>
<AvalonDock:DockablePane>
<AvalonDock:DockableContent x:Name="content1" Title="Toolbox">
<Default:ToolboxView />
</AvalonDock:DockableContent>
</AvalonDock:DockablePane>
<AvalonDock:DockablePane>
<AvalonDock:DockableContent x:Name="content2" Title="Outline">
<Outline:Outline Root="{Binding CurrentDocument.OutlineRoot}"/>
</AvalonDock:DockableContent>
</AvalonDock:DockablePane>
<AvalonDock:DockablePane>
<AvalonDock:DockableContent x:Name="content3" Title="Errors">
<Default:ErrorListView ItemsSource="{Binding CurrentDocument.XamlErrorService.Errors}"/>
</AvalonDock:DockableContent>
</AvalonDock:DockablePane>
<AvalonDock:DockablePane>
<AvalonDock:DockableContent x:Name="content4" Title="Properties">
<sd:PropertyGridView x:Name="uxPropertyGridView"
SelectedItems="{Binding DataContext.CurrentDocument.SelectionService.SelectedItems, ElementName=root, FallbackValue={x:Null}}"/>
</AvalonDock:DockableContent>
</AvalonDock:DockablePane>
<AvalonDock:DockablePane>
<AvalonDock:DockableContent x:Name="content5" Title="Thumbnail">
<sd:ThumbnailView x:Name="uxThumbnailView" DesignSurface="{Binding DataContext.CurrentDocument.DesignSurface, ElementName=root, FallbackValue={x:Null}}" />
</AvalonDock:DockableContent>
</AvalonDock:DockablePane>
</AvalonDock:ResizingPanel>
</AvalonDock:DockingManager>
</DockPanel>
</Window>

191
samples/XamlDesigner/MainWindow.xaml.cs

@ -1,191 +0,0 @@ @@ -1,191 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using ICSharpCode.XamlDesigner.Configuration;
using System.ComponentModel;
using Microsoft.Win32;
using AvalonDock;
using System.IO;
using System.Collections.Specialized;
using ICSharpCode.WpfDesign.Designer;
namespace ICSharpCode.XamlDesigner
{
public partial class MainWindow
{
public MainWindow()
{
Instance = this;
DataContext = Shell.Instance;
RenameCommands();
BasicMetadata.Register();
InitializeComponent();
Shell.Instance.PropertyGrid = uxPropertyGridView.PropertyGrid;
AvalonDockWorkaround();
RouteDesignSurfaceCommands();
this.AddCommandHandler(RefreshCommand, Shell.Instance.Refresh, Shell.Instance.CanRefresh);
LoadSettings();
ProcessPaths(App.Args);
ApplicationCommands.New.Execute(null, this);
}
public static MainWindow Instance;
OpenFileDialog openFileDialog;
SaveFileDialog saveFileDialog;
protected override void OnDragEnter(DragEventArgs e)
{
ProcessDrag(e);
}
protected override void OnDragOver(DragEventArgs e)
{
ProcessDrag(e);
}
protected override void OnDrop(DragEventArgs e)
{
ProcessPaths(e.Data.Paths());
}
protected override void OnClosing(CancelEventArgs e)
{
if (Shell.Instance.PrepareExit()) {
SaveSettings();
}
else {
e.Cancel = true;
}
base.OnClosing(e);
}
void RecentFiles_Click(object sender, RoutedEventArgs e)
{
var path = (string)(e.OriginalSource as MenuItem).Header;
Shell.Instance.Open(path);
}
void ProcessDrag(DragEventArgs e)
{
e.Effects = DragDropEffects.None;
e.Handled = true;
foreach (var path in e.Data.Paths()) {
if (path.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase) ||
path.EndsWith(".exe", StringComparison.InvariantCultureIgnoreCase)) {
e.Effects = DragDropEffects.Copy;
break;
}
else if (path.EndsWith(".xaml", StringComparison.InvariantCultureIgnoreCase)) {
e.Effects = DragDropEffects.Copy;
break;
}
}
}
void ProcessPaths(IEnumerable<string> paths)
{
foreach (var path in paths) {
if (path.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase) ||
path.EndsWith(".exe", StringComparison.InvariantCultureIgnoreCase)) {
Toolbox.Instance.AddAssembly(path);
}
else if (path.EndsWith(".xaml", StringComparison.InvariantCultureIgnoreCase)) {
Shell.Instance.Open(path);
}
}
}
public string AskOpenFileName()
{
if (openFileDialog == null) {
openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Xaml Documents (*.xaml)|*.xaml";
}
if ((bool)openFileDialog.ShowDialog()) {
return openFileDialog.FileName;
}
return null;
}
public string AskSaveFileName(string initName)
{
if (saveFileDialog == null) {
saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "Xaml Documents (*.xaml)|*.xaml";
}
saveFileDialog.FileName = initName;
if ((bool)saveFileDialog.ShowDialog()) {
return saveFileDialog.FileName;
}
return null;
}
void LoadSettings()
{
WindowState = Settings.Default.MainWindowState;
Rect r = Settings.Default.MainWindowRect;
if (r != new Rect()) {
Left = r.Left;
Top = r.Top;
Width = r.Width;
Height = r.Height;
}
uxDockingManager.Loaded += delegate {
if (Settings.Default.AvalonDockLayout != null) {
uxDockingManager.RestoreLayout(Settings.Default.AvalonDockLayout.ToStream());
}
};
}
void SaveSettings()
{
Settings.Default.MainWindowState = WindowState;
if (WindowState == WindowState.Normal) {
Settings.Default.MainWindowRect = new Rect(Left, Top, Width, Height);
}
var writer = new StringWriter();
uxDockingManager.SaveLayout(writer);
Settings.Default.AvalonDockLayout = writer.ToString();
Shell.Instance.SaveSettings();
}
#region AvalonDockWorkaround
void AvalonDockWorkaround()
{
uxDocumentPane.Items.KeepSyncronizedWith(Shell.Instance.Documents, d => CreateContentFor(d));
}
DocumentContent CreateContentFor(Document doc)
{
var content = new DocumentContent() {
DataContext = doc,
Content = new DocumentView(doc)
};
content.SetBinding(DocumentContent.TitleProperty, "Title");
return content;
}
#endregion
}
}

177
samples/XamlDesigner/MainWindow_Commands.cs

@ -1,177 +0,0 @@ @@ -1,177 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Xml;
using Microsoft.Win32;
namespace ICSharpCode.XamlDesigner
{
public partial class MainWindow
{
public static SimpleCommand CloseAllCommand = new SimpleCommand("Close All");
public static SimpleCommand SaveAllCommand = new SimpleCommand("Save All", ModifierKeys.Control | ModifierKeys.Shift, Key.S);
public static SimpleCommand ExitCommand = new SimpleCommand("Exit");
public static SimpleCommand RefreshCommand = new SimpleCommand("Refresh", Key.F5);
public static SimpleCommand RunCommand = new SimpleCommand("Run", ModifierKeys.Shift, Key.F5);
public static SimpleCommand RenderToBitmapCommand = new SimpleCommand("Render to Bitmap");
static void RenameCommands()
{
ApplicationCommands.Open.Text = "Open...";
ApplicationCommands.SaveAs.Text = "Save As...";
}
void NewCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
Shell.Instance.New();
}
void OpenCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
Shell.Instance.Open();
}
void CloseCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
Shell.Instance.CloseCurrentDocument();
}
void CloseCommand_PreviewExecuted(object sender, ExecutedRoutedEventArgs e)
{
Shell.Instance.CloseCurrentDocument();
}
void CloseAllCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
Shell.Instance.CloseAll();
}
void SaveCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
Shell.Instance.SaveCurrentDocument();
}
void SaveAsCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
Shell.Instance.SaveCurrentDocumentAs();
}
void SaveAllCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
Shell.Instance.SaveAll();
}
void RunCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
StringBuilder sb = new StringBuilder();
var xmlWriter = XmlWriter.Create(new StringWriter(sb));
Shell.Instance.CurrentDocument.DesignSurface.SaveDesigner(xmlWriter);
var txt = sb.ToString();
var xmlReader = XmlReader.Create(new StringReader(txt));
var ctl = XamlReader.Load(xmlReader);
Window wnd = ctl as Window;
if (wnd == null) {
wnd = new Window();
wnd.Content = ctl;
}
wnd.Show();
}
void RenderToBitmapCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
int desiredWidth = 300;
int desiredHeight = 300;
StringBuilder sb = new StringBuilder();
var xmlWriter = XmlWriter.Create(new StringWriter(sb));
Shell.Instance.CurrentDocument.DesignSurface.SaveDesigner(xmlWriter);
var txt = sb.ToString();
var xmlReader = XmlReader.Create(new StringReader(txt));
var ctl = XamlReader.Load(xmlReader) as Control;
if (ctl is Window) {
var wnd = ctl as Window;
wnd.Width = desiredWidth;
wnd.Height = desiredHeight;
wnd.Top = -10000;
wnd.Left = -10000;
wnd.Show();
} else {
ctl.Measure(new Size(desiredWidth, desiredHeight));
ctl.Arrange(new Rect(new Size(desiredWidth, desiredHeight)));
}
RenderTargetBitmap bmp = new RenderTargetBitmap(300, 300, 96, 96, PixelFormats.Default);
bmp.Render(ctl);
var encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(bmp));
var dlg = new SaveFileDialog();
dlg.Filter = "*.png|*.png";
if (dlg.ShowDialog() == true) {
using (Stream stm = File.OpenWrite(dlg.FileName)) {
encoder.Save(stm);
stm.Flush();
}
}
if (ctl is Window) {
var wnd = ctl as Window;
wnd.Close();
}
}
void ExitCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
Shell.Instance.Exit();
}
void CurrentDocument_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = Shell.Instance.CurrentDocument != null;
}
void RouteDesignSurfaceCommands()
{
RouteDesignSurfaceCommand(ApplicationCommands.Undo);
RouteDesignSurfaceCommand(ApplicationCommands.Redo);
RouteDesignSurfaceCommand(ApplicationCommands.Copy);
RouteDesignSurfaceCommand(ApplicationCommands.Cut);
RouteDesignSurfaceCommand(ApplicationCommands.Paste);
RouteDesignSurfaceCommand(ApplicationCommands.SelectAll);
RouteDesignSurfaceCommand(ApplicationCommands.Delete);
}
void RouteDesignSurfaceCommand(RoutedCommand command)
{
var cb = new CommandBinding(command);
cb.CanExecute += delegate(object sender, CanExecuteRoutedEventArgs e) {
if (Shell.Instance.CurrentDocument != null) {
Shell.Instance.CurrentDocument.DesignSurface.RaiseEvent(e);
}else {
e.CanExecute = false;
}
};
cb.Executed += delegate(object sender, ExecutedRoutedEventArgs e) {
Shell.Instance.CurrentDocument.DesignSurface.RaiseEvent(e);
};
CommandBindings.Add(cb);
}
}
}

49
samples/XamlDesigner/MyTypeFinder.cs

@ -1,49 +0,0 @@ @@ -1,49 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
using ICSharpCode.WpfDesign.XamlDom;
namespace ICSharpCode.XamlDesigner
{
public class MyTypeFinder : XamlTypeFinder
{
public override Assembly LoadAssembly(string name)
{
foreach (var assemblyNode in Toolbox.Instance.AssemblyNodes)
{
if (assemblyNode.Name == name)
return assemblyNode.Assembly;
}
return null;
}
public override XamlTypeFinder Clone()
{
return _instance;
}
private static object lockObj = new object();
private static MyTypeFinder _instance;
public static MyTypeFinder Instance
{
get
{
lock (lockObj)
{
if (_instance == null)
{
_instance = new MyTypeFinder();
_instance.ImportFrom(CreateWpfTypeFinder());
}
}
return _instance;
}
}
}
}

4
samples/XamlDesigner/NewFileTemplate.xaml

@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Canvas />
</Window>

260
samples/XamlDesigner/Shell.cs

@ -1,260 +0,0 @@ @@ -1,260 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;
using ICSharpCode.WpfDesign.Designer.PropertyGrid;
using ICSharpCode.XamlDesigner.Configuration;
using System.Collections.Specialized;
using System.IO;
using System.Windows;
using System.Diagnostics;
using ICSharpCode.WpfDesign.Designer.Services;
namespace ICSharpCode.XamlDesigner
{
public class Shell : INotifyPropertyChanged
{
public Shell()
{
Documents = new ObservableCollection<Document>();
RecentFiles = new ObservableCollection<string>();
Views = new Dictionary<object, FrameworkElement>();
LoadSettings();
}
public static Shell Instance = new Shell();
public const string ApplicationTitle = "Xaml Designer";
//public Toolbox Toolbox { get; set; }
//public SceneTree SceneTree { get; set; }
public IPropertyGrid PropertyGrid { get; internal set; }
//public ErrorList ErrorList { get; set; }
public ObservableCollection<Document> Documents { get; private set; }
public ObservableCollection<string> RecentFiles { get; private set; }
public Dictionary<object, FrameworkElement> Views { get; private set; }
Document currentDocument;
public Document CurrentDocument {
get {
return currentDocument;
}
set {
currentDocument = value;
RaisePropertyChanged("CurrentDocument");
RaisePropertyChanged("Title");
}
}
public string Title {
get {
if (CurrentDocument != null) {
return CurrentDocument.Title + " - " + ApplicationTitle;
}
return ApplicationTitle;
}
}
void LoadSettings()
{
if (Settings.Default.RecentFiles != null) {
RecentFiles.AddRange(Settings.Default.RecentFiles.Cast<string>());
}
}
public void SaveSettings()
{
if (Settings.Default.RecentFiles == null) {
Settings.Default.RecentFiles = new StringCollection();
}
else {
Settings.Default.RecentFiles.Clear();
}
foreach (var f in RecentFiles) {
Settings.Default.RecentFiles.Add(f);
}
}
public static void ReportException(Exception x)
{
MessageBox.Show(x.ToString());
}
public void JumpToError(XamlError error)
{
if (CurrentDocument != null) {
(Views[CurrentDocument] as DocumentView).JumpToError(error);
}
}
public bool CanRefresh()
{
return CurrentDocument != null;
}
public void Refresh()
{
CurrentDocument.Refresh();
}
#region Files
bool IsSomethingDirty {
get {
foreach (var doc in Shell.Instance.Documents) {
if (doc.IsDirty) return true;
}
return false;
}
}
static int nonameIndex = 1;
public void New()
{
Document doc = new Document("New" + nonameIndex++, File.ReadAllText("NewFileTemplate.xaml"));
Documents.Add(doc);
CurrentDocument = doc;
}
public void Open()
{
var path = MainWindow.Instance.AskOpenFileName();
if (path != null) {
Open(path);
}
}
public void Open(string path)
{
path = Path.GetFullPath(path);
if (RecentFiles.Contains(path)) {
RecentFiles.Remove(path);
}
RecentFiles.Insert(0, path);
foreach (var doc in Documents) {
if (doc.FilePath == path) {
CurrentDocument = doc;
return;
}
}
var newDoc = new Document(path);
Documents.Add(newDoc);
CurrentDocument = newDoc;
}
public bool Save(Document doc)
{
if (doc.IsDirty) {
if (doc.FilePath == null) {
return SaveAs(doc);
}
doc.Save();
}
return true;
}
public bool SaveAs(Document doc)
{
var initName = doc.FileName ?? doc.Name + ".xaml";
var path = MainWindow.Instance.AskSaveFileName(initName);
if (path != null) {
doc.SaveAs(path);
return true;
}
return false;
}
public bool SaveAll()
{
foreach (var doc in Documents) {
if (!Save(doc)) return false;
}
return true;
}
public bool Close(Document doc)
{
if (doc.IsDirty) {
var result = MessageBox.Show("Save \"" + doc.Name + "\" ?", Shell.ApplicationTitle,
MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
if (result == MessageBoxResult.Yes) {
if (!Save(doc)) return false;
}
else if (result == MessageBoxResult.Cancel) {
return false;
}
}
Documents.Remove(doc);
Views.Remove(doc);
return true;
}
public bool CloseAll()
{
foreach (var doc in Documents.ToArray()) {
if (!Close(doc)) return false;
}
return true;
}
public bool PrepareExit()
{
if (IsSomethingDirty) {
var result = MessageBox.Show("Save All?", Shell.ApplicationTitle,
MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
if (result == MessageBoxResult.Yes) {
if (!SaveAll()) return false;
}
else if (result == MessageBoxResult.Cancel) {
return false;
}
}
return true;
}
public void Exit()
{
MainWindow.Instance.Close();
}
public void SaveCurrentDocument()
{
Save(CurrentDocument);
}
public void SaveCurrentDocumentAs()
{
SaveAs(CurrentDocument);
}
public void CloseCurrentDocument()
{
Close(CurrentDocument);
}
#endregion
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
void RaisePropertyChanged(string name)
{
if (PropertyChanged != null) {
PropertyChanged(this, new PropertyChangedEventArgs(name));
}
}
#endregion
}
}

27
samples/XamlDesigner/SimpleCommand.cs

@ -1,27 +0,0 @@ @@ -1,27 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
namespace ICSharpCode.XamlDesigner
{
public class SimpleCommand : RoutedUICommand
{
public SimpleCommand(string text)
{
Text = text;
}
public SimpleCommand(string text, ModifierKeys modifiers, Key key)
{
InputGestures.Add(new KeyGesture(key, modifiers));
Text = text;
}
public SimpleCommand(string text, Key key)
: this(text, ModifierKeys.None, key)
{
}
}
}

31
samples/XamlDesigner/TestFiles/1.xaml

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
<Window xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="WindowTitle"
BorderThickness="10"
Width="400"
Height="300">
<StackPanel>
<Canvas Height="50">
<Button>CB</Button>
</Canvas>
<TabControl MinHeight="150">
<TabItem Header="StackPanel">
<StackPanel>
<Button>a</Button>
</StackPanel>
</TabItem>
<TabItem Header="Button">
<Button>button on page 2</Button>
</TabItem>
<TabItem Header="Canvas">
<Canvas />
</TabItem>
<TabItem Header="Grid">
<Grid />
</TabItem>
<TabItem Header="DockPanel">
<DockPanel />
</TabItem>
</TabControl>
</StackPanel>
</Window>

53
samples/XamlDesigner/TestFiles/2.xaml

@ -1,53 +0,0 @@ @@ -1,53 +0,0 @@
<Window xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="524"
Height="385">
<Canvas>
<Ellipse Width="146"
Height="63"
Fill="#FF5DAF05"
Stroke="#FF000000"
StrokeThickness="8"
Canvas.Left="8"
Canvas.Top="158.9" />
<Grid Width="279"
Height="336.99999999999989"
Background="#FFFFFFE1"
Canvas.Left="226.99999999999994"
Canvas.Top="8.0000000000000853">
<Panel.Children>
<TextBlock Width="59"
Height="39"
Margin="0,10,12,0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
FontSize="33"
Text="Grid"
Grid.Column="0"
Grid.Row="0" />
</Panel.Children>
</Grid>
<GroupBox Content="GroupBox"
Width="175.39666666666668"
Height="116"
Canvas.Left="8"
Canvas.Top="8" />
<TextBlock Width="66.710000000000008"
FontSize="14"
Text="StackPanel"
Canvas.Left="8"
Canvas.Top="133" />
<StackPanel Width="209.99999999999994"
Height="114.09999999999991"
Background="#FFEDEDED"
Canvas.Left="8"
Canvas.Top="230.90000000000012">
<Panel.Children />
</StackPanel>
<Button Content="bla-blakjh"
Width="54.999999999999886"
Height="88.900000000000091"
Canvas.Left="163.00000000000006"
Canvas.Top="133.00000000000003" />
</Canvas>
</Window>

16
samples/XamlDesigner/TestFiles/3.xaml

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
<Window xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Name="root"
Title="Hydralisk">
<Window.Resources>
<sys:String x:Key="r1">Title</sys:String>
<sys:String x:Key="r2">Width</sys:String>
</Window.Resources>
<StackPanel>
<Button Name="b1"
Width="100"
Content="Button" />
<TextBlock Text="{Binding Path={StaticResource r1}, ElementName=root}" />
</StackPanel>
</Window>

16
samples/XamlDesigner/TestFiles/4.xaml

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
<Window xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Name="root"
Title="Hydralisk">
<Window.Resources>
<sys:String x:Key="r1">Title</sys:String>
<sys:String x:Key="r2">Width</sys:String>
</Window.Resources>
<StackPanel>
<Button Name="b1"
Width="100"
Content="Button" />
<TextBlock Text="{Binding Path={StaticResource r1}, ElementName=root}" />
</StackPanel>
</Window>

6
samples/XamlDesigner/Themes/Generic.xaml

@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Default="clr-namespace:ICSharpCode.XamlDesigner"
xmlns:Converters="clr-namespace:ICSharpCode.XamlDesigner.Converters">
</ResourceDictionary>

109
samples/XamlDesigner/Toolbox.cs

@ -1,109 +0,0 @@ @@ -1,109 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Collections.ObjectModel;
using ICSharpCode.XamlDesigner.Configuration;
using System.Windows;
using System.Collections.Specialized;
using ICSharpCode.WpfDesign;
namespace ICSharpCode.XamlDesigner
{
public class Toolbox
{
public Toolbox()
{
AssemblyNodes = new ObservableCollection<AssemblyNode>();
LoadSettings();
}
public static Toolbox Instance = new Toolbox();
public ObservableCollection<AssemblyNode> AssemblyNodes { get; private set; }
public void AddAssembly(string path)
{
AddAssembly(path, true);
}
void AddAssembly(string path, bool updateSettings)
{
var assembly = Assembly.LoadFile(path);
MyTypeFinder.Instance.RegisterAssembly(assembly);
var node = new AssemblyNode();
node.Assembly = assembly;
node.Path = path;
foreach (var t in assembly.GetExportedTypes()) {
if (IsControl(t) /* && Metadata.IsPopularControl(t) */) {
node.Controls.Add(new ControlNode() { Type = t });
}
}
node.Controls.Sort(delegate(ControlNode c1, ControlNode c2) {
return c1.Name.CompareTo(c2.Name);
});
AssemblyNodes.Add(node);
if (updateSettings) {
if (Settings.Default.AssemblyList == null) {
Settings.Default.AssemblyList = new StringCollection();
}
Settings.Default.AssemblyList.Add(path);
}
}
public void Remove(AssemblyNode node)
{
AssemblyNodes.Remove(node);
Settings.Default.AssemblyList.Remove(node.Path);
}
public void LoadSettings()
{
if (Settings.Default.AssemblyList != null) {
foreach (var path in Settings.Default.AssemblyList) {
try
{
AddAssembly(Environment.ExpandEnvironmentVariables(path), false);
}
catch (Exception)
{ }
}
}
}
static bool IsControl(Type t)
{
return !t.IsAbstract && !t.IsGenericTypeDefinition && t.IsSubclassOf(typeof(UIElement)) && t.GetConstructor(BindingFlags.Public | BindingFlags.Instance, null, Type.EmptyTypes, null) != null;
}
}
public class AssemblyNode
{
public AssemblyNode()
{
Controls = new List<ControlNode>();
}
public Assembly Assembly { get; set; }
public List<ControlNode> Controls { get; private set; }
public string Path { get; set; }
public string Name {
get { return Assembly.GetName().Name; }
}
}
public class ControlNode
{
public Type Type { get; set; }
public string Name {
get { return Type.Name; }
}
}
}

31
samples/XamlDesigner/ToolboxView.xaml

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
<UserControl x:Class="ICSharpCode.XamlDesigner.ToolboxView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Outline="clr-namespace:ICSharpCode.WpfDesign.Designer.OutlineView;assembly=ICSharpCode.WpfDesign.Designer"
xmlns:Default="clr-namespace:ICSharpCode.XamlDesigner">
<UserControl.ContextMenu>
<ContextMenu>
<MenuItem Header="Browse..." Click="BrowseForAssemblies_OnClick"></MenuItem>
</ContextMenu>
</UserControl.ContextMenu>
<UserControl.Resources>
<HierarchicalDataTemplate DataType="{x:Type Default:AssemblyNode}"
ItemsSource="{Binding Controls}">
<Outline:IconItem Icon="Images/Reference.png"
Text="{Binding Name}"
ToolTip="{Binding Path}" />
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type Default:ControlNode}">
<Outline:IconItem Icon="Images/Tag.png"
Text="{Binding Type.Name}" />
</DataTemplate>
</UserControl.Resources>
<TreeView x:Name="uxTreeView"
ItemsSource="{Binding AssemblyNodes}"
BorderThickness="0"/>
</UserControl>

94
samples/XamlDesigner/ToolboxView.xaml.cs

@ -1,94 +0,0 @@ @@ -1,94 +0,0 @@
using System.IO;
using ICSharpCode.WpfDesign.Designer.OutlineView;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ICSharpCode.WpfDesign.Designer.Services;
using Microsoft.Win32;
namespace ICSharpCode.XamlDesigner
{
public partial class ToolboxView
{
public ToolboxView()
{
DataContext = Toolbox.Instance;
InitializeComponent();
new DragListener(this).DragStarted += Toolbox_DragStarted;
uxTreeView.SelectedItemChanged += uxTreeView_SelectedItemChanged;
uxTreeView.GotKeyboardFocus += uxTreeView_GotKeyboardFocus;
}
void uxTreeView_GotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
{
PrepareTool(uxTreeView.SelectedItem as ControlNode, false);
}
void uxTreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
{
PrepareTool(uxTreeView.SelectedItem as ControlNode, false);
}
void Toolbox_DragStarted(object sender, MouseButtonEventArgs e)
{
PrepareTool(e.GetDataContext() as ControlNode, true);
}
void PrepareTool(ControlNode node, bool drag)
{
if (node != null) {
var tool = new CreateComponentTool(node.Type);
if (Shell.Instance.CurrentDocument != null) {
Shell.Instance.CurrentDocument.DesignContext.Services.Tool.CurrentTool = tool;
if (drag) {
DragDrop.DoDragDrop(this, tool, DragDropEffects.Copy);
}
}
}
}
protected override void OnKeyDown(KeyEventArgs e)
{
if (e.Key == Key.Delete) {
Remove();
}
}
void Remove()
{
AssemblyNode node = uxTreeView.SelectedItem as AssemblyNode;
if (node != null) {
Toolbox.Instance.Remove(node);
}
}
private void BrowseForAssemblies_OnClick(object sender, RoutedEventArgs e)
{
var dlg = new OpenFileDialog();
dlg.Filter = "Assemblies (*.dll)|*.dll";
dlg.Multiselect = true;
dlg.CheckFileExists = true;
if (dlg.ShowDialog().Value)
{
foreach (var fileName in dlg.FileNames)
{
Toolbox.Instance.AddAssembly(fileName);
}
}
}
}
}

214
samples/XamlDesigner/XamlDesigner.csproj

@ -1,214 +0,0 @@ @@ -1,214 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{27DA2B5C-2AAA-4478-AB00-3E184273C241}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>ICSharpCode.XamlDesigner</RootNamespace>
<AssemblyName>XamlDesigner</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<ApplicationManifest>Configuration\app.manifest</ApplicationManifest>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="AvalonDock">
<HintPath>..\..\bin\AvalonDock.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.AvalonEdit">
<HintPath>..\..\bin\ICSharpCode.AvalonEdit.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.NRefactory">
<HintPath>..\..\bin\ICSharpCode.NRefactory.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpDevelop.Widgets">
<HintPath>..\..\bin\ICSharpCode.SharpDevelop.Widgets.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UIAutomationProvider">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="PresentationCore">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="PresentationFramework">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<ProjectReference Include="..\..\src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj">
<Project>{78CC29AC-CC79-4355-B1F2-97936DF198AC}</Project>
<Name>WpfDesign.Designer</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj">
<Project>{88DA149F-21B2-48AB-82C4-28FB6BDFD783}</Project>
<Name>WpfDesign.XamlDom</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj">
<Project>{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}</Project>
<Name>WpfDesign</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\src\Main\GlobalAssemblyInfo.cs">
<Link>Configuration\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="BitmapButton.xaml.cs">
<DependentUpon>BitmapButton.xaml</DependentUpon>
</Compile>
<Compile Include="Configuration\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Configuration\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="Converters.cs" />
<Compile Include="Document.cs" />
<Compile Include="DocumentView.xaml.cs">
<DependentUpon>DocumentView.xaml</DependentUpon>
</Compile>
<Compile Include="ErrorListView.xaml.cs">
<DependentUpon>ErrorListView.xaml</DependentUpon>
</Compile>
<Compile Include="ExtensionMethods.cs" />
<Compile Include="MainWindow_Commands.cs" />
<Compile Include="MyTypeFinder.cs" />
<Compile Include="Shell.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
</Compile>
<Compile Include="SimpleCommand.cs" />
<Compile Include="Toolbox.cs" />
<Compile Include="ToolboxView.xaml.cs">
<DependentUpon>ToolboxView.xaml</DependentUpon>
</Compile>
<Compile Include="XamlFormatter.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="NewFileTemplate.xaml">
<SubType>Designer</SubType>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Page Include="BitmapButton.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="DocumentView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ErrorListView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<None Include="TestFiles\1.xaml">
<SubType>Designer</SubType>
</None>
<None Include="TestFiles\2.xaml">
<SubType>Designer</SubType>
</None>
<None Include="TestFiles\3.xaml">
<SubType>Designer</SubType>
</None>
<None Include="TestFiles\4.xaml">
<SubType>Designer</SubType>
</None>
<Page Include="Themes\Generic.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ToolboxView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="Configuration\app.config" />
<None Include="Configuration\app.manifest" />
<None Include="Configuration\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Reference.png" />
<Resource Include="Images\Tag.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Error.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

47
samples/XamlDesigner/XamlDesigner.sln

@ -1,47 +0,0 @@ @@ -1,47 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# SharpDevelop 5.1
VisualStudioVersion = 12.0.20827.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlDesigner", "XamlDesigner.csproj", "{27DA2B5C-2AAA-4478-AB00-3E184273C241}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "..\..\src\AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "..\..\src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "..\..\src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "..\..\src\AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{27DA2B5C-2AAA-4478-AB00-3E184273C241}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27DA2B5C-2AAA-4478-AB00-3E184273C241}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27DA2B5C-2AAA-4478-AB00-3E184273C241}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27DA2B5C-2AAA-4478-AB00-3E184273C241}.Release|Any CPU.Build.0 = Release|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}.Release|Any CPU.Build.0 = Release|Any CPU
{78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78CC29AC-CC79-4355-B1F2-97936DF198AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78CC29AC-CC79-4355-B1F2-97936DF198AC}.Release|Any CPU.Build.0 = Release|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.Build.0 = Release|Any CPU
{88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Debug|Any CPU.Build.0 = Debug|Any CPU
{88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88DA149F-21B2-48AB-82C4-28FB6BDFD783}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

203
samples/XamlDesigner/XamlFormatter.cs

@ -1,203 +0,0 @@ @@ -1,203 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
namespace ICSharpCode.XamlDesigner
{
public static class XamlFormatter
{
public static char IndentChar = ' ';
public static int Indenation = 2;
public static int LengthBeforeNewLine = 60;
static StringBuilder sb;
static int currentColumn;
static int nextColumn;
public static string Format(string xaml)
{
sb = new StringBuilder();
currentColumn = 0;
nextColumn = 0;
try {
var doc = XDocument.Parse(xaml);
WalkContainer(doc);
return sb.ToString();
}
catch {
return xaml;
}
}
static void WalkContainer(XContainer node)
{
foreach (var c in node.Nodes()) {
if (c is XElement) {
WalkElement(c as XElement);
} else {
NewLine();
Append(c.ToString().Trim());
}
}
}
static void WalkElement(XElement e)
{
NewLine();
string prefix1 = e.GetPrefixOfNamespace(e.Name.Namespace);
string name1 = prefix1 == null ? e.Name.LocalName : prefix1 + ":" + e.Name.LocalName;
Append("<" + name1);
List<AttributeString> list = new List<AttributeString>();
int length = name1.Length;
foreach (var a in e.Attributes()) {
string prefix2 = e.GetPrefixOfNamespace(a.Name.Namespace);
var g = new AttributeString() { Name = a.Name, Prefix = prefix2, Value = a.Value };
list.Add(g);
length += g.FinalString.Length;
}
list.Sort(AttributeComparrer.Instance);
if (length > LengthBeforeNewLine) {
nextColumn = currentColumn + 1;
for (int i = 0; i < list.Count; i++) {
if (i > 0) {
NewLine();
}
else {
Append(" ");
}
Append(list[i].FinalString);
}
nextColumn -= name1.Length + 2;
}
else {
foreach (var a in list) {
Append(" " + a.FinalString);
}
}
if (e.Nodes().Count() > 0) {
Append(">");
nextColumn += Indenation;
WalkContainer(e);
nextColumn -= Indenation;
NewLine();
Append("</" + name1 + ">");
}
else {
Append(" />");
}
}
static void NewLine()
{
if (sb.Length > 0) {
sb.AppendLine();
sb.Append(new string(' ', nextColumn));
currentColumn = nextColumn;
}
}
static void Append(string s)
{
sb.Append(s);
currentColumn += s.Length;
}
enum AttributeLayout
{
X,
XmlnsMicrosoft,
Xmlns,
XmlnsWithClr,
SpecialOrder,
ByName,
Attached,
WithPrefix
}
class AttributeString
{
public XName Name;
public string Prefix;
public string Value;
public string LocalName {
get { return Name.LocalName; }
}
public string FinalName {
get {
return Prefix == null ? Name.LocalName : Prefix + ":" + Name.LocalName;
}
}
public string FinalString {
get {
return FinalName + "=\"" + Value + "\"";
}
}
public AttributeLayout GetAttributeLayout()
{
if (Prefix == "xmlns" || LocalName == "xmlns") {
if (Value.StartsWith("http://schemas.microsoft.com")) return AttributeLayout.XmlnsMicrosoft;
if (Value.StartsWith("clr")) return AttributeLayout.XmlnsWithClr;
return AttributeLayout.Xmlns;
}
if (Prefix == "x") return AttributeLayout.X;
if (Prefix != null) return AttributeLayout.WithPrefix;
if (LocalName.Contains(".")) return AttributeLayout.Attached;
if (AttributeComparrer.SpecialOrder.Contains(LocalName)) return AttributeLayout.SpecialOrder;
return AttributeLayout.ByName;
}
}
class AttributeComparrer : IComparer<AttributeString>
{
public static AttributeComparrer Instance = new AttributeComparrer();
public int Compare(AttributeString a1, AttributeString a2)
{
var y1 = a1.GetAttributeLayout();
var y2 = a2.GetAttributeLayout();
if (y1 == y2) {
if (y1 == AttributeLayout.SpecialOrder) {
return
Array.IndexOf(SpecialOrder, a1.LocalName).CompareTo(
Array.IndexOf(SpecialOrder, a2.LocalName));
}
return a1.FinalName.CompareTo(a2.FinalName);
}
return y1.CompareTo(y2);
}
public static string[] SpecialOrder = new string[] {
"Name",
"Content",
"Command",
"Executed",
"CanExecute",
"Width",
"Height",
"Margin",
"HorizontalAlignment",
"VerticalAlignment",
"HorizontalContentAlignment",
"VerticalContentAlignment",
"StartPoint",
"EndPoint",
"Offset",
"Color"
};
}
}
}

6
samples/XamlDesigner/app.config

@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

13
src/AddIns/Analysis/CodeCoverage/Project/Src/CodeCoverageClassTreeNode.cs

@ -66,14 +66,11 @@ namespace ICSharpCode.CodeCoverage @@ -66,14 +66,11 @@ namespace ICSharpCode.CodeCoverage
// Add methods.
CodeCoveragePropertyCollection properties = new CodeCoveragePropertyCollection();
foreach (CodeCoverageMethod method in Methods) {
// method name that is generated by compiler, contains "__" (double underscore)
if ( !method.Name.Contains("__") ) {
if (method.IsProperty) {
properties.Add(method);
} else {
CodeCoverageMethodTreeNode node = new CodeCoverageMethodTreeNode(method);
node.AddTo(this);
}
if (method.IsProperty) {
properties.Add(method);
} else {
CodeCoverageMethodTreeNode node = new CodeCoverageMethodTreeNode(method);
node.AddTo(this);
}
}

3
src/AddIns/Analysis/CodeCoverage/Project/Src/CodeCoverageMethodsTreeNode.cs

@ -41,9 +41,6 @@ namespace ICSharpCode.CodeCoverage @@ -41,9 +41,6 @@ namespace ICSharpCode.CodeCoverage
decimal branchCoverage = 0;
int branchCoverageCount = 0;
foreach (CodeCoverageMethod method in methods) {
if (method.Name.Contains("__")) {
continue;
}
visitedCodeLength += method.GetVisitedCodeLength();
unvisitedCodeLength += method.GetUnvisitedCodeLength();
if ( method.IsVisited ) {

5
src/AddIns/Analysis/CodeCoverage/Project/Src/CodeCoverageResults.cs

@ -78,7 +78,6 @@ namespace ICSharpCode.CodeCoverage @@ -78,7 +78,6 @@ namespace ICSharpCode.CodeCoverage
var classNames =
assembly.Elements("Classes").Elements("Class").Where(
c =>
!c.Element("FullName").Value.Contains("__") &&
c.Attribute("skippedDueTo") == null).Select(
c => c.Element("FullName").Value).Distinct().OrderBy(name => name);
foreach (string className in classNames) {
@ -130,9 +129,7 @@ namespace ICSharpCode.CodeCoverage @@ -130,9 +129,7 @@ namespace ICSharpCode.CodeCoverage
CodeCoverageMethod AddMethod(CodeCoverageModule module, string className, XElement reader)
{
var method = new CodeCoverageMethod(className, reader, this);
if (!method.Name.Contains("__")) {
module.Methods.Add(method);
}
module.Methods.Add(method);
return method;
}

2
src/AddIns/Analysis/CodeQuality/CodeQuality.csproj

@ -134,7 +134,7 @@ @@ -134,7 +134,7 @@
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\Libraries\NRefactory\ICSharpCode.NRefactory.Cecil\ICSharpCode.NRefactory.Cecil.csproj">
<Project>{B2BBC7BC-837C-40ED-A6DB-D5AE8626212F}</Project>
<Project>{2b8f4f83-c2b3-4e84-a27b-8dee1be0e006}</Project>
<Name>ICSharpCode.NRefactory.Cecil</Name>
<Private>False</Private>
</ProjectReference>

2
src/AddIns/Analysis/Profiler/Controller/Profiler.Controller.csproj

@ -173,7 +173,7 @@ @@ -173,7 +173,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\X64Converter\Profiler.X64Converter.csproj">
<Project>{600D7F63-DACE-4933-BE8C-B51A948A86D4}</Project>
<Project>{fe88fe17-d9fb-4fcc-9a35-6bffb6b26cc6}</Project>
<Name>Profiler.X64Converter</Name>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>

2
src/AddIns/Analysis/UnitTesting/Test/UnitTesting.Tests.csproj

@ -104,7 +104,7 @@ @@ -104,7 +104,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Libraries\NRefactory\ICSharpCode.NRefactory.Cecil\ICSharpCode.NRefactory.Cecil.csproj">
<Project>{B2BBC7BC-837C-40ED-A6DB-D5AE8626212F}</Project>
<Project>{2b8f4f83-c2b3-4e84-a27b-8dee1be0e006}</Project>
<Name>ICSharpCode.NRefactory.Cecil</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Libraries\NRefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj">

3
src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin

@ -235,8 +235,6 @@ @@ -235,8 +235,6 @@
<Class class = "ICSharpCode.NRefactory.CSharp.Refactoring.EnumUnderlyingTypeIsIntIssue" />
<Class class = "ICSharpCode.NRefactory.CSharp.Refactoring.EqualExpressionComparisonIssue" />
<Class class = "ICSharpCode.NRefactory.CSharp.Refactoring.EventUnsubscriptionViaAnonymousDelegateIssue" />
<Class class = "ICSharpCode.NRefactory.CSharp.Refactoring.ExceptionRethrowIssue" />
<Class class = "ICSharpCode.NRefactory.CSharp.Refactoring.ExplicitConversionInForEachIssue" />
<Class class = "ICSharpCode.NRefactory.CSharp.Refactoring.ExpressionIsNeverOfProvidedTypeIssue" />
<Class class = "ICSharpCode.NRefactory.CSharp.Refactoring.FieldCanBeMadeReadOnlyIssue" />
<Class class = "ICSharpCode.NRefactory.CSharp.Refactoring.ForCanBeConvertedToForeachIssue" />
@ -415,7 +413,6 @@ @@ -415,7 +413,6 @@
<CSharpCodeActionProvider class = "ICSharpCode.NRefactory.CSharp.Refactoring.ConvertReturnStatementToIfAction" />
<CSharpCodeActionProvider class = "ICSharpCode.NRefactory.CSharp.Refactoring.ConvertShiftToMultiplyAction" />
<CSharpCodeActionProvider class = "ICSharpCode.NRefactory.CSharp.Refactoring.ConvertSwitchToIfAction" />
<CSharpCodeActionProvider class = "ICSharpCode.NRefactory.CSharp.Refactoring.ConvertToInitializerAction" />
<CSharpCodeActionProvider class = "ICSharpCode.NRefactory.CSharp.Refactoring.ConvertWhileToDoWhileLoopAction" />
<CSharpCodeActionProvider class = "ICSharpCode.NRefactory.CSharp.Refactoring.CopyCommentsFromBase" />
<CSharpCodeActionProvider class = "ICSharpCode.NRefactory.CSharp.Refactoring.CopyCommentsFromInterface" />

2
src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj

@ -256,7 +256,7 @@ @@ -256,7 +256,7 @@
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj">
<Project>{9E951B9F-6AC2-4537-9D0B-0AE7C026D5A1}</Project>
<Project>{7d7e92df-aceb-4b69-92c8-8ac7a703cd57}</Project>
<Name>FormsDesigner</Name>
<Private>False</Private>
</ProjectReference>

76
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpCompletionBinding.cs

@ -35,7 +35,7 @@ using CSharpBinding.FormattingStrategy; @@ -35,7 +35,7 @@ using CSharpBinding.FormattingStrategy;
namespace CSharpBinding.Completion
{
public class CSharpCompletionBinding : ICodeCompletionBinding
public class CSharpCompletionBinding : ICodeCompletionBinding, IInsightCodeCompletionBinding
{
ICodeContext context;
TextLocation currentLocation;
@ -70,8 +70,25 @@ namespace CSharpBinding.Completion @@ -70,8 +70,25 @@ namespace CSharpBinding.Completion
{
return ShowCompletion(editor, '\0', true);
}
bool ShowCompletion(ITextEditor editor, char completionChar, bool ctrlSpace)
public bool CtrlShiftSpace(ITextEditor editor)
{
return ShowInsight(editor);
}
private int GetCaretOffset(ITextEditor editor, CSharpCompletionContext completionContext)
{
int caretOffset;
if (fileContent == null) {
caretOffset = editor.Caret.Offset;
currentLocation = editor.Caret.Location;
} else {
caretOffset = completionContext.Document.GetOffset(currentLocation);
}
return caretOffset;
}
CSharpCompletionContext GetCompletionContext(ITextEditor editor)
{
CSharpCompletionContext completionContext;
if (fileContent == null) {
@ -79,17 +96,17 @@ namespace CSharpBinding.Completion @@ -79,17 +96,17 @@ namespace CSharpBinding.Completion
} else {
completionContext = CSharpCompletionContext.Get(editor, context, currentLocation, fileContent);
}
return completionContext;
}
bool ShowCompletion(ITextEditor editor, char completionChar, bool ctrlSpace)
{
var completionContext = GetCompletionContext(editor);
if (completionContext == null)
return false;
int caretOffset;
if (fileContent == null) {
caretOffset = editor.Caret.Offset;
currentLocation = editor.Caret.Location;
} else {
caretOffset = completionContext.Document.GetOffset(currentLocation);
}
int caretOffset = GetCaretOffset(editor, completionContext);
var completionFactory = new CSharpCompletionDataFactory(completionContext, new CSharpResolver(completionContext.TypeResolveContextAtCaret));
CSharpCompletionEngine cce = new CSharpCompletionEngine(
@ -112,7 +129,9 @@ namespace CSharpBinding.Completion @@ -112,7 +129,9 @@ namespace CSharpBinding.Completion
triggerWordLength = 0;
}
completionData = cce.GetCompletionData(startPos, true);
completionData = completionData.Concat(cce.GetImportCompletionData(startPos));
if (!completionContext.OnlyTypeMembersFitAtPosition(startPos)) {
completionData = completionData.Concat(cce.GetImportCompletionData(startPos));
}
} else {
startPos = caretOffset;
if (char.IsLetterOrDigit (completionChar) || completionChar == '_') {
@ -139,7 +158,36 @@ namespace CSharpBinding.Completion @@ -139,7 +158,36 @@ namespace CSharpBinding.Completion
return true;
}
if (CodeCompletionOptions.InsightEnabled && !ctrlSpace) {
if (!ctrlSpace) {
// Method Insight
// Method Insight
return ShowInsight(caretOffset, completionContext, completionFactory, completionChar);
}
return false;
}
bool ShowInsight(ITextEditor editor)
{
var completionContext = GetCompletionContext(editor);
if (completionContext == null)
return false;
int caretOffset = GetCaretOffset(editor, completionContext);
var completionFactory = new CSharpCompletionDataFactory(
completionContext,
new CSharpResolver(completionContext.TypeResolveContextAtCaret));
return ShowInsight(caretOffset, completionContext, completionFactory, '(');
}
bool ShowInsight(
int caretOffset,
CSharpCompletionContext completionContext,
CSharpCompletionDataFactory completionFactory,
char completionChar)
{
if (CodeCompletionOptions.InsightEnabled) {
// Method Insight
var pce = new CSharpParameterCompletionEngine(
completionContext.Document,

24
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpCompletionContext.cs

@ -80,6 +80,30 @@ namespace CSharpBinding.Completion @@ -80,6 +80,30 @@ namespace CSharpBinding.Completion
return new CSharpCompletionContext(editor, EmptyList<string>.Instance, compilation, projectContent, document, unresolvedFile, currentLocation);
}
/// <summary>
/// Look back for the nearest char that is not a part of an identifier or a whitespace.
/// (We don't stop on whitespaces because it is legal to have a piece of code like "Foo. Bar(). Baz()")
/// If the char we found is a dot, then the code completion suggestions should only include type members,
/// but not types from the outer scope.
/// If the char we found is not a dot (e. g., a semicolon), then the code completion suggestions can include type names.
/// </summary>
internal bool OnlyTypeMembersFitAtPosition(int offset)
{
var c = '\0';
var pos = offset - 1;
while (pos >= 0) {
c = Document.GetCharAt(pos);
if (!char.IsLetterOrDigit(c) && c != '_' && !char.IsWhiteSpace(c))
break;
pos--;
}
if (pos == -1 || c != '.')
return false;
return true;
}
private CSharpCompletionContext(ITextEditor editor, IList<string> conditionalSymbols, ICompilation compilation, IProjectContent projectContent, IDocument document, CSharpUnresolvedFile unresolvedFile, TextLocation caretLocation)
{

2
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/CSharpSymbolSearch.cs

@ -193,7 +193,7 @@ namespace CSharpBinding @@ -193,7 +193,7 @@ namespace CSharpBinding
var cancellationToken = args.ProgressMonitor.CancellationToken;
return Task.Run(
() => {
bool isNameValid = Mono.CSharp.Tokenizer.IsValidIdentifier(args.NewName);
bool isNameValid = ICSharpCode.NRefactory.MonoCSharp.Tokenizer.IsValidIdentifier(args.NewName);
object progressLock = new object();
Parallel.ForEach(
searchScopesPerFile.Keys,

2
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/CreatePropertiesDialog.xaml.cs

@ -257,7 +257,7 @@ namespace CSharpBinding.Refactoring @@ -257,7 +257,7 @@ namespace CSharpBinding.Refactoring
public static Modifiers ConvertModifier(Modifiers modifiers, ITypeDefinition targetContext)
{
IProject project = targetContext.ParentAssembly.GetProject();
if (targetContext != null && project != null && targetContext.DeclaringType != null) {
if (targetContext != null && project != null && targetContext.DeclaringTypeDefinition != null) {
// if (project.LanguageBinding.IsClassWithImplicitlyStaticMembers(targetContext.CallingClass)) {
return modifiers & ~Modifiers.Static;
// }

2
src/AddIns/BackendBindings/CSharpBinding/Tests/CSharpBinding.Tests.csproj

@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
<Name>ICSharpCode.AvalonEdit</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Libraries\NRefactory\ICSharpCode.NRefactory.Cecil\ICSharpCode.NRefactory.Cecil.csproj">
<Project>{B2BBC7BC-837C-40ED-A6DB-D5AE8626212F}</Project>
<Project>{2b8f4f83-c2b3-4e84-a27b-8dee1be0e006}</Project>
<Name>ICSharpCode.NRefactory.Cecil</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Libraries\NRefactory\ICSharpCode.NRefactory.CSharp.Refactoring\ICSharpCode.NRefactory.CSharp.Refactoring.csproj">

120
src/AddIns/BackendBindings/JavaScriptBinding/JavaScriptBinding.sln

@ -1,120 +0,0 @@ @@ -1,120 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# SharpDevelop 4.1.0.7683-alpha
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JavaScriptBinding", "Project\JavaScriptBinding.csproj", "{062B7E01-AF3D-430D-BE33-17FF3EF4F647}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JavaScriptBinding.Tests", "Test\JavaScriptBinding.Tests.csproj", "{66B1741A-CCCE-4692-81EA-1D5D58ECC5E5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "..\..\..\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDock", "..\..\..\Libraries\AvalonDock\AvalonDock\AvalonDock.csproj", "{87E61430-4243-45F2-B74E-0A4C096CEBF3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "..\..\..\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "..\..\..\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation", "..\..\..\Main\ICSharpCode.Core.Presentation\ICSharpCode.Core.Presentation.csproj", "{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "..\..\..\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "..\..\..\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "..\..\..\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{062B7E01-AF3D-430D-BE33-17FF3EF4F647}.Debug|x86.Build.0 = Debug|x86
{062B7E01-AF3D-430D-BE33-17FF3EF4F647}.Debug|x86.ActiveCfg = Debug|x86
{062B7E01-AF3D-430D-BE33-17FF3EF4F647}.Release|x86.Build.0 = Release|x86
{062B7E01-AF3D-430D-BE33-17FF3EF4F647}.Release|x86.ActiveCfg = Release|x86
{66B1741A-CCCE-4692-81EA-1D5D58ECC5E5}.Debug|x86.Build.0 = Debug|x86
{66B1741A-CCCE-4692-81EA-1D5D58ECC5E5}.Debug|x86.ActiveCfg = Debug|x86
{66B1741A-CCCE-4692-81EA-1D5D58ECC5E5}.Release|x86.Build.0 = Release|x86
{66B1741A-CCCE-4692-81EA-1D5D58ECC5E5}.Release|x86.ActiveCfg = Release|x86
{66B1741A-CCCE-4692-81EA-1D5D58ECC5E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66B1741A-CCCE-4692-81EA-1D5D58ECC5E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66B1741A-CCCE-4692-81EA-1D5D58ECC5E5}.Release|Any CPU.Build.0 = Release|Any CPU
{66B1741A-CCCE-4692-81EA-1D5D58ECC5E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|x86.Build.0 = Debug|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|x86.ActiveCfg = Debug|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|x86.Build.0 = Release|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|x86.ActiveCfg = Release|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|Any CPU.Build.0 = Release|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|x86.Build.0 = Debug|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|x86.ActiveCfg = Debug|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|x86.Build.0 = Release|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|x86.ActiveCfg = Release|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|Any CPU.Build.0 = Release|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{87E61430-4243-45F2-B74E-0A4C096CEBF3}.Debug|x86.Build.0 = Debug|Any CPU
{87E61430-4243-45F2-B74E-0A4C096CEBF3}.Debug|x86.ActiveCfg = Debug|Any CPU
{87E61430-4243-45F2-B74E-0A4C096CEBF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{87E61430-4243-45F2-B74E-0A4C096CEBF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{87E61430-4243-45F2-B74E-0A4C096CEBF3}.Release|x86.Build.0 = Release|Any CPU
{87E61430-4243-45F2-B74E-0A4C096CEBF3}.Release|x86.ActiveCfg = Release|Any CPU
{87E61430-4243-45F2-B74E-0A4C096CEBF3}.Release|Any CPU.Build.0 = Release|Any CPU
{87E61430-4243-45F2-B74E-0A4C096CEBF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|x86.Build.0 = Debug|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|x86.ActiveCfg = Debug|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|x86.Build.0 = Release|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|x86.ActiveCfg = Release|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Any CPU.Build.0 = Release|Any CPU
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Debug|x86.Build.0 = Debug|Any CPU
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Debug|x86.ActiveCfg = Debug|Any CPU
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Release|x86.Build.0 = Release|Any CPU
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Release|x86.ActiveCfg = Release|Any CPU
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Release|Any CPU.Build.0 = Release|Any CPU
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Debug|x86.Build.0 = Debug|Any CPU
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Debug|x86.ActiveCfg = Debug|Any CPU
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Release|x86.Build.0 = Release|Any CPU
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Release|x86.ActiveCfg = Release|Any CPU
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Release|Any CPU.Build.0 = Release|Any CPU
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Debug|x86.Build.0 = Debug|Any CPU
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Debug|x86.ActiveCfg = Debug|Any CPU
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Debug|Any CPU.Build.0 = Debug|Any CPU
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Release|x86.Build.0 = Release|Any CPU
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Release|x86.ActiveCfg = Release|Any CPU
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Release|Any CPU.Build.0 = Release|Any CPU
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}.Release|Any CPU.ActiveCfg = Release|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|x86.Build.0 = Debug|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|x86.ActiveCfg = Debug|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|x86.Build.0 = Release|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|x86.ActiveCfg = Release|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|Any CPU.Build.0 = Release|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8035765F-D51F-4A0C-A746-2FD100E19419}.Debug|x86.Build.0 = Debug|Any CPU
{8035765F-D51F-4A0C-A746-2FD100E19419}.Debug|x86.ActiveCfg = Debug|Any CPU
{8035765F-D51F-4A0C-A746-2FD100E19419}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8035765F-D51F-4A0C-A746-2FD100E19419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8035765F-D51F-4A0C-A746-2FD100E19419}.Release|x86.Build.0 = Release|Any CPU
{8035765F-D51F-4A0C-A746-2FD100E19419}.Release|x86.ActiveCfg = Release|Any CPU
{8035765F-D51F-4A0C-A746-2FD100E19419}.Release|Any CPU.Build.0 = Release|Any CPU
{8035765F-D51F-4A0C-A746-2FD100E19419}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
EndGlobal

31
src/AddIns/BackendBindings/JavaScriptBinding/Project/Configuration/AssemblyInfo.cs

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System.Reflection;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("JavaScript Binding")]
[assembly: AssemblyDescription("JavaScript language binding for SharpDevelop")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

32
src/AddIns/BackendBindings/JavaScriptBinding/Project/JavaScriptBinding.addin

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
<AddIn
name="Python Binding"
author="Matt Ward"
copyright="prj:///doc/copyright.txt"
description="Language binding for JavaScript"
addInManagerHidden="preinstalled">
<Manifest>
<Identity name="ICSharpCode.JavaScript"/>
</Manifest>
<Runtime>
<Import assembly=":ICSharpCode.SharpDevelop"/>
<Import assembly="JavaScriptBinding.dll"/>
</Runtime>
<!-- JavaScript parser -->
<Path name="/SharpDevelop/Parser">
<Parser
id="JavaScript"
supportedextensions=".js"
projectfileextension=".csproj"
class="ICSharpCode.JavaScriptBinding.JavaScriptParser"/>
</Path>
<Path name="/Workspace/Icons">
<Icon
id="JavaScript.File"
extensions=".js"
resource="JScript.FileIcon"/>
</Path>
</AddIn>

99
src/AddIns/BackendBindings/JavaScriptBinding/Project/JavaScriptBinding.csproj

@ -1,99 +0,0 @@ @@ -1,99 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<ProjectGuid>{062B7E01-AF3D-430D-BE33-17FF3EF4F647}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Library</OutputType>
<RootNamespace>ICSharpCode.JavaScriptBinding</RootNamespace>
<AssemblyName>JavaScriptBinding</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
<OutputPath>..\..\..\..\..\AddIns\BackendBindings\JavaScriptBinding\</OutputPath>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'x86' ">
<PlatformTarget>x86</PlatformTarget>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="Antlr3.Runtime">
<HintPath>..\RequiredLibraries\Antlr3.Runtime.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\..\Main\GlobalAssemblyInfo.cs">
<Link>Configuration\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Configuration\AssemblyInfo.cs" />
<Compile Include="Src\CommonTreeExtensions.cs" />
<Compile Include="Src\ES3\ES3Lexer.Action.cs" />
<Compile Include="Src\ES3\ES3Parser.Action.cs" />
<Compile Include="Src\ES3\Generated\ES3Lexer.cs" />
<Compile Include="Src\ES3\Generated\ES3Parser.cs" />
<Compile Include="Src\ITokenExtensions.cs" />
<Compile Include="Src\JavaScriptAst.cs" />
<Compile Include="Src\JavaScriptAstFactory.cs" />
<Compile Include="Src\JavaScriptAstWalker.cs" />
<Compile Include="Src\JavaScriptRegion.cs" />
<Compile Include="Src\JavaScriptRegionEnd.cs" />
<Compile Include="Src\JavaScriptRegionStart.cs" />
<Compile Include="Src\JavaScriptCompilationUnit.cs" />
<Compile Include="Src\JavaScriptFunctionDefinition.cs" />
<Compile Include="Src\JavaScriptGlobalClass.cs" />
<Compile Include="Src\JavaScriptMethodRegion.cs" />
<Compile Include="Src\JavaScriptParser.cs" />
<Compile Include="Src\JavaScriptRegionWalker.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Src" />
<Folder Include="Src\ES3" />
<Folder Include="Src\ES3\Generated" />
</ItemGroup>
<ItemGroup>
<None Include="JavaScriptBinding.addin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Src\ES3\ES3.g3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
<Name>ICSharpCode.SharpDevelop</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj">
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
<Name>ICSharpCode.Core</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj">
<Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project>
<Name>ICSharpCode.SharpDevelop.Dom</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

52
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/CommonTreeExtensions.cs

@ -1,52 +0,0 @@ @@ -1,52 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using Antlr.Runtime.Tree;
using Xebic.Parsers.ES3;
namespace ICSharpCode.JavaScriptBinding
{
public static class CommonTreeExtensions
{
public static bool IsFunction(this CommonTree tree)
{
return tree.Type == ES3Parser.FUNCTION;
}
public static bool HasChildren(this CommonTree tree)
{
return tree.ChildCount > 0;
}
public static CommonTree GetFirstChild(this CommonTree tree)
{
return tree.GetChild(0) as CommonTree;
}
public static CommonTree GetFirstChildArguments(this CommonTree tree)
{
return tree.GetFirstChildWithType(ES3Parser.ARGS) as CommonTree;
}
public static int BeginColumn(this CommonTree tree)
{
return tree.CharPositionInLine + 1;
}
}
}

1324
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ES3/ES3.g3

File diff suppressed because it is too large Load Diff

184
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ES3/ES3Lexer.Action.cs

@ -1,184 +0,0 @@ @@ -1,184 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Antlr.Runtime;
namespace Xebic.Parsers.ES3
{
using IToken = Antlr.Runtime.IToken;
/// <summary>
/// This partial class is complementary to the lexer generated with ANTLR from the JavaScript.g grammar.
/// It implements the actions used in the lexer.
/// </summary>
public partial class ES3Lexer
{
/// <summary>
/// Containts the last on channel token.
/// </summary>
protected IToken last;
/// <summary>
/// Indicates whether regular expression (yields true) or division expression recognition (false) in the lexer is enabled.
/// These are mutual exclusive and the decision which is active in the lexer is based on the previous on channel token.
/// When the previous token can be identified as a possible left operand for a division this results in false, otherwise true.
/// </summary>
private bool AreRegularExpressionsEnabled
{
get
{
if (last == null)
{
return true;
}
switch (last.Type)
{
// identifier
case Identifier:
// literals
case NULL:
case TRUE:
case FALSE:
case THIS:
case OctalIntegerLiteral:
case DecimalLiteral:
case HexIntegerLiteral:
case StringLiteral:
// member access ending
case RBRACK:
// function call or nested expression ending
case RPAREN:
return false;
// otherwise OK
default:
return true;
}
}
}
/// <summary>
/// Consumes an unicode identifier after validating that the first character can be the starting character.
/// This method is called by the lexer logic as fallback alternative when a character can not be considered as start of an identifier in the ASCII range.
/// See the Identfier lexer rule for more details.
/// </summary>
private void ConsumeIdentifierUnicodeStart()
{
int ch = (char)input.LA(1);
if (IsIdentifierStartUnicode(ch))
{
MatchAny();
do
{
ch = (char)input.LA(1);
if (ch == '$' || (ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z') || ch == '\\' || ch == '_' || (ch >= 'a' && ch <= 'z') || IsIdentifierPartUnicode(ch))
{
mIdentifierPart();
}
else
{
return;
}
}
while (true);
}
else
{
throw new NoViableAltException();
}
}
/// <summary>
/// Indicates whether a given character can be a part of an unicode identifier.
/// This method doesn't consider ASCII characters that can be a part of an identifier, that is left to the mIdentifierPart method.
/// The latter method will call this method to check other characters in the unicode range after evaluating those in the ASCII range.
/// </summary>
/// <param name="ch">The character to check.</param>
/// <returns>True when the character matches, false otherwise.</returns>
public static bool IsIdentifierPartUnicode(int ch)
{
switch (Char.GetUnicodeCategory((char)ch))
{
// UnicodeLetter
case UnicodeCategory.UppercaseLetter: // Lu
case UnicodeCategory.LowercaseLetter: // Ll
case UnicodeCategory.TitlecaseLetter: // Lt
case UnicodeCategory.ModifierLetter: // Lm
case UnicodeCategory.OtherLetter: // Lo
case UnicodeCategory.LetterNumber: // Nl
// UnicodeCombiningMark
case UnicodeCategory.NonSpacingMark: // Mn
case UnicodeCategory.SpacingCombiningMark: // Mc
// UnicodeDigit
case UnicodeCategory.DecimalDigitNumber: // Nd
// UnicodeConnectorPuntuation
case UnicodeCategory.ConnectorPunctuation: // Pc
return true;
// Not matching
default:
return false;
}
}
/// <summary>
/// Indicates whether a given character can be the first character of an unicode identifier.
/// This method doesn't consider ASCII characters as it is used in a fallback scenario after the ASCII range is evaluated.
/// </summary>
/// <param name="ch">The character to check.</param>
/// <returns>True when the character matches, false otherwise.</returns>
public static bool IsIdentifierStartUnicode(int ch)
{
switch (Char.GetUnicodeCategory((char)ch))
{
// UnicodeLetter
case UnicodeCategory.UppercaseLetter: // Lu
case UnicodeCategory.LowercaseLetter: // Ll
case UnicodeCategory.TitlecaseLetter: // Lt
case UnicodeCategory.ModifierLetter: // Lm
case UnicodeCategory.OtherLetter: // Lo
case UnicodeCategory.LetterNumber: // Nl
return true;
// Not matching
default:
return false;
}
}
/// <summary>
/// Override of base to track previous on channel token.
/// This token is needed as input to decide whether regular expression or division expression recognition is enabled.
/// </summary>
public override IToken NextToken()
{
IToken result = base.NextToken();
if (result.Channel == DefaultTokenChannel)
{
last = result;
}
return result;
}
}
}

192
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ES3/ES3Parser.Action.cs

@ -1,192 +0,0 @@ @@ -1,192 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using Antlr.Runtime;
using Antlr.Runtime.Tree;
namespace Xebic.Parsers.ES3
{
using IToken = Antlr.Runtime.IToken;
/// <summary>
/// This partial class is complementary to the parser generated with ANTLR from the JavaScript.g grammar.
/// It implements the actions used in the parser.
/// </summary>
public partial class ES3Parser
{
/// <summary>
/// Is a RuleReturnScope node candidate for the left-hand-side of an assignment expression?
/// </summary>
/// <param name="lhs">The RuleReturnScope node</param>
/// <param name="cached">The cached result of a former call to this method</param>
/// <returns>True if so, false otherwise</returns>
public bool IsLeftHandSideAssign(IAstRuleReturnScope lhs, ref bool? cached)
{
if (cached.HasValue)
{
return cached.Value;
}
bool result;
if (IsLeftHandSideExpression(lhs))
{
switch (input.LA(1))
{
case ASSIGN:
case MULASS:
case DIVASS:
case MODASS:
case ADDASS:
case SUBASS:
case SHLASS:
case SHRASS:
case SHUASS:
case ANDASS:
case XORASS:
case ORASS:
result = true;
break;
default:
result = false;
break;
}
}
else
{
result = false;
}
cached = result;
return result;
}
/// <summary>
/// Is a RuleReturnScope node candidate a left-hand-side expression?
/// </summary>
/// <param name="lhs">The RuleReturnScope node</param>
/// <returns>True if so, false otherwise</returns>
private bool IsLeftHandSideExpression(IAstRuleReturnScope lhs)
{
if (lhs.Tree == null) // e.g. during backtracking
{
return true;
}
else
{
switch (((ITree)lhs.Tree).Type)
{
// primaryExpression
case THIS:
case Identifier:
case NULL:
case TRUE:
case FALSE:
case DecimalLiteral:
case OctalIntegerLiteral:
case HexIntegerLiteral:
case StringLiteral:
case RegularExpressionLiteral:
case ARRAY:
case OBJECT:
case PAREXPR:
// functionExpression
case FUNCTION:
// newExpression
case NEW:
// leftHandSideExpression
case CALL:
case BYFIELD:
case BYINDEX:
return true;
default:
return false;
}
}
}
/// <summary>
/// Is a RuleReturnScope node candidate for the left-hand-side of an in expression?
/// </summary>
/// <param name="lhs">The RuleReturnScope node</param>
/// <param name="cached">The cached result of a former call to this method</param>
/// <returns>True if so, false otherwise</returns>
public bool IsLeftHandSideIn(IAstRuleReturnScope lhs, ref bool? cached)
{
if (cached.HasValue)
{
return cached.Value;
}
bool result = IsLeftHandSideExpression(lhs) && (input.LA(1) == IN);
cached = result;
return result;
}
/// <summary>
/// This method handles promotion of an EOL token to on channel in situations where the ECMA 3 specification
/// states there should be a semicolon inserted because of an EOL between the current (offending) token
/// and the previous token.
/// So an semicolon is not actually inserted but the EOL present is switched from off to on channel. In this
/// way that EOL gets the notion of an "virtual" semicolon.
/// As a side effect a given rule's return scope starting point is set to the found EOL and the input stream is repositioned on it.
/// A multi line comment with an EOL is also promoted.
/// </summary>
/// <param name="rule">The invoking rule's return scope</param>
public void PromoteEOL(ParserRuleReturnScope<IToken> rule)
{
// Get current token and its type (the possibly offending token).
IToken lt = input.LT(1);
int la = lt.Type;
// We only need to promote an EOL when the current token is offending (not a SEMIC, EOF, RBRACE or EOL).
// Promoting an EOL means switching it from off channel to on channel.
if (!(la == SEMIC || la == EOF || la == RBRACE || la == EOL))
{
// Start on the possition before the current token and scan backwards off channel tokens until the previous on channel token.
for (int ix = lt.TokenIndex - 1; ix > 0; ix--)
{
lt = input.Get(ix);
if (lt.Channel == DefaultTokenChannel)
{
// On channel token found: stop scanning.
break;
}
else if (lt.Type == EOL || (lt.Type == MultiLineComment && Regex.IsMatch(lt.Text, "/.*\r\n|\r|\n")))
{
// We found our EOL: promote it to on channel, position the input on it and reset the rule start.
lt.Channel = DefaultTokenChannel;
input.Seek(lt.TokenIndex);
if (rule != null)
{
rule.Start = lt;
}
break;
}
}
}
}
}
}

8149
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ES3/Generated/ES3Lexer.cs

File diff suppressed because it is too large Load Diff

12382
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ES3/Generated/ES3Parser.cs

File diff suppressed because it is too large Load Diff

42
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/ITokenExtensions.cs

@ -1,42 +0,0 @@ @@ -1,42 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using Antlr.Runtime;
using Xebic.Parsers.ES3;
namespace ICSharpCode.JavaScriptBinding
{
public static class ITokenExtensions
{
public static int BeginColumn(this IToken token)
{
return token.CharPositionInLine + 1;
}
public static int EndColumn(this IToken token)
{
return token.CharPositionInLine + token.Text.Length + 1;
}
public static bool IsSingleLineComment(this IToken token)
{
return token.Type == ES3Lexer.SingleLineComment;
}
}
}

55
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptAst.cs

@ -1,55 +0,0 @@ @@ -1,55 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using Antlr.Runtime;
using Antlr.Runtime.Tree;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptAst
{
CommonTokenStream tokenStream;
CommonTree tree;
public JavaScriptAst(CommonTokenStream tokenStream, CommonTree tree)
{
this.tokenStream = tokenStream;
this.tree = tree;
}
public CommonTree Tree {
get { return tree; }
}
public bool IsValid {
get { return tree != null; }
}
public IToken GetToken(int index)
{
return tokenStream.Get(index);
}
public IList<IToken> GetTokens()
{
return tokenStream.GetTokens();
}
}
}

53
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptAstFactory.cs

@ -1,53 +0,0 @@ @@ -1,53 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using Antlr.Runtime;
using Antlr.Runtime.Tree;
using ICSharpCode.SharpDevelop;
using Xebic.Parsers.ES3;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptAstFactory
{
string code;
CommonTokenStream tokenStream;
ES3Parser.program_return programReturn;
public JavaScriptAstFactory(ITextBuffer textBuffer)
{
code = textBuffer.Text;
}
public JavaScriptAst Create()
{
CreateTokenStream();
var parser = new ES3Parser(tokenStream);
programReturn = parser.program();
return new JavaScriptAst(tokenStream, programReturn.Tree as CommonTree);
}
void CreateTokenStream()
{
var stream = new ANTLRStringStream(code);
var lexer = new ES3Lexer(stream);
tokenStream = new CommonTokenStream(lexer);
}
}
}

78
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptAstWalker.cs

@ -1,78 +0,0 @@ @@ -1,78 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using Antlr.Runtime.Tree;
using ICSharpCode.SharpDevelop.Dom;
using Xebic.Parsers.ES3;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptAstWalker
{
JavaScriptCompilationUnit compilationUnit;
JavaScriptAst ast;
public JavaScriptAstWalker(
JavaScriptCompilationUnit compilationUnit,
JavaScriptAst ast)
{
this.compilationUnit = compilationUnit;
this.ast = ast;
}
public void Walk()
{
if (ast.IsValid) {
Walk(ast.Tree);
WalkRegions();
}
}
void Walk(CommonTree tree)
{
if (tree.IsFunction()) {
AddMethod(tree);
}
if (tree.HasChildren()) {
WalkChildren(tree.Children);
}
}
void AddMethod(CommonTree tree)
{
var functionDefinition = new JavaScriptFunctionDefinition(ast, tree);
functionDefinition.AddMethod(compilationUnit.GlobalClass);
}
void WalkChildren(IEnumerable<ITree> children)
{
foreach (CommonTree child in children) {
Walk(child);
}
}
void WalkRegions()
{
var regionWalker = new JavaScriptRegionWalker(ast, compilationUnit);
regionWalker.Walk();
}
}
}

60
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptCompilationUnit.cs

@ -1,60 +0,0 @@ @@ -1,60 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.IO;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptCompilationUnit : DefaultCompilationUnit
{
public JavaScriptCompilationUnit(
IProjectContent projectContent,
string fileName)
: base(projectContent)
{
this.FileName = fileName;
AddGlobalClass();
}
void AddGlobalClass()
{
GlobalClass = CreateGlobalClass();
AddClass(GlobalClass);
}
public JavaScriptGlobalClass GlobalClass { get; private set; }
JavaScriptGlobalClass CreateGlobalClass()
{
string className = GetGlobalClassName();
return new JavaScriptGlobalClass(this, className);
}
string GetGlobalClassName()
{
return Path.GetFileNameWithoutExtension(FileName);
}
void AddClass(IClass c)
{
Classes.Add(c);
}
}
}

56
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptFunctionDefinition.cs

@ -1,56 +0,0 @@ @@ -1,56 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using Antlr.Runtime.Tree;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptFunctionDefinition
{
JavaScriptAst ast;
CommonTree tree;
public JavaScriptFunctionDefinition(JavaScriptAst ast, CommonTree tree)
{
this.ast = ast;
this.tree = tree;
}
public void AddMethod(JavaScriptGlobalClass c)
{
string methodName = GetMethodName();
DefaultMethod method = c.AddMethod(methodName);
UpdateRegions(method);
}
string GetMethodName()
{
CommonTree child = tree.GetFirstChild();
return child.Text;
}
void UpdateRegions(DefaultMethod method)
{
var methodRegion = new JavaScriptMethodRegion(ast, tree);
method.Region = methodRegion.GetHeaderRegion();
method.BodyRegion = methodRegion.GetBodyRegion();
}
}
}

45
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptGlobalClass.cs

@ -1,45 +0,0 @@ @@ -1,45 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptGlobalClass : DefaultClass
{
public JavaScriptGlobalClass(
ICompilationUnit compilationUnit,
string fullyQualifiedName)
: base(compilationUnit, fullyQualifiedName)
{
}
public DefaultMethod AddMethod(string name)
{
var method = new DefaultMethod(this, name);
AddMethod(method);
return method;
}
public void AddMethod(IMethod method)
{
Methods.Add(method);
}
}
}

92
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptMethodRegion.cs

@ -1,92 +0,0 @@ @@ -1,92 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using Antlr.Runtime;
using Antlr.Runtime.Tree;
using ICSharpCode.SharpDevelop.Dom;
using Xebic.Parsers.ES3;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptMethodRegion
{
JavaScriptAst ast;
CommonTree methodDefinition;
IToken functionDefinitionEndToken;
public JavaScriptMethodRegion(JavaScriptAst ast, CommonTree methodDefinition)
{
this.ast = ast;
this.methodDefinition = methodDefinition;
}
public DomRegion GetHeaderRegion()
{
int beginLine = methodDefinition.Line;
int endLine = beginLine; //TODO - function header definition can go across lines.
int beginColumn = GetMethodHeaderBeginColumn();
int endColumn = GetMethodHeaderEndColumn();
return new DomRegion(beginLine, beginColumn, endLine, endColumn);
}
int GetMethodHeaderBeginColumn()
{
return methodDefinition.BeginColumn();
}
int GetMethodHeaderEndColumn()
{
CommonTree arguments = methodDefinition.GetFirstChildArguments();
if (arguments != null) {
IToken token = ast.GetToken(arguments.TokenStopIndex);
return token.EndColumn();
}
return 0;
}
public DomRegion GetBodyRegion()
{
int beginLine = methodDefinition.Line;
int endLine = GetMethodBodyEndLine();
int beginColumn = GetMethodHeaderEndColumn();
int endColumn = GetMethodBodyEndColumn();
return new DomRegion(beginLine, beginColumn, endLine, endColumn);
}
int GetMethodBodyEndLine()
{
IToken token = GetFunctionDefinitionEndToken();
return token.Line;
}
IToken GetFunctionDefinitionEndToken()
{
if (functionDefinitionEndToken == null) {
functionDefinitionEndToken = ast.GetToken(methodDefinition.TokenStopIndex);
}
return functionDefinitionEndToken;
}
int GetMethodBodyEndColumn()
{
IToken token = GetFunctionDefinitionEndToken();
return token.EndColumn();
}
}
}

88
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptParser.cs

@ -1,88 +0,0 @@ @@ -1,88 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.IO;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptParser : IParser
{
public JavaScriptParser()
{
LexerTags = new string[0];
}
public string[] LexerTags { get; set; }
public LanguageProperties Language {
get { return LanguageProperties.None; }
}
public IExpressionFinder CreateExpressionFinder(string fileName)
{
return null;
}
public bool CanParse(string fileName)
{
string extension = Path.GetExtension(fileName);
if (extension != null) {
return IsJavaScriptFileExtension(extension);
}
return false;
}
bool IsJavaScriptFileExtension(string extension)
{
return extension.Equals(".js", StringComparison.InvariantCultureIgnoreCase);
}
public bool CanParse(IProject project)
{
return true;
}
public ICompilationUnit Parse(IProjectContent projectContent, string fileName, ITextBuffer fileContent)
{
try {
var astFactory = new JavaScriptAstFactory(fileContent);
JavaScriptAst ast = astFactory.Create();
var unit = new JavaScriptCompilationUnit(projectContent, fileName);
var walker = new JavaScriptAstWalker(unit, ast);
walker.Walk();
return unit;
} catch (Exception ex) {
LoggingService.Debug(ex.ToString());
}
return new DefaultCompilationUnit(projectContent) { FileName = fileName };
}
public IResolver CreateResolver()
{
return null;
}
}
}

57
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptRegion.cs

@ -1,57 +0,0 @@ @@ -1,57 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptRegion
{
JavaScriptRegionStart start;
JavaScriptRegionEnd end;
public JavaScriptRegion(JavaScriptRegionStart start, JavaScriptRegionEnd end)
{
this.start = start;
this.end = end;
}
public void AddRegion(IList<FoldingRegion> foldingRegions)
{
FoldingRegion namedFoldingRegion = CreateFoldingRegion();
foldingRegions.Add(namedFoldingRegion);
}
FoldingRegion CreateFoldingRegion()
{
DomRegion location = GetRegionLocation();
return new FoldingRegion(start.Name, location);
}
DomRegion GetRegionLocation()
{
int beginLine = start.Line;
int endLine = end.Line;
int beginColumn = start.StartColumn;
int endColumn = end.EndColumn;
return new DomRegion(beginLine, beginColumn, endLine, endColumn);
}
}
}

49
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptRegionEnd.cs

@ -1,49 +0,0 @@ @@ -1,49 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using Antlr.Runtime;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptRegionEnd
{
public static readonly string RegionEndText = "//#endregion";
public static readonly int RegionEndTextLength = RegionEndText.Length;
IToken token;
public JavaScriptRegionEnd(IToken token)
{
this.token = token;
}
public static bool IsRegionEnd(IToken token)
{
return token.Text.StartsWith(RegionEndText);
}
public int Line {
get { return token.Line; }
}
public int EndColumn {
get { return token.BeginColumn() + RegionEndTextLength; }
}
}
}

66
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptRegionStart.cs

@ -1,66 +0,0 @@ @@ -1,66 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using Antlr.Runtime;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptRegionStart
{
public static readonly string RegionStartText = "//#region ";
public static readonly int RegionStartTextLength = RegionStartText.Length;
IToken token;
string name;
public JavaScriptRegionStart(IToken token)
{
this.token = token;
}
public string Name {
get {
if (name == null) {
GetName();
}
return name;
}
}
void GetName()
{
string text = token.Text;
int index = text.IndexOf(RegionStartText);
name = text.Substring(index + RegionStartTextLength);
}
public static bool IsRegionStart(IToken token)
{
return token.Text.StartsWith(RegionStartText);
}
public int Line {
get { return token.Line; }
}
public int StartColumn {
get { return token.BeginColumn(); }
}
}
}

79
src/AddIns/BackendBindings/JavaScriptBinding/Project/Src/JavaScriptRegionWalker.cs

@ -1,79 +0,0 @@ @@ -1,79 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using Antlr.Runtime;
using Antlr.Runtime.Tree;
using ICSharpCode.SharpDevelop.Dom;
using Xebic.Parsers.ES3;
namespace ICSharpCode.JavaScriptBinding
{
public class JavaScriptRegionWalker
{
JavaScriptAst ast;
ICompilationUnit compilationUnit;
Stack<JavaScriptRegionStart> regions;
public JavaScriptRegionWalker(
JavaScriptAst ast,
ICompilationUnit compilationUnit)
{
this.ast = ast;
this.compilationUnit = compilationUnit;
}
public void Walk()
{
regions = new Stack<JavaScriptRegionStart>();
foreach (IToken token in ast.GetTokens()) {
if (token.IsSingleLineComment()) {
WalkComment(token);
}
}
}
void WalkComment(IToken token)
{
if (JavaScriptRegionStart.IsRegionStart(token)) {
WalkRegionStart(token);
} else if (JavaScriptRegionEnd.IsRegionEnd(token)) {
WalkRegionEnd(token);
}
}
void WalkRegionStart(IToken token)
{
var regionStart = new JavaScriptRegionStart(token);
regions.Push(regionStart);
}
void WalkRegionEnd(IToken token)
{
if (regions.Count > 0) {
JavaScriptRegionStart regionStart = regions.Pop();
var regionEnd = new JavaScriptRegionEnd(token);
var region = new JavaScriptRegion(regionStart, regionEnd);
region.AddRegion(compilationUnit.FoldingRegions);
}
}
}
}

BIN
src/AddIns/BackendBindings/JavaScriptBinding/RequiredLibraries/Antlr3.Runtime.dll

Binary file not shown.

29
src/AddIns/BackendBindings/JavaScriptBinding/RequiredLibraries/AntlrCSharp3-license.txt

@ -1,29 +0,0 @@ @@ -1,29 +0,0 @@
[The "BSD licence"]
Copyright (c) 2005-2008 Terence Parr
All rights reserved.
Conversion to C#:
Copyright (c) 2008-2009 Sam Harwell, Pixel Mine, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3
src/AddIns/BackendBindings/JavaScriptBinding/RequiredLibraries/AntlrCSharp3Runtime-readme.txt

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
C# 3 Runtime for Antlr
Antlr3.Runtime.dll
http://www.tunnelvisionlabs.com/downloads/antlr/antlr-dotnet-tool-3.3.1.7705.7z

30
src/AddIns/BackendBindings/JavaScriptBinding/RequiredLibraries/ES3Grammar-license.txt

@ -1,30 +0,0 @@ @@ -1,30 +0,0 @@
Software License Agreement (BSD License)
Copyright (c) 2008-2009, Xebic Research B.V.
All rights reserved.
Redistribution and use of this software in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
* Neither the name of Xebic Research B.V. nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission of Xebic Research B.V.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

28
src/AddIns/BackendBindings/JavaScriptBinding/RequiredLibraries/ES3Grammar-readme.txt

@ -1,28 +0,0 @@ @@ -1,28 +0,0 @@
A complete ECMAScript 3 grammar for ANTLR 3
http://research.xebic.com/es3/
Licence: (BSD) - http://research.xebic.com/es3/license.txt
Copyrights Xebic Research B.V. All rights reserved.
Original work by Patrick Hulsmeijer.
Please use the antlr-interest mailing list for questions.
Download:
Combined lexer and parser for AST creation ES3.g3
Treeparser template to walk the AST generated by ES3.g3 ES3Walker.g3
License license.txt
C# Version C#
All files ES3.zip
History
2008-4-9: Initial release.
2008-4-11: Solely targeting Java for simplicity sake.
2008-4-15: Added license. Fixed two bugs: EOL in MultiLineComment should be treated as SEMIC, function bodies should accept functionDeclarations.
2009-4-16: Updated license statements.
2009-12-4: Added seperate C# version.
2010-2-25: Updated license.

31
src/AddIns/BackendBindings/JavaScriptBinding/Test/Configuration/AssemblyInfo.cs

@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System.Reflection;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("JavaScriptBinding.Tests")]
[assembly: AssemblyDescription("JavaScript Language Binding Unit Tests")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

66
src/AddIns/BackendBindings/JavaScriptBinding/Test/JavaScriptBinding.Tests.csproj

@ -1,66 +0,0 @@ @@ -1,66 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<ProjectGuid>{66B1741A-CCCE-4692-81EA-1D5D58ECC5E5}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Library</OutputType>
<RootNamespace>JavaScriptBinding.Tests</RootNamespace>
<AssemblyName>JavaScriptBinding.Tests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
<OutputPath>..\..\..\..\..\bin\UnitTests\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'x86' ">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework">
<HintPath>..\..\..\..\Tools\NUnit\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Configuration\AssemblyInfo.cs" />
<Compile Include="Src\Helpers\FakeTextBuffer.cs" />
<Compile Include="Src\JavaScriptParserTests.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Src" />
<Folder Include="Src\Helpers" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
<Name>ICSharpCode.SharpDevelop</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj">
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
<Name>ICSharpCode.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj">
<Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project>
<Name>ICSharpCode.SharpDevelop.Dom</Name>
</ProjectReference>
<ProjectReference Include="..\Project\JavaScriptBinding.csproj">
<Project>{062B7E01-AF3D-430D-BE33-17FF3EF4F647}</Project>
<Name>JavaScriptBinding</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

77
src/AddIns/BackendBindings/JavaScriptBinding/Test/Src/Helpers/FakeTextBuffer.cs

@ -1,77 +0,0 @@ @@ -1,77 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.SharpDevelop;
namespace JavaScriptBinding.Tests.Helpers
{
public class FakeTextBuffer : ITextBuffer
{
public FakeTextBuffer(string text)
{
this.Text = text;
}
#pragma warning disable 0067
public event EventHandler TextChanged;
#pragma warning restore
public int TextLength {
get { return Text.Length; }
}
public string Text { get; set; }
public ITextBufferVersion Version {
get {
throw new NotImplementedException();
}
}
public ITextBuffer CreateSnapshot()
{
throw new NotImplementedException();
}
public ITextBuffer CreateSnapshot(int offset, int length)
{
throw new NotImplementedException();
}
public System.IO.TextReader CreateReader()
{
throw new NotImplementedException();
}
public System.IO.TextReader CreateReader(int offset, int length)
{
throw new NotImplementedException();
}
public char GetCharAt(int offset)
{
throw new NotImplementedException();
}
public string GetText(int offset, int length)
{
throw new NotImplementedException();
}
}
}

522
src/AddIns/BackendBindings/JavaScriptBinding/Test/Src/JavaScriptParserTests.cs

@ -1,522 +0,0 @@ @@ -1,522 +0,0 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.JavaScriptBinding;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Internal.Templates;
using ICSharpCode.SharpDevelop.Project;
using JavaScriptBinding.Tests.Helpers;
using NUnit.Framework;
namespace JavaScriptBinding.Tests
{
[TestFixture]
public class JavaScriptParserTests
{
JavaScriptParser parser;
ICompilationUnit compilationUnit;
void CreateParser()
{
parser = new JavaScriptParser();
}
IProject CreateCSharpProject()
{
var createInfo = new ProjectCreateInformation();
createInfo.Solution = new Solution(new MockProjectChangeWatcher());
createInfo.OutputProjectFileName = @"d:\projects\MyProject\MyProject.csproj";
return new MSBuildBasedProject(createInfo);
}
void ParseEmptyJavaScriptFileWithFileName(string fileName)
{
ParseJavaScript(fileName, String.Empty);
}
void ParseEmptyJavaScriptFileWithProjectContent(IProjectContent projectContent)
{
Parse(projectContent, String.Empty, String.Empty);
}
void ParseJavaScript(string code)
{
ParseJavaScript("test.js", code);
}
void ParseJavaScript(string fileName, string code)
{
var projectContent = new DefaultProjectContent();
Parse(projectContent, fileName, code);
}
void Parse(IProjectContent projectContent, string fileName, string code)
{
var textBuffer = new FakeTextBuffer(code);
CreateParser();
compilationUnit = parser.Parse(projectContent, fileName, textBuffer);
}
IClass FirstClass {
get { return compilationUnit.Classes[0]; }
}
IMethod FirstClassFirstMethod {
get { return FirstClass.Methods[0]; }
}
FoldingRegion FirstRegion {
get { return compilationUnit.FoldingRegions[0]; }
}
FoldingRegion SecondRegion {
get { return compilationUnit.FoldingRegions[1]; }
}
[Test]
public void CanParse_CSharpProjectPassed_ReturnsTrue()
{
CreateParser();
IProject project = CreateCSharpProject();
bool result = parser.CanParse(project);
Assert.IsTrue(result);
}
[Test]
public void CanParse_JavaScriptFileNamePassed_ReturnsTrue()
{
CreateParser();
bool result = parser.CanParse("test.js");
Assert.IsTrue(result);
}
[Test]
public void CanParse_TextFileNamePassed_ReturnsFalse()
{
CreateParser();
bool result = parser.CanParse("test.txt");
Assert.IsFalse(result);
}
[Test]
public void CanParse_NullFileNamePassed_ReturnsFalse()
{
CreateParser();
bool result = parser.CanParse((string)null);
Assert.IsFalse(result);
}
[Test]
public void CanParse_JavaScriptFileNameInUpperCasePassed_ReturnsTrue()
{
CreateParser();
bool result = parser.CanParse("TEST.JS");
Assert.IsTrue(result);
}
[Test]
public void Parse_FileNamePassed_ReturnsCompilationUnitWithFileName()
{
string expectedFileName = @"d:\projects\test\MyScript.js";
ParseEmptyJavaScriptFileWithFileName(expectedFileName);
string fileName = compilationUnit.FileName;
Assert.AreEqual(expectedFileName, fileName);
}
[Test]
public void Parse_ProjectContentPassed_ReturnsCompilationUnitWithProjectContent()
{
var expectedProjectContent = new DefaultProjectContent();
ParseEmptyJavaScriptFileWithProjectContent(expectedProjectContent);
IProjectContent projectContent = compilationUnit.ProjectContent;
Assert.AreEqual(expectedProjectContent, projectContent);
}
[Test]
public void Parse_JavaScriptCodeHasOneFunction_ReturnsOneClassInCompilationUnit()
{
string code =
"function test() {\r\n " +
"}\r\n";
ParseJavaScript(code);
Assert.AreEqual(1, compilationUnit.Classes.Count);
}
[Test]
public void Parse_JavaScriptCodeHasOneFunction_ClassNameIsFileNameWithoutExtension()
{
string code =
"function test() {\r\n " +
"}\r\n";
ParseJavaScript("myscript.js", code);
string className = FirstClass.Name;
Assert.AreEqual("myscript", className);
}
[Test]
public void Parse_JavaScriptCodeHasOneFunction_ReturnsOneMethodInClass()
{
string code =
"function test() {\r\n " +
"}\r\n";
CreateParser();
ParseJavaScript(code);
Assert.AreEqual(1, FirstClass.Methods.Count);
}
[Test]
public void Parse_JavaScriptCodeHasOneFunction_MethodNameExistsInClass()
{
string code =
"function test() {\r\n " +
"}\r\n";
CreateParser();
ParseJavaScript(code);
string methodName = FirstClassFirstMethod.Name;
Assert.AreEqual("test", methodName);
}
[Test]
public void Parse_JavaScriptCodeHasOneFunctionCalledMyFunction_MethodNameExistsInClass()
{
string code =
"function MyFunction() {\r\n " +
"}\r\n";
ParseJavaScript(code);
string methodName = FirstClassFirstMethod.Name;
Assert.AreEqual("MyFunction", methodName);
}
[Test]
public void Parse_JavaScriptCodeHasOnlyFunctionKeyword_NoMethodsParsed()
{
string code = "function";
ParseJavaScript(code);
Assert.AreEqual(0, FirstClass.Methods.Count);
}
[Test]
public void Parse_JavaScriptCodeHasFunctionKeywordAndFunctionNameOnly_NoOverflowExceptionThrown()
{
string code = "function test";
Assert.DoesNotThrow(() => ParseJavaScript(code));
string methodName = FirstClassFirstMethod.Name;
Assert.AreEqual("test", methodName);
}
[Test]
public void Parse_JavaScriptCodeHasTwoFunctions_TwoMethodsReturned()
{
string code =
"function one() { }\r\n" +
"function two() { }\r\n";
ParseJavaScript(code);
int count = FirstClass.Methods.Count;
Assert.AreEqual(2, count);
}
[Test]
public void Parse_JavaScriptCodeHasOneFunctionSpanningThreeLines_MethodHeaderRegionCoversStartOfFunctionToMethodRightParenthesis()
{
string code =
"function myfunction() {\r\n" +
" alert('test');\r\n" +
"}\r\n";
ParseJavaScript(code);
DomRegion methodHeaderRegion = FirstClassFirstMethod.Region;
int beginLine = 1;
int endLine = 1;
int beginColumn = 1;
int endColumn = 22;
var expectedRegion = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedRegion, methodHeaderRegion);
}
[Test]
public void Parse_JavaScriptCodeHasOneFunctionSpanningThreeLines_MethodBodyRegionCoversFunctionFromAfterParametersToRightBrace()
{
string code =
"function myfunction() {\r\n" +
" alert('test');\r\n" +
"}\r\n";
ParseJavaScript(code);
DomRegion methodBodyRegion = FirstClassFirstMethod.BodyRegion;
int beginLine = 1;
int endLine = 3;
int beginColumn = 22;
int endColumn = 2;
var expectedRegion = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedRegion, methodBodyRegion);
}
[Test]
public void Parse_JavaScriptCodeHasOneRegion_OneFoldingRegionAddedToCompilationUnit()
{
string code =
"//#region MyRegion\r\n" +
"var a = 1;\r\n" +
"//#endregion\r\n";
ParseJavaScript(code);
int count = compilationUnit.FoldingRegions.Count;
Assert.AreEqual(1, count);
}
[Test]
public void Parse_JavaScriptCodeHasOneRegionWithName_FoldingRegionAddedWithName()
{
string code =
"//#region MyRegion\r\n" +
"var a = 1;\r\n" +
"//#endregion\r\n";
ParseJavaScript(code);
string name = FirstRegion.Name;
Assert.AreEqual("MyRegion", name);
}
[Test]
public void Parse_JavaScriptCodeHasNoRegions_NoFoldingRegionsAddedToCompilationUnit()
{
string code = "var a = 1;";
ParseJavaScript(code);
int count = compilationUnit.FoldingRegions.Count;
Assert.AreEqual(0, count);
}
[Test]
public void Parse_JavaScriptCodeSingleCommentEndsWithRegionTextButDoesNotStartWithRegion_NoRegionsAddedToCompilationUnit()
{
string code =
"//not a #region test\r\n" +
"var a = 1;\r\n" +
"//not an #endregion\r\n";
ParseJavaScript(code);
Assert.AreEqual(0, compilationUnit.FoldingRegions.Count);
}
[Test]
public void Parse_JavaScriptCodeHasOneRegion_RegionLocationIsSpecified()
{
string code =
"//#region MyRegion\r\n" +
"var a = 1;\r\n" +
"//#endregion\r\n";
ParseJavaScript(code);
DomRegion location = FirstRegion.Region;
int beginLine = 1;
int endLine = 3;
int beginColumn = 1;
int endColumn = 13;
var expectedLocation = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedLocation, location);
}
[Test]
public void Parse_JavaScriptCodeHasRegionStartOnly_NoRegionsAddedToCompilationUnit()
{
string code =
"//#region MyRegion\r\n" +
"var a = 1;\r\n";
ParseJavaScript(code);
Assert.AreEqual(0, compilationUnit.FoldingRegions.Count);
}
[Test]
public void Parse_JavaScriptCodeHasOneRegionWithEndRegionFollowedByText_TextFollowingEndRegionIsNotPartOfFold()
{
string code =
"//#region MyRegion\r\n" +
"var a = 1;\r\n" +
"//#endregion abc\r\n";
ParseJavaScript(code);
DomRegion location = FirstRegion.Region;
int beginLine = 1;
int endLine = 3;
int beginColumn = 1;
int endColumn = 13;
var expectedLocation = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedLocation, location);
}
[Test]
public void Parse_JavaScriptCodeHasTwoRegions_TwoRegionsAddedToCompilationUnit()
{
string code =
"//#region One\r\n" +
"var a = 1;\r\n" +
"//#endregion\r\n" +
"\r\n" +
"//#region Two\r\n" +
"var b = 1;\r\n" +
"//#endregion\r\n";
ParseJavaScript(code);
Assert.AreEqual(2, compilationUnit.FoldingRegions.Count);
}
[Test]
public void Parse_JavaScriptCodeHasTwoRegions_RegionsHaveCorrectLocationsAndNames()
{
string code =
"//#region One\r\n" +
"var a = 1;\r\n" +
"//#endregion\r\n" +
"\r\n" +
"//#region Two\r\n" +
"var b = 1;\r\n" +
"//#endregion\r\n";
ParseJavaScript(code);
DomRegion firstRegionLocation = FirstRegion.Region;
int beginLine = 1;
int endLine = 3;
int beginColumn = 1;
int endColumn = 13;
var expectedFirstRegionLocation = new DomRegion(beginLine, beginColumn, endLine, endColumn);
DomRegion secondRegionLocation = SecondRegion.Region;
beginLine = 5;
endLine = 7;
beginColumn = 1;
endColumn = 13;
var expectedSecondRegionLocation = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedFirstRegionLocation, firstRegionLocation);
Assert.AreEqual("One", FirstRegion.Name);
Assert.AreEqual(expectedSecondRegionLocation, secondRegionLocation);
Assert.AreEqual("Two", SecondRegion.Name);
}
[Test]
public void Parse_JavaScriptCodeHasEndRegionButNoStartRegion_NoRegionsAddedToCompilationUnit()
{
string code =
"var a = 1;\r\n" +
"//#endregion\r\n";
ParseJavaScript(code);
Assert.AreEqual(0, compilationUnit.FoldingRegions.Count);
}
[Test]
public void Parse_JavaScriptCodeHasTwoNestedRegions_RegionsHaveCorrectLocationsAndNames()
{
string code =
"//#region One\r\n" +
"var a = 1;\r\n" +
"//#region Two\r\n" +
"var b = 1;\r\n" +
"//#endregion\r\n" +
"var c = 1;\r\n" +
"//#endregion\r\n";
ParseJavaScript(code);
DomRegion firstRegionLocation = FirstRegion.Region;
int beginLine = 3;
int endLine = 5;
int beginColumn = 1;
int endColumn = 13;
var expectedFirstRegionLocation = new DomRegion(beginLine, beginColumn, endLine, endColumn);
DomRegion secondRegionLocation = SecondRegion.Region;
beginLine = 1;
endLine = 7;
beginColumn = 1;
endColumn = 13;
var expectedSecondRegionLocation = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedFirstRegionLocation, firstRegionLocation);
Assert.AreEqual("Two", FirstRegion.Name);
Assert.AreEqual(expectedSecondRegionLocation, secondRegionLocation);
Assert.AreEqual("One", SecondRegion.Name);
}
}
}

31
src/AddIns/BackendBindings/TypeScript/Project/Configuration/AssemblyInfo.cs

@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System.Reflection;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("TypeScriptBinding")]
[assembly: AssemblyDescription("TypeScript support.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

127
src/AddIns/BackendBindings/TypeScript/Project/Resources/ImageResources.resx

@ -0,0 +1,127 @@ @@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="TypeScript.ProjectBrowser.File" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>TypeScript.ProjectBrowser.File.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TypeScript.Template.EmptyFile" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>TypeScript.Template.EmptyFile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

BIN
src/AddIns/BackendBindings/TypeScript/Project/Resources/TypeScript.ProjectBrowser.File.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

BIN
src/AddIns/BackendBindings/TypeScript/Project/Resources/TypeScript.Template.EmptyFile.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

137
src/AddIns/BackendBindings/TypeScript/Project/Resources/TypeScript.xshd

@ -0,0 +1,137 @@ @@ -0,0 +1,137 @@
<?xml version="1.0"?>
<!-- Based on JavaScript syntax definition for JavaScript 2.0 by Svante Lidman -->
<!-- converted to AvalonEdit format by Siegfried Pammer in 2010 -->
<SyntaxDefinition name="TypeScript" extensions=".ts" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<Color name="Digits" foreground="DarkBlue" />
<Color name="Comment" foreground="Green" />
<Color name="String" foreground="Sienna" />
<Color name="Character" foreground="Sienna" />
<Color name="Regex" foreground="Sienna" />
<Color name="TypeScriptKeyWords" foreground="Blue" />
<Color name="TypeScriptIntrinsics" foreground="Blue" />
<Color name="TypeScriptLiterals" foreground="Blue" />
<Color name="TypeScriptGlobalFunctions" foreground="Blue" />
<RuleSet ignoreCase="false">
<Keywords color="TypeScriptKeyWords">
<Word>any</Word>
<Word>break</Word>
<Word>continue</Word>
<Word>delete</Word>
<Word>else</Word>
<Word>for</Word>
<Word>function</Word>
<Word>if</Word>
<Word>in</Word>
<Word>new</Word>
<Word>return</Word>
<Word>this</Word>
<Word>typeof</Word>
<Word>var</Word>
<Word>void</Word>
<Word>while</Word>
<Word>with</Word>
<Word>abstract</Word>
<Word>bool</Word>
<Word>boolean</Word>
<Word>byte</Word>
<Word>case</Word>
<Word>catch</Word>
<Word>char</Word>
<Word>class</Word>
<Word>const</Word>
<Word>debugger</Word>
<Word>default</Word>
<Word>do</Word>
<Word>double</Word>
<Word>enum</Word>
<Word>export</Word>
<Word>extends</Word>
<Word>final</Word>
<Word>finally</Word>
<Word>float</Word>
<Word>goto</Word>
<Word>implements</Word>
<Word>import</Word>
<Word>instanceof</Word>
<Word>int</Word>
<Word>interface</Word>
<Word>long</Word>
<Word>module</Word>
<Word>native</Word>
<Word>number</Word>
<Word>package</Word>
<Word>private</Word>
<Word>protected</Word>
<Word>public</Word>
<Word>short</Word>
<Word>static</Word>
<Word>string</Word>
<Word>super</Word>
<Word>switch</Word>
<Word>synchronized</Word>
<Word>throw</Word>
<Word>throws</Word>
<Word>transient</Word>
<Word>try</Word>
<Word>volatile</Word>
</Keywords>
<Keywords color="TypeScriptIntrinsics">
<Word>Array</Word>
<Word>Boolean</Word>
<Word>Date</Word>
<Word>Function</Word>
<Word>Global</Word>
<Word>Math</Word>
<Word>Number</Word>
<Word>Object</Word>
<Word>RegExp</Word>
<Word>String</Word>
</Keywords>
<Keywords color="TypeScriptLiterals">
<Word>false</Word>
<Word>null</Word>
<Word>true</Word>
<Word>NaN</Word>
<Word>Infinity</Word>
</Keywords>
<Keywords color="TypeScriptGlobalFunctions">
<Word>eval</Word>
<Word>parseInt</Word>
<Word>parseFloat</Word>
<Word>escape</Word>
<Word>unescape</Word>
<Word>isNaN</Word>
<Word>isFinite</Word>
</Keywords>
<Span color="Comment">
<Begin>//</Begin>
</Span>
<Span color="Comment" multiline="true">
<Begin>/\*</Begin>
<End>\*/</End>
</Span>
<!--<Rule color="Regex">/.*/</Rule>-->
<Span color="Regex">
<Begin>/</Begin>
<End>/</End>
<RuleSet>
<Span begin="\\/" end="." />
</RuleSet>
</Span>
<Span color="String" multiline="true">
<Begin>"</Begin>
<End>"</End>
<RuleSet>
<Span begin="\\" end="." />
</RuleSet>
</Span>
<Span color="Character">
<Begin>'</Begin>
<End>'</End>
<RuleSet>
<Span begin="\\" end="." />
</RuleSet>
</Span>
<Rule color="Digits">\b0[xX][0-9a-fA-F]+|(\b\d+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?</Rule>
</RuleSet>
</SyntaxDefinition>

55
src/AddIns/BackendBindings/TypeScript/Project/Scripts/TypeScript-License.txt

@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of this License; and
You must cause any modified files to carry prominent notices stating that You changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save