diff --git a/.github/workflows/monodevelop.yml b/.github/workflows/monodevelop.yml
new file mode 100644
index 00000000000..6ee4aab56cc
--- /dev/null
+++ b/.github/workflows/monodevelop.yml
@@ -0,0 +1,68 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - '*'
+ paths-ignore:
+ - '**.md'
+ pull_request:
+ branches:
+ - '*'
+
+ workflow_dispatch:
+
+jobs:
+ ubuntu2004:
+ runs-on: ubuntu-latest
+ container:
+ # This is (currently) the cached docker image SHA256:aba80b77...40417fe dated 17/06/2021
+ image: "ubuntu:20.04"
+ steps:
+ - name: Dependencies
+ run: |
+ # Install extra ubuntu packages
+ apt-get update
+ apt-get install -y sudo
+ sudo apt-get update
+ # Install dotnet-sdk packages
+ sudo apt-get install -y wget
+ wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
+ sudo dpkg -i packages-microsoft-prod.deb
+ sudo apt-get install -y apt-transport-https
+ sudo apt-get update
+ sudo apt-get install -y dotnet-sdk-6.0
+ # Install mono and msbuild
+ sudo apt-get install -y gnupg ca-certificates
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
+ # Reference mono and msbuild from stable repo for versions 6.12.0.122 (mono) and 16.6.0.15201 (msbuild)
+ # echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
+ # Reference mono and msbuild from preview repo for versions 6.12.0.147 (mono) and 16.10.1 (msbuild)
+ echo "deb https://download.mono-project.com/repo/ubuntu preview-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-preview.list
+ sudo apt-get update
+ # Install mono-complete and ca-certificates-mono
+ sudo apt-get install -y mono-complete ca-certificates-mono
+ # Synchronise Mono SSL certs
+ cert-sync /etc/ssl/certs/ca-certificates.crt
+ # Install extra packages required for dotdevelop build
+ sudo apt-get install -y sed git build-essential intltool nuget fsharp gtk-sharp2
+ sudo apt-get install -y software-properties-common
+ sudo apt-get update
+ - name: Verify OS and tools versions
+ run: |
+ uname -a
+ git --version
+ make --version
+ mono -V
+ msbuild -version
+ dotnet --info
+ git config --global --add safe.directory /__w/dotdevelop/dotdevelop
+
+ # Checkout, configure and build
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: Checkout configure and build
+ run: |
+ ./configure --profile=gnome
+ make
diff --git a/.gitignore b/.gitignore
index 59249529679..f0fff1fdac4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -279,3 +279,15 @@ main/po/StripMnemonics.exe
*.binlog
*.ProjectImports.zip
main/tests/StressTest/bin
+
+#rider
+main/.idea/
+.idea/
+
+.localcache
+
+#dotnet Version
+global.json
+
+#crash logs
+*mono_crash.*.json
diff --git a/.gitmodules b/.gitmodules
index f2ac87c4a4f..e0d4812f099 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,54 +1,46 @@
[submodule "main/external/debugger-libs"]
path = main/external/debugger-libs
- url = git://github.com/mono/debugger-libs.git
+ url = https://github.com/dotdevelop/debugger-libs.git
branch = master
[submodule "main/external/guiunit"]
path = main/external/guiunit
- url = git://github.com/mono/guiunit.git
-[submodule "main/external/libgit-binary"]
- path = main/external/libgit-binary
- url = git://github.com/mono/libgit-binary.git
- branch = vs-8.0-v0.26.8
-[submodule "main/external/libgit2"]
- path = main/external/libgit2
- url = git://github.com/mono/libgit2.git
- branch = vs-8.0-v0.26.8
-[submodule "main/external/libgit2sharp"]
- path = main/external/libgit2sharp
- url = git://github.com/mono/libgit2sharp.git
- branch = vs-8.0-v0.26
+ url = https://github.com/dotdevelop/guiunit.git
[submodule "main/external/macdoc"]
path = main/external/macdoc
- url = git://github.com/xamarin/macdoc
+ url = https://github.com/dotdevelop/macdoc
[submodule "main/external/mdtestharness"]
path = main/external/mdtestharness
- url = git://github.com/mono/mdtestharness.git
+ url = https://github.com/dotdevelop/mdtestharness.git
[submodule "main/external/mono-addins"]
path = main/external/mono-addins
- url = git://github.com/mono/mono-addins.git
- branch = master
+ url = https://github.com/dotdevelop/mono-addins.git
+ branch = dotdevelop_gtksharp
[submodule "main/external/mono-tools"]
path = main/external/mono-tools
- url = git://github.com/mono/mono-tools.git
+ url = https://github.com/dotdevelop/mono-tools.git
[submodule "main/external/nrefactory"]
path = main/external/nrefactory
- url = git://github.com/xamarin/NRefactory.git
-[submodule "main/external/nuget-binary"]
- path = main/external/nuget-binary
- url = git://github.com/mono/nuget-binary.git
- branch = master
+ url = https://github.com/dotdevelop/NRefactory.git
[submodule "main/external/sharpsvn-binary"]
path = main/external/sharpsvn-binary
- url = git://github.com/mono/sharpsvn-binary.git
+ url = https://github.com/dotdevelop/sharpsvn-binary.git
[submodule "main/external/xwt"]
path = main/external/xwt
- url = git://github.com/mono/xwt
- branch = master
+ url = https://github.com/dotdevelop/xwt
+ branch = dotdevelop
[submodule "main/external/Xamarin.PropertyEditing"]
path = main/external/Xamarin.PropertyEditing
- url = https://github.com/xamarin/Xamarin.PropertyEditing
+ url = https://github.com/dotdevelop/Xamarin.PropertyEditing
branch = master
[submodule "main/external/vs-editor-api"]
path = main/external/vs-editor-api
- url = https://github.com/microsoft/vs-editor-api.git
- branch = master
+ url = https://github.com/dotdevelop/vs-editor-api.git
+ branch = dotdevelop_oe_8.1.5
+[submodule "main/external/Monodevelop.Netcoredbg"]
+ path = main/external/Monodevelop.Netcoredbg
+ url = https://github.com/dotdevelop/monodevelop.netcoredbg.git
+ branch = dotdevelop
+[submodule "main/external/Samsung.Netcoredbg"]
+ path = main/external/Samsung.Netcoredbg
+ url = https://github.com/dotdevelop/netcoredbg.git
+ branch = dotdevelop
diff --git a/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/.nupkg.metadata b/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/.nupkg.metadata
new file mode 100644
index 00000000000..20344507a73
--- /dev/null
+++ b/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "JBVp+Mxc3fpXhybVZzGo4KDbV6hf/fq0+3DVgQ+UODSeOKfZrY8rDcpfBy51eWKJjGvdYaNyKyM4Xrz5ty8+Bw=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/libgit2sharp.0.27.0-preview-g1da3cfaa68.nupkg b/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/libgit2sharp.0.27.0-preview-g1da3cfaa68.nupkg
new file mode 100644
index 00000000000..c2da9bb2edb
Binary files /dev/null and b/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/libgit2sharp.0.27.0-preview-g1da3cfaa68.nupkg differ
diff --git a/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/libgit2sharp.0.27.0-preview-g1da3cfaa68.nupkg.sha512 b/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/libgit2sharp.0.27.0-preview-g1da3cfaa68.nupkg.sha512
new file mode 100644
index 00000000000..76b58f8b9a3
--- /dev/null
+++ b/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/libgit2sharp.0.27.0-preview-g1da3cfaa68.nupkg.sha512
@@ -0,0 +1 @@
+JBVp+Mxc3fpXhybVZzGo4KDbV6hf/fq0+3DVgQ+UODSeOKfZrY8rDcpfBy51eWKJjGvdYaNyKyM4Xrz5ty8+Bw==
\ No newline at end of file
diff --git a/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/libgit2sharp.nuspec b/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/libgit2sharp.nuspec
new file mode 100755
index 00000000000..fa83d3a4bbe
--- /dev/null
+++ b/.nugetfallback/libgit2sharp/0.27.0-preview-g1da3cfaa68/libgit2sharp.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ LibGit2Sharp
+ 0.27.0-preview-g1da3cfaa68
+ LibGit2Sharp contributors
+ false
+ App_Readme/LICENSE.md
+ https://aka.ms/deprecateLicenseUrl
+ square-logo.png
+ https://github.com/dotdevelop/libgit2sharp/
+ LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .Net and Mono.
+ https://github.com/libgit2/libgit2sharp/blob/1da3cfaa68/CHANGES.md#libgit2sharp-changes
+ Copyright © LibGit2Sharp contributors
+ libgit2 git
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..831508af434
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "TmiReau8/5wXYRAbR80FxmMPpGltEBdmgrJgbt4mhDgyNl4pkCaKREyDY3DfMQvunZru4SjDJjaoLkt3cXPqzg=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.common.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.common.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..2a12147e63a
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.common.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.common.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.common.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..2121a2808fa
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.common.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+lqI6zenfnVUlWbyKYA1TZsT8Yp9yuUo3+P+rg9o0X54NwWOtUV9NyGAG8UOaRylbQJhlylGMf5WRtYeNlplzYA==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.common.nuspec b/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.common.nuspec
new file mode 100755
index 00000000000..d129d94f5fc
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.common.nuspec
@@ -0,0 +1,33 @@
+
+
+
+ Microsoft.CodeAnalysis.Common
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ A shared package used by the Microsoft .NET Compiler Platform ("Roslyn").
+ Do not install this package manually, it will be added as a prerequisite by other packages that require it.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..b27567f6f0f
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "aivGMkIt1bf/EuiFbJZCvIkc+abQ0Hlytf7+mXV+egqMzW48k9gPkBmUEUoYSMEiG0xkOM6OPlmvTbRF5o5aXw=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.editorfeatures.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.editorfeatures.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..f8ab3ce4226
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.editorfeatures.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.editorfeatures.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.editorfeatures.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..18838933da6
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.editorfeatures.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+IpcJizcADFHipSfRLJdMOOe05jn8boKum0llHHvKTsdX3B0KJPMeDiWVaUp9mrwO9Z4EwYGYYFFw8qMkWwyAvA==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.editorfeatures.nuspec b/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.editorfeatures.nuspec
new file mode 100755
index 00000000000..bae2e60b992
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.editorfeatures.nuspec
@@ -0,0 +1,47 @@
+
+
+
+ Microsoft.CodeAnalysis.CSharp.EditorFeatures
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for C# editor features inside the Visual Studio editor.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..0871cd3616d
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "nU3JVeQlwdA7LOkrhfK27ySZRYNrO1ixAiJo2LwRmySC2TyJWGCWpXSL04FI9nbk1xc2A08bJE5BYX+Vv0FdEg=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.features.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.features.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..fe78f4e17d7
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.features.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.features.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.features.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..d53031bc853
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.features.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+s8zcFoePqnH5XC4MNu7y+svfh27W4brq4xAK1REUVfyoItZ1SWKZpgdancZvde/LDzQeG89YotAfN1abIgb9Uw==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.features.nuspec b/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.features.nuspec
new file mode 100755
index 00000000000..e9ee9f43170
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.features.nuspec
@@ -0,0 +1,30 @@
+
+
+
+ Microsoft.CodeAnalysis.CSharp.Features
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for creating C# editing experiences.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..8425b62bc82
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "FpA47k7JHDN8JCeNPzkdRJUK3qzpelFhyQW9vGNARaVZN07zxXQ2FxEwIeFrYxmhNCFd6RjUED0jqxDNDiGvcA=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.workspaces.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.workspaces.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..2a8b7dba99a
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.workspaces.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.workspaces.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.workspaces.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..eb282f64c83
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.workspaces.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+Diu61yiXi6gPdbNxTBYI1ZHEFH+0Rn6dgevb4hzsJ9/dYBsJWYcsfPUjwC83Pfbn9k9CGLoIDKDOQErZJVlczg==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.workspaces.nuspec b/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.workspaces.nuspec
new file mode 100755
index 00000000000..218e402e6e9
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.workspaces.nuspec
@@ -0,0 +1,28 @@
+
+
+
+ Microsoft.CodeAnalysis.CSharp.Workspaces
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for analyzing C# projects and solutions.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..b1c6894db61
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "tTVzmQwq68vnwgYVJyQ+3XWinUbesO0iVxi7dc8MWTtKLASCJ5egHqmZq5H/5V67cuOt9SSKHZtsyOUWsyMRHA=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..8cd5191cae6
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..a43f50e1718
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+Lg5RCOPsXOO+D/WIAL65N06EVE3sT1BgPQ71Ktw6H8piOlp3RRjkhTGisniUUcYLbq5Jy1Y5CEBCNf/LzmJttQ==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.nuspec b/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.nuspec
new file mode 100755
index 00000000000..7144f097ee2
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.csharp/3.4.0-beta4-19568-04/microsoft.codeanalysis.csharp.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ Microsoft.CodeAnalysis.CSharp
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for C#, Microsoft.CodeAnalysis.CSharp.dll.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..b9858f627d5
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "aTDG1xjhS0wjlDY1iovWr//jE/EZ/xmJn8JvqLo5Ru0mZk9M2H5A9LATjEShlmsltnMglcONr9MF8Tz1ueDI+A=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.common.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.common.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..8e32f285e26
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.common.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.common.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.common.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..776b3cacd1a
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.common.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+NMo60QdAixL0g/M6SQ3DP3HgiYZDCxVgixU8luo+2erCIhkSfJos3j3jPmrMx39dk4lsp4ug87hsdNqf2DjZNA==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.common.nuspec b/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.common.nuspec
new file mode 100755
index 00000000000..6f4307682cb
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.editorfeatures.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.common.nuspec
@@ -0,0 +1,46 @@
+
+
+
+ Microsoft.CodeAnalysis.EditorFeatures.Common
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for editor features inside the Visual Studio editor.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..afeb1ff647b
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "xtQhwszqaWJ6mawZaroLYSyMpQLZ7OpBDjih1mHc59+DEmiJVMPo9Jwoh9UurDzyGvFwsO3N0Wd7plgAe2UX1A=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.text.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.text.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..be514719bfe
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.text.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.text.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.text.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..2af934aea87
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.text.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+5V8SnTUt4LatOEXKfP0mYRMW6wR+Up0+/lOxlvYyI3/09ueDdLBINRx/QUe1IZ92O7UHr7+sjg1oz/gCC9s+Og==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.text.nuspec b/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.text.nuspec
new file mode 100755
index 00000000000..92ed6d6fcb9
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.editorfeatures.text/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.text.nuspec
@@ -0,0 +1,32 @@
+
+
+
+ Microsoft.CodeAnalysis.EditorFeatures.Text
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for working with Visual Studio text buffers.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..a2305c84488
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "CTTACfIVPDN8GLQk1z6kkX7x6TOo0sOjI0Z4XLlnbgfh43C/6py58W7H3dNHs8dc+h8shNGboTUBCEyJ4m5bUw=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..a611c801156
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..7bb2e6854a3
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+VCKf7dkDH9F6Rr3rWGs8jQwOlMeTMxU6j5dL1mURTHzP6zInPV365iqkobG1uRtbG6gWjIBKvfac8ZDPvTFU/g==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.nuspec b/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.nuspec
new file mode 100755
index 00000000000..9b14bfc82b1
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.editorfeatures.nuspec
@@ -0,0 +1,31 @@
+
+
+
+ Microsoft.CodeAnalysis.EditorFeatures
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for editor features inside the Visual Studio editor.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..003918bcc6e
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "WgllFT67O9JDkilG6KR0TdQAGKw/at2+SatV3geRPDuIB+AGqPbOvNfhhx+5WdeZoY/5MmbzjVwv9U7k7spH+w=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.features.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.features.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..3e64aa272e1
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.features.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.features.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.features.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..687da1a983f
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.features.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+U55Yz57mzchO7h3TVxBa51NpSS2iu+e3qTf8jTyl4DoCoynt8V7mISUsClfIqqh1sq+d0xH6vcKye2XMe4d2FA==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.features.nuspec b/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.features.nuspec
new file mode 100755
index 00000000000..fbce9c4f3c9
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.features.nuspec
@@ -0,0 +1,30 @@
+
+
+
+ Microsoft.CodeAnalysis.Features
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for creating editing experiences.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..7ae3d6e10bb
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "JwtcwNsQx17WhnNnk7ui/uG/dysGLzHGHDAfNF3a2huM2FafQfzUagukJ2g5jQccBp8TrUFHrai+8VISwgTntA=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.scripting.common.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.scripting.common.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..ac69755e89a
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.scripting.common.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.scripting.common.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.scripting.common.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..014fd518f1f
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.scripting.common.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+8lHrpR31eJnxHjqsvsjN4EzTlmlWW21IBGP5cvHVxugQ4ElrVp3li8yCJpND7tM64rIzgAeH/pJnmZ8LVeB1OA==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.scripting.common.nuspec b/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.scripting.common.nuspec
new file mode 100755
index 00000000000..e995b16e61d
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.scripting.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.scripting.common.nuspec
@@ -0,0 +1,27 @@
+
+
+
+ Microsoft.CodeAnalysis.Scripting.Common
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ Microsoft .NET Compiler Platform ("Roslyn") shared scripting package.
+ Do not install this package manually, it will be added as a prerequisite by other packages that require it.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..2e93b4c46f4
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "C3iU9ja4aCwBTRNa/EWt0+2ggpuMfi/iBe8IS2dK5J7x3OV3c5IB4c12Cejw++3mUak0UjK6pNFQzNnVKowxzA=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.editorfeatures.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.editorfeatures.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..4593947dc35
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.editorfeatures.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.editorfeatures.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.editorfeatures.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..fa897cf391a
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.editorfeatures.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+G2qDUYYHrZAgoaNUwPgMu5x2irHXfOrObHaHNnneKyFWR4Jqe4l6lAAnQ0thHv595O8mizombvz8S5EJiUc4kQ==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.editorfeatures.nuspec b/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.editorfeatures.nuspec
new file mode 100755
index 00000000000..bd0c256238f
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic.editorfeatures/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.editorfeatures.nuspec
@@ -0,0 +1,45 @@
+
+
+
+ Microsoft.CodeAnalysis.VisualBasic.EditorFeatures
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for VisualBasic editor features inside the Visual Studio editor.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..58652b0f32b
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "ZJ7teeeBNcO8mREkea6eY545+zrMHrP0JszX4XCcvogAh8n9JPnQ7sUYfAmTvVeSIiKasoWEqibAY3Kx9H89CA=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.features.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.features.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..c4e1b484e5b
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.features.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.features.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.features.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..5abc2688f89
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.features.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+U9F7XTGZ6oqEI1ezCspVJKGI92iP3nhY8RWqPCf3KSdW3zJLX4TumNAnP1FBkndT85a6ZA1o9bStHyieQQiJvg==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.features.nuspec b/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.features.nuspec
new file mode 100755
index 00000000000..ddad7b48850
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic.features/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.features.nuspec
@@ -0,0 +1,30 @@
+
+
+
+ Microsoft.CodeAnalysis.VisualBasic.Features
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for creating Visual Basic editing experiences.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..437eea5189a
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "6Z4zIJroA7yei1npQp2PnbchxiAFjLnuEyrUn4KTEgr104k2y21UGgTqCYWB5krq+wKxnNfdB7XjjpCnnAvPfQ=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.workspaces.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.workspaces.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..1adecd21426
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.workspaces.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.workspaces.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.workspaces.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..5139cdacaf1
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.workspaces.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+wdMVnT9Waxrn2+0z+uRscpvjX61vEepeJSEHjkZWzpSOIzjOu2suPvub9aHBJfu6vLUgkEiM/NDzaY1GC4EhmQ==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.workspaces.nuspec b/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.workspaces.nuspec
new file mode 100755
index 00000000000..eb6648f6014
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic.workspaces/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.workspaces.nuspec
@@ -0,0 +1,28 @@
+
+
+
+ Microsoft.CodeAnalysis.VisualBasic.Workspaces
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for analyzing Visual Basic projects and solutions.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..77be29762d9
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "hRyKDYi4zWXRx0JeBbtq1dhtDGjB75mgHjIzna/cjx0ec+6X3t3AdPv9RxmqN3PvmhqeHL771//g2+Yyz3gzfQ=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..3873e12e0c9
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..ce8bc73bf78
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+JAeZJNFvPgqcnA4sgZwvw1RREDz1WkcDLhdKYwSsBc8vspRdrGuOSHV6rRMBVAjg0fCqxbiQwIlMMwPMWjoaNg==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.nuspec b/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.nuspec
new file mode 100755
index 00000000000..153d034ad2e
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.visualbasic/3.4.0-beta4-19568-04/microsoft.codeanalysis.visualbasic.nuspec
@@ -0,0 +1,26 @@
+
+
+
+ Microsoft.CodeAnalysis.VisualBasic
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for Visual Basic, Microsoft.CodeAnalysis.VisualBasic.dll.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..2a2daaa0c64
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "EcegeKTAEjl++wXUMIyd2R4FIbpuxlC+kyrOurqFDZaXMgFKeuqu72UON/fBYafGWHNISuICFmegpTC30jEKXA=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.common.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.common.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..7bb7f03eb6d
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.common.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.common.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.common.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..d98437bc01f
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.common.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+Fzq65z6qcUo2WxcjwOC4G0qzPdPjqDgNf/jiks4uNuVPWLJZA3azl/dCFm208pjm4PhvJJaGonV/AcevrRoRTg==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.common.nuspec b/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.common.nuspec
new file mode 100755
index 00000000000..7e01a6a88b2
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.workspaces.common/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.common.nuspec
@@ -0,0 +1,28 @@
+
+
+
+ Microsoft.CodeAnalysis.Workspaces.Common
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions.
+ Do not install this package manually, it will be added as a prerequisite by other packages that require it.
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/.nupkg.metadata b/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/.nupkg.metadata
new file mode 100644
index 00000000000..48e123aa437
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/.nupkg.metadata
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "contentHash": "LLOkCHYke1s9xJAh8b/qXIBvJVDHrtNmSj3iKgmCjSfYUUMTBJ1Tq2f/wPLcPkG8sU/PAqeaXovCJrMCHvyuWQ=="
+}
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.msbuild.3.4.0-beta4-19568-04.nupkg b/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.msbuild.3.4.0-beta4-19568-04.nupkg
new file mode 100644
index 00000000000..0c8465193e6
Binary files /dev/null and b/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.msbuild.3.4.0-beta4-19568-04.nupkg differ
diff --git a/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.msbuild.3.4.0-beta4-19568-04.nupkg.sha512 b/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.msbuild.3.4.0-beta4-19568-04.nupkg.sha512
new file mode 100644
index 00000000000..a1c96e99a07
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.msbuild.3.4.0-beta4-19568-04.nupkg.sha512
@@ -0,0 +1 @@
+Jd4WkKSc22OjcTp8QebxX1zdq8MHXccDrKib9cbtUjhYowSwcJsPQ1JsMax8FWRpkmKwAgHNJ4OsYZ91DPg15g==
\ No newline at end of file
diff --git a/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.msbuild.nuspec b/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.msbuild.nuspec
new file mode 100755
index 00000000000..02238a6fc4c
--- /dev/null
+++ b/.nugetfallback/microsoft.codeanalysis.workspaces.msbuild/3.4.0-beta4-19568-04/microsoft.codeanalysis.workspaces.msbuild.nuspec
@@ -0,0 +1,39 @@
+
+
+
+ Microsoft.CodeAnalysis.Workspaces.MSBuild
+ 3.4.0-beta4-19568-04
+ Microsoft
+ Microsoft
+ true
+ Apache-2.0
+ https://licenses.nuget.org/Apache-2.0
+ https://github.com/dotnet/roslyn
+ .NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one
+ of the following packages to add the appropriate language support:
+ - Microsoft.CodeAnalysis.CSharp.Workspaces
+ - Microsoft.CodeAnalysis.VisualBasic.Workspaces
+
+ More details at https://aka.ms/roslyn-packages
+ This package was built from the source at https://github.com/dotnet/roslyn/commit/82f2e2541478e239dc4b04f231e90dc2b3dcb422.
+ © Microsoft Corporation. All rights reserved.
+ Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Parser Scanner Lexer Emit CodeGeneration Metadata IL Compilation Scripting Syntax Semantics
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Building.md b/Building.md
new file mode 100644
index 00000000000..257f4cff08f
--- /dev/null
+++ b/Building.md
@@ -0,0 +1,135 @@
+# Building DotDevelop
+
+To build DotDevelop from scratch you will need to following pre-requisites.
+
+Please note, Ubuntu 20.04 LTS is the perferred environment for buiding from source as Ubuntu 22.04 LTS doesn’t support .NET Core 3.1 or 2.0 since the distro only supports openSSL 3.
+
+## Build Environment Requirements
+
+The following steps are for Ubuntu, other distros may require different URLs.
+
+```bash
+sudo apt update
+sudo apt install wget
+sudo apt install intltool fsharp gtk-sharp2
+
+# DotNet
+## Ubuntu 20.04
+wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
+sudo dpkg -i packages-microsoft-prod.deb
+rm packages-microsoft-prod.deb
+
+## Ubuntu 22.04
+# wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
+# sudo dpkg -i packages-microsoft-prod.deb
+# rm packages-microsoft-prod.deb
+
+sudo apt-get install -y apt-transport-https
+sudo apt-get update && sudo apt-get install -y dotnet-sdk-3.1
+sudo apt-get update && sudo apt-get install -y dotnet-sdk-5.0
+sudo apt-get update && sudo apt-get install -y dotnet-sdk-6.0
+
+# Install Mono and MSBuild
+sudo apt-get install -y gnupg ca-certificates
+sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
+
+# Reference mono and msbuild from stable repo for versions 6.12.0.122 (mono) and 16.6.0.15201 (msbuild)
+echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
+
+# Reference mono and msbuild from preview repo for versions 6.12.0.147 (mono) and 16.10.1 (msbuild)
+# echo "deb https://download.mono-project.com/repo/ubuntu preview-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-preview.list
+sudo apt-get update
+
+# Install mono-complete and ca-certificates-mono
+sudo apt-get install -y mono-complete ca-certificates-mono
+
+# Synchronise Mono SSL certs
+cert-sync /etc/ssl/certs/ca-certificates.crt
+
+# Install extra packages required for dotdevelop build
+sudo apt-get install -y sed git build-essential intltool nuget fsharp gtk-sharp2
+sudo apt-get install -y software-properties-common
+sudo apt-get update
+
+# NetCoreDbg Requirements
+sudo apt install curl
+sudo apt install -y cmake clang
+```
+
+## Clone and Building
+
+Build DotDevelop
+
+```bash
+git clone -b main https://github.com/dotdevelop/dotdevelop.git
+cd dotdevelop/
+
+./configure --profile=gnome
+make
+```
+
+Build NetCoreDbg, starting from the root of the `dotdevelop` folder.
+
+```bash
+# Build NetCoreDbg (starting from DotDevelop directory)
+cd main/external/Samsung.Netcoredbg
+bash build.sh
+cd ../../..
+```
+
+## Launching the IDE
+
+Launch DotDevelop, using one of the 2 options
+
+```bash
+# Start detached from terminal window
+(mono main/build/bin/MonoDevelop.exe &)
+
+# Start attached to terminal window
+mono main/build/bin/MonoDevelop.exe
+```
+
+## Building using Dotdevelop
+once you have a sucessfull build on Linux you can also start Dotdevelop for building Dotdevelop
+```bash
+git clone -b main https://github.com/dotdevelop/dotdevelop.git
+git submodule update --init
+cd main
+nuget restore
+```
+
+open Main.sln from Dotdevelop
+select Mondevelop.Startup and DebugGnome!!
+
+### Verify .NET Core Debugger is attached
+
+1. Launch, MonoDevelop
+2. Edit > Preferences > Projects > .NET Core Debuggers
+3. Click `...` and navigate to, `main/build/AddIns/Samsung.Netcoredbg/netcoredbg`
+4. Click, OK and start debugging
+
+
+### Running DotDevelop with .NET6.0+ installed
+
+With dotnet-sdk-6.0+ installed, the following error occurs:-
+
+"MSB4236 WorkloadAutoImportPropsLocator could not be found".
+
+This is described by [this issue](https://github.com/dotnet/sdk/issues/17461) with the following workaround:-
+
+Set the environment variable `MSBuildEnableWorkloadResolver=false` prior to starting monodevelop
+
+eg, in a terminal, before starting dotdevelop as above...
+
+```bash
+export MSBuildEnableWorkloadResolver=false
+mono ./main/build/bin/MonoDevelop.exe --no-redirect
+```
+### CI mainfest
+Take a look at [the CI manifest](https://github.com/dotdevelop/dotdevelop/blob/main/.github/workflows/monodevelop.yml) in case the latest steps differ from above.
+
+## References
+
+* [NetCoreDbg - Readme.md](https://github.com/dotdevelop/netcoredbg/tree/dotdevelop#readme)
+ * [Samsung NetCoreDbg](https://github.com/Samsung/netcoredbg)
+* [Issue #19 - Samsung.NetCoreDbg External Package](https://github.com/dotdevelop/dotdevelop/issues/47)
diff --git a/Makefile b/Makefile
index acaba31f05e..e763f2e2c88 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
include main/monodevelop_version
EXTRA_DIST = configure code_of_conduct.md
-SPACE :=
-SPACE +=
+SPACE :=
+SPACE +=
ifeq ($(origin APP), undefined)
BIN_DIR=main/build
@@ -110,7 +110,7 @@ dist: update_submodules remove-stale-tarballs remove-stale-buildinfo dist-recurs
echo Decompressing $$tb; \
tar xvjf external/$$tb; \
done
- @rm -rf tarballs/external
+ @rm -rf tarballs/external
@echo Decompressing monodevelop-$(PACKAGE_VERSION).tar.bz2
@cd tarballs && tar xvjf monodevelop-$(PACKAGE_VERSION).tar.bz2
@cp version.config tarballs/monodevelop-$(PACKAGE_VERSION)
@@ -165,7 +165,7 @@ run-no-accessibility:
cd main && $(MAKE) run-no-accessibility
test:
cd main && $(MAKE) test assembly=$(assembly)
-
+
deploy-tests:
cd main && $(MAKE) deploy-tests
diff --git a/NuGet.config b/NuGet.config
index 826e9f8c208..28f0a186b4d 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -1,18 +1,15 @@
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NuGetExternalFeed.config b/NuGetExternalFeed.config
new file mode 100644
index 00000000000..d3bce859b9c
--- /dev/null
+++ b/NuGetExternalFeed.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/README.md b/README.md
index 127f8e74444..e5ffde2bf64 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,30 @@
-**MonoDevelop** is a full-featured integrated development environment (IDE) for mono using Gtk#.
+**PLEASE NOTE!**
-The MonoDevelop core is also the foundation for Visual Studio for Mac.
-Feel free to file bugs against Visual Studio for Mac here as well.
+This is an effort to get MonoDevelop open sourced again.
-See http://www.monodevelop.com for more info.
+**DotDevelop** will hopefully be a full-featured integrated development environment (IDE) for .NET using GTK.
-[](http://jenkins.mono-project.com/job/test-monodevelop-mainline/)
+**Current Status**
-[](https://gitter.im/mono/monodevelop?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+This fork is based on the last commit on 29 Jan 2020 (https://github.com/mono/monodevelop/commit/96b42aa0741af179a8e501f426b6ff5451c27264).
+
+It was refactored to compile / run again on Linux. Other platforms will follow.
+
+**Contributors**
+
+[Building from Source](Building.md)
+
+
+Discussion, Bugs, Patches
+-------------------------
+
+https://github.com/dotdevelop/dotdevelop/issues/new *(submit bugs and patches here)*
+https://github.com/dotdevelop/community/issues/9 *(temporary link to the roadmap thread, should be replaced in the future with a proper roadmap)
+
+> Other Linux distributions/versions require different ways to acquire dependencies. Open [a new issue
+](https://github.com/dotdevelop/dotdevelop/issues) and point out which Linux distribution/version you use, so others might help.
+
+# (outdated) ReadMe from MonoDevelop:
Directory organization
----------------------
@@ -122,15 +139,3 @@ References
**[Gnome Human Interface Guidelines (HIG)](https://developer.gnome.org/hig/stable/)**
**[freedesktop.org standards](http://freedesktop.org/Standards/)**
-
-Discussion, Bugs, Patches
--------------------------
-
-monodevelop-list@lists.ximian.com *(questions and discussion)*
-
-monodevelop-patches-list@lists.ximian.com *(track commits to MonoDevelop)*
-
-monodevelop-bugs@lists.ximian.com *(track MonoDevelop bugzilla component)*
-
-https://github.com/mono/monodevelop/issues/new *(submit bugs and patches here)*
-
diff --git a/main/Directory.Build.props b/main/Directory.Build.props
index dcf4897bf3c..f501d998f17 100644
--- a/main/Directory.Build.props
+++ b/main/Directory.Build.props
@@ -5,23 +5,24 @@
$(MSBuildThisFileDirectory)
$(RootDirectory)packages
$(MSBuildThisFileDirectory)..\..\md-addins\
- $(MdAddinsDirectory)external\vs-editor-core\
+
$(MSBuildThisFileDirectory)external\vs-editor-api\
$(RootDirectory)\msbuild\ReferencesVSEditor.Windows.props
- $(RootDirectory)\msbuild\ReferencesVSEditor.Mac.props
+ $(RootDirectory)\msbuild\ReferencesVSEditor.Mac.props
+ $(RootDirectory)\msbuild\ReferencesVSEditor.Gtk.props
$(RootDirectory)\msbuild\ReferencesGtk.props
- 1.0.0.9
- 0.10.1
+ 3.0.0
+ 0.10.4
0.1.2
- 3.0.0-rc1.19464.2
- 16.2.0
+ 5.0.403
+ 16.11.0
0.1.0.2
- 12.0.2
- 5.4.0
- 2.7.0
- 3.9.0
- 15.8.20719.1
- 15.8.112
- 16.1.28-g2ad4df7366
+ 13.0.3
+ 5.8.0
+ 2.7.1
+ 3.16.3
+ 17.2.60629.1
+ 17.7.26
+ 16.4.280
diff --git a/main/Main.sln b/main/Main.sln
index 3776c79dae3..e6d3b9db6f9 100644
--- a/main/Main.sln
+++ b/main/Main.sln
@@ -1,4 +1,4 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
+Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
@@ -62,8 +62,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDeveloperExtensions", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NUnit", "src\addins\MonoDeveloperExtensions\NUnit\NUnit.csproj", "{376889B5-6504-46A1-9D18-A9E4B4A50F49}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.DesignerSupport", "src\addins\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj", "{2C24D515-4A2C-445C-8419-C09231913CFA}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Autotools", "src\addins\MonoDevelop.Autotools\MonoDevelop.Autotools.csproj", "{CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.WebReferences", "src\addins\MonoDevelop.WebReferences\MonoDevelop.WebReferences.csproj", "{2A00A871-C641-4116-ADFD-29B7799952B4}"
@@ -189,8 +187,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Xwt", "Xwt", "{67A32B53-F71
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt", "external\xwt\Xwt\Xwt.csproj", "{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.Gtk", "external\xwt\Xwt.Gtk\Xwt.Gtk.csproj", "{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.WPF", "external\xwt\Xwt.WPF\Xwt.WPF.csproj", "{C93D746E-1586-4D4F-B411-BF5A966E6A08}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.Gtk.Mac", "external\xwt\Xwt.Gtk.Mac\Xwt.Gtk.Mac.csproj", "{E95833C9-90AA-4366-9262-0A1BED148249}"
@@ -219,8 +215,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.NRefactory.Ceci
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuiUnit_NET_4_5", "external\guiunit\src\framework\GuiUnit_NET_4_5.csproj", "{D12F0F7B-8DE3-43EC-BA49-41052D065A9B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibGit2Sharp", "external\libgit2sharp\LibGit2Sharp\LibGit2Sharp.csproj", "{EE6ED99F-CB12-4683-B055-D28FC7357A34}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{5D3F7E65-E55B-45CA-A83B-D1E10040281E}"
ProjectSection(SolutionItems) = preProject
..\.editorconfig = ..\.editorconfig
@@ -312,7 +306,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.AspNetCore", "s
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Core.Tests", "tests\MonoDevelop.Core.Tests\MonoDevelop.Core.Tests.csproj", "{FDA43CAA-1C2A-4593-8601-3E2EE06D9E03}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.UnitTesting.Tests", "src\addins\MonoDevelop.UnitTesting\MonoDevelop.UnitTesting.Tests\MonoDevelop.UnitTesting.Tests.csproj", "{CD31F051-9012-487B-B7E8-4CDDEA68B3AF}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.DesignerSupport.Tests", "src\addins\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.Tests\MonoDevelop.DesignerSupport.Tests.csproj", "{CD31F051-9012-487B-B7E8-4CDDEA68B3AF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Refactoring.Tests", "tests\MonoDevelop.Refactoring.Tests\MonoDevelop.Refactoring.Tests.csproj", "{BCC3A6AE-EC45-40AD-BA3E-59F6401D588C}"
EndProject
@@ -460,8 +454,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MDBuildTasks", "msbuild\MDB
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StandardClassification", "external\vs-editor-api\src\Editor\Language\Def\StandardClassification\StandardClassification.csproj", "{9730E995-DFFE-49F2-BEDB-4DE7F33C8E8D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextUICocoa", "external\vs-editor-api\src\Editor\Text\Def\TextUICocoa\TextUICocoa.csproj", "{B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Debugger.PerfTests", "src\addins\MonoDevelop.Debugger\MonoDevelop.Debugger.PerfTests\MonoDevelop.Debugger.PerfTests.csproj", "{785F775C-9CA0-4411-86E6-B89D89F3E2ED}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Imaging", "Imaging", "{8E19F797-D714-4C07-903F-97C76E247A03}"
@@ -470,7 +462,29 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Def", "Def", "{F16C4445-227
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MonoDevelop.DesignerSupport", "MonoDevelop.DesignerSupport", "{56499B8C-4935-4D00-9192-4F2033142975}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.DesignerSupport.Tests", "src\addins\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.Tests\MonoDevelop.DesignerSupport.Tests.csproj", "{49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextUIGtk", "external\vs-editor-api\src\Editor\Text\Def\TextUIGtk\TextUIGtk.csproj", "{E5EA3C1D-431E-46FD-B879-492725B1CDBE}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Debugger.Mac", "src\addins\MonoDevelop.Debugger.Mac\MonoDevelop.Debugger.Mac.csproj", "{573D31CF-B22B-4693-820D-BA143266F4D8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.DesignerSupport.Mac", "src\addins\MonoDevelop.DesignerSupport.Mac\MonoDevelop.DesignerSupport.Mac.csproj", "{364E4FEE-0F78-4AEC-A170-BB6AC93E8F9A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextUICommon", "external\vs-editor-api\src\Editor\Text\Def\TextUICommon\TextUICommon.csproj", "{11239964-1C07-4A3D-B129-E4AFFFE8A840}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextUICocoa", "external\vs-editor-api\src\Editor\Text\Def\TextUICocoa\TextUICocoa.csproj", "{9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.DesignerSupport", "src\addins\MonoDevelop.DesignerSupport\MonoDevelop.DesignerSupport.csproj", "{2C24D515-4A2C-445C-8419-C09231913CFA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextUIGtkUtil", "external\vs-editor-api\src\Editor\Text\Util\TextUIGtkUtil\TextUIGtkUtil.csproj", "{209B27AE-712E-4B87-8846-BB149874D44E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Debugger.DotNetCore", "external\Monodevelop.Netcoredbg\MonoDevelop.Debugger.DotNetCore\MonoDevelop.Debugger.DotNetCore.csproj", "{F71A259D-C08F-48D9-93B7-EE51497EB390}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.Gtk2", "external\xwt\Xwt.Gtk2\Xwt.Gtk2.csproj", "{FED3E127-B64A-4E57-8D2A-C8817C5D593A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xwt.GtkSharp", "external\xwt\Xwt.GtkSharp\Xwt.GtkSharp.csproj", "{8F0B736F-8353-4A6C-B471-192D826BDD81}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Addins.GuiGtk3", "external\mono-addins\Mono.Addins.GuiGtk3\Mono.Addins.GuiGtk3.csproj", "{410A7DC9-E7DA-43E6-B592-93E2A344B660}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.GtkExtensions", "src\core\MonoDevelop.GtkExtensions\MonoDevelop.GtkExtensions.csproj", "{0A8EB4EA-60B4-4708-BA45-68C5E730ED00}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
@@ -486,6 +500,8 @@ Global
ReleaseGnome|Any CPU = ReleaseGnome|Any CPU
ReleaseMac|Any CPU = ReleaseMac|Any CPU
ReleaseWin32|Any CPU = ReleaseWin32|Any CPU
+ Debug|x86 = Debug|x86
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7525BB88-6142-4A26-93B9-A30C6983390A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -605,11 +621,11 @@ Global
{0413DB7D-8B35-423F-9752-D75C9225E7DE}.DebugWin32|Any CPU.ActiveCfg = DebugWin32|Any CPU
{0413DB7D-8B35-423F-9752-D75C9225E7DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0413DB7D-8B35-423F-9752-D75C9225E7DE}.Release|Any CPU.Build.0 = Release|Any CPU
- {0413DB7D-8B35-423F-9752-D75C9225E7DE}.ReleaseGnome|Any CPU.ActiveCfg = ReleaseGnome|Any CPU
- {0413DB7D-8B35-423F-9752-D75C9225E7DE}.ReleaseGnome|Any CPU.Build.0 = ReleaseGnome|Any CPU
{0413DB7D-8B35-423F-9752-D75C9225E7DE}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU
{0413DB7D-8B35-423F-9752-D75C9225E7DE}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU
{0413DB7D-8B35-423F-9752-D75C9225E7DE}.ReleaseWin32|Any CPU.ActiveCfg = ReleaseWin32|Any CPU
+ {0413DB7D-8B35-423F-9752-D75C9225E7DE}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
+ {0413DB7D-8B35-423F-9752-D75C9225E7DE}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{E2CAB397-D00C-4D11-8F5F-E3A052092969}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2CAB397-D00C-4D11-8F5F-E3A052092969}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2CAB397-D00C-4D11-8F5F-E3A052092969}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
@@ -647,11 +663,11 @@ Global
{F3AC14B0-3D1F-4B9B-95E8-384056060F33}.DebugWin32|Any CPU.ActiveCfg = DebugWin32|Any CPU
{F3AC14B0-3D1F-4B9B-95E8-384056060F33}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F3AC14B0-3D1F-4B9B-95E8-384056060F33}.Release|Any CPU.Build.0 = Release|Any CPU
- {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.ReleaseGnome|Any CPU.ActiveCfg = ReleaseGnome|Any CPU
- {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.ReleaseGnome|Any CPU.Build.0 = ReleaseGnome|Any CPU
{F3AC14B0-3D1F-4B9B-95E8-384056060F33}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU
{F3AC14B0-3D1F-4B9B-95E8-384056060F33}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU
{F3AC14B0-3D1F-4B9B-95E8-384056060F33}.ReleaseWin32|Any CPU.ActiveCfg = ReleaseWin32|Any CPU
+ {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
+ {F3AC14B0-3D1F-4B9B-95E8-384056060F33}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{1038FBD8-750E-4081-BC65-D89FFED3C881}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1038FBD8-750E-4081-BC65-D89FFED3C881}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{1038FBD8-750E-4081-BC65-D89FFED3C881}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -774,22 +790,6 @@ Global
{376889B5-6504-46A1-9D18-A9E4B4A50F49}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{376889B5-6504-46A1-9D18-A9E4B4A50F49}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{376889B5-6504-46A1-9D18-A9E4B4A50F49}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.Release|Any CPU.Build.0 = Release|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
- {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
{CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFC02FEC-BDF4-40B9-94D6-35E73F76A92E}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
@@ -970,12 +970,12 @@ Global
{9BC670A8-1851-40EC-9685-279F4C98433D}.DebugWin32|Any CPU.Build.0 = DebugWin32|Any CPU
{9BC670A8-1851-40EC-9685-279F4C98433D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9BC670A8-1851-40EC-9685-279F4C98433D}.Release|Any CPU.Build.0 = Release|Any CPU
- {9BC670A8-1851-40EC-9685-279F4C98433D}.ReleaseGnome|Any CPU.ActiveCfg = ReleaseGnome|Any CPU
- {9BC670A8-1851-40EC-9685-279F4C98433D}.ReleaseGnome|Any CPU.Build.0 = ReleaseGnome|Any CPU
{9BC670A8-1851-40EC-9685-279F4C98433D}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{9BC670A8-1851-40EC-9685-279F4C98433D}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{9BC670A8-1851-40EC-9685-279F4C98433D}.ReleaseWin32|Any CPU.ActiveCfg = ReleaseWin32|Any CPU
{9BC670A8-1851-40EC-9685-279F4C98433D}.ReleaseWin32|Any CPU.Build.0 = ReleaseWin32|Any CPU
+ {9BC670A8-1851-40EC-9685-279F4C98433D}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
+ {9BC670A8-1851-40EC-9685-279F4C98433D}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{BA9020AD-A2D1-47C8-9A7C-756162C38296}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA9020AD-A2D1-47C8-9A7C-756162C38296}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA9020AD-A2D1-47C8-9A7C-756162C38296}.DebugGnome|Any CPU.ActiveCfg = DebugGnome|Any CPU
@@ -1360,22 +1360,6 @@ Global
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.Release|Any CPU.Build.0 = Release|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
{C93D746E-1586-4D4F-B411-BF5A966E6A08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C93D746E-1586-4D4F-B411-BF5A966E6A08}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{C93D746E-1586-4D4F-B411-BF5A966E6A08}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -1544,22 +1528,6 @@ Global
{D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
{D12F0F7B-8DE3-43EC-BA49-41052D065A9B}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.Release|Any CPU.Build.0 = Release|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
{BFE8691A-D323-4622-9021-7B8B27F81599}.Debug|Any CPU.ActiveCfg = Debug|x86
{BFE8691A-D323-4622-9021-7B8B27F81599}.Debug|Any CPU.Build.0 = Debug|x86
{BFE8691A-D323-4622-9021-7B8B27F81599}.DebugGnome|Any CPU.ActiveCfg = Debug|x86
@@ -2167,6 +2135,10 @@ Global
{44FFFDDA-156F-49F9-AE6A-BA640C198B33}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{44FFFDDA-156F-49F9-AE6A-BA640C198B33}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
{44FFFDDA-156F-49F9-AE6A-BA640C198B33}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
+ {44FFFDDA-156F-49F9-AE6A-BA640C198B33}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {44FFFDDA-156F-49F9-AE6A-BA640C198B33}.Debug|x86.Build.0 = Debug|Any CPU
+ {44FFFDDA-156F-49F9-AE6A-BA640C198B33}.Release|x86.ActiveCfg = Release|Any CPU
+ {44FFFDDA-156F-49F9-AE6A-BA640C198B33}.Release|x86.Build.0 = Release|Any CPU
{29D34EA6-D312-4690-9FE9-1EA1F2EBAC2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29D34EA6-D312-4690-9FE9-1EA1F2EBAC2E}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{29D34EA6-D312-4690-9FE9-1EA1F2EBAC2E}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2207,6 +2179,8 @@ Global
{2471CB49-9952-43D4-A7AD-7C01BCEDC461}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{2471CB49-9952-43D4-A7AD-7C01BCEDC461}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{2471CB49-9952-43D4-A7AD-7C01BCEDC461}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {2471CB49-9952-43D4-A7AD-7C01BCEDC461}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {2471CB49-9952-43D4-A7AD-7C01BCEDC461}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{44A7579B-2E53-451E-8F6B-946AD04DED3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44A7579B-2E53-451E-8F6B-946AD04DED3F}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{44A7579B-2E53-451E-8F6B-946AD04DED3F}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2217,6 +2191,8 @@ Global
{44A7579B-2E53-451E-8F6B-946AD04DED3F}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{44A7579B-2E53-451E-8F6B-946AD04DED3F}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{44A7579B-2E53-451E-8F6B-946AD04DED3F}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {44A7579B-2E53-451E-8F6B-946AD04DED3F}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {44A7579B-2E53-451E-8F6B-946AD04DED3F}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{AB85D313-77D7-4F3D-B3F3-56864A1253DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB85D313-77D7-4F3D-B3F3-56864A1253DC}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{AB85D313-77D7-4F3D-B3F3-56864A1253DC}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2227,6 +2203,8 @@ Global
{AB85D313-77D7-4F3D-B3F3-56864A1253DC}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{AB85D313-77D7-4F3D-B3F3-56864A1253DC}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{AB85D313-77D7-4F3D-B3F3-56864A1253DC}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {AB85D313-77D7-4F3D-B3F3-56864A1253DC}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {AB85D313-77D7-4F3D-B3F3-56864A1253DC}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{C0943335-A94F-4DF4-91D0-2129D45C666C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0943335-A94F-4DF4-91D0-2129D45C666C}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{C0943335-A94F-4DF4-91D0-2129D45C666C}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2237,6 +2215,8 @@ Global
{C0943335-A94F-4DF4-91D0-2129D45C666C}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{C0943335-A94F-4DF4-91D0-2129D45C666C}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{C0943335-A94F-4DF4-91D0-2129D45C666C}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {C0943335-A94F-4DF4-91D0-2129D45C666C}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {C0943335-A94F-4DF4-91D0-2129D45C666C}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{E20390B6-25C8-4DDC-B3E3-9E0560FC4336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E20390B6-25C8-4DDC-B3E3-9E0560FC4336}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{E20390B6-25C8-4DDC-B3E3-9E0560FC4336}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2247,6 +2227,8 @@ Global
{E20390B6-25C8-4DDC-B3E3-9E0560FC4336}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{E20390B6-25C8-4DDC-B3E3-9E0560FC4336}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{E20390B6-25C8-4DDC-B3E3-9E0560FC4336}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {E20390B6-25C8-4DDC-B3E3-9E0560FC4336}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {E20390B6-25C8-4DDC-B3E3-9E0560FC4336}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{D53A102A-8B6B-4838-BC65-FE36527E7018}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D53A102A-8B6B-4838-BC65-FE36527E7018}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{D53A102A-8B6B-4838-BC65-FE36527E7018}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2257,6 +2239,8 @@ Global
{D53A102A-8B6B-4838-BC65-FE36527E7018}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{D53A102A-8B6B-4838-BC65-FE36527E7018}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{D53A102A-8B6B-4838-BC65-FE36527E7018}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {D53A102A-8B6B-4838-BC65-FE36527E7018}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {D53A102A-8B6B-4838-BC65-FE36527E7018}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{33DAC448-FBCB-4030-9939-01FA4B3EAE76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{33DAC448-FBCB-4030-9939-01FA4B3EAE76}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{33DAC448-FBCB-4030-9939-01FA4B3EAE76}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2267,6 +2251,8 @@ Global
{33DAC448-FBCB-4030-9939-01FA4B3EAE76}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{33DAC448-FBCB-4030-9939-01FA4B3EAE76}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{33DAC448-FBCB-4030-9939-01FA4B3EAE76}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {33DAC448-FBCB-4030-9939-01FA4B3EAE76}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {33DAC448-FBCB-4030-9939-01FA4B3EAE76}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{FB46DD61-12E4-42D0-A99C-0A79C412FDD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FB46DD61-12E4-42D0-A99C-0A79C412FDD5}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{FB46DD61-12E4-42D0-A99C-0A79C412FDD5}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2277,6 +2263,8 @@ Global
{FB46DD61-12E4-42D0-A99C-0A79C412FDD5}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{FB46DD61-12E4-42D0-A99C-0A79C412FDD5}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{FB46DD61-12E4-42D0-A99C-0A79C412FDD5}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {FB46DD61-12E4-42D0-A99C-0A79C412FDD5}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {FB46DD61-12E4-42D0-A99C-0A79C412FDD5}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{E5AF4EB5-9E7F-40B6-8762-98FA45FACA06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5AF4EB5-9E7F-40B6-8762-98FA45FACA06}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{E5AF4EB5-9E7F-40B6-8762-98FA45FACA06}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2287,6 +2275,8 @@ Global
{E5AF4EB5-9E7F-40B6-8762-98FA45FACA06}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{E5AF4EB5-9E7F-40B6-8762-98FA45FACA06}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{E5AF4EB5-9E7F-40B6-8762-98FA45FACA06}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {E5AF4EB5-9E7F-40B6-8762-98FA45FACA06}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {E5AF4EB5-9E7F-40B6-8762-98FA45FACA06}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{6154E851-B914-47D5-9CC0-3E7433047574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6154E851-B914-47D5-9CC0-3E7433047574}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{6154E851-B914-47D5-9CC0-3E7433047574}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2297,6 +2287,8 @@ Global
{6154E851-B914-47D5-9CC0-3E7433047574}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{6154E851-B914-47D5-9CC0-3E7433047574}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{6154E851-B914-47D5-9CC0-3E7433047574}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {6154E851-B914-47D5-9CC0-3E7433047574}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {6154E851-B914-47D5-9CC0-3E7433047574}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{E0561832-1C54-41A8-A30A-97E8E81DBCA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E0561832-1C54-41A8-A30A-97E8E81DBCA7}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{E0561832-1C54-41A8-A30A-97E8E81DBCA7}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2307,6 +2299,8 @@ Global
{E0561832-1C54-41A8-A30A-97E8E81DBCA7}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{E0561832-1C54-41A8-A30A-97E8E81DBCA7}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{E0561832-1C54-41A8-A30A-97E8E81DBCA7}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {E0561832-1C54-41A8-A30A-97E8E81DBCA7}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {E0561832-1C54-41A8-A30A-97E8E81DBCA7}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{CB978906-1945-4BB6-AAA5-1FA2E60C22EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CB978906-1945-4BB6-AAA5-1FA2E60C22EF}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{CB978906-1945-4BB6-AAA5-1FA2E60C22EF}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2317,6 +2311,8 @@ Global
{CB978906-1945-4BB6-AAA5-1FA2E60C22EF}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{CB978906-1945-4BB6-AAA5-1FA2E60C22EF}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{CB978906-1945-4BB6-AAA5-1FA2E60C22EF}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {CB978906-1945-4BB6-AAA5-1FA2E60C22EF}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {CB978906-1945-4BB6-AAA5-1FA2E60C22EF}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{9B8B470A-5455-45B5-A5D1-8619ED174257}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B8B470A-5455-45B5-A5D1-8619ED174257}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{9B8B470A-5455-45B5-A5D1-8619ED174257}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2327,6 +2323,8 @@ Global
{9B8B470A-5455-45B5-A5D1-8619ED174257}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{9B8B470A-5455-45B5-A5D1-8619ED174257}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{9B8B470A-5455-45B5-A5D1-8619ED174257}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {9B8B470A-5455-45B5-A5D1-8619ED174257}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {9B8B470A-5455-45B5-A5D1-8619ED174257}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{726E446E-2E8D-4B48-A47B-923C6CEC4556}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{726E446E-2E8D-4B48-A47B-923C6CEC4556}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{726E446E-2E8D-4B48-A47B-923C6CEC4556}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2337,6 +2335,8 @@ Global
{726E446E-2E8D-4B48-A47B-923C6CEC4556}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{726E446E-2E8D-4B48-A47B-923C6CEC4556}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{726E446E-2E8D-4B48-A47B-923C6CEC4556}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {726E446E-2E8D-4B48-A47B-923C6CEC4556}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {726E446E-2E8D-4B48-A47B-923C6CEC4556}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{F713D37D-70A4-49BB-ADAE-B7007C880E57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F713D37D-70A4-49BB-ADAE-B7007C880E57}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{F713D37D-70A4-49BB-ADAE-B7007C880E57}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2347,6 +2347,8 @@ Global
{F713D37D-70A4-49BB-ADAE-B7007C880E57}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{F713D37D-70A4-49BB-ADAE-B7007C880E57}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{F713D37D-70A4-49BB-ADAE-B7007C880E57}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {F713D37D-70A4-49BB-ADAE-B7007C880E57}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {F713D37D-70A4-49BB-ADAE-B7007C880E57}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{B5C85F1D-38B8-4A57-A763-F390D58BD4D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B5C85F1D-38B8-4A57-A763-F390D58BD4D5}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{B5C85F1D-38B8-4A57-A763-F390D58BD4D5}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2357,6 +2359,8 @@ Global
{B5C85F1D-38B8-4A57-A763-F390D58BD4D5}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{B5C85F1D-38B8-4A57-A763-F390D58BD4D5}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{B5C85F1D-38B8-4A57-A763-F390D58BD4D5}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {B5C85F1D-38B8-4A57-A763-F390D58BD4D5}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {B5C85F1D-38B8-4A57-A763-F390D58BD4D5}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{72987C64-502B-4BBB-B9C9-B09F54C7B552}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72987C64-502B-4BBB-B9C9-B09F54C7B552}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{72987C64-502B-4BBB-B9C9-B09F54C7B552}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2367,6 +2371,8 @@ Global
{72987C64-502B-4BBB-B9C9-B09F54C7B552}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{72987C64-502B-4BBB-B9C9-B09F54C7B552}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{72987C64-502B-4BBB-B9C9-B09F54C7B552}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {72987C64-502B-4BBB-B9C9-B09F54C7B552}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {72987C64-502B-4BBB-B9C9-B09F54C7B552}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{3C354DFC-8768-4023-9977-B9C3B9FF81ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C354DFC-8768-4023-9977-B9C3B9FF81ED}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{3C354DFC-8768-4023-9977-B9C3B9FF81ED}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2377,6 +2383,8 @@ Global
{3C354DFC-8768-4023-9977-B9C3B9FF81ED}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{3C354DFC-8768-4023-9977-B9C3B9FF81ED}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{3C354DFC-8768-4023-9977-B9C3B9FF81ED}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {3C354DFC-8768-4023-9977-B9C3B9FF81ED}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {3C354DFC-8768-4023-9977-B9C3B9FF81ED}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{29E74860-17B2-47D3-B3D4-7BC7E77900CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{29E74860-17B2-47D3-B3D4-7BC7E77900CE}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{29E74860-17B2-47D3-B3D4-7BC7E77900CE}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2387,6 +2395,8 @@ Global
{29E74860-17B2-47D3-B3D4-7BC7E77900CE}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{29E74860-17B2-47D3-B3D4-7BC7E77900CE}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{29E74860-17B2-47D3-B3D4-7BC7E77900CE}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {29E74860-17B2-47D3-B3D4-7BC7E77900CE}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {29E74860-17B2-47D3-B3D4-7BC7E77900CE}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{135FD888-1648-4721-A861-4F7503C44A3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{135FD888-1648-4721-A861-4F7503C44A3D}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{135FD888-1648-4721-A861-4F7503C44A3D}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2397,6 +2407,8 @@ Global
{135FD888-1648-4721-A861-4F7503C44A3D}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{135FD888-1648-4721-A861-4F7503C44A3D}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{135FD888-1648-4721-A861-4F7503C44A3D}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {135FD888-1648-4721-A861-4F7503C44A3D}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {135FD888-1648-4721-A861-4F7503C44A3D}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{547C3D7B-7DFF-4169-88A7-56245170FDB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{547C3D7B-7DFF-4169-88A7-56245170FDB3}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{547C3D7B-7DFF-4169-88A7-56245170FDB3}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2407,6 +2419,8 @@ Global
{547C3D7B-7DFF-4169-88A7-56245170FDB3}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{547C3D7B-7DFF-4169-88A7-56245170FDB3}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{547C3D7B-7DFF-4169-88A7-56245170FDB3}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {547C3D7B-7DFF-4169-88A7-56245170FDB3}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {547C3D7B-7DFF-4169-88A7-56245170FDB3}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{1206D585-670F-4951-A6BF-493C79C950E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1206D585-670F-4951-A6BF-493C79C950E4}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{1206D585-670F-4951-A6BF-493C79C950E4}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2417,6 +2431,8 @@ Global
{1206D585-670F-4951-A6BF-493C79C950E4}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{1206D585-670F-4951-A6BF-493C79C950E4}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{1206D585-670F-4951-A6BF-493C79C950E4}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {1206D585-670F-4951-A6BF-493C79C950E4}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {1206D585-670F-4951-A6BF-493C79C950E4}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{69F195E1-A8C9-43B3-AE91-A8FC79393163}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69F195E1-A8C9-43B3-AE91-A8FC79393163}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{69F195E1-A8C9-43B3-AE91-A8FC79393163}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2427,6 +2443,8 @@ Global
{69F195E1-A8C9-43B3-AE91-A8FC79393163}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{69F195E1-A8C9-43B3-AE91-A8FC79393163}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{69F195E1-A8C9-43B3-AE91-A8FC79393163}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {69F195E1-A8C9-43B3-AE91-A8FC79393163}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {69F195E1-A8C9-43B3-AE91-A8FC79393163}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{B2B41590-92EF-4120-B9B8-E861F3903FDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2B41590-92EF-4120-B9B8-E861F3903FDD}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{B2B41590-92EF-4120-B9B8-E861F3903FDD}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2437,6 +2455,8 @@ Global
{B2B41590-92EF-4120-B9B8-E861F3903FDD}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{B2B41590-92EF-4120-B9B8-E861F3903FDD}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{B2B41590-92EF-4120-B9B8-E861F3903FDD}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {B2B41590-92EF-4120-B9B8-E861F3903FDD}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {B2B41590-92EF-4120-B9B8-E861F3903FDD}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{B2B41590-670F-4169-B3D4-7BC7E77900CE}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2457,6 +2477,8 @@ Global
{3AFF3617-E88F-4F96-AA81-00D3D9E15C05}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{3AFF3617-E88F-4F96-AA81-00D3D9E15C05}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{3AFF3617-E88F-4F96-AA81-00D3D9E15C05}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {3AFF3617-E88F-4F96-AA81-00D3D9E15C05}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {3AFF3617-E88F-4F96-AA81-00D3D9E15C05}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{063241E2-CBDA-4A95-9B8E-914AD6D6D242}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{063241E2-CBDA-4A95-9B8E-914AD6D6D242}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{063241E2-CBDA-4A95-9B8E-914AD6D6D242}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2467,6 +2489,8 @@ Global
{063241E2-CBDA-4A95-9B8E-914AD6D6D242}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{063241E2-CBDA-4A95-9B8E-914AD6D6D242}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{063241E2-CBDA-4A95-9B8E-914AD6D6D242}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {063241E2-CBDA-4A95-9B8E-914AD6D6D242}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {063241E2-CBDA-4A95-9B8E-914AD6D6D242}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{C00336B8-0DC9-4F05-A030-C6BD2A018746}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C00336B8-0DC9-4F05-A030-C6BD2A018746}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{C00336B8-0DC9-4F05-A030-C6BD2A018746}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2477,6 +2501,8 @@ Global
{C00336B8-0DC9-4F05-A030-C6BD2A018746}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{C00336B8-0DC9-4F05-A030-C6BD2A018746}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{C00336B8-0DC9-4F05-A030-C6BD2A018746}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {C00336B8-0DC9-4F05-A030-C6BD2A018746}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {C00336B8-0DC9-4F05-A030-C6BD2A018746}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{1CA8F6F3-8FCD-4AC1-84A7-5DB4248FEC07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1CA8F6F3-8FCD-4AC1-84A7-5DB4248FEC07}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{1CA8F6F3-8FCD-4AC1-84A7-5DB4248FEC07}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2487,6 +2513,8 @@ Global
{1CA8F6F3-8FCD-4AC1-84A7-5DB4248FEC07}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{1CA8F6F3-8FCD-4AC1-84A7-5DB4248FEC07}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{1CA8F6F3-8FCD-4AC1-84A7-5DB4248FEC07}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {1CA8F6F3-8FCD-4AC1-84A7-5DB4248FEC07}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {1CA8F6F3-8FCD-4AC1-84A7-5DB4248FEC07}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{C90CEE76-1A52-43EC-A28D-ABD25F95646B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C90CEE76-1A52-43EC-A28D-ABD25F95646B}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{C90CEE76-1A52-43EC-A28D-ABD25F95646B}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2497,6 +2525,8 @@ Global
{C90CEE76-1A52-43EC-A28D-ABD25F95646B}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{C90CEE76-1A52-43EC-A28D-ABD25F95646B}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{C90CEE76-1A52-43EC-A28D-ABD25F95646B}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {C90CEE76-1A52-43EC-A28D-ABD25F95646B}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {C90CEE76-1A52-43EC-A28D-ABD25F95646B}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{9B0C6B46-52CA-42F5-83E1-C259F54EE5F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B0C6B46-52CA-42F5-83E1-C259F54EE5F5}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{9B0C6B46-52CA-42F5-83E1-C259F54EE5F5}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2507,6 +2537,8 @@ Global
{9B0C6B46-52CA-42F5-83E1-C259F54EE5F5}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{9B0C6B46-52CA-42F5-83E1-C259F54EE5F5}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{9B0C6B46-52CA-42F5-83E1-C259F54EE5F5}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {9B0C6B46-52CA-42F5-83E1-C259F54EE5F5}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {9B0C6B46-52CA-42F5-83E1-C259F54EE5F5}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{A8F39368-ECD9-41A5-A562-CC7C82B3CC86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8F39368-ECD9-41A5-A562-CC7C82B3CC86}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{A8F39368-ECD9-41A5-A562-CC7C82B3CC86}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2517,6 +2549,8 @@ Global
{A8F39368-ECD9-41A5-A562-CC7C82B3CC86}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{A8F39368-ECD9-41A5-A562-CC7C82B3CC86}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{A8F39368-ECD9-41A5-A562-CC7C82B3CC86}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {A8F39368-ECD9-41A5-A562-CC7C82B3CC86}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {A8F39368-ECD9-41A5-A562-CC7C82B3CC86}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{6CFF32E7-9621-4F17-8D31-732F93F0C1A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CFF32E7-9621-4F17-8D31-732F93F0C1A6}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{6CFF32E7-9621-4F17-8D31-732F93F0C1A6}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2527,6 +2561,8 @@ Global
{6CFF32E7-9621-4F17-8D31-732F93F0C1A6}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{6CFF32E7-9621-4F17-8D31-732F93F0C1A6}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{6CFF32E7-9621-4F17-8D31-732F93F0C1A6}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {6CFF32E7-9621-4F17-8D31-732F93F0C1A6}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {6CFF32E7-9621-4F17-8D31-732F93F0C1A6}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{FDE5334A-70B5-41AE-9445-A0C77725A63D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDE5334A-70B5-41AE-9445-A0C77725A63D}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{FDE5334A-70B5-41AE-9445-A0C77725A63D}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2537,6 +2573,8 @@ Global
{FDE5334A-70B5-41AE-9445-A0C77725A63D}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{FDE5334A-70B5-41AE-9445-A0C77725A63D}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{FDE5334A-70B5-41AE-9445-A0C77725A63D}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {FDE5334A-70B5-41AE-9445-A0C77725A63D}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {FDE5334A-70B5-41AE-9445-A0C77725A63D}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{8858E6B0-8398-46A9-9022-358D10E5E394}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8858E6B0-8398-46A9-9022-358D10E5E394}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{8858E6B0-8398-46A9-9022-358D10E5E394}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2547,6 +2585,8 @@ Global
{8858E6B0-8398-46A9-9022-358D10E5E394}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{8858E6B0-8398-46A9-9022-358D10E5E394}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{8858E6B0-8398-46A9-9022-358D10E5E394}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {8858E6B0-8398-46A9-9022-358D10E5E394}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {8858E6B0-8398-46A9-9022-358D10E5E394}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{8EC74798-FED7-4F3C-A01B-25013317A90B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8EC74798-FED7-4F3C-A01B-25013317A90B}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{8EC74798-FED7-4F3C-A01B-25013317A90B}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2557,6 +2597,8 @@ Global
{8EC74798-FED7-4F3C-A01B-25013317A90B}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{8EC74798-FED7-4F3C-A01B-25013317A90B}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{8EC74798-FED7-4F3C-A01B-25013317A90B}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {8EC74798-FED7-4F3C-A01B-25013317A90B}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {8EC74798-FED7-4F3C-A01B-25013317A90B}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{52BF10FD-66DF-430F-8A30-E5E63A93AE91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{52BF10FD-66DF-430F-8A30-E5E63A93AE91}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
{52BF10FD-66DF-430F-8A30-E5E63A93AE91}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2567,6 +2609,8 @@ Global
{52BF10FD-66DF-430F-8A30-E5E63A93AE91}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{52BF10FD-66DF-430F-8A30-E5E63A93AE91}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{52BF10FD-66DF-430F-8A30-E5E63A93AE91}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {52BF10FD-66DF-430F-8A30-E5E63A93AE91}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {52BF10FD-66DF-430F-8A30-E5E63A93AE91}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
{C8BEA9D9-9608-4FC7-BE8D-DFEDCE41C39F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8BEA9D9-9608-4FC7-BE8D-DFEDCE41C39F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8BEA9D9-9608-4FC7-BE8D-DFEDCE41C39F}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2609,6 +2653,8 @@ Global
{A0B6FE73-D046-4E1C-BA9D-F20683889C5A}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
{A0B6FE73-D046-4E1C-BA9D-F20683889C5A}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
{A0B6FE73-D046-4E1C-BA9D-F20683889C5A}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
+ {A0B6FE73-D046-4E1C-BA9D-F20683889C5A}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {A0B6FE73-D046-4E1C-BA9D-F20683889C5A}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
{E8F4F0EB-C2B1-4116-8459-E076E0E0E485}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
{E8F4F0EB-C2B1-4116-8459-E076E0E0E485}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
{E8F4F0EB-C2B1-4116-8459-E076E0E0E485}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
@@ -2647,16 +2693,6 @@ Global
{9730E995-DFFE-49F2-BEDB-4DE7F33C8E8D}.Debug|x86.Build.0 = Debug|Any CPU
{9730E995-DFFE-49F2-BEDB-4DE7F33C8E8D}.Release|x86.ActiveCfg = Release|Any CPU
{9730E995-DFFE-49F2-BEDB-4DE7F33C8E8D}.Release|x86.Build.0 = Release|Any CPU
- {B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
- {B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
- {B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
- {B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
- {B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
- {B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
- {B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
{785F775C-9CA0-4411-86E6-B89D89F3E2ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{785F775C-9CA0-4411-86E6-B89D89F3E2ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{785F775C-9CA0-4411-86E6-B89D89F3E2ED}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2673,22 +2709,224 @@ Global
{785F775C-9CA0-4411-86E6-B89D89F3E2ED}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
{785F775C-9CA0-4411-86E6-B89D89F3E2ED}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
{785F775C-9CA0-4411-86E6-B89D89F3E2ED}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.Release|Any CPU.Build.0 = Release|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.Debug|x86.Build.0 = Debug|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.Release|x86.ActiveCfg = Release|Any CPU
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE}.Release|x86.Build.0 = Release|Any CPU
+
+ {209B27AE-712E-4B87-8846-BB149874D44E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.Debug|x86.Build.0 = Debug|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.Release|x86.ActiveCfg = Release|Any CPU
+ {209B27AE-712E-4B87-8846-BB149874D44E}.Release|x86.Build.0 = Release|Any CPU
+
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.Debug|x86.Build.0 = Debug|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.Release|x86.ActiveCfg = Release|Any CPU
+ {573D31CF-B22B-4693-820D-BA143266F4D8}.Release|x86.Build.0 = Release|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.Release|Any CPU.Build.0 = Release|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.Debug|x86.Build.0 = Debug|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.Release|x86.ActiveCfg = Release|Any CPU
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840}.Release|x86.Build.0 = Release|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.ReleaseGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.ReleaseMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.ReleaseMac|Any CPU.Build.0 = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.ReleaseWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.ReleaseWin32|Any CPU.Build.0 = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.Debug|x86.Build.0 = Debug|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.Release|x86.ActiveCfg = Release|Any CPU
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6}.Release|x86.Build.0 = Release|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugWin32|Any CPU.ActiveCfg = DebugMac|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugWin32|Any CPU.Build.0 = DebugMac|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseWin32|Any CPU.ActiveCfg = DebugMac|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseWin32|Any CPU.Build.0 = DebugMac|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.Debug|x86.Build.0 = Debug|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.Release|x86.ActiveCfg = Release|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.Release|x86.Build.0 = Release|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugGnome|Any CPU.ActiveCfg = DebugGnome|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.DebugGnome|Any CPU.Build.0 = DebugGnome|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
+ {2C24D515-4A2C-445C-8419-C09231913CFA}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.ReleaseGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.ReleaseGnome|Any CPU.Build.0 = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.ReleaseMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.ReleaseMac|Any CPU.Build.0 = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.ReleaseWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.ReleaseWin32|Any CPU.Build.0 = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.Debug|x86.Build.0 = Debug|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.Release|x86.ActiveCfg = Release|Any CPU
+ {F71A259D-C08F-48D9-93B7-EE51497EB390}.Release|x86.Build.0 = Release|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.ReleaseGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.ReleaseGnome|Any CPU.Build.0 = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.ReleaseMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.ReleaseMac|Any CPU.Build.0 = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.ReleaseWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.ReleaseWin32|Any CPU.Build.0 = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.Debug|x86.Build.0 = Debug|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.Release|x86.ActiveCfg = Release|Any CPU
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A}.Release|x86.Build.0 = Release|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.ReleaseGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.ReleaseGnome|Any CPU.Build.0 = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.ReleaseMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.ReleaseMac|Any CPU.Build.0 = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.ReleaseWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.ReleaseWin32|Any CPU.Build.0 = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.Debug|x86.Build.0 = Debug|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.Release|x86.ActiveCfg = Release|Any CPU
+ {8F0B736F-8353-4A6C-B471-192D826BDD81}.Release|x86.Build.0 = Release|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.Release|Any CPU.Build.0 = Release|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.ReleaseGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.ReleaseGnome|Any CPU.Build.0 = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.ReleaseMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.ReleaseMac|Any CPU.Build.0 = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.ReleaseWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.ReleaseWin32|Any CPU.Build.0 = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.Debug|x86.Build.0 = Debug|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.Release|x86.ActiveCfg = Release|Any CPU
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660}.Release|x86.Build.0 = Release|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.ReleaseMac|Any CPU.ActiveCfg = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.ReleaseMac|Any CPU.Build.0 = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.ReleaseWin32|Any CPU.ActiveCfg = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.ReleaseWin32|Any CPU.Build.0 = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.Debug|x86.Build.0 = Debug|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.Release|x86.ActiveCfg = Release|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.Release|x86.Build.0 = Release|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -2719,7 +2957,6 @@ Global
{7E9FADE6-CB4E-4366-8489-AEA1DD9F45F2} = {D417E929-2B3A-46AC-BBE8-027ADB63A790}
{9A415695-CF80-4845-AA80-0DA26CF1E256} = {7E9FADE6-CB4E-4366-8489-AEA1DD9F45F2}
{376889B5-6504-46A1-9D18-A9E4B4A50F49} = {7E9FADE6-CB4E-4366-8489-AEA1DD9F45F2}
- {2C24D515-4A2C-445C-8419-C09231913CFA} = {56499B8C-4935-4D00-9192-4F2033142975}
{CFC02FEC-BDF4-40B9-94D6-35E73F76A92E} = {D417E929-2B3A-46AC-BBE8-027ADB63A790}
{2A00A871-C641-4116-ADFD-29B7799952B4} = {D417E929-2B3A-46AC-BBE8-027ADB63A790}
{B480BF1B-1DCD-4288-9212-F5BEDF763797} = {D417E929-2B3A-46AC-BBE8-027ADB63A790}
@@ -2772,7 +3009,6 @@ Global
{372E8E3E-29D5-4B4D-88A2-4711CD628C4E} = {F12939F1-D55A-4CE9-9F33-8D959BFC7D6C}
{67A32B53-F719-4ECB-B5E1-FD0B04FEE258} = {F12939F1-D55A-4CE9-9F33-8D959BFC7D6C}
{92494904-35FA-4DC9-BDE9-3A3E87AC49D3} = {67A32B53-F719-4ECB-B5E1-FD0B04FEE258}
- {C3887A93-B2BD-4097-8E2F-3A063EFF32FD} = {67A32B53-F719-4ECB-B5E1-FD0B04FEE258}
{C93D746E-1586-4D4F-B411-BF5A966E6A08} = {67A32B53-F719-4ECB-B5E1-FD0B04FEE258}
{E95833C9-90AA-4366-9262-0A1BED148249} = {67A32B53-F719-4ECB-B5E1-FD0B04FEE258}
{252117CA-0ABB-4F36-BFC8-DE23A8089BB9} = {67A32B53-F719-4ECB-B5E1-FD0B04FEE258}
@@ -2787,7 +3023,6 @@ Global
{53DCA265-3C3C-42F9-B647-F72BA678122B} = {2D711139-8765-4929-BC7A-AA2DEE6F615D}
{2B8F4F83-C2B3-4E84-A27B-8DEE1BE0E006} = {2D711139-8765-4929-BC7A-AA2DEE6F615D}
{D12F0F7B-8DE3-43EC-BA49-41052D065A9B} = {F12939F1-D55A-4CE9-9F33-8D959BFC7D6C}
- {EE6ED99F-CB12-4683-B055-D28FC7357A34} = {F12939F1-D55A-4CE9-9F33-8D959BFC7D6C}
{BFE8691A-D323-4622-9021-7B8B27F81599} = {5D3F7E65-E55B-45CA-A83B-D1E10040281E}
{8A04FF99-5DFE-4E3D-A24F-72A621C8DDC6} = {5D3F7E65-E55B-45CA-A83B-D1E10040281E}
{D0B5AF2B-4BC1-4EB4-81D3-E5B85DDCE925} = {5D3F7E65-E55B-45CA-A83B-D1E10040281E}
@@ -2827,7 +3062,7 @@ Global
{1DEFDD53-2677-439D-906E-141ED2AEC19B} = {D417E929-2B3A-46AC-BBE8-027ADB63A790}
{B3E73DE7-8AFC-429A-9B68-5699B1E63A02} = {1DEFDD53-2677-439D-906E-141ED2AEC19B}
{FDA43CAA-1C2A-4593-8601-3E2EE06D9E03} = {78C10DAE-D3D7-44FC-93DF-831D8D54ECF9}
- {CD31F051-9012-487B-B7E8-4CDDEA68B3AF} = {DE462010-393D-4655-A42C-2C78BB14D2FA}
+ {CD31F051-9012-487B-B7E8-4CDDEA68B3AF} = {56499B8C-4935-4D00-9192-4F2033142975}
{BCC3A6AE-EC45-40AD-BA3E-59F6401D588C} = {78C10DAE-D3D7-44FC-93DF-831D8D54ECF9}
{CF789E43-7AAF-4690-BA32-ABD75DEEB087} = {78C10DAE-D3D7-44FC-93DF-831D8D54ECF9}
{A9D93F6C-EB26-44FF-8F2A-B3DB411FA410} = {1DEFDD53-2677-439D-906E-141ED2AEC19B}
@@ -2853,7 +3088,6 @@ Global
{C0943335-A94F-4DF4-91D0-2129D45C666C} = {AA56E3AE-8E61-4101-B01A-2646DC1B0D7B}
{E20390B6-25C8-4DDC-B3E3-9E0560FC4336} = {AA56E3AE-8E61-4101-B01A-2646DC1B0D7B}
{D53A102A-8B6B-4838-BC65-FE36527E7018} = {AA56E3AE-8E61-4101-B01A-2646DC1B0D7B}
- {B85A8B6C-FAE2-4604-A0A8-B6F42F696FA9} = {AA56E3AE-8E61-4101-B01A-2646DC1B0D7B}
{33DAC448-FBCB-4030-9939-01FA4B3EAE76} = {32539734-6484-4451-9EF3-61610CA25BBF}
{FB46DD61-12E4-42D0-A99C-0A79C412FDD5} = {32539734-6484-4451-9EF3-61610CA25BBF}
{E5AF4EB5-9E7F-40B6-8762-98FA45FACA06} = {32539734-6484-4451-9EF3-61610CA25BBF}
@@ -2904,7 +3138,18 @@ Global
{8E19F797-D714-4C07-903F-97C76E247A03} = {5A92B792-BF17-4748-B29E-34C99B2E8722}
{F16C4445-2277-4A08-9511-5BE611756CDA} = {8E19F797-D714-4C07-903F-97C76E247A03}
{56499B8C-4935-4D00-9192-4F2033142975} = {D417E929-2B3A-46AC-BBE8-027ADB63A790}
- {49D21A49-7F0B-4F1E-A6D4-3B1EBB7B39C5} = {56499B8C-4935-4D00-9192-4F2033142975}
+ {E5EA3C1D-431E-46FD-B879-492725B1CDBE} = {AA56E3AE-8E61-4101-B01A-2646DC1B0D7B}
+ {573D31CF-B22B-4693-820D-BA143266F4D8} = {776872D9-76FA-407B-BA69-08E25A24E5CE}
+ {364E4FEE-0F78-4AEC-A170-BB6AC93E8F9A} = {56499B8C-4935-4D00-9192-4F2033142975}
+ {11239964-1C07-4A3D-B129-E4AFFFE8A840} = {AA56E3AE-8E61-4101-B01A-2646DC1B0D7B}
+ {9DAA25E7-9C9D-4C34-A72A-E402D29BE6F6} = {AA56E3AE-8E61-4101-B01A-2646DC1B0D7B}
+ {2C24D515-4A2C-445C-8419-C09231913CFA} = {56499B8C-4935-4D00-9192-4F2033142975}
+ {209B27AE-712E-4B87-8846-BB149874D44E} = {745BF6CA-BC7C-4863-B1B4-C423A828820A}
+ {F71A259D-C08F-48D9-93B7-EE51497EB390} = {A026D596-3C8D-4521-BB42-2C898FA3BE2D}
+ {FED3E127-B64A-4E57-8D2A-C8817C5D593A} = {67A32B53-F719-4ECB-B5E1-FD0B04FEE258}
+ {8F0B736F-8353-4A6C-B471-192D826BDD81} = {67A32B53-F719-4ECB-B5E1-FD0B04FEE258}
+ {410A7DC9-E7DA-43E6-B592-93E2A344B660} = {B8897B76-1A12-4DFA-8B60-7944CC4C9654}
+ {0A8EB4EA-60B4-4708-BA45-68C5E730ED00} = {9D360D43-0C05-49D6-84DB-4E7AB2F38F82}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {856CF524-E2A7-4DB0-B80F-8F1B080A2E25}
diff --git a/main/Main.sln.DotSettings b/main/Main.sln.DotSettings
index 904c88e3dee..5fdc0e6ddaa 100644
--- a/main/Main.sln.DotSettings
+++ b/main/Main.sln.DotSettings
@@ -11,4 +11,5 @@
True
<Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="" Style="AA_BB" /></Policy>
<Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
- <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
\ No newline at end of file
+ <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
+
diff --git a/main/external/Monodevelop.Netcoredbg b/main/external/Monodevelop.Netcoredbg
new file mode 160000
index 00000000000..0a52b6c4c6d
--- /dev/null
+++ b/main/external/Monodevelop.Netcoredbg
@@ -0,0 +1 @@
+Subproject commit 0a52b6c4c6de32a66d6549d3c6abca8152bf310d
diff --git a/main/external/Samsung.Netcoredbg b/main/external/Samsung.Netcoredbg
new file mode 160000
index 00000000000..39c63e79eb9
--- /dev/null
+++ b/main/external/Samsung.Netcoredbg
@@ -0,0 +1 @@
+Subproject commit 39c63e79eb98e6fb0b63ebbf58e9fb80e2d7ba2d
diff --git a/main/external/fsharpbinding/MonoDevelop.FSharp.Gui/MonoDevelop.FSharp.Gui.csproj b/main/external/fsharpbinding/MonoDevelop.FSharp.Gui/MonoDevelop.FSharp.Gui.csproj
index 3db6e486892..c52adb4590c 100644
--- a/main/external/fsharpbinding/MonoDevelop.FSharp.Gui/MonoDevelop.FSharp.Gui.csproj
+++ b/main/external/fsharpbinding/MonoDevelop.FSharp.Gui/MonoDevelop.FSharp.Gui.csproj
@@ -13,10 +13,6 @@
..\..\..\build\AddIns\FSharpBinding
True
-
-
-
-
diff --git a/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/MonoDevelop.FSharp.Tests.fsproj b/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/MonoDevelop.FSharp.Tests.fsproj
index 11dcb89113e..71f960bb4e4 100644
--- a/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/MonoDevelop.FSharp.Tests.fsproj
+++ b/main/external/fsharpbinding/MonoDevelop.FSharp.Tests/MonoDevelop.FSharp.Tests.fsproj
@@ -21,6 +21,12 @@
run-md-tests $(MSBuildProjectDirectory)\..\..\..\build\tests\MonoDevelop.FSharp.Tests.dll
false
+
+ bin\Debug\
+
+
+ bin\Release\
+
@@ -58,10 +64,6 @@
..\..\..\build\bin\Microsoft.CodeAnalysis.Workspaces.dll
False
-
- ..\..\Xamarin.Mac.dll
- False
-
False
..\..\..\build\AddIns\DisplayBindings\SourceEditor\MonoDevelop.SourceEditor.dll
diff --git a/main/external/fsharpbinding/MonoDevelop.FSharpBinding/MonoDevelop.FSharp.fsproj b/main/external/fsharpbinding/MonoDevelop.FSharpBinding/MonoDevelop.FSharp.fsproj
index f15270b00b2..fdd8356ac05 100644
--- a/main/external/fsharpbinding/MonoDevelop.FSharpBinding/MonoDevelop.FSharp.fsproj
+++ b/main/external/fsharpbinding/MonoDevelop.FSharpBinding/MonoDevelop.FSharp.fsproj
@@ -30,8 +30,6 @@
-
-
@@ -74,6 +72,8 @@
+
+
@@ -132,22 +132,23 @@
-
- {2C24D515-4A2C-445C-8419-C09231913CFA}
- MonoDevelop.DesignerSupport
+
+
+
+
+
+
+
+
+
+
+ {100568FC-F4E8-439B-94AD-41D11724E45B}
+ MonoDevelop.Refactoring
False
-
- {FD0D1033-9145-48E5-8ED8-E2365252878C}
- MonoDevelop.FSharp.Gui
-
-
- {AF5FEAD5-B50E-4F07-A274-32F23D5C504D}
- MonoDevelop.FSharp.Shared
-
-
- {2357AABD-08C7-4808-A495-8FF2D3CDFDB0}
- MonoDevelop.Debugger
+
+ {27096E7F-C91C-4AC6-B289-6897A701DF21}
+ MonoDevelop.Ide
False
@@ -155,14 +156,22 @@
MonoDevelop.Core
False
-
- {27096E7F-C91C-4AC6-B289-6897A701DF21}
- MonoDevelop.Ide
+
+ {2357AABD-08C7-4808-A495-8FF2D3CDFDB0}
+ MonoDevelop.Debugger
False
-
- {100568FC-F4E8-439B-94AD-41D11724E45B}
- MonoDevelop.Refactoring
+
+ {AF5FEAD5-B50E-4F07-A274-32F23D5C504D}
+ MonoDevelop.FSharp.Shared
+
+
+ {FD0D1033-9145-48E5-8ED8-E2365252878C}
+ MonoDevelop.FSharp.Gui
+
+
+ {364E4FEE-0F78-4AEC-A170-BB6AC93E8F9A}
+ MonoDevelop.DesignerSupport.Mac
False
@@ -176,17 +185,6 @@
False
-
-
-
-
-
-
-
-
-
-
-
diff --git a/main/external/fsharpbinding/MonoDevelop.FSharpi.Service/MonoDevelop.FSharpInteractive.Service.fsproj b/main/external/fsharpbinding/MonoDevelop.FSharpi.Service/MonoDevelop.FSharpInteractive.Service.fsproj
index c3710a5e90d..88f6f27243f 100644
--- a/main/external/fsharpbinding/MonoDevelop.FSharpi.Service/MonoDevelop.FSharpInteractive.Service.fsproj
+++ b/main/external/fsharpbinding/MonoDevelop.FSharpi.Service/MonoDevelop.FSharpInteractive.Service.fsproj
@@ -28,15 +28,6 @@
-
-
-
- {AF5FEAD5-B50E-4F07-A274-32F23D5C504D}
- MonoDevelop.FSharp.Shared
- false
-
-
-
@@ -48,6 +39,11 @@
FSharp.Core.sigdata
PreserveNewest
+
+ {AF5FEAD5-B50E-4F07-A274-32F23D5C504D}
+ MonoDevelop.FSharp.Shared
+ false
+
diff --git a/main/external/fsharpbinding/paket.dependencies b/main/external/fsharpbinding/paket.dependencies
index 0fa75c3a9f3..1b3e2d53ee5 100644
--- a/main/external/fsharpbinding/paket.dependencies
+++ b/main/external/fsharpbinding/paket.dependencies
@@ -1,6 +1,6 @@
version 5.201.1
framework: net472
-source https://nuget.org/api/v2/
+source https://api.nuget.org/v3/index.json
nuget ExtCore framework: >= net40
nuget FSharp.Compiler.Service 31.0.0
diff --git a/main/external/fsharpbinding/paket.lock b/main/external/fsharpbinding/paket.lock
index 817a6a8ded3..b099144eba0 100644
--- a/main/external/fsharpbinding/paket.lock
+++ b/main/external/fsharpbinding/paket.lock
@@ -1,6 +1,6 @@
RESTRICTION: == net472
NUGET
- remote: https://www.nuget.org/api/v2
+ remote: https://api.nuget.org/v3/index.json
ExtCore (0.8.46)
FAKE (5.8.4)
Fantomas (3.0.0-beta-002)
diff --git a/main/external/libgit-binary b/main/external/libgit-binary
deleted file mode 160000
index 2871279e5d6..00000000000
--- a/main/external/libgit-binary
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 2871279e5d6abe886a571583ae72131fae2ffa53
diff --git a/main/external/libgit2 b/main/external/libgit2
deleted file mode 160000
index 71efcb31582..00000000000
--- a/main/external/libgit2
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 71efcb31582108be91adf61155927d8bd9bbcfc1
diff --git a/main/external/libgit2sharp b/main/external/libgit2sharp
deleted file mode 160000
index 7c156e1beff..00000000000
--- a/main/external/libgit2sharp
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 7c156e1beff7d0c8811564b3d36fb85742392cbe
diff --git a/main/external/mono-addins b/main/external/mono-addins
index 78293401391..cddcc8052c5 160000
--- a/main/external/mono-addins
+++ b/main/external/mono-addins
@@ -1 +1 @@
-Subproject commit 78293401391922f6d06c4707a043e030b54e3732
+Subproject commit cddcc8052c57447c9422a85dabbbf2a872b4e415
diff --git a/main/external/nuget-binary b/main/external/nuget-binary
deleted file mode 160000
index 7871fa26914..00000000000
--- a/main/external/nuget-binary
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 7871fa26914593fdb2f2500df1196df7b8aecb1c
diff --git a/main/external/nuget-binary/CODE-OF-CONDUCT.md b/main/external/nuget-binary/CODE-OF-CONDUCT.md
new file mode 100644
index 00000000000..775f221c98e
--- /dev/null
+++ b/main/external/nuget-binary/CODE-OF-CONDUCT.md
@@ -0,0 +1,6 @@
+# Code of Conduct
+
+This project has adopted the code of conduct defined by the Contributor Covenant
+to clarify expected behavior in our community.
+
+For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
diff --git a/main/external/nuget-binary/Lucene.Net.dll b/main/external/nuget-binary/Lucene.Net.dll
new file mode 100755
index 00000000000..5cbb2bd46dc
Binary files /dev/null and b/main/external/nuget-binary/Lucene.Net.dll differ
diff --git a/main/external/nuget-binary/Microsoft.Web.XmlTransform.dll b/main/external/nuget-binary/Microsoft.Web.XmlTransform.dll
new file mode 100755
index 00000000000..98c9d56ff43
Binary files /dev/null and b/main/external/nuget-binary/Microsoft.Web.XmlTransform.dll differ
diff --git a/main/external/nuget-binary/NuGet-COPYRIGHT.txt b/main/external/nuget-binary/NuGet-COPYRIGHT.txt
new file mode 100644
index 00000000000..0bdc1962b61
--- /dev/null
+++ b/main/external/nuget-binary/NuGet-COPYRIGHT.txt
@@ -0,0 +1,12 @@
+Copyright (c) .NET Foundation. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+these files except in compliance with the License. You may obtain a copy of the
+License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed
+under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License.
diff --git a/main/external/nuget-binary/NuGet-LICENSE.txt b/main/external/nuget-binary/NuGet-LICENSE.txt
new file mode 100644
index 00000000000..dd0f078c6b9
--- /dev/null
+++ b/main/external/nuget-binary/NuGet-LICENSE.txt
@@ -0,0 +1,177 @@
+
+ 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:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) 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
+
+ (d) 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
diff --git a/main/external/nuget-binary/NuGet.Commands.dll b/main/external/nuget-binary/NuGet.Commands.dll
new file mode 100644
index 00000000000..31e766b4d7e
Binary files /dev/null and b/main/external/nuget-binary/NuGet.Commands.dll differ
diff --git a/main/external/nuget-binary/NuGet.Common.dll b/main/external/nuget-binary/NuGet.Common.dll
new file mode 100644
index 00000000000..cec6277e09e
Binary files /dev/null and b/main/external/nuget-binary/NuGet.Common.dll differ
diff --git a/main/external/nuget-binary/NuGet.Configuration.dll b/main/external/nuget-binary/NuGet.Configuration.dll
new file mode 100644
index 00000000000..cb29db8ed14
Binary files /dev/null and b/main/external/nuget-binary/NuGet.Configuration.dll differ
diff --git a/main/external/nuget-binary/NuGet.DependencyResolver.Core.dll b/main/external/nuget-binary/NuGet.DependencyResolver.Core.dll
new file mode 100644
index 00000000000..90be4aeef43
Binary files /dev/null and b/main/external/nuget-binary/NuGet.DependencyResolver.Core.dll differ
diff --git a/main/external/nuget-binary/NuGet.Frameworks.dll b/main/external/nuget-binary/NuGet.Frameworks.dll
new file mode 100644
index 00000000000..009e420ad60
Binary files /dev/null and b/main/external/nuget-binary/NuGet.Frameworks.dll differ
diff --git a/main/external/nuget-binary/NuGet.Indexing.dll b/main/external/nuget-binary/NuGet.Indexing.dll
new file mode 100644
index 00000000000..55f5e1bfa94
Binary files /dev/null and b/main/external/nuget-binary/NuGet.Indexing.dll differ
diff --git a/main/external/nuget-binary/NuGet.LibraryModel.dll b/main/external/nuget-binary/NuGet.LibraryModel.dll
new file mode 100644
index 00000000000..a70b8bf5f1a
Binary files /dev/null and b/main/external/nuget-binary/NuGet.LibraryModel.dll differ
diff --git a/main/external/nuget-binary/NuGet.PackageManagement.dll b/main/external/nuget-binary/NuGet.PackageManagement.dll
new file mode 100644
index 00000000000..9d33be12f15
Binary files /dev/null and b/main/external/nuget-binary/NuGet.PackageManagement.dll differ
diff --git a/main/external/nuget-binary/NuGet.Packaging.Core.dll b/main/external/nuget-binary/NuGet.Packaging.Core.dll
new file mode 100644
index 00000000000..58a73c2c2e3
Binary files /dev/null and b/main/external/nuget-binary/NuGet.Packaging.Core.dll differ
diff --git a/main/external/nuget-binary/NuGet.Packaging.dll b/main/external/nuget-binary/NuGet.Packaging.dll
new file mode 100644
index 00000000000..7067e2e513c
Binary files /dev/null and b/main/external/nuget-binary/NuGet.Packaging.dll differ
diff --git a/main/external/nuget-binary/NuGet.ProjectModel.dll b/main/external/nuget-binary/NuGet.ProjectModel.dll
new file mode 100644
index 00000000000..1be0af44d0b
Binary files /dev/null and b/main/external/nuget-binary/NuGet.ProjectModel.dll differ
diff --git a/main/external/nuget-binary/NuGet.Protocol.dll b/main/external/nuget-binary/NuGet.Protocol.dll
new file mode 100644
index 00000000000..ea2d1f39f55
Binary files /dev/null and b/main/external/nuget-binary/NuGet.Protocol.dll differ
diff --git a/main/external/nuget-binary/NuGet.Resolver.dll b/main/external/nuget-binary/NuGet.Resolver.dll
new file mode 100644
index 00000000000..46d10782ecc
Binary files /dev/null and b/main/external/nuget-binary/NuGet.Resolver.dll differ
diff --git a/main/external/nuget-binary/NuGet.Versioning.dll b/main/external/nuget-binary/NuGet.Versioning.dll
new file mode 100644
index 00000000000..9ed020685fb
Binary files /dev/null and b/main/external/nuget-binary/NuGet.Versioning.dll differ
diff --git a/main/external/nuget-binary/NuGetVersion-5.8.0.txt b/main/external/nuget-binary/NuGetVersion-5.8.0.txt
new file mode 100644
index 00000000000..010b70ef500
--- /dev/null
+++ b/main/external/nuget-binary/NuGetVersion-5.8.0.txt
@@ -0,0 +1,2 @@
+These dlls have been downloaded fron NuGet Gallery and are all from release-5.8.x
+Framework NET Framework 4.7.2 is currently selected for DotDevelop
diff --git a/main/external/nuget-binary/README.md b/main/external/nuget-binary/README.md
new file mode 100644
index 00000000000..5adc57dac1b
--- /dev/null
+++ b/main/external/nuget-binary/README.md
@@ -0,0 +1,10 @@
+ Temporary repo to hold nuget binaries for use with DotDevelop
+
+License: Apache License 2.0 (see NuGet-LICENSE.txt for details)
+
+This folder was initially an external repo as described above, and was forked into DotDevelop from the original MonoDevelop one at https://github.com/mono/nuget-binary.
+
+Since MonoDevelop was archived there have been no commits since 1-Dec-2018, and there seems to be no reason to continue keeping the contents as a submodule of DotDevelop.
+
+The advantage of changing it to a standard folder would then allow any changes to its contents - for example, updates to later releases of NuGet.Client (https://github.com/nuget/nuget.client) to be under the version control of the main DotDevelop repo.
+It is being retained in the `main/external/nuget-binary` to minimise changes to the rest of the DotDevelop repo.
diff --git a/main/external/nuget-binary/nuget.exe b/main/external/nuget-binary/nuget.exe
new file mode 100644
index 00000000000..0e535e736e8
Binary files /dev/null and b/main/external/nuget-binary/nuget.exe differ
diff --git a/main/external/vs-editor-api b/main/external/vs-editor-api
index 5ce6368e5b7..71b2d6b03cc 160000
--- a/main/external/vs-editor-api
+++ b/main/external/vs-editor-api
@@ -1 +1 @@
-Subproject commit 5ce6368e5b71451d75a388db524e5e104e222122
+Subproject commit 71b2d6b03ccaf515f5ccfeea85999b65bd9b22b4
diff --git a/main/external/xwt b/main/external/xwt
index 9a22465b52c..b191f50b079 160000
--- a/main/external/xwt
+++ b/main/external/xwt
@@ -1 +1 @@
-Subproject commit 9a22465b52c7dbaae321a514b046edebd6a0efb8
+Subproject commit b191f50b079c49df4426302fe84c53baeec6c721
diff --git a/main/msbuild/MDBuildTasks/MDBuildTasks.csproj b/main/msbuild/MDBuildTasks/MDBuildTasks.csproj
index b736d7adc8d..8a93f9482be 100644
--- a/main/msbuild/MDBuildTasks/MDBuildTasks.csproj
+++ b/main/msbuild/MDBuildTasks/MDBuildTasks.csproj
@@ -4,7 +4,7 @@
bin
-
+
diff --git a/main/msbuild/ReferencesGtk.props b/main/msbuild/ReferencesGtk.props
index 00ade622658..480551d1975 100644
--- a/main/msbuild/ReferencesGtk.props
+++ b/main/msbuild/ReferencesGtk.props
@@ -1,10 +1,17 @@
-
+
+ GTK_SHARP
+
false
+ false
+ $(DefineConstants);GTK3;GTK_SHARP
-
+
+
+
+
$(ReferencesGtkCopyToOutput)
@@ -20,15 +27,17 @@
$(ReferencesGtkCopyToOutput)
-
+
$(ReferencesGtkCopyToOutput)
+
+
+
+
$(ReferencesGtkCopyToOutput)
-
- $(ReferencesGtkCopyToOutput)
-
+
\ No newline at end of file
diff --git a/main/msbuild/ReferencesVSEditor.Gtk.props b/main/msbuild/ReferencesVSEditor.Gtk.props
new file mode 100644
index 00000000000..9fa95b8fcb4
--- /dev/null
+++ b/main/msbuild/ReferencesVSEditor.Gtk.props
@@ -0,0 +1,77 @@
+
+
+
+ false
+ runtime
+ none
+ none
+ runtime
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Release
+ Debug
+ $(VSEditorApiDirectory)bin\FPF\$(FPFConfiguration)\net472\
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/main/src/addins/AspNet/Razor/EditorParserFixed/DisposableAction.cs b/main/src/addins/AspNet/Razor/EditorParserFixed/DisposableAction.cs
index 231fc3bd430..48c6b1bf241 100644
--- a/main/src/addins/AspNet/Razor/EditorParserFixed/DisposableAction.cs
+++ b/main/src/addins/AspNet/Razor/EditorParserFixed/DisposableAction.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Microsoft Public License (MS-PL)
using System;
@@ -13,7 +13,7 @@ public DisposableAction(Action action)
{
if (action == null)
{
- throw new ArgumentNullException("action");
+ throw new ArgumentNullException(nameof(action));
}
_action = action;
}
diff --git a/main/src/addins/AspNet/Razor/EditorParserFixed/RazorEditorParser.cs b/main/src/addins/AspNet/Razor/EditorParserFixed/RazorEditorParser.cs
index bdc3002b958..1d8b82ec40e 100644
--- a/main/src/addins/AspNet/Razor/EditorParserFixed/RazorEditorParser.cs
+++ b/main/src/addins/AspNet/Razor/EditorParserFixed/RazorEditorParser.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Microsoft Public License (MS-PL)
using System.CodeDom;
@@ -78,11 +78,11 @@ public RazorEditorParser(RazorEngineHost host, string sourceFileName)
{
if (host == null)
{
- throw new ArgumentNullException("host");
+ throw new ArgumentNullException(nameof(host));
}
if (String.IsNullOrEmpty(sourceFileName))
{
- throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "sourceFileName");
+ throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, nameof(sourceFileName));
}
Host = host;
diff --git a/main/src/addins/AspNet/Razor/Generator/FileUtil.cs b/main/src/addins/AspNet/Razor/Generator/FileUtil.cs
index cd90db11f78..14ad0d242bf 100644
--- a/main/src/addins/AspNet/Razor/Generator/FileUtil.cs
+++ b/main/src/addins/AspNet/Razor/Generator/FileUtil.cs
@@ -1,4 +1,4 @@
-//
+//
// FileUtil.cs
//
// Author:
@@ -115,7 +115,7 @@ static bool IsSeparator (char ch)
static string GetFullPath (string path)
{
if (path == null)
- throw new ArgumentNullException ("path");
+ throw new ArgumentNullException (nameof(path));
if (!isWindows || path.IndexOf ('*') == -1)
return Path.GetFullPath (path);
else {
diff --git a/main/src/addins/AspNet/Razor/Generator/PreprocessedRazorHost.cs b/main/src/addins/AspNet/Razor/Generator/PreprocessedRazorHost.cs
index d636cf94a40..258fd2fa6d5 100644
--- a/main/src/addins/AspNet/Razor/Generator/PreprocessedRazorHost.cs
+++ b/main/src/addins/AspNet/Razor/Generator/PreprocessedRazorHost.cs
@@ -25,7 +25,7 @@ class PreprocessedRazorHost : RazorEngineHost
public PreprocessedRazorHost (string fullPath) : base (RazorCodeLanguage.GetLanguageByExtension (".cshtml"))
{
if (fullPath == null)
- throw new ArgumentNullException ("fullPath");
+ throw new ArgumentNullException (nameof(fullPath));
FullPath = fullPath;
_codeDomProvider = new Microsoft.CSharp.CSharpCodeProvider ();
diff --git a/main/src/addins/AspNet/WebForms/CSharp/CSharpProjector.cs b/main/src/addins/AspNet/WebForms/CSharp/CSharpProjector.cs
index 3bf093be49d..dc56d6ec18f 100644
--- a/main/src/addins/AspNet/WebForms/CSharp/CSharpProjector.cs
+++ b/main/src/addins/AspNet/WebForms/CSharp/CSharpProjector.cs
@@ -1,4 +1,4 @@
-//
+//
// CSharpProjector.cs
//
// Author:
@@ -39,9 +39,9 @@ public class CSharpProjector
public Task CreateProjection (DocumentInfo info, IReadonlyTextDocument data, bool buildExpressions)
{
if (info == null)
- throw new ArgumentNullException ("info");
+ throw new ArgumentNullException (nameof(info));
if (data == null)
- throw new ArgumentNullException ("data");
+ throw new ArgumentNullException (nameof(data));
var document = new StringBuilder ();
WriteUsings (info.Imports, document);
diff --git a/main/src/addins/CSharpBinding/CSharpBinding.csproj b/main/src/addins/CSharpBinding/CSharpBinding.csproj
index c4fcfe81388..9d445c25a9a 100644
--- a/main/src/addins/CSharpBinding/CSharpBinding.csproj
+++ b/main/src/addins/CSharpBinding/CSharpBinding.csproj
@@ -124,6 +124,7 @@
+
@@ -232,6 +233,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -300,4 +321,4 @@
-
\ No newline at end of file
+
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicy.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicy.cs
index 68c67dd1fa5..09af0d0a245 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicy.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpFormattingPolicy.cs
@@ -1,4 +1,4 @@
-//
+//
// CSharpFormattingPolicy.cs
//
// Author:
@@ -116,7 +116,7 @@ static CSharpFormattingPolicy ()
public CSharpFormattingPolicy (OptionSet options)
{
if (options == null)
- throw new ArgumentNullException ("options");
+ throw new ArgumentNullException (nameof(options));
this.options = options;
}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/AbstractKeywordHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/AbstractKeywordHighlighter.cs
new file mode 100644
index 00000000000..214638a3015
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/AbstractKeywordHighlighter.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using ICSharpCode.NRefactory6.CSharp;
+using Microsoft.CodeAnalysis.Text;
+using Roslyn.Utilities;
+
+namespace Microsoft.CodeAnalysis.Editor.Implementation.Highlighting
+{
+ interface IHighlighter
+ {
+ IEnumerable GetHighlights (
+ SyntaxNode root, int position, CancellationToken cancellationToken);
+
+ }
+ internal abstract class AbstractKeywordHighlighter : IHighlighter
+ where TNode : SyntaxNode
+ {
+ public IEnumerable GetHighlights(
+ SyntaxNode root, int position, CancellationToken cancellationToken)
+ {
+ foreach (var token in GetTokens(root, position))
+ {
+ for (var parent = token.Parent; parent != null; parent = parent.Parent)
+ {
+ if (parent is TNode)
+ {
+ var highlights = GetHighlights((TNode)parent, cancellationToken);
+
+ // Only return them if any of them matched
+ if (highlights.Any(span => span.IntersectsWith(position)))
+ {
+ // Return the non-empty spans
+ return highlights.Where(s => !s.IsEmpty).Distinct();
+ }
+ }
+ }
+ }
+
+ return SpecializedCollections.EmptyEnumerable();
+ }
+
+ protected abstract IEnumerable GetHighlights(TNode node, CancellationToken cancellationToken);
+
+ protected TextSpan EmptySpan(int position)
+ {
+ return new TextSpan(position, 0);
+ }
+
+ internal static IEnumerable GetTokens(
+ SyntaxNode root,
+ int position)
+ {
+ foreach (var token in GetTokens (root, position, findInsideTrivia: true))
+ yield return token;
+
+ foreach (var token in GetTokens (root, position, findInsideTrivia: false))
+ yield return token;
+ }
+
+ private static IEnumerable GetTokens(
+ SyntaxNode root,
+ int position,
+ bool findInsideTrivia)
+ {
+ yield return root.FindToken(position - 0, findInsideTrivia);
+
+ if (position > 0)
+ {
+ yield return root.FindToken(position - 1, findInsideTrivia);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/HighlightUsagesExtension.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/HighlightUsagesExtension.cs
index a8c7f2c205b..44d9627e547 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/HighlightUsagesExtension.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/HighlightUsagesExtension.cs
@@ -1,21 +1,21 @@
-//
+//
// HighlightUsagesExtension.cs
-//
+//
// Author:
// Mike Krüger
-//
+//
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -49,21 +49,45 @@
using MonoDevelop.Refactoring;
using MonoDevelop.CSharp.Refactoring;
using MonoDevelop.Ide.Editor.Highlighting;
-using Microsoft.CodeAnalysis.DocumentHighlighting;
-using Microsoft.VisualStudio.Platform;
-using MonoDevelop.Ide.Composition;
+
+// oe REVERTED from oe-20180406-7.4.3.8-dd to fix editor highlighting.
+// oe REVERTED from oe-20180406-7.4.3.8-dd to fix editor highlighting.
+// oe REVERTED from oe-20180406-7.4.3.8-dd to fix editor highlighting.
namespace MonoDevelop.CSharp.Highlighting
{
- class HighlightUsagesExtension : AbstractUsagesExtension>
+ class UsageData
{
- IDocumentHighlightsService highlightsService;
+ public RefactoringSymbolInfo SymbolInfo;
+ public Document Document;
+ public int Offset;
+ public ISymbol Symbol {
+ get { return SymbolInfo != null ? SymbolInfo.Symbol ?? SymbolInfo.DeclaredSymbol : null; }
+ }
+ }
+
+ class HighlightUsagesExtension : AbstractUsagesExtension
+ {
+ static IHighlighter [] highlighters;
+
+ static HighlightUsagesExtension ()
+ {
+ try {
+ highlighters = typeof (HighlightUsagesExtension).Assembly
+ .GetTypes ()
+ .Where (t => !t.IsAbstract && typeof (IHighlighter).IsAssignableFrom (t))
+ .Select (Activator.CreateInstance)
+ .Cast ()
+ .ToArray ();
+ } catch (Exception e) {
+ LoggingService.LogError ("Error while loading highlighters.", e);
+ highlighters = Array.Empty ();
+ }
+ }
protected override void Initialize ()
{
base.Initialize ();
- highlightsService = DocumentContext.RoslynWorkspace.Services.GetLanguageServices (LanguageNames.CSharp).GetService ();
-
Editor.SetSelectionSurroundingProvider (new CSharpSelectionSurroundingProvider (Editor, DocumentContext));
fallbackHighlighting = Editor.SyntaxHighlighting;
UpdateHighlighting ();
@@ -85,9 +109,10 @@ void UpdateHighlighting ()
Editor.SyntaxHighlighting = fallbackHighlighting;
return;
}
- var old = Editor.SyntaxHighlighting as TagBasedSyntaxHighlighting;
- if (old == null) {
- Editor.SyntaxHighlighting = CompositionManager.Instance.GetExportedValue ().CreateSyntaxHighlighting (Editor.TextView, "source.cs");
+ var old = Editor.SyntaxHighlighting as RoslynClassificationHighlighting;
+ if (old == null || old.DocumentId != DocumentContext.AnalysisDocument.Id) {
+ Editor.SyntaxHighlighting = new RoslynClassificationHighlighting ((MonoDevelopWorkspace)DocumentContext.RoslynWorkspace,
+ DocumentContext.AnalysisDocument.Id, "source.cs");
}
}
@@ -98,40 +123,151 @@ public override void Dispose ()
base.Dispose ();
}
- protected async override Task> ResolveAsync (CancellationToken token)
+ protected async override Task ResolveAsync (CancellationToken token)
{
+ var doc = IdeApp.Workbench.ActiveDocument;
+ //old if (doc == null || doc.FileName == FilePath.Null)
+ if (doc == null || doc.FilePath == FilePath.Null)
+ return new UsageData ();
+
+ //old var analysisDocument = doc.AnalysisDocument;
var analysisDocument = DocumentContext?.AnalysisDocument;
if (analysisDocument == null)
- return ImmutableArray.Empty;
+ return new UsageData ();
+
+ //old var symbolInfo = await RefactoringSymbolInfo.GetSymbolInfoAsync (doc, doc.Editor, token);
+ var symbolInfo = await RefactoringSymbolInfo.GetSymbolInfoAsync (DocumentContext, Editor, token);
+ if (symbolInfo.Symbol == null && symbolInfo.DeclaredSymbol == null)
+ return new UsageData {
+ Document = analysisDocument,
+ //old Offset = doc.Editor.CaretOffset
+ Offset = Editor.CaretOffset
+ };
- return await highlightsService.GetDocumentHighlightsAsync (analysisDocument, Editor.CaretOffset, ImmutableHashSet.Empty.Add (analysisDocument), token);
+ if (symbolInfo.Symbol != null && !symbolInfo.Node.IsKind (SyntaxKind.IdentifierName) && !symbolInfo.Node.IsKind (SyntaxKind.GenericName))
+ return new UsageData ();
+
+ return new UsageData {
+ Document = analysisDocument,
+ SymbolInfo = symbolInfo,
+ //old Offset = doc.Editor.CaretOffset
+ Offset = Editor.CaretOffset
+ };
}
- protected override Task> GetReferencesAsync (ImmutableArray resolveResult, CancellationToken token)
+ protected override async Task> GetReferencesAsync (UsageData resolveResult, CancellationToken token)
{
var result = new List ();
- foreach (var highlight in resolveResult) {
- foreach (var span in highlight.HighlightSpans) {
- result.Add (new MemberReference (highlight, highlight.Document.FilePath, span.TextSpan.Start, span.TextSpan.Length) {
- ReferenceUsageType = ConvertKind (span.Kind)
+ if (resolveResult.Symbol == null) {
+ if (resolveResult.Document == null)
+ return result;
+ var root = await resolveResult.Document.GetSyntaxRootAsync (token).ConfigureAwait (false);
+ var doc2 = resolveResult.Document;
+ var offset = resolveResult.Offset;
+ if (!root.Span.Contains (offset))
+ return result;
+ foreach (var highlighter in highlighters) {
+ try {
+ foreach (var span in highlighter.GetHighlights (root, offset, token)) {
+ result.Add (new MemberReference (span, doc2.FilePath, span.Start, span.Length) {
+ ReferenceUsageType = ReferenceUsageType.Keyword
+ });
+ }
+ } catch (Exception e) {
+ LoggingService.LogError ("Highlighter " + highlighter + " threw exception.", e);
+ }
+ }
+ return result;
+ }
+
+ var doc = resolveResult.Document;
+ var documents = ImmutableHashSet.Create (doc);
+
+ //rev foreach (var symbol in await CSharpFindReferencesProvider.GatherSymbols (resolveResult.Symbol, resolveResult.Document.Project.Solution, token)) {
+ var tmp1 = Microsoft.CodeAnalysis.FindSymbols.SymbolAndProjectId.Create( resolveResult.Symbol, resolveResult.Document.Project.Id );
+ foreach (var symbol in await CSharpFindReferencesProvider.GatherSymbols (tmp1, resolveResult.Document.Project.Solution, token)) {
+ // "symbol" old type is ISymbol but new type is SymbolAndProjectId.
+ //rev foreach (var loc in symbol.Locations) {
+ foreach (var loc in symbol.Symbol.Locations) {
+ if (loc.IsInSource && loc.SourceTree.FilePath == doc.FilePath)
+ result.Add (new MemberReference (symbol, doc.FilePath, loc.SourceSpan.Start, loc.SourceSpan.Length) {
+ ReferenceUsageType = ReferenceUsageType.Declaration
+ });
+ }
+
+ //rev foreach (var mref in await SymbolFinder.FindReferencesAsync (symbol, DocumentContext.AnalysisDocument.Project.Solution, documents, token)) {
+ foreach (var mref in await SymbolFinder.FindReferencesAsync (symbol.Symbol, DocumentContext.AnalysisDocument.Project.Solution, documents, token)) {
+ foreach (var loc in mref.Locations) {
+ Microsoft.CodeAnalysis.Text.TextSpan span = loc.Location.SourceSpan;
+ var root = loc.Location.SourceTree.GetRoot ();
+ var node = root.FindNode (loc.Location.SourceSpan);
+ var trivia = root.FindTrivia (loc.Location.SourceSpan.Start);
+ if (!trivia.IsKind (SyntaxKind.SingleLineDocumentationCommentTrivia)) {
+ span = node.Span;
+ }
+
+ if (span.Start != loc.Location.SourceSpan.Start) {
+ span = loc.Location.SourceSpan;
+ }
+ result.Add (new MemberReference (symbol, doc.FilePath, span.Start, span.Length) {
+ ReferenceUsageType = GetUsage (node)
+ });
+ }
+ }
+
+ //rev foreach (var loc in await GetAdditionalReferencesAsync (doc, symbol, token)) {
+ foreach (var loc in await GetAdditionalReferencesAsync (doc, symbol.Symbol, token)) {
+ result.Add (new MemberReference (symbol, doc.FilePath, loc.SourceSpan.Start, loc.SourceSpan.Length) {
+ ReferenceUsageType = ReferenceUsageType.Write
});
}
}
- return Task.FromResult((IEnumerable)result);
+
+ return result;
}
- static ReferenceUsageType ConvertKind (HighlightSpanKind kind)
+ async Task> GetAdditionalReferencesAsync (Document document, ISymbol symbol, CancellationToken cancellationToken)
{
- switch (kind) {
- case HighlightSpanKind.Definition:
- return ReferenceUsageType.Declaration;
- case HighlightSpanKind.Reference:
- return ReferenceUsageType.Read;
- case HighlightSpanKind.WrittenReference:
- return ReferenceUsageType.ReadWrite;
- default:
- return ReferenceUsageType.Unknown;
+ // The FindRefs engine won't find references through 'var' for performance reasons.
+ // Also, they are not needed for things like rename/sig change, and the normal find refs
+ // feature. However, we would lke the results to be highlighted to get a good experience
+ // while editing (especially since highlighting may have been invoked off of 'var' in
+ // the first place).
+ //
+ // So we look for the references through 'var' directly in this file and add them to the
+ // results found by the engine.
+ List results = null;
+
+ if (symbol is INamedTypeSymbol && symbol.Name != "var") {
+ var originalSymbol = symbol.OriginalDefinition;
+ var root = await document.GetSyntaxRootAsync (cancellationToken).ConfigureAwait (false);
+
+ var descendents = root.DescendantNodes ();
+ var semanticModel = default (SemanticModel);
+
+ foreach (var type in descendents.OfType ()) {
+ cancellationToken.ThrowIfCancellationRequested ();
+
+ if (type.IsVar) {
+ if (semanticModel == null) {
+ semanticModel = await document.GetSemanticModelAsync (cancellationToken).ConfigureAwait (false);
+ }
+
+ var boundSymbol = semanticModel.GetSymbolInfo (type, cancellationToken).Symbol;
+ boundSymbol = boundSymbol == null ? null : boundSymbol.OriginalDefinition;
+
+ if (originalSymbol.Equals (boundSymbol)) {
+ if (results == null) {
+ results = new List ();
+ }
+
+ results.Add (type.GetLocation ());
+ }
+ }
+ }
}
+
+ return results ?? SpecializedCollections.EmptyEnumerable ();
}
internal static ReferenceUsageType GetUsage (SyntaxNode node)
@@ -148,5 +284,7 @@ internal static ReferenceUsageType GetUsage (SyntaxNode node)
return ReferenceUsageType.ReadWrite;
return ReferenceUsageType.Read;
}
+
}
-}
\ No newline at end of file
+}
+
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AbstractAsyncHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AbstractAsyncHighlighter.cs
new file mode 100644
index 00000000000..5342e80f7a8
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AbstractAsyncHighlighter.cs
@@ -0,0 +1,87 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Linq;
+using ICSharpCode.NRefactory6;
+using ICSharpCode.NRefactory6.CSharp;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Extensions;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Shared.Extensions;
+using Microsoft.CodeAnalysis.Text;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal abstract class AbstractAsyncHighlighter : AbstractKeywordHighlighter where TNode : SyntaxNode
+ {
+ protected void HighlightRelatedKeywords(SyntaxNode node, List spans)
+ {
+ // Highlight async keyword
+ node.TypeSwitch(
+ (MethodDeclarationSyntax methodDeclaration) =>
+ {
+ var asyncModifier = methodDeclaration.Modifiers.FirstOrDefault(m => m.Kind() == SyntaxKind.AsyncKeyword);
+ if (asyncModifier.Kind() != SyntaxKind.None)
+ {
+ spans.Add(asyncModifier.Span);
+ }
+ },
+ (SimpleLambdaExpressionSyntax simpleLambda) =>
+ {
+ if (simpleLambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword)
+ {
+ spans.Add(simpleLambda.AsyncKeyword.Span);
+ }
+ },
+ (ParenthesizedLambdaExpressionSyntax parenthesizedLambda) =>
+ {
+ if (parenthesizedLambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword)
+ {
+ spans.Add(parenthesizedLambda.AsyncKeyword.Span);
+ }
+ },
+ (AnonymousMethodExpressionSyntax anonymousMethod) =>
+ {
+ if (anonymousMethod.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword)
+ {
+ spans.Add(anonymousMethod.AsyncKeyword.Span);
+ }
+ });
+
+ // Highlight await keywords
+ var awaitExpression = node as AwaitExpressionSyntax;
+ if (awaitExpression != null) {
+ // Note if there is already a highlight for the previous token, merge it
+ // with this span. That way, we highlight nested awaits with a single span.
+ var handled = false;
+ var awaitToken = awaitExpression.AwaitKeyword;
+ var previousToken = awaitToken.GetPreviousToken();
+ if (!previousToken.Span.IsEmpty)
+ {
+ var index = spans.FindIndex(s => s.Contains(previousToken.Span));
+ if (index >= 0)
+ {
+ var span = spans[index];
+ spans[index] = TextSpan.FromBounds(span.Start, awaitToken.Span.End);
+ handled = true;
+ }
+ }
+
+ if (!handled)
+ {
+ spans.Add(awaitToken.Span);
+ }
+ };
+
+ foreach (var child in node.ChildNodes())
+ {
+ // Only recurse if we have anything to do
+ if (!child.IsReturnableConstruct())
+ {
+ HighlightRelatedKeywords(child, spans);
+ }
+ }
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncAnonymousMethodHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncAnonymousMethodHighlighter.cs
new file mode 100644
index 00000000000..7861625b17f
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncAnonymousMethodHighlighter.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using ICSharpCode.NRefactory6.CSharp;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Text;
+using Roslyn.Utilities;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class AsyncAnonymousMethodHighlighter : AbstractAsyncHighlighter
+ {
+ protected override IEnumerable GetHighlights(AnonymousMethodExpressionSyntax node, CancellationToken cancellationToken)
+ {
+ if (node.AsyncKeyword.Kind() != SyntaxKind.AsyncKeyword)
+ {
+ return SpecializedCollections.EmptyEnumerable();
+ }
+
+ var spans = new List();
+
+ HighlightRelatedKeywords(node, spans);
+
+ return spans;
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncMethodHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncMethodHighlighter.cs
new file mode 100644
index 00000000000..eaa20b27e33
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncMethodHighlighter.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using ICSharpCode.NRefactory6.CSharp;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Text;
+using Roslyn.Utilities;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class AsyncMethodHighlighter : AbstractAsyncHighlighter
+ {
+ protected override IEnumerable GetHighlights(MethodDeclarationSyntax node, CancellationToken cancellationToken)
+ {
+ if (!node.Modifiers.Any(SyntaxKind.AsyncKeyword))
+ {
+ return SpecializedCollections.EmptyEnumerable();
+ }
+
+ var spans = new List();
+
+ HighlightRelatedKeywords(node, spans);
+
+ return spans;
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncParenthesizedLambdaHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncParenthesizedLambdaHighlighter.cs
new file mode 100644
index 00000000000..81e1d4a9908
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncParenthesizedLambdaHighlighter.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using ICSharpCode.NRefactory6.CSharp;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Text;
+using Roslyn.Utilities;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class AsyncParenthesizedLambdaHighlighter : AbstractAsyncHighlighter
+ {
+ protected override IEnumerable GetHighlights(ParenthesizedLambdaExpressionSyntax node, CancellationToken cancellationToken)
+ {
+ if (node.AsyncKeyword.Kind() != SyntaxKind.AsyncKeyword)
+ {
+ return SpecializedCollections.EmptyEnumerable();
+ }
+
+ var spans = new List();
+
+ HighlightRelatedKeywords(node, spans);
+
+ return spans;
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncSimpleLambdaHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncSimpleLambdaHighlighter.cs
new file mode 100644
index 00000000000..d6ecbea7d75
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AsyncSimpleLambdaHighlighter.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using ICSharpCode.NRefactory6.CSharp;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Text;
+using Roslyn.Utilities;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class AsyncSimpleLambdaHighlighter : AbstractAsyncHighlighter
+ {
+ protected override IEnumerable GetHighlights(SimpleLambdaExpressionSyntax node, CancellationToken cancellationToken)
+ {
+ if (node.AsyncKeyword.Kind() != SyntaxKind.AsyncKeyword)
+ {
+ return SpecializedCollections.EmptyEnumerable();
+ }
+
+ var spans = new List();
+
+ HighlightRelatedKeywords(node, spans);
+
+ return spans;
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AwaitHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AwaitHighlighter.cs
new file mode 100644
index 00000000000..8dfb69f7dce
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/AwaitHighlighter.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using ICSharpCode.NRefactory6.CSharp;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Extensions;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Text;
+using Roslyn.Utilities;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class AwaitHighlighter : AbstractAsyncHighlighter
+ {
+ protected override IEnumerable GetHighlights(AwaitExpressionSyntax awaitExpression, CancellationToken cancellationToken)
+ {
+ var parent = awaitExpression
+ .AncestorsAndSelf()
+ .FirstOrDefault(n => n.IsReturnableConstruct());
+
+ if (parent == null)
+ {
+ return SpecializedCollections.EmptyEnumerable();
+ }
+
+ var spans = new List();
+
+ HighlightRelatedKeywords(parent, spans);
+
+ return spans;
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/CheckedExpressionHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/CheckedExpressionHighlighter.cs
new file mode 100644
index 00000000000..0a5e8991dad
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/CheckedExpressionHighlighter.cs
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Text;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class CheckedExpressionHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ CheckedExpressionSyntax checkedExpressionSyntax, CancellationToken cancellationToken)
+ {
+ switch (checkedExpressionSyntax.Kind())
+ {
+ case SyntaxKind.CheckedExpression:
+ case SyntaxKind.UncheckedExpression:
+ yield return checkedExpressionSyntax.Keyword.Span;
+ break;
+ default:
+ yield break;
+ }
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/CheckedStatementHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/CheckedStatementHighlighter.cs
new file mode 100644
index 00000000000..12f5349a120
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/CheckedStatementHighlighter.cs
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Text;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class CheckedStatementHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ CheckedStatementSyntax checkedStatement, CancellationToken cancellationToken)
+ {
+ yield return checkedStatement.Keyword.Span;
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/ConditionalPreprocessorHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/ConditionalPreprocessorHighlighter.cs
new file mode 100644
index 00000000000..eb3695b9c79
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/ConditionalPreprocessorHighlighter.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.CodeAnalysis.CSharp.Extensions;
+using Microsoft.CodeAnalysis.Shared.Extensions;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Text;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class ConditionalPreprocessorHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ DirectiveTriviaSyntax directive, CancellationToken cancellationToken)
+ {
+ var conditionals = directive.GetMatchingConditionalDirectives(cancellationToken);
+ if (conditionals == null)
+ {
+ yield break;
+ }
+
+ foreach (var conditional in conditionals)
+ {
+ yield return TextSpan.FromBounds(
+ conditional.HashToken.SpanStart,
+ conditional.DirectiveNameToken.Span.End);
+ }
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/IfStatementHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/IfStatementHighlighter.cs
new file mode 100644
index 00000000000..0063878bbc2
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/IfStatementHighlighter.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using ICSharpCode.NRefactory6.CSharp;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Extensions;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Text;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting
+{
+ internal class IfStatementHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ IfStatementSyntax ifStatement, CancellationToken cancellationToken)
+ {
+ if (ifStatement.Parent.Kind() != SyntaxKind.ElseClause)
+ {
+ return ComputeSpans(ifStatement);
+ }
+
+ return Enumerable.Empty();
+ }
+
+ private IEnumerable ComputeSpans(
+ IfStatementSyntax ifStatement)
+ {
+ yield return ifStatement.IfKeyword.Span;
+
+ // Loop to get all the else if parts
+ while (ifStatement != null && ifStatement.Else != null)
+ {
+ // Check for 'else if' scenario' (the statement in the else clause is an if statement)
+ var elseKeyword = ifStatement.Else.ElseKeyword;
+ var elseIfStatement = ifStatement.Else.Statement as IfStatementSyntax;
+
+ if (elseIfStatement != null)
+ {
+ if (OnlySpacesBetween(elseKeyword, elseIfStatement.IfKeyword))
+ {
+ // Highlight both else and if tokens if they are on the same line
+ yield return TextSpan.FromBounds(
+ elseKeyword.SpanStart,
+ elseIfStatement.IfKeyword.Span.End);
+ }
+ else
+ {
+ // Highlight the else and if tokens separately
+ yield return elseKeyword.Span;
+ yield return elseIfStatement.IfKeyword.Span;
+ }
+
+ // Continue the enumeration looking for more else blocks
+ ifStatement = elseIfStatement;
+ }
+ else
+ {
+ // Highlight just the else and we're done
+ yield return elseKeyword.Span;
+ break;
+ }
+ }
+ }
+
+ public static bool OnlySpacesBetween(SyntaxToken first, SyntaxToken second)
+ {
+ return first.TrailingTrivia.AsString().All(c => c == ' ') &&
+ second.LeadingTrivia.AsString().All(c => c == ' ');
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/LockStatementHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/LockStatementHighlighter.cs
new file mode 100644
index 00000000000..217da2a1a26
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/LockStatementHighlighter.cs
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Text;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class LockStatementHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ LockStatementSyntax lockStatement, CancellationToken cancellationToken)
+ {
+ yield return lockStatement.LockKeyword.Span;
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/LoopHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/LoopHighlighter.cs
new file mode 100644
index 00000000000..24e56c8c5cd
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/LoopHighlighter.cs
@@ -0,0 +1,118 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading;
+using ICSharpCode.NRefactory6.CSharp;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Extensions;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Shared.Extensions;
+using Microsoft.CodeAnalysis.Text;
+using Roslyn.Utilities;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class LoopHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ SyntaxNode node, CancellationToken cancellationToken)
+ {
+ var loop = node.GetAncestorsOrThis()
+ .FirstOrDefault(ancestor => ancestor.IsContinuableConstruct());
+
+ if (loop != null)
+ {
+ return KeywordHighlightsForLoop(loop);
+ }
+
+ return SpecializedCollections.EmptyEnumerable();
+ }
+
+ private IEnumerable KeywordHighlightsForLoop(SyntaxNode loopNode)
+ {
+ var spans = new List();
+
+ switch (loopNode.Kind())
+ {
+ case SyntaxKind.DoStatement:
+ HighlightDoStatement((DoStatementSyntax)loopNode, spans);
+ break;
+ case SyntaxKind.ForStatement:
+ HighlightForStatement((ForStatementSyntax)loopNode, spans);
+ break;
+
+ case SyntaxKind.ForEachStatement:
+ HighlightForEachStatement((ForEachStatementSyntax)loopNode, spans);
+ break;
+
+ case SyntaxKind.WhileStatement:
+ HighlightWhileStatement((WhileStatementSyntax)loopNode, spans);
+ break;
+ }
+
+ HighlightRelatedKeywords(loopNode, spans, true, true);
+
+ return spans;
+ }
+
+ private void HighlightDoStatement(DoStatementSyntax statement, List spans)
+ {
+ spans.Add(statement.DoKeyword.Span);
+ spans.Add(statement.WhileKeyword.Span);
+ spans.Add(EmptySpan(statement.SemicolonToken.Span.End));
+ }
+
+ private void HighlightForStatement(ForStatementSyntax statement, List spans)
+ {
+ spans.Add(statement.ForKeyword.Span);
+ }
+
+ private void HighlightForEachStatement(ForEachStatementSyntax statement, List spans)
+ {
+ spans.Add(statement.ForEachKeyword.Span);
+ }
+
+ private void HighlightWhileStatement(WhileStatementSyntax statement, List spans)
+ {
+ spans.Add(statement.WhileKeyword.Span);
+ }
+
+ ///
+ /// Finds all breaks and continues that are a child of this node, and adds the appropriate spans to the spans list.
+ ///
+ private void HighlightRelatedKeywords(SyntaxNode node, List spans, bool highlightBreaks, bool highlightContinues)
+ {
+ Debug.Assert(highlightBreaks || highlightContinues);
+
+ if (highlightBreaks && node is BreakStatementSyntax)
+ {
+ var statement = (BreakStatementSyntax)node;
+ spans.Add(statement.BreakKeyword.Span);
+ spans.Add(EmptySpan(statement.SemicolonToken.Span.End));
+ }
+ else if (highlightContinues && node is ContinueStatementSyntax)
+ {
+ var statement = (ContinueStatementSyntax)node;
+ spans.Add(statement.ContinueKeyword.Span);
+ spans.Add(EmptySpan(statement.SemicolonToken.Span.End));
+ }
+ else
+ {
+ foreach (var child in node.ChildNodes())
+ {
+ var highlightBreaksForChild = highlightBreaks && !child.IsBreakableConstruct();
+ var highlightContinuesForChild = highlightContinues && !child.IsContinuableConstruct();
+
+ // Only recurse if we have anything to do
+ if (highlightBreaksForChild || highlightContinuesForChild)
+ {
+ HighlightRelatedKeywords(child, spans, highlightBreaksForChild, highlightContinuesForChild);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/RegionHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/RegionHighlighter.cs
new file mode 100644
index 00000000000..07d918d95de
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/RegionHighlighter.cs
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using ICSharpCode.NRefactory6.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Extensions;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Text;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class RegionHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ DirectiveTriviaSyntax directive, CancellationToken cancellationToken)
+ {
+ var matchingDirective = directive.GetMatchingDirective(cancellationToken);
+ if (matchingDirective == null)
+ {
+ yield break;
+ }
+
+ yield return TextSpan.FromBounds(
+ directive.HashToken.SpanStart,
+ directive.DirectiveNameToken.Span.End);
+
+ yield return TextSpan.FromBounds(
+ matchingDirective.HashToken.SpanStart,
+ matchingDirective.DirectiveNameToken.Span.End);
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/ReturnStatementHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/ReturnStatementHighlighter.cs
new file mode 100644
index 00000000000..32d42b280fb
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/ReturnStatementHighlighter.cs
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using Microsoft.CodeAnalysis.CSharp.Extensions;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Shared.Extensions;
+using Microsoft.CodeAnalysis.Text;
+using Roslyn.Utilities;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class ReturnStatementHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights (
+ ReturnStatementSyntax returnStatement, CancellationToken cancellationToken)
+ {
+ var parent = returnStatement
+ .GetAncestorsOrThis ()
+ .FirstOrDefault (n => n.IsReturnableConstruct ());
+
+ if (parent == null) {
+ return SpecializedCollections.EmptyEnumerable ();
+ }
+
+ var spans = new List ();
+
+ HighlightRelatedKeywords (parent, spans);
+
+ return spans;
+ }
+
+ ///
+ /// Finds all returns that are children of this node, and adds the appropriate spans to the spans list.
+ ///
+ private void HighlightRelatedKeywords (SyntaxNode node, List spans)
+ {
+ var statement = node as ReturnStatementSyntax;
+ if (statement != null) {
+ spans.Add (statement.ReturnKeyword.Span);
+ spans.Add (EmptySpan (statement.SemicolonToken.Span.End));
+ } else {
+ foreach (var child in node.ChildNodes ()) {
+ // Only recurse if we have anything to do
+ if (!child.IsReturnableConstruct ()) {
+ HighlightRelatedKeywords (child, spans);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/SwitchStatementHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/SwitchStatementHighlighter.cs
new file mode 100644
index 00000000000..626bd299e0b
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/SwitchStatementHighlighter.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Extensions;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Shared.Extensions;
+using Microsoft.CodeAnalysis.Text;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class SwitchStatementHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ SwitchStatementSyntax switchStatement, CancellationToken cancellationToken)
+ {
+ var spans = new List();
+
+ spans.Add(switchStatement.SwitchKeyword.Span);
+
+ foreach (var switchSection in switchStatement.Sections)
+ {
+ foreach (var label in switchSection.Labels)
+ {
+ spans.Add(label.Keyword.Span);
+ spans.Add(EmptySpan(label.ColonToken.Span.End));
+ }
+
+ foreach (var statement in switchSection.Statements)
+ {
+ HighlightRelatedKeywords(statement, spans);
+ }
+ }
+
+ return spans;
+ }
+
+ ///
+ /// Finds all breaks and continues that are a child of this node, and adds the appropriate spans to the spans
+ /// list.
+ ///
+ private void HighlightRelatedKeywords(SyntaxNode node, List spans)
+ {
+ node.TypeSwitch(
+ (BreakStatementSyntax breakStatement) =>
+ {
+ spans.Add(breakStatement.BreakKeyword.Span);
+ spans.Add(EmptySpan(breakStatement.SemicolonToken.Span.End));
+ },
+ (GotoStatementSyntax gotoStatement) =>
+ {
+ var start = gotoStatement.GotoKeyword.SpanStart;
+ var end = !gotoStatement.CaseOrDefaultKeyword.IsKind(SyntaxKind.None)
+ ? gotoStatement.CaseOrDefaultKeyword.Span.End
+ : gotoStatement.GotoKeyword.Span.End;
+
+ spans.Add(TextSpan.FromBounds(start, end));
+ spans.Add(EmptySpan(gotoStatement.SemicolonToken.Span.End));
+ },
+ _ =>
+ {
+ foreach (var child in node.ChildNodes())
+ {
+ // Only recurse if we have anything to do
+ if (child.IsBreakableConstruct())
+ {
+ HighlightRelatedKeywords(child, spans);
+ }
+ }
+ });
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/TryStatementHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/TryStatementHighlighter.cs
new file mode 100644
index 00000000000..f84041102c8
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/TryStatementHighlighter.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Text;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class TryStatementHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ TryStatementSyntax tryStatement, CancellationToken cancellationToken)
+ {
+ yield return tryStatement.TryKeyword.Span;
+
+ foreach (var catchDeclaration in tryStatement.Catches)
+ {
+ yield return catchDeclaration.CatchKeyword.Span;
+
+ if (catchDeclaration.Filter != null)
+ {
+ yield return catchDeclaration.Filter.WhenKeyword.Span;
+ }
+ }
+
+ if (tryStatement.Finally != null)
+ {
+ yield return tryStatement.Finally.FinallyKeyword.Span;
+ }
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/UnsafeStatementHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/UnsafeStatementHighlighter.cs
new file mode 100644
index 00000000000..04834ab3cc8
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/UnsafeStatementHighlighter.cs
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Text;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class UnsafeStatementHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ UnsafeStatementSyntax unsafeStatement, CancellationToken cancellationToken)
+ {
+ yield return unsafeStatement.UnsafeKeyword.Span;
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/UsingStatementHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/UsingStatementHighlighter.cs
new file mode 100644
index 00000000000..c6ad88d6139
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/UsingStatementHighlighter.cs
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Text;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class UsingStatementHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ UsingStatementSyntax usingStatement, CancellationToken cancellationToken)
+ {
+ yield return usingStatement.UsingKeyword.Span;
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/YieldStatementHighlighter.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/YieldStatementHighlighter.cs
new file mode 100644
index 00000000000..c377cb819f0
--- /dev/null
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/KeywordHighlighters/YieldStatementHighlighter.cs
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using ICSharpCode.NRefactory6;
+using ICSharpCode.NRefactory6.CSharp;
+using Microsoft.CodeAnalysis.CSharp;
+using Microsoft.CodeAnalysis.CSharp.Extensions;
+using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.Editor.Implementation.Highlighting;
+using Microsoft.CodeAnalysis.Shared.Extensions;
+using Microsoft.CodeAnalysis.Text;
+using Roslyn.Utilities;
+
+namespace Microsoft.CodeAnalysis.Editor.CSharp.KeywordHighlighting.KeywordHighlighters
+{
+ internal class YieldStatementHighlighter : AbstractKeywordHighlighter
+ {
+ protected override IEnumerable GetHighlights(
+ YieldStatementSyntax yieldStatement, CancellationToken cancellationToken)
+ {
+ var parent = yieldStatement
+ .GetAncestorsOrThis()
+ .FirstOrDefault(n => n.IsReturnableConstruct());
+
+ if (parent == null)
+ {
+ return SpecializedCollections.EmptyEnumerable();
+ }
+
+ var spans = new List();
+
+ HighlightRelatedKeywords(parent, spans);
+
+ return spans;
+ }
+
+ ///
+ /// Finds all returns that are children of this node, and adds the appropriate spans to the spans list.
+ ///
+ private void HighlightRelatedKeywords(SyntaxNode node, List spans)
+ {
+ var statement = node as YieldStatementSyntax;
+ if (statement != null) {
+ spans.Add (
+ TextSpan.FromBounds (
+ statement.YieldKeyword.SpanStart,
+ statement.ReturnOrBreakKeyword.Span.End));
+
+ spans.Add (EmptySpan (statement.SemicolonToken.Span.End));
+ } else {
+ foreach (var child in node.ChildNodes ()) {
+ // Only recurse if we have anything to do
+ if (!child.IsReturnableConstruct ()) {
+ HighlightRelatedKeywords (child, spans);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpCodeGenerator.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpCodeGenerator.cs
index 733744f93a2..156ebc5077a 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpCodeGenerator.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpCodeGenerator.cs
@@ -1,4 +1,4 @@
-//
+//
// CSharpCodeGenerator.cs
//
// Author:
@@ -322,7 +322,7 @@ public static CodeGeneratorMemberResult CreatePartialMemberImplementation(Docume
static void AppendReturnType(StringBuilder result, CodeGenerationOptions options, ITypeSymbol type)
{
if (type == null)
- throw new ArgumentNullException("type");
+ throw new ArgumentNullException(nameof(type));
result.Append(CSharpAmbience.SafeMinimalDisplayString (type, options.SemanticModel, options.Part.SourceSpan.Start, Ambience.LabelFormat));
// var implementingType = options.Part;
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CodeGenerationService.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CodeGenerationService.cs
index db6a03e457a..471942f8577 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CodeGenerationService.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CodeGenerationService.cs
@@ -1,4 +1,4 @@
-//
+//
// CodeGenerationService.cs
//
// Author:
@@ -258,7 +258,7 @@ public static MonoDevelop.Ide.TypeSystem.CodeGenerator CreateCodeGenerator (this
public static void AddAttribute (INamedTypeSymbol cls, string name, params object [] parameters)
{
if (cls == null)
- throw new ArgumentNullException ("cls");
+ throw new ArgumentNullException (nameof(cls));
bool isOpen;
string fileName = cls.Locations.First ().SourceTree.FilePath;
var buffer = TextFileProvider.Instance.GetTextEditorData (fileName, out isOpen);
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/GotoBaseDeclarationHandler.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/GotoBaseDeclarationHandler.cs
index 80d7f3bb338..616105c4339 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/GotoBaseDeclarationHandler.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/GotoBaseDeclarationHandler.cs
@@ -1,4 +1,4 @@
-//
+//
// GotoBaseDeclarationHandler.cs
//
// Author:
@@ -38,7 +38,7 @@ static class GotoBaseDeclarationHandler
public static string GetDescription (ISymbol symbol)
{
if (symbol == null)
- throw new ArgumentNullException ("symbol");
+ throw new ArgumentNullException (nameof(symbol));
switch (symbol.Kind) {
case SymbolKind.NamedType:
return GettextCatalog.GetString ("Go to _Base Type");
@@ -78,9 +78,9 @@ public static bool CanGotoBase (ISymbol symbol)
public static async Task GotoBase (MonoDevelop.Ide.Gui.Document doc, ISymbol symbol)
{
if (doc == null)
- throw new ArgumentNullException ("doc");
+ throw new ArgumentNullException (nameof(doc));
if (symbol == null)
- throw new ArgumentNullException ("symbol");
+ throw new ArgumentNullException (nameof(symbol));
var metadata = Navigation.Counters.CreateNavigateToMetadata ("Base");
using (var timer = Navigation.Counters.NavigateTo.BeginTiming (metadata)) {
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Resolver/HelperMethods.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Resolver/HelperMethods.cs
index 5f897a1eabe..bbcdc89e9a9 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Resolver/HelperMethods.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Resolver/HelperMethods.cs
@@ -1,4 +1,4 @@
-//
+//
// HelperMethods.cs
//
// Author:
@@ -103,7 +103,7 @@ public static OptionSet GetFormattingOptions (this DocumentContext doc)
// public static bool TryResolveAt (this DocumentContext documentContext, DocumentLocation loc, out ResolveResult result, out AstNode node)
// {
// if (documentContext == null)
-// throw new ArgumentNullException ("documentContext");
+// throw new ArgumentNullException (nameof(documentContext));
// result = null;
// node = null;
// var parsedDocument = documentContext.ParsedDocument;
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpAmbience.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpAmbience.cs
index 2167db0eeff..56b347e2a01 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpAmbience.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp/CSharpAmbience.cs
@@ -200,7 +200,7 @@ static CSharpAmbience ()
public override Task GetTooltip (CancellationToken token, Microsoft.CodeAnalysis.ISymbol entity)
{
if (entity == null)
- throw new ArgumentNullException ("entity");
+ throw new ArgumentNullException (nameof(entity));
return SourceEditor.LanguageItemTooltipProvider.CreateTooltipInformation (token, null, null, entity, false, true);
}
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs
index e33dd53a9ed..044c1d702b6 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs
@@ -1,4 +1,4 @@
-//
+//
// PathedDocumentTextEditorExtension.cs
//
// Author:
@@ -372,7 +372,7 @@ class DataProvider : DropDownBoxListWindow.IListDataProvider
public DataProvider (PathedDocumentTextEditorExtension ext, object tag)
{
if (ext == null)
- throw new ArgumentNullException ("ext");
+ throw new ArgumentNullException (nameof(ext));
this.ext = ext;
this.tag = tag;
Reset ();
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs
index 25a7535243a..2093e8b2b34 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp/SignatureMarkupCreator.cs
@@ -1,4 +1,4 @@
-//
+//
// SignatureMarkupCreator.cs
//
// Author:
@@ -172,7 +172,7 @@ public string GetTypeReferenceString (ITypeSymbol type, bool highlight = true)
public string GetMarkup (ITypeSymbol type)
{
if (type == null)
- throw new ArgumentNullException ("entity");
+ throw new ArgumentNullException (nameof(type));
return GetTypeMarkup (type);
}
@@ -180,7 +180,7 @@ public string GetMarkup (ITypeSymbol type)
public string GetMarkup (Microsoft.CodeAnalysis.ISymbol entity)
{
if (entity == null)
- throw new ArgumentNullException ("entity");
+ throw new ArgumentNullException (nameof(entity));
string result;
try {
switch (entity.Kind) {
@@ -391,7 +391,7 @@ static bool IsObjectOrValueType (ITypeSymbol type)
string GetTypeParameterMarkup (ITypeSymbol t)
{
if (t == null)
- throw new ArgumentNullException ("t");
+ throw new ArgumentNullException (nameof(t));
var result = StringBuilderCache.Allocate ();
var highlightedTypeName = Highlight (FilterEntityName (t.Name), GetThemeColor (userTypes));
result.Append (highlightedTypeName);
@@ -486,7 +486,7 @@ public static bool IsNullableType (ITypeSymbol type)
string GetTypeMarkup (ITypeSymbol t, bool includeDeclaringTypes = false)
{
if (t == null)
- throw new ArgumentNullException ("t");
+ throw new ArgumentNullException (nameof(t));
if (t.TypeKind == TypeKind.Error)
return GettextCatalog.GetString ("Type can not be resolved.");
if (t.TypeKind == TypeKind.Delegate)
@@ -629,7 +629,7 @@ static string FilterEntityName (string name)
public string GetDelegateInfo (ITypeSymbol type)
{
if (type == null)
- throw new ArgumentNullException ("type");
+ throw new ArgumentNullException (nameof(type));
var t = type;
var result = StringBuilderCache.Allocate ();
@@ -704,7 +704,7 @@ string GetDelegateMarkup (INamedTypeSymbol delegateType)
string GetLocalVariableMarkup (ILocalSymbol local)
{
if (local == null)
- throw new ArgumentNullException ("local");
+ throw new ArgumentNullException (nameof(local));
var result = StringBuilderCache.Allocate ();
@@ -735,7 +735,7 @@ string GetLocalVariableMarkup (ILocalSymbol local)
string GetParameterVariableMarkup (IParameterSymbol parameter)
{
if (parameter == null)
- throw new ArgumentNullException ("parameter");
+ throw new ArgumentNullException (nameof(parameter));
var result = StringBuilderCache.Allocate ();
AppendParameter (result, parameter);
@@ -756,7 +756,7 @@ string GetParameterVariableMarkup (IParameterSymbol parameter)
string GetFieldMarkup (IFieldSymbol field)
{
if (field == null)
- throw new ArgumentNullException ("field");
+ throw new ArgumentNullException (nameof(field));
var result = StringBuilderCache.Allocate ();
bool isEnum = field.ContainingType.TypeKind == TypeKind.Enum;
@@ -806,7 +806,7 @@ string GetFieldMarkup (IFieldSymbol field)
string GetMethodMarkup (IMethodSymbol method)
{
if (method == null)
- throw new ArgumentNullException ("method");
+ throw new ArgumentNullException (nameof(method));
var result = StringBuilderCache.Allocate ();
AppendModifiers (result, method);
@@ -852,7 +852,7 @@ string GetMethodMarkup (IMethodSymbol method)
string GetConstructorMarkup (IMethodSymbol method)
{
if (method == null)
- throw new ArgumentNullException ("method");
+ throw new ArgumentNullException (nameof(method));
var result = StringBuilderCache.Allocate ();
@@ -882,7 +882,7 @@ string GetConstructorMarkup (IMethodSymbol method)
string GetDestructorMarkup (IMethodSymbol method)
{
if (method == null)
- throw new ArgumentNullException ("method");
+ throw new ArgumentNullException (nameof(method));
var result = StringBuilderCache.Allocate ();
AppendModifiers (result, method);
@@ -920,7 +920,7 @@ bool IsAccessibleOrHasSourceCode (ISymbol entity)
string GetPropertyMarkup (IPropertySymbol property)
{
if (property == null)
- throw new ArgumentNullException ("property");
+ throw new ArgumentNullException (nameof(property));
var result = StringBuilderCache.Allocate ();
AppendModifiers (result, property);
result.Append (GetTypeReferenceString (property.Type));
@@ -1544,7 +1544,7 @@ public TooltipInformation GetTypeOfTooltip (TypeOfExpressionSyntax typeOfExpress
string GetEventMarkup (IEventSymbol evt)
{
if (evt == null)
- throw new ArgumentNullException ("evt");
+ throw new ArgumentNullException (nameof(evt));
var result = StringBuilderCache.Allocate ();
AppendModifiers (result, evt);
result.Append (Highlight ("event ", GetThemeColor (modifierColor)));
@@ -1823,7 +1823,7 @@ HslColor AlphaBlend (HslColor color, HslColor color2, double alpha)
public string GetArrayIndexerMarkup (IArrayTypeSymbol arrayType)
{
if (arrayType == null)
- throw new ArgumentNullException ("arrayType");
+ throw new ArgumentNullException (nameof(arrayType));
var result = StringBuilderCache.Allocate ();
result.Append (GetTypeReferenceString (arrayType.ElementType));
if (BreakLineAfterReturnType) {
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.JSon/JSonIndentEngine.cs b/main/src/addins/CSharpBinding/MonoDevelop.JSon/JSonIndentEngine.cs
index f63c179045f..b77b8b3a128 100644
--- a/main/src/addins/CSharpBinding/MonoDevelop.JSon/JSonIndentEngine.cs
+++ b/main/src/addins/CSharpBinding/MonoDevelop.JSon/JSonIndentEngine.cs
@@ -48,7 +48,7 @@ class JSonIndentEngine : IStateMachineIndentEngine
public JSonIndentEngine (Ide.Editor.TextEditor editor)
{
if (editor == null)
- throw new ArgumentNullException ("editor");
+ throw new ArgumentNullException (nameof(editor));
this.editor = editor;
Reset ();
}
diff --git a/main/src/addins/CSharpBinding/Util/CompilationExtensions.cs b/main/src/addins/CSharpBinding/Util/CompilationExtensions.cs
index 39d7d56bf13..09552f0dd92 100644
--- a/main/src/addins/CSharpBinding/Util/CompilationExtensions.cs
+++ b/main/src/addins/CSharpBinding/Util/CompilationExtensions.cs
@@ -1,4 +1,4 @@
-//
+//
// CompilationExtensions.cs
//
// Author:
@@ -56,7 +56,7 @@ static class CompilationExtensions
public static ITypeSymbol GetTypeSymbol(this Compilation compilation, string ns, string name, int arity, CancellationToken cancellationToken = default(CancellationToken))
{
if (compilation == null)
- throw new ArgumentNullException("compilation");
+ throw new ArgumentNullException(nameof(compilation));
var nsSymbol = FindNamespace (compilation.GlobalNamespace, ns, cancellationToken);
if (nsSymbol == null)
return null;
diff --git a/main/src/addins/CSharpBinding/Util/FormatStringHelper.cs b/main/src/addins/CSharpBinding/Util/FormatStringHelper.cs
index 3c26915b121..1281a38dbed 100644
--- a/main/src/addins/CSharpBinding/Util/FormatStringHelper.cs
+++ b/main/src/addins/CSharpBinding/Util/FormatStringHelper.cs
@@ -44,9 +44,9 @@ public static bool TryGetFormattingParameters(
CancellationToken cancellationToken = default (CancellationToken))
{
if (semanticModel == null)
- throw new ArgumentNullException("semanticModel");
+ throw new ArgumentNullException(nameof(semanticModel));
if (invocationExpression == null)
- throw new ArgumentNullException("invocationExpression");
+ throw new ArgumentNullException(nameof(invocationExpression));
var symbolInfo = semanticModel.GetSymbolInfo(invocationExpression.Expression, cancellationToken);
if (argumentFilter == null)
argumentFilter = (p, e) => true;
diff --git a/main/src/addins/CSharpBinding/Util/PortingExtensions.cs b/main/src/addins/CSharpBinding/Util/PortingExtensions.cs
index 3d465bf428b..a23edcc6d7e 100644
--- a/main/src/addins/CSharpBinding/Util/PortingExtensions.cs
+++ b/main/src/addins/CSharpBinding/Util/PortingExtensions.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
@@ -114,7 +114,7 @@ public static IEnumerable GetAllBaseClassesAndInterfaces (this
public static System.ComponentModel.EditorBrowsableState GetEditorBrowsableState (this ISymbol symbol)
{
if (symbol == null)
- throw new ArgumentNullException ("symbol");
+ throw new ArgumentNullException (nameof(symbol));
var browsableState = symbol.GetAttributes ().FirstOrDefault (attr => attr.AttributeClass.Name == "EditorBrowsableAttribute" && attr.AttributeClass.ContainingNamespace.MetadataName == "System.ComponentModel");
if (browsableState != null && browsableState.ConstructorArguments.Length == 1) {
try {
@@ -138,7 +138,7 @@ public static System.ComponentModel.EditorBrowsableState GetEditorBrowsableState
public static bool IsEditorBrowsable (this ISymbol symbol)
{
if (symbol == null)
- throw new ArgumentNullException ("symbol");
+ throw new ArgumentNullException (nameof(symbol));
return GetEditorBrowsableState (symbol) != System.ComponentModel.EditorBrowsableState.Never;
}
diff --git a/main/src/addins/GnomePlatform/Gio.cs b/main/src/addins/GnomePlatform/GioGtk2.cs
similarity index 99%
rename from main/src/addins/GnomePlatform/Gio.cs
rename to main/src/addins/GnomePlatform/GioGtk2.cs
index 38372b760e6..d7e87aed52d 100644
--- a/main/src/addins/GnomePlatform/Gio.cs
+++ b/main/src/addins/GnomePlatform/GioGtk2.cs
@@ -3,7 +3,7 @@
// Author: Mike Kestner
//
// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -11,10 +11,10 @@
// 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
@@ -35,34 +35,34 @@ internal static class Gio {
const string gio = "libgio-2.0-0.dll";
const string glib = "libglib-2.0-0.dll";
- const string gobject = "libgobject-2.0-0.dll";
-
+ const string gobject = "libgobject-2.0-0.dll";
+
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr g_app_info_get_executable (IntPtr raw);
+ static extern IntPtr g_app_info_get_executable (IntPtr raw);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr g_app_info_get_id (IntPtr raw);
+ static extern IntPtr g_app_info_get_id (IntPtr raw);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr g_app_info_get_name (IntPtr raw);
+ static extern IntPtr g_app_info_get_name (IntPtr raw);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr g_app_info_get_default_for_type (IntPtr content_type, bool must_support_uris);
+ static extern IntPtr g_app_info_get_default_for_type (IntPtr content_type, bool must_support_uris);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr g_app_info_get_all_for_type (IntPtr content_type);
+ static extern IntPtr g_app_info_get_all_for_type (IntPtr content_type);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr g_content_type_from_mime_type (IntPtr mime_type);
+ static extern IntPtr g_content_type_from_mime_type (IntPtr mime_type);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr g_content_type_get_description (IntPtr mime_type);
+ static extern IntPtr g_content_type_get_description (IntPtr mime_type);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr g_content_type_get_mime_type (IntPtr content_type);
+ static extern IntPtr g_content_type_get_mime_type (IntPtr content_type);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr g_file_info_get_content_type (IntPtr handle);
+ static extern IntPtr g_file_info_get_content_type (IntPtr handle);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_file_info_get_icon (IntPtr fileinfo);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_file_new_for_path (IntPtr path);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr g_file_new_for_uri (IntPtr uri);
+ static extern IntPtr g_file_new_for_uri (IntPtr uri);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr g_file_query_info (IntPtr handle, IntPtr attrs, int flags, IntPtr cancellable, out IntPtr error);
+ static extern IntPtr g_file_query_info (IntPtr handle, IntPtr attrs, int flags, IntPtr cancellable, out IntPtr error);
[DllImport (gio, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_icon_to_string (IntPtr icon);
[DllImport(gio, CallingConvention = CallingConvention.Cdecl)]
@@ -72,7 +72,7 @@ internal static class Gio {
[DllImport (glib, CallingConvention = CallingConvention.Cdecl)]
static extern void g_error_free (IntPtr raw);
[DllImport (glib, CallingConvention = CallingConvention.Cdecl)]
- static extern void g_list_free (IntPtr raw);
+ static extern void g_list_free (IntPtr raw);
[DllImport (gobject, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_unref (IntPtr handle);
@@ -89,7 +89,7 @@ static GnomeDesktopApplication AppFromAppInfoPtr (IntPtr handle, DesktopApplicat
string id = GLib.Marshaller.Utf8PtrToString (g_app_info_get_id (handle));
string name = GLib.Marshaller.Utf8PtrToString (g_app_info_get_name (handle));
string executable = GLib.Marshaller.Utf8PtrToString (g_app_info_get_executable (handle));
-
+
if (!string.IsNullOrEmpty (name) && !string.IsNullOrEmpty (executable) && !executable.Contains ("monodevelop "))
return new GnomeDesktopApplication (executable, name, defaultApp != null && defaultApp.Id == id);
return null;
@@ -108,7 +108,7 @@ static IntPtr ContentTypeFromMimeType (string mime_type)
return content_type;
}
- public static DesktopApplication GetDefaultForType (string mime_type)
+ public static DesktopApplication GetDefaultForType (string mime_type)
{
IntPtr content_type = ContentTypeFromMimeType (mime_type);
IntPtr ret = g_app_info_get_default_for_type (content_type, false);
@@ -119,7 +119,7 @@ public static DesktopApplication GetDefaultForType (string mime_type)
public static System.Collections.Generic.IList GetAllForType (string mime_type)
{
var def = GetDefaultForType (mime_type);
-
+
IntPtr content_type = ContentTypeFromMimeType (mime_type);
IntPtr ret = g_app_info_get_all_for_type (content_type);
GLib.Marshaller.Free (content_type);
diff --git a/main/src/addins/GnomePlatform/GioGtkSharp.cs b/main/src/addins/GnomePlatform/GioGtkSharp.cs
new file mode 100644
index 00000000000..72ee28b8380
--- /dev/null
+++ b/main/src/addins/GnomePlatform/GioGtkSharp.cs
@@ -0,0 +1,131 @@
+// Gio.cs
+//
+// Authors:
+// Mike Kestner
+// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+//
+// Refactoring to GtkSharp:
+// Lytico (http://www.limada.org)
+//
+// 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.Collections.Generic;
+using System.Linq;
+using GLib;
+using MonoDevelop.Ide.Desktop;
+
+namespace MonoDevelop.Platform
+{
+
+ internal static class Gio
+ {
+
+ static GnomeDesktopApplication AppFromAppInfoPtr (IAppInfo handle, DesktopApplication defaultApp)
+ {
+ string id = handle.Id;
+ string name = handle.Name;
+ string executable = handle.Executable;
+
+ if (!string.IsNullOrEmpty (name) && !string.IsNullOrEmpty (executable) &&
+ !executable.Contains ("monodevelop "))
+ return new GnomeDesktopApplication (executable, name, defaultApp != null && defaultApp.Id == id);
+ return null;
+ }
+
+ static string ContentTypeFromMimeType (string mime_type)
+ {
+ var content_type = ContentType.FromMimeType (mime_type);
+ return content_type;
+ }
+
+ public static DesktopApplication GetDefaultForType (string mime_type)
+ {
+ var content_type = ContentTypeFromMimeType (mime_type);
+ var ret = AppInfoAdapter.GetDefaultForType (content_type, false);
+ return ret == default ? null : AppFromAppInfoPtr (ret, null);
+ }
+
+ public static IList GetAllForType (string mime_type)
+ {
+ var def = GetDefaultForType (mime_type);
+
+ var content_type = ContentTypeFromMimeType (mime_type);
+ var ret = AppInfoAdapter.GetAllForType (content_type);
+ if (ret == null || ret.Length == 0)
+ return new DesktopApplication[0];
+ return ret.Select (i => AppFromAppInfoPtr (i, def)).ToArray ();
+ }
+
+ public static string GetGSettingsString (string schema, string key)
+ {
+ using var gsettings = new Settings (schema);
+ var ret = gsettings.GetString (key);
+ return ret;
+ }
+
+ public static string GetIconIdForFile (string filename)
+ {
+ if (string.IsNullOrEmpty (filename))
+ return null;
+
+ var gfile = FileFactory.NewForPath (filename);
+ var native_attrs = "standard::icon";
+ using var info = gfile.QueryInfo (native_attrs, FileQueryInfoFlags.None, null);
+
+ var iconnative = info?.Icon?.ToString ();
+ if (iconnative == null)
+ return default;
+
+ var iconid = iconnative.Split (' ');
+ // g_icon_to_string should give us 4 fields, 2nd is GThemedIcon
+ // if this isn't the case, we're into crazyland, and fall back
+ if (iconid.Length == 4 && iconid[1].Trim () == "GThemedIcon")
+ return iconid[2].Trim ();
+ return null;
+ }
+
+ public static string GetMimeTypeDescription (string mime_type)
+ {
+ var content_type = ContentTypeFromMimeType (mime_type);
+ var desc = ContentType.GetDescription (content_type);
+
+ return desc;
+ }
+
+ public static string GetMimeTypeForUri (string uri)
+ {
+ if (string.IsNullOrEmpty (uri))
+ return null;
+ var gfile = FileFactory.NewForPath (uri);
+ var native_attrs = "standard::content-type";
+
+ using var info = gfile.QueryInfo (native_attrs, FileQueryInfoFlags.None, null);
+
+ var content_type = info?.ContentType;
+ if (content_type == default)
+ return default;
+
+ string mime_type = ContentType.GetMimeType (content_type);
+
+ return mime_type;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/main/src/addins/GnomePlatform/GnomePlatform.cs b/main/src/addins/GnomePlatform/GnomePlatform.cs
index f597e4a9306..f775d460162 100644
--- a/main/src/addins/GnomePlatform/GnomePlatform.cs
+++ b/main/src/addins/GnomePlatform/GnomePlatform.cs
@@ -6,7 +6,7 @@
// Matthias Gliwka
//
// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -14,10 +14,10 @@
// 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
@@ -32,6 +32,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
+using System.Linq;
using MonoDevelop.Core.Execution;
using MonoDevelop.Core;
@@ -42,7 +43,7 @@ public class GnomePlatform : PlatformService
static GnomePlatform ()
{
}
-
+
public override IEnumerable GetApplications (string filename)
{
var mimeType = GetMimeTypeForUri (filename);
@@ -53,7 +54,7 @@ IEnumerable GetApplicationsForMimeType (string mimeType)
{
return Gio.GetAllForType (mimeType);
}
-
+
struct GnomeVfsApp {
#pragma warning disable 649 // never assigned
public string Id, DisplayName, Command;
@@ -69,7 +70,7 @@ protected override string OnGetMimeTypeForUri (string uri)
{
if (uri == null)
return null;
-
+
return Gio.GetMimeTypeForUri (uri);
}
@@ -77,7 +78,7 @@ public override void ShowUrl (string url)
{
Runtime.ProcessService.StartProcess ("xdg-open", url, null, null);
}
-
+
public override string DefaultMonospaceFont {
get {
try {
@@ -87,7 +88,7 @@ public override string DefaultMonospaceFont {
}
}
}
-
+
public override string Name {
get { return "Gnome"; }
}
@@ -96,31 +97,31 @@ protected override string OnGetIconIdForFile (string filename)
{
if (filename == "Documentation") {
return "gnome-fs-regular";
- }
+ }
if (System.IO.Directory.Exists (filename)) {
return "gnome-fs-directory";
} else if (System.IO.File.Exists (filename)) {
filename = EscapeFileName (filename);
if (filename == null)
return "gnome-fs-regular";
-
+
string icon = null;
try {
icon = Gio.GetIconIdForFile (filename);
} catch {}
if (icon != null && icon.Length > 0)
return icon;
- }
+ }
return "gnome-fs-regular";
-
+
}
-
+
protected override Xwt.Drawing.Image OnGetIconForFile (string filename)
{
string icon = OnGetIconIdForFile (filename);
return GetIconForType (icon);
}
-
+
string EscapeFileName (string filename)
{
foreach (char c in filename) {
@@ -131,7 +132,7 @@ string EscapeFileName (string filename)
}
return ConvertFileNameToVFS (filename);
}
-
+
static string ConvertFileNameToVFS (string fileName)
{
string result = fileName;
@@ -140,8 +141,8 @@ static string ConvertFileNameToVFS (string fileName)
result = result.Replace ("?", "%3F");
return result;
}
-
-
+
+
delegate string TerminalRunnerHandler (string command, string args, string dir, string title, bool pause, Guid applicationId);
delegate string TerminalOpenFolderRunnerHandler (string dir);
@@ -149,15 +150,22 @@ static string ConvertFileNameToVFS (string fileName)
bool terminal_probed;
TerminalRunnerHandler runner;
TerminalOpenFolderRunnerHandler openDirectoryRunner;
-
+
+ private static string _gts_command;
+
+ private static string GtsCommand => _gts_command ??
+ (_gts_command = new[] {"/usr/libexec", "/usr/lib/gnome-terminal"}
+ .Select (c=>Path.Combine (c,"gnome-terminal-server"))
+ .FirstOrDefault (File.Exists));
+
public override ProcessAsyncOperation StartConsoleProcess (string command, string arguments, string workingDirectory,
- IDictionary environmentVariables,
+ IDictionary environmentVariables,
string title, bool pauseWhenFinished)
{
ProbeTerminal ();
-
+
//generate unique guid to derive application id for gnome terminal server
- var consoleGuid = Guid.NewGuid ();
+ var consoleGuid = Guid.NewGuid ();
string exec = runner (command, arguments, workingDirectory, title, pauseWhenFinished, consoleGuid);
@@ -169,11 +177,11 @@ public override ProcessAsyncOperation StartConsoleProcess (string command, strin
foreach (var env in environmentVariables)
psi.EnvironmentVariables [env.Key] = env.Value;
}
-
+
ProcessWrapper proc = new ProcessWrapper ();
if (terminal_command.Contains ("gnome-terminal")) {
var parameter = String.Format ("--app-id {0}", GenerateAppId (consoleGuid));
- var terminalProcessStartInfo = new ProcessStartInfo ("/usr/lib/gnome-terminal/gnome-terminal-server", parameter) {
+ var terminalProcessStartInfo = new ProcessStartInfo(GtsCommand, parameter) {
CreateNoWindow = true,
UseShellExecute = false,
};
@@ -188,15 +196,15 @@ public override ProcessAsyncOperation StartConsoleProcess (string command, strin
}
return proc.ProcessAsyncOperation;
}
-
+
#region Terminal runner implementations
-
+
private static string GnomeTerminalRunner (string command, string args, string dir, string title, bool pause, Guid applicationId)
{
- string extra_commands = pause
+ string extra_commands = pause
? BashPause.Replace ("'", "\\\"")
: String.Empty;
-
+
return String.Format (@" --app-id {5} --name ""{4}"" -e ""bash -c 'cd {3} ; {0} {1} ; {2}'""",
command,
EscapeArgs (args),
@@ -205,13 +213,13 @@ private static string GnomeTerminalRunner (string command, string args, string d
title,
GenerateAppId (applicationId));
}
-
+
private static string MateTerminalRunner (string command, string args, string dir, string title, bool pause, Guid applicationId)
{
- string extra_commands = pause
+ string extra_commands = pause
? BashPause.Replace ("'", "\\\"")
: String.Empty;
-
+
return String.Format (@"--name ""{4}"" -e ""bash -c 'cd {3} ; {0} {1} ; {2}'""",
command,
EscapeArgs (args),
@@ -224,13 +232,13 @@ private static string GenerateAppId (Guid applicationId)
{
return String.Format("mono.develop.id{0}", applicationId.ToString ().Replace ("-", ""));
}
-
+
private static string XtermRunner (string command, string args, string dir, string title, bool pause, Guid applicationId)
{
- string extra_commands = pause
+ string extra_commands = pause
? BashPause
: String.Empty;
-
+
return String.Format (@" -title ""{4}"" -e bash -c ""cd {3} ; '""{0}""' {1} ; {2}""",
command,
EscapeArgs (args),
@@ -238,13 +246,13 @@ private static string XtermRunner (string command, string args, string dir, stri
EscapeDir (dir),
title);
}
-
+
private static string Xfce4TerminalRunner (string command, string args, string dir, string title, bool pause, Guid applicationId)
{
- string extra_commands = pause
+ string extra_commands = pause
? BashPause
: String.Empty;
-
+
return String.Format (@" -T ""{4}"" --working-directory=""{3}"" -x bash -c ""'{0}' {1} ; {2}""",
command,
EscapeArgs (args),
@@ -255,7 +263,7 @@ private static string Xfce4TerminalRunner (string command, string args, string d
private static string KdeTerminalRunner (string command, string args, string dir, string title, bool pause, Guid applicationId)
{
- string extra_commands = pause
+ string extra_commands = pause
? BashPause.Replace ("'", "\"")
: String.Empty;
@@ -286,12 +294,12 @@ private static string EscapeArgs (string args)
{
return args.Replace ("\\", "\\\\").Replace ("\"", "\\\"");
}
-
+
private static string EscapeDir (string dir)
{
return dir.Replace (" ", "\\ ").Replace (";", "\\;");
}
-
+
private static string BashPause {
get { return @"echo; read -p 'Press any key to continue...' -n1;"; }
}
@@ -305,9 +313,9 @@ private void ProbeTerminal ()
if (terminal_probed) {
return;
}
-
+
terminal_probed = true;
-
+
string fallback_terminal = PropertyService.Get ("MonoDevelop.Shell", "xterm");
string preferred_terminal;
TerminalRunnerHandler preferred_runner = null;
@@ -325,8 +333,8 @@ private void ProbeTerminal ()
preferred_terminal = "mate-terminal";
preferred_runner = MateTerminalRunner;
preferedOpenFolderRunner = GnomeTerminalOpenFolderRunner;
- }
- else if (!String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("KDE_SESSION_VERSION"))) {
+ }
+ else if (!String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("KDE_SESSION_VERSION"))) {
preferred_terminal = "konsole";
preferred_runner = KdeTerminalRunner;
preferedOpenFolderRunner = KdeTerminalOpenFolderRunner;
@@ -335,7 +343,7 @@ private void ProbeTerminal ()
preferred_terminal = "xfce4-terminal";
preferred_runner = Xfce4TerminalRunner;
preferedOpenFolderRunner = Xfce4TerminalOpenFolderRunner;
- }
+ }
else {
preferred_terminal = fallback_terminal;
preferred_runner = fallback_runner;
@@ -348,7 +356,7 @@ private void ProbeTerminal ()
openDirectoryRunner = preferedOpenFolderRunner;
return;
}
-
+
terminal_command = FindExec (fallback_terminal);
runner = fallback_runner;
openDirectoryRunner = fallbackOpenFolderRunner;
@@ -383,7 +391,7 @@ private string [] GetExecPaths ()
}
#endregion
-
+
public override bool CanOpenTerminal {
get {
return true;
@@ -396,17 +404,17 @@ public override void OpenTerminal (FilePath directory, IDictionary
-
-
+
+
+
- Debug
- AnyCPU
{AE84B4A7-E6B1-4565-8904-16284DCE41B6}
$(MDFrameworkVersion)
..\..\..\build\bin
+ false
+ false
+ false
+ true
-
-
-
-
+
+
+
+
-
-
- {7525BB88-6142-4A26-93B9-A30C6983390A}
- MonoDevelop.Core
- False
-
-
- {27096E7F-C91C-4AC6-B289-6897A701DF21}
- MonoDevelop.Ide
- False
-
-
- {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}
- Xwt
- False
-
-
- {91DD5A2D-9FE3-4C3C-9253-876141874DAD}
- Mono.Addins
- False
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Never
+
-
+
+
PreserveNewest
-
-
+
+
\ No newline at end of file
diff --git a/main/src/addins/GnomePlatform/AddinInfo.cs b/main/src/addins/GnomePlatform/Properties/AddinInfo.cs
similarity index 100%
rename from main/src/addins/GnomePlatform/AddinInfo.cs
rename to main/src/addins/GnomePlatform/Properties/AddinInfo.cs
diff --git a/main/src/addins/GnomePlatform/AssemblyInfo.cs b/main/src/addins/GnomePlatform/Properties/AssemblyInfo.cs
similarity index 100%
rename from main/src/addins/GnomePlatform/AssemblyInfo.cs
rename to main/src/addins/GnomePlatform/Properties/AssemblyInfo.cs
diff --git a/main/src/addins/GnomePlatform/GnomePlatform.addin.xml b/main/src/addins/GnomePlatform/Properties/GnomePlatform.addin.xml
similarity index 100%
rename from main/src/addins/GnomePlatform/GnomePlatform.addin.xml
rename to main/src/addins/GnomePlatform/Properties/GnomePlatform.addin.xml
diff --git a/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.csproj b/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.csproj
index eca7d6cbc08..6b18dd3fa04 100644
--- a/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.csproj
+++ b/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.csproj
@@ -6,7 +6,7 @@
AnyCPU
{B3E73DE7-8AFC-429A-9B68-5699B1E63A02}
$(MDFrameworkVersion)
- 1.0.0-beta2-20170430-208
+ 1.0.0-beta2-20170629-269
1.0.0-beta2-20170727-301
..\..\..\build\AddIns\AspNetCore
@@ -18,7 +18,7 @@
-
+
diff --git a/main/src/addins/MonoDevelop.AspNetCore/Properties/MonoDevelop.AspNetCore.addin.xml b/main/src/addins/MonoDevelop.AspNetCore/Properties/MonoDevelop.AspNetCore.addin.xml
index 65267a36850..6df895b7001 100644
--- a/main/src/addins/MonoDevelop.AspNetCore/Properties/MonoDevelop.AspNetCore.addin.xml
+++ b/main/src/addins/MonoDevelop.AspNetCore/Properties/MonoDevelop.AspNetCore.addin.xml
@@ -83,6 +83,351 @@
For example, .NET Core 1.1 SDK does not have a Razor template so having the 1.1 templates first
would cause the Razor template to be last in the New Project dialog if both 1.1 and 2.x templates
are available. -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Path = new List();
-
-// // get path
-// GetXmlDocPathRecursive(Member, Path);
-
-// // generate string
-// if (Path.Count == 0)
-// return string.Empty;
-
-// foreach (string strTemp in Path)
-// stbBuilder.Append(strTemp);
-
-// return stbBuilder.ToString();
-// }
-
-// public void SetCompatibilityType(
-// CompatibilityType Compatibility)
-// {
-// if (Compatibility == CompatibilityType.None)
-// throw new ArgumentException("Invalid parameter value.");
-
-// this.m_compat = Compatibility;
-// }
-
-// public CompatibilityType GetCompatibilityType()
-// {
-// return this.m_compat;
-// }
-// #endregion
-
-// #region Private methods
-// private string GetXmlDocExplicitIfaceImplPath(
-// MemberReference Member)
-// {
-// TypeReference declaringTypeRef = null;
-// TypeDefinition declaringTypeDef = null;
-// string strPath = string.Empty;
-
-// if (Member.DeclaringType is GenericInstanceType)
-// declaringTypeRef = (Member.DeclaringType as GenericInstanceType).ElementType;
-// else
-// declaringTypeRef = Member.DeclaringType;
-
-// // lookup TypeDefinition for TypeReference
-// declaringTypeDef = TryLookUpTypeDefinition(declaringTypeRef);
-
-// if (declaringTypeDef == null || declaringTypeDef.IsInterface)
-// return string.Empty;
-
-// foreach (InterfaceImplementation tempIface in declaringTypeDef.Interfaces)
-// {
-// var tempIfaceRef = tempIface.InterfaceType;
-// // check whether this member name begins with interface name (plus generic arguments)
-// if (Member.Name.StartsWith(this.StripInterfaceName(tempIfaceRef.FullName)))
-// {
-// // element begins with interface name, this is explicit interface implementation,
-// // get explicit interface implementation path
-
-// // add member's name to path, at this point
-// // name contains interface name (with generic arguments) plus member name
-// strPath = Member.Name;
-
-// // remove text between "<" and ">" and put interface parameters
-// // (in explicit mode of course)
-// int LeftBrace = strPath.IndexOf("<");
-// int RightBrace = strPath.LastIndexOf(">");
-
-// if (LeftBrace != -1 && RightBrace != -1)
-// {
-// bool firstAppend = true;
-// GenericInstanceType tempGenericIfaceDef = null;
-// StringBuilder stbParameters = new StringBuilder();
-
-// // convert to definition
-// tempGenericIfaceDef = tempIfaceRef as GenericInstanceType;
-
-// if (tempGenericIfaceDef == null)
-// break;
-
-// strPath = strPath.Remove(LeftBrace, (RightBrace - LeftBrace) + 1);
-// stbParameters.Append("{");
-// foreach (TypeReference tempParam in tempGenericIfaceDef.GenericArguments)
-// {
-// // in "explicit" mode "@" is used as a separator instead of ","
-// // in "normal" mode
-// if (!firstAppend)
-// stbParameters.Append(CanAppendSpecialExplicitChar() ? "@" : ",");
-
-// GetXmlDocParameterPathRecursive(tempParam, true, stbParameters);
-// firstAppend = false;
-// }
-// stbParameters.Append("}");
-
-// // insert
-// strPath = strPath.Insert(LeftBrace, stbParameters.ToString());
-// }
-
-// // replace "." with "#"
-// if (CanAppendSpecialExplicitChar())
-// strPath = strPath.Replace(".", "#");
-
-// return strPath;
-// }
-// }
-
-// return string.Empty;
-// }
-
-// private TypeDefinition TryLookUpTypeDefinition(
-// TypeReference Reference)
-// {
-// // try find in the current assembly
-// foreach (TypeDefinition tempTypeDef in Reference.Module.Types)
-// if (tempTypeDef.ToString() == Reference.ToString())
-// return tempTypeDef;
-
-// return null;
-// }
-
-// private string StripInterfaceName(
-// string OrginalName)
-// {
-// StringBuilder builderStrippedName = new StringBuilder();
-
-// // split name
-// string[] strSlices = OrginalName.Split(new char[] { '`' });
-
-// // remove numbers at the begining of each string to "<" charter
-// if (strSlices.Length > 1)
-// for (int i = 0; i < strSlices.Length; i++)
-// if (strSlices[i].Contains("<"))
-// strSlices[i] = strSlices[i].Remove(0, strSlices[i].IndexOf("<"));
-
-// // build string
-// foreach (string tempString in strSlices)
-// builderStrippedName.Append(tempString);
-
-// return builderStrippedName.ToString();
-// }
-
-// private void GetXmlDocPathRecursive(
-// MemberReference Member,
-// List CurrPath)
-// {
-// /*
-// * determine type of the current member, if current path is empty
-// * we have also to insert to path element type:
-// * - "N:" - for namespace (not used here)
-// * - "T:" - for a type (class, structure, delegate)
-// * - "M:" - for a method (or constructor)
-// * - "F:" - for a field
-// * - "P:" - for a property or indexer
-// * - "E:" - for an event
-// */
-
-// StringBuilder stbTempPath = new StringBuilder();
-// string strExplicitPath = string.Empty;
-
-// if (Member is TypeReference)
-// {
-// TypeReference thisTypeRef = null;
-// GenericInstanceType thisGenericTypeDef = null;
-// GenericParameter thisGenericParam = null;
-// string strTempTypeName = string.Empty;
-
-// if (Member is GenericInstanceType)
-// {
-// thisGenericTypeDef = Member as GenericInstanceType;
-// thisTypeRef = thisGenericTypeDef.ElementType;
-// }
-// else if (Member is GenericParameter)
-// {
-// thisGenericParam = Member as GenericParameter;
-// CurrPath.Add("`" + thisGenericParam.Position.ToString());
-
-// // return immediatelly, because there is nothing to do.
-// return;
-// }
-// else
-// {
-// // cast to TypeReference
-// thisTypeRef = Member as TypeReference;
-// }
-
-// // if nested, scan enclosing type
-// if (this.IsNested(thisTypeRef))
-// GetXmlDocPathRecursive(Member.DeclaringType, CurrPath);
-
-// // determine namespace
-// string strNamespace = string.Empty;
-// if ((thisTypeRef.Namespace != null && thisTypeRef.Namespace.Length > 0) || thisTypeRef.DeclaringType != null)
-// strNamespace = thisTypeRef.Namespace + ".";
-
-// // remove "`" char or not
-// string strTempShortTypeName = thisTypeRef.Name;
-// if (thisTypeRef.Name.Contains("`") && thisGenericTypeDef != null)
-// strTempShortTypeName = thisTypeRef.Name.Remove(thisTypeRef.Name.IndexOf("`"));
-
-// // class, interface, structure or delegate
-// if (CurrPath.Count == 0)
-// strTempTypeName = "T:" + strNamespace + strTempShortTypeName;
-// else if (CurrPath.Count > 0 && !this.IsNested(thisTypeRef))
-// strTempTypeName = strNamespace + strTempShortTypeName;
-// else
-// strTempTypeName = "." + strTempShortTypeName;
-
-// CurrPath.Add(strTempTypeName);
-
-// // add generic _arguments_ (not parameters !)
-// if (thisTypeRef.Name.Contains("`") && thisGenericTypeDef != null)
-// {
-// bool firstAppend = true;
-
-// // open bracket
-// CurrPath.Add("{");
-
-// foreach (TypeReference tempGenArgument in thisGenericTypeDef.GenericArguments)
-// {
-// // add comma
-// if (!firstAppend)
-// CurrPath.Add(",");
-
-// // add argument's xmlDocPath
-// GetXmlDocPathRecursive(tempGenArgument as MemberReference, CurrPath);
-
-// // first append done
-// firstAppend = false;
-// }
-
-// // close bracket
-// CurrPath.Add("}");
-// }
-// }
-// else if (Member is MethodReference)
-// {
-// var thisMethodDef = Member as MethodReference;
-
-// // method, get type's path firstAppend
-// CurrPath.Add("M:");
-// if (Member.DeclaringType != null)
-// GetXmlDocPathRecursive(Member.DeclaringType, CurrPath);
-
-// // method's path
-// // check whether this is constructor method, or explicitly implemented method
+//using System;
+//using System.Collections.Generic;
+//using System.Text;
+
+//using Mono.Cecil;
+
+//namespace XmlDocIdLib
+//{
+// #region XmlDocIdGenerator
+// class XmlDocIdGenerator
+// {
+// #region Constructors
+// public XmlDocIdGenerator()
+// {
+// this.m_compat = CompatibilityType.Net35;
+// }
+// #endregion
+
+// #region Public methods
+// public string GetXmlDocPath(
+// MemberReference Member)
+// {
+// if (Member == null)
+// throw new ArgumentNullException(nameof(Member));
+
+// StringBuilder stbBuilder = new StringBuilder();
+// List Path = new List();
+
+// // get path
+// GetXmlDocPathRecursive(Member, Path);
+
+// // generate string
+// if (Path.Count == 0)
+// return string.Empty;
+
+// foreach (string strTemp in Path)
+// stbBuilder.Append(strTemp);
+
+// return stbBuilder.ToString();
+// }
+
+// public void SetCompatibilityType(
+// CompatibilityType Compatibility)
+// {
+// if (Compatibility == CompatibilityType.None)
+// throw new ArgumentException("Invalid parameter value.");
+
+// this.m_compat = Compatibility;
+// }
+
+// public CompatibilityType GetCompatibilityType()
+// {
+// return this.m_compat;
+// }
+// #endregion
+
+// #region Private methods
+// private string GetXmlDocExplicitIfaceImplPath(
+// MemberReference Member)
+// {
+// TypeReference declaringTypeRef = null;
+// TypeDefinition declaringTypeDef = null;
+// string strPath = string.Empty;
+
+// if (Member.DeclaringType is GenericInstanceType)
+// declaringTypeRef = (Member.DeclaringType as GenericInstanceType).ElementType;
+// else
+// declaringTypeRef = Member.DeclaringType;
+
+// // lookup TypeDefinition for TypeReference
+// declaringTypeDef = TryLookUpTypeDefinition(declaringTypeRef);
+
+// if (declaringTypeDef == null || declaringTypeDef.IsInterface)
+// return string.Empty;
+
+// foreach (InterfaceImplementation tempIface in declaringTypeDef.Interfaces)
+// {
+// var tempIfaceRef = tempIface.InterfaceType;
+// // check whether this member name begins with interface name (plus generic arguments)
+// if (Member.Name.StartsWith(this.StripInterfaceName(tempIfaceRef.FullName)))
+// {
+// // element begins with interface name, this is explicit interface implementation,
+// // get explicit interface implementation path
+
+// // add member's name to path, at this point
+// // name contains interface name (with generic arguments) plus member name
+// strPath = Member.Name;
+
+// // remove text between "<" and ">" and put interface parameters
+// // (in explicit mode of course)
+// int LeftBrace = strPath.IndexOf("<");
+// int RightBrace = strPath.LastIndexOf(">");
+
+// if (LeftBrace != -1 && RightBrace != -1)
+// {
+// bool firstAppend = true;
+// GenericInstanceType tempGenericIfaceDef = null;
+// StringBuilder stbParameters = new StringBuilder();
+
+// // convert to definition
+// tempGenericIfaceDef = tempIfaceRef as GenericInstanceType;
+
+// if (tempGenericIfaceDef == null)
+// break;
+
+// strPath = strPath.Remove(LeftBrace, (RightBrace - LeftBrace) + 1);
+// stbParameters.Append("{");
+// foreach (TypeReference tempParam in tempGenericIfaceDef.GenericArguments)
+// {
+// // in "explicit" mode "@" is used as a separator instead of ","
+// // in "normal" mode
+// if (!firstAppend)
+// stbParameters.Append(CanAppendSpecialExplicitChar() ? "@" : ",");
+
+// GetXmlDocParameterPathRecursive(tempParam, true, stbParameters);
+// firstAppend = false;
+// }
+// stbParameters.Append("}");
+
+// // insert
+// strPath = strPath.Insert(LeftBrace, stbParameters.ToString());
+// }
+
+// // replace "." with "#"
+// if (CanAppendSpecialExplicitChar())
+// strPath = strPath.Replace(".", "#");
+
+// return strPath;
+// }
+// }
+
+// return string.Empty;
+// }
+
+// private TypeDefinition TryLookUpTypeDefinition(
+// TypeReference Reference)
+// {
+// // try find in the current assembly
+// foreach (TypeDefinition tempTypeDef in Reference.Module.Types)
+// if (tempTypeDef.ToString() == Reference.ToString())
+// return tempTypeDef;
+
+// return null;
+// }
+
+// private string StripInterfaceName(
+// string OrginalName)
+// {
+// StringBuilder builderStrippedName = new StringBuilder();
+
+// // split name
+// string[] strSlices = OrginalName.Split(new char[] { '`' });
+
+// // remove numbers at the begining of each string to "<" charter
+// if (strSlices.Length > 1)
+// for (int i = 0; i < strSlices.Length; i++)
+// if (strSlices[i].Contains("<"))
+// strSlices[i] = strSlices[i].Remove(0, strSlices[i].IndexOf("<"));
+
+// // build string
+// foreach (string tempString in strSlices)
+// builderStrippedName.Append(tempString);
+
+// return builderStrippedName.ToString();
+// }
+
+// private void GetXmlDocPathRecursive(
+// MemberReference Member,
+// List CurrPath)
+// {
+// /*
+// * determine type of the current member, if current path is empty
+// * we have also to insert to path element type:
+// * - "N:" - for namespace (not used here)
+// * - "T:" - for a type (class, structure, delegate)
+// * - "M:" - for a method (or constructor)
+// * - "F:" - for a field
+// * - "P:" - for a property or indexer
+// * - "E:" - for an event
+// */
+
+// StringBuilder stbTempPath = new StringBuilder();
+// string strExplicitPath = string.Empty;
+
+// if (Member is TypeReference)
+// {
+// TypeReference thisTypeRef = null;
+// GenericInstanceType thisGenericTypeDef = null;
+// GenericParameter thisGenericParam = null;
+// string strTempTypeName = string.Empty;
+
+// if (Member is GenericInstanceType)
+// {
+// thisGenericTypeDef = Member as GenericInstanceType;
+// thisTypeRef = thisGenericTypeDef.ElementType;
+// }
+// else if (Member is GenericParameter)
+// {
+// thisGenericParam = Member as GenericParameter;
+// CurrPath.Add("`" + thisGenericParam.Position.ToString());
+
+// // return immediatelly, because there is nothing to do.
+// return;
+// }
+// else
+// {
+// // cast to TypeReference
+// thisTypeRef = Member as TypeReference;
+// }
+
+// // if nested, scan enclosing type
+// if (this.IsNested(thisTypeRef))
+// GetXmlDocPathRecursive(Member.DeclaringType, CurrPath);
+
+// // determine namespace
+// string strNamespace = string.Empty;
+// if ((thisTypeRef.Namespace != null && thisTypeRef.Namespace.Length > 0) || thisTypeRef.DeclaringType != null)
+// strNamespace = thisTypeRef.Namespace + ".";
+
+// // remove "`" char or not
+// string strTempShortTypeName = thisTypeRef.Name;
+// if (thisTypeRef.Name.Contains("`") && thisGenericTypeDef != null)
+// strTempShortTypeName = thisTypeRef.Name.Remove(thisTypeRef.Name.IndexOf("`"));
+
+// // class, interface, structure or delegate
+// if (CurrPath.Count == 0)
+// strTempTypeName = "T:" + strNamespace + strTempShortTypeName;
+// else if (CurrPath.Count > 0 && !this.IsNested(thisTypeRef))
+// strTempTypeName = strNamespace + strTempShortTypeName;
+// else
+// strTempTypeName = "." + strTempShortTypeName;
+
+// CurrPath.Add(strTempTypeName);
+
+// // add generic _arguments_ (not parameters !)
+// if (thisTypeRef.Name.Contains("`") && thisGenericTypeDef != null)
+// {
+// bool firstAppend = true;
+
+// // open bracket
+// CurrPath.Add("{");
+
+// foreach (TypeReference tempGenArgument in thisGenericTypeDef.GenericArguments)
+// {
+// // add comma
+// if (!firstAppend)
+// CurrPath.Add(",");
+
+// // add argument's xmlDocPath
+// GetXmlDocPathRecursive(tempGenArgument as MemberReference, CurrPath);
+
+// // first append done
+// firstAppend = false;
+// }
+
+// // close bracket
+// CurrPath.Add("}");
+// }
+// }
+// else if (Member is MethodReference)
+// {
+// var thisMethodDef = Member as MethodReference;
+
+// // method, get type's path firstAppend
+// CurrPath.Add("M:");
+// if (Member.DeclaringType != null)
+// GetXmlDocPathRecursive(Member.DeclaringType, CurrPath);
+
+// // method's path
+// // check whether this is constructor method, or explicitly implemented method
// strExplicitPath = GetXmlDocExplicitIfaceImplPath(Member);
// //if (thisMethodDef.IsStatic && thisMethodDef.IsConstructor)
// // stbTempPath.Append(".#cctor");
// //if (!thisMethodDef.IsStatic && thisMethodDef.IsConstructor)
// // stbTempPath.Append(".#ctor");
-// stbTempPath.Append (".");
-// if (strExplicitPath.Length > 0)
-// stbTempPath.Append (strExplicitPath);
-// else
-// stbTempPath.Append (thisMethodDef.Name);
-
-// // check whether this method is generic
-// if (thisMethodDef.GenericParameters.Count > 0)
-// stbTempPath.Append("``").Append (thisMethodDef.GenericParameters.Count);
-
-// if (thisMethodDef.Parameters.Count > 0)
-// stbTempPath.Append("(");
-// bool firstAppend = true;
-// foreach (ParameterDefinition TempParam in thisMethodDef.Parameters)
-// {
-// if (!firstAppend)
-// stbTempPath.Append(",");
-
-// stbTempPath.Append(GetXmlDocParameterPath(TempParam.ParameterType, false));
-// firstAppend = false;
-// }
-
-// if (thisMethodDef.Parameters.Count > 0)
-// stbTempPath.Append(")");
-
-// // check whether this is a conversion operator (implicit or explicit)
-// // if so, we have to read return type and add "~" char.
-// //if (IsOperator(thisMethodDef))
-// //{
-// // OperatorType OpType = GetOperatorType(thisMethodDef);
-
-// // if (OpType == OperatorType.op_Implicit || OpType == OperatorType.op_Explicit)
-// // {
-// // // add return type parameter path
-// // stbTempPath.Append("~");
-// // stbTempPath.Append(GetXmlDocParameterPath(thisMethodDef.ReturnType, false));
-// // }
-// //}
-
-// // add to path
-// CurrPath.Add(stbTempPath.ToString());
-// }
-// else if (Member is FieldReference)
-// {
-// // field, get type's path name
-// CurrPath.Add("F:");
-// if (Member.DeclaringType != null)
-// GetXmlDocPathRecursive(Member.DeclaringType, CurrPath);
-
-// // field's path
-// CurrPath.Add("." + Member.Name);
-// }
-// else if (Member is PropertyReference)
-// {
-// // property or indexer, get declaring type's path
-// CurrPath.Add("P:");
-// if (Member.DeclaringType != null)
-// GetXmlDocPathRecursive(Member.DeclaringType, CurrPath);
-
-// // property's path
-// // check whether this is explicitly implemented property
-// strExplicitPath = GetXmlDocExplicitIfaceImplPath(Member);
-// stbTempPath.Append (".");
-// if (strExplicitPath.Length > 0)
-// stbTempPath.Append (strExplicitPath);
-// else
-// stbTempPath.Append (Member.Name);
-
-// // is it an indexer ?
-// bool firstAppend = true;
-// PropertyDefinition piProperty = Member as PropertyDefinition;
-// if (piProperty.Parameters.Count > 0)
-// stbTempPath.Append("(");
-
-// foreach (ParameterDefinition TempParam in piProperty.Parameters)
-// {
-// if (!firstAppend)
-// stbTempPath.Append(",");
-
-// stbTempPath.Append(GetXmlDocParameterPath(TempParam.ParameterType, false));
-// firstAppend = false;
-// }
-
-// if (piProperty.Parameters.Count > 0)
-// stbTempPath.Append(")");
-
-// CurrPath.Add(stbTempPath.ToString());
-// }
-// else if (Member is EventReference)
-// {
-// // event, get type's path firstAppend
-// CurrPath.Add("E:");
-// if (Member.DeclaringType != null)
-// GetXmlDocPathRecursive(Member.DeclaringType, CurrPath);
-
-// // event's path
-// CurrPath.Add("." + Member.Name);
-// }
-// }
-
-// private string GetXmlDocParameterPath(
-// TypeReference Type,
-// bool ExplicitMode)
-// {
-// StringBuilder stbCurrPath = new StringBuilder();
-
-// GetXmlDocParameterPathRecursive(Type, ExplicitMode, stbCurrPath);
-
-// return stbCurrPath.ToString();
-// }
-
-// private void GetXmlDocParameterPathRecursive(
-// TypeReference tpType,
-// bool ExplicitMode,
-// StringBuilder CurrPath)
-// {
-// if (tpType == null)
-// return;
-
-// if (tpType.GenericParameters.Count > 0)
-// {
-// CurrPath.Append(tpType.Namespace)
-// .Append ((CanAppendSpecialExplicitChar () && ExplicitMode) ? "#" : ".")
-// .Append(StripGenericName(tpType.Name));
-
-// // list parameters or types
-// bool firstAppend = true;
-// CurrPath.Append("{");
-// foreach (GenericParameter TempType in tpType.GenericParameters)
-// {
-// if (!firstAppend)
-// CurrPath.Append(",");
-
-// CurrPath.Append(GetXmlDocParameterPath(TempType, ExplicitMode));
-// firstAppend = false;
-// }
-// CurrPath.Append("}");
-// }
-// else if (tpType is GenericInstanceType)
-// {
-// GenericInstanceType thisGenericType = tpType as GenericInstanceType;
-
-// // if nested, scan enclosing type
-// if (tpType.DeclaringType != null)
-// CurrPath.Append(GetXmlDocParameterPath(tpType.DeclaringType, ExplicitMode));
-
-// // determine namespace
-// string strNamespace = string.Empty;
-// if ((tpType.Namespace != null && tpType.Namespace.Length > 0) || tpType.DeclaringType != null)
-// {
-// strNamespace = tpType.Namespace +
-// ((CanAppendSpecialExplicitChar() && ExplicitMode) ? "#" : ".");
-// }
-
-// CurrPath.Append(strNamespace).Append (StripGenericName(thisGenericType.Name));
-
-// // list parameters or types
-// bool firstAppend = true;
-// CurrPath.Append("{");
-// foreach (TypeReference tempTypeRef in thisGenericType.GenericArguments)
-// {
-// if (!firstAppend)
-// CurrPath.Append(",");
-
-// CurrPath.Append(GetXmlDocParameterPath(tempTypeRef, ExplicitMode));
-// firstAppend = false;
-// }
-// CurrPath.Append("}");
-// }
-// else if (tpType is GenericParameter)
-// {
-// GenericParameter thisGenParam = tpType as GenericParameter;
-
-// if (ExplicitMode)
-// {
-// // in explicit mode we print parameter name
-// CurrPath.Append(thisGenParam.Name);
-// }
-// else
-// {
-// // in non-explicit mode we print parameter order
-// int paramOrder = 0;
-
-// // find
-// for (int i = 0; i < thisGenParam.Owner.GenericParameters.Count; i++)
-// {
-// if (thisGenParam.Owner.GenericParameters[i].Name == tpType.Name)
-// {
-// paramOrder = i;
-// break;
-// }
-// }
-// if (thisGenParam.Owner is MethodReference)
-// CurrPath.Append("``").Append (paramOrder);
-// else
-// CurrPath.Append("`").Append (paramOrder);
-// }
-// }
-// else if (tpType is PointerType)
-// {
-// // parameter is pointer type
-// CurrPath.Append(GetXmlDocParameterPath((tpType as PointerType).ElementType, ExplicitMode));
-// CurrPath.Append("*");
-// }
-// else if (tpType is ArrayType)
-// {
-// ArrayType thisArrayType = tpType as ArrayType;
-// if (thisArrayType.ElementType != null)
-// CurrPath.Append(GetXmlDocParameterPath(thisArrayType.ElementType, ExplicitMode));
-
-// int iRank = thisArrayType.Rank;
-// if (iRank == 1)
-// {
-// CurrPath.Append("[]");
-// }
-// else
-// {
-// bool firstAppend = true;
-// CurrPath.Append("[");
-
-// for (int i = 0; i < (ExplicitMode ? iRank - 1 : iRank); i++)
-// {
-// // in explicit mode for .NET3.5/VS2008,
-// // there is no separator char "," used for multi-dimensional array,
-// // so there are three cases when comma shall be added:
-// // firstAppend = false; ExplicitMode = false; CanAppendSpecialExplicitChar() = true;
-// // firstAppend = false; ExplicitMode = false; CanAppendSpecialExplicitChar() = false;
-// // firstAppend = false; ExplicitMode = true; CanAppendSpecialExplicitChar() = false;
-// // below this is stored in decent manner
-// if (!firstAppend && (!ExplicitMode || !CanAppendSpecialExplicitChar()))
-// CurrPath.Append(",");
-
-// CurrPath.Append(((CanAppendSpecialExplicitChar() && ExplicitMode) ? "@" : "0:"));
-// if (thisArrayType.Dimensions[i].UpperBound > 0)
-// CurrPath.Append(thisArrayType.Dimensions[i].UpperBound.ToString());
-// firstAppend = false;
-// }
-
-// CurrPath.Append("]");
-// }
-// }
-//// else if (!tpType.IsValueType)
-//// {
-//// // parameter is passed by reference
-//// CurrPath.Append(GetXmlDocParameterPath((tpType as ReferenceType).ElementType, false));
-//// CurrPath.Append("@");
-//// }
-//// else if (tpType is ModifierOptional)
-//// {
-//// // parameter has optional modifier
-//// ModifierOptional thisModOpt = tpType as ModifierOptional;
-////
-//// CurrPath.Append(GetXmlDocParameterPath(thisModOpt.ElementType, ExplicitMode));
-//// CurrPath.Append("!");
-//// CurrPath.Append(GetXmlDocParameterPath(thisModOpt.ModifierType, ExplicitMode));
-//// }
-//// else if (tpType is ModifierRequired)
-//// {
-//// // parameter has required modifier
-//// ModifierRequired thisModReq = tpType as ModifierRequired;
-////
-//// CurrPath.Append(GetXmlDocParameterPath(thisModReq.ElementType, ExplicitMode));
-//// CurrPath.Append("|");
-//// CurrPath.Append(GetXmlDocParameterPath(thisModReq.ModifierType, ExplicitMode));
-//// }
-// else if (tpType is FunctionPointerType)
-// {
-// // type is function pointer
-// FunctionPointerType thisFuncPtr = tpType as FunctionPointerType;
-//// string tempString = string.Empty;
-
-// // return type
-// CurrPath.Append("=FUNC:");
-// CurrPath.Append(GetXmlDocParameterPath(thisFuncPtr.ReturnType, ExplicitMode));
-
-// // method's parameters
-// if (thisFuncPtr.Parameters.Count > 0)
-// {
-// bool firstAppend = true;
-// CurrPath.Append("(");
-
-// foreach (ParameterDefinition tempParam in thisFuncPtr.Parameters)
-// {
-// if (!firstAppend)
-// CurrPath.Append(",");
-
-// CurrPath.Append(GetXmlDocParameterPath(tempParam.ParameterType, ExplicitMode));
-// firstAppend = false;
-// }
-
-// CurrPath.Append(")");
-// }
-// else
-// {
-// CurrPath.Append("(System.Void)");
-// }
-// }
-// else if (tpType is PinnedType)
-// {
-// // type is pinned type
-// CurrPath.Append(GetXmlDocParameterPath((tpType as PinnedType).ElementType, ExplicitMode));
-// CurrPath.Append("^");
-// }
-// else if (tpType is TypeReference)
-// {
-// // if nested, scan enclosing type
-// if (tpType.DeclaringType != null)
-// CurrPath.Append(GetXmlDocParameterPath(tpType.DeclaringType, ExplicitMode));
-
-// // determine namespace
-// string strNamespace = string.Empty;
-// if ((tpType.Namespace != null && tpType.Namespace.Length > 0) || tpType.DeclaringType != null)
-// {
-// strNamespace = tpType.Namespace +
-// ((CanAppendSpecialExplicitChar() && ExplicitMode) ? "#" : ".");
-// }
-
-// // concrete type
-// CurrPath.Append(strNamespace).Append (
-// ((CanAppendSpecialExplicitChar() && ExplicitMode) ? tpType.Name.Replace(".", "#") : tpType.Name));
-// }
-// }
-
-// private OperatorType GetOperatorType(MethodDefinition OperatorMethod)
-// {
-// try
-// {
-// return (OperatorType)Enum.Parse(typeof(OperatorType), OperatorMethod.Name.Trim());
-// }
-// catch
-// {
-// return OperatorType.None;
-// }
-// }
-
-// public bool IsNested(
-// TypeReference Type)
-// {
-// if (Type.IsNested)
-// return true;
-
-// return false;
-// }
-
-// private bool IsOperator(MethodDefinition Method)
-// {
-// if (Method.IsSpecialName && Method.Name.StartsWith("op_"))
-// return true;
-
-// return false;
-// }
-
-// private bool CanAppendSpecialExplicitChar()
-// {
-// if (m_compat == CompatibilityType.Net35)
-// return true;
-
-// return false;
-// }
-
-// private string StripGenericName(string OrginalClassName)
-// {
-// if (OrginalClassName.IndexOf("`") != -1)
-// return OrginalClassName.Remove(OrginalClassName.IndexOf("`"));
-// else
-// return OrginalClassName;
-// }
-// #endregion
-
-// #region Private members
-// private CompatibilityType m_compat;
-// #endregion
-// }
-// #endregion
-//}
+// stbTempPath.Append (".");
+// if (strExplicitPath.Length > 0)
+// stbTempPath.Append (strExplicitPath);
+// else
+// stbTempPath.Append (thisMethodDef.Name);
+
+// // check whether this method is generic
+// if (thisMethodDef.GenericParameters.Count > 0)
+// stbTempPath.Append("``").Append (thisMethodDef.GenericParameters.Count);
+
+// if (thisMethodDef.Parameters.Count > 0)
+// stbTempPath.Append("(");
+// bool firstAppend = true;
+// foreach (ParameterDefinition TempParam in thisMethodDef.Parameters)
+// {
+// if (!firstAppend)
+// stbTempPath.Append(",");
+
+// stbTempPath.Append(GetXmlDocParameterPath(TempParam.ParameterType, false));
+// firstAppend = false;
+// }
+
+// if (thisMethodDef.Parameters.Count > 0)
+// stbTempPath.Append(")");
+
+// // check whether this is a conversion operator (implicit or explicit)
+// // if so, we have to read return type and add "~" char.
+// //if (IsOperator(thisMethodDef))
+// //{
+// // OperatorType OpType = GetOperatorType(thisMethodDef);
+
+// // if (OpType == OperatorType.op_Implicit || OpType == OperatorType.op_Explicit)
+// // {
+// // // add return type parameter path
+// // stbTempPath.Append("~");
+// // stbTempPath.Append(GetXmlDocParameterPath(thisMethodDef.ReturnType, false));
+// // }
+// //}
+
+// // add to path
+// CurrPath.Add(stbTempPath.ToString());
+// }
+// else if (Member is FieldReference)
+// {
+// // field, get type's path name
+// CurrPath.Add("F:");
+// if (Member.DeclaringType != null)
+// GetXmlDocPathRecursive(Member.DeclaringType, CurrPath);
+
+// // field's path
+// CurrPath.Add("." + Member.Name);
+// }
+// else if (Member is PropertyReference)
+// {
+// // property or indexer, get declaring type's path
+// CurrPath.Add("P:");
+// if (Member.DeclaringType != null)
+// GetXmlDocPathRecursive(Member.DeclaringType, CurrPath);
+
+// // property's path
+// // check whether this is explicitly implemented property
+// strExplicitPath = GetXmlDocExplicitIfaceImplPath(Member);
+// stbTempPath.Append (".");
+// if (strExplicitPath.Length > 0)
+// stbTempPath.Append (strExplicitPath);
+// else
+// stbTempPath.Append (Member.Name);
+
+// // is it an indexer ?
+// bool firstAppend = true;
+// PropertyDefinition piProperty = Member as PropertyDefinition;
+// if (piProperty.Parameters.Count > 0)
+// stbTempPath.Append("(");
+
+// foreach (ParameterDefinition TempParam in piProperty.Parameters)
+// {
+// if (!firstAppend)
+// stbTempPath.Append(",");
+
+// stbTempPath.Append(GetXmlDocParameterPath(TempParam.ParameterType, false));
+// firstAppend = false;
+// }
+
+// if (piProperty.Parameters.Count > 0)
+// stbTempPath.Append(")");
+
+// CurrPath.Add(stbTempPath.ToString());
+// }
+// else if (Member is EventReference)
+// {
+// // event, get type's path firstAppend
+// CurrPath.Add("E:");
+// if (Member.DeclaringType != null)
+// GetXmlDocPathRecursive(Member.DeclaringType, CurrPath);
+
+// // event's path
+// CurrPath.Add("." + Member.Name);
+// }
+// }
+
+// private string GetXmlDocParameterPath(
+// TypeReference Type,
+// bool ExplicitMode)
+// {
+// StringBuilder stbCurrPath = new StringBuilder();
+
+// GetXmlDocParameterPathRecursive(Type, ExplicitMode, stbCurrPath);
+
+// return stbCurrPath.ToString();
+// }
+
+// private void GetXmlDocParameterPathRecursive(
+// TypeReference tpType,
+// bool ExplicitMode,
+// StringBuilder CurrPath)
+// {
+// if (tpType == null)
+// return;
+
+// if (tpType.GenericParameters.Count > 0)
+// {
+// CurrPath.Append(tpType.Namespace)
+// .Append ((CanAppendSpecialExplicitChar () && ExplicitMode) ? "#" : ".")
+// .Append(StripGenericName(tpType.Name));
+
+// // list parameters or types
+// bool firstAppend = true;
+// CurrPath.Append("{");
+// foreach (GenericParameter TempType in tpType.GenericParameters)
+// {
+// if (!firstAppend)
+// CurrPath.Append(",");
+
+// CurrPath.Append(GetXmlDocParameterPath(TempType, ExplicitMode));
+// firstAppend = false;
+// }
+// CurrPath.Append("}");
+// }
+// else if (tpType is GenericInstanceType)
+// {
+// GenericInstanceType thisGenericType = tpType as GenericInstanceType;
+
+// // if nested, scan enclosing type
+// if (tpType.DeclaringType != null)
+// CurrPath.Append(GetXmlDocParameterPath(tpType.DeclaringType, ExplicitMode));
+
+// // determine namespace
+// string strNamespace = string.Empty;
+// if ((tpType.Namespace != null && tpType.Namespace.Length > 0) || tpType.DeclaringType != null)
+// {
+// strNamespace = tpType.Namespace +
+// ((CanAppendSpecialExplicitChar() && ExplicitMode) ? "#" : ".");
+// }
+
+// CurrPath.Append(strNamespace).Append (StripGenericName(thisGenericType.Name));
+
+// // list parameters or types
+// bool firstAppend = true;
+// CurrPath.Append("{");
+// foreach (TypeReference tempTypeRef in thisGenericType.GenericArguments)
+// {
+// if (!firstAppend)
+// CurrPath.Append(",");
+
+// CurrPath.Append(GetXmlDocParameterPath(tempTypeRef, ExplicitMode));
+// firstAppend = false;
+// }
+// CurrPath.Append("}");
+// }
+// else if (tpType is GenericParameter)
+// {
+// GenericParameter thisGenParam = tpType as GenericParameter;
+
+// if (ExplicitMode)
+// {
+// // in explicit mode we print parameter name
+// CurrPath.Append(thisGenParam.Name);
+// }
+// else
+// {
+// // in non-explicit mode we print parameter order
+// int paramOrder = 0;
+
+// // find
+// for (int i = 0; i < thisGenParam.Owner.GenericParameters.Count; i++)
+// {
+// if (thisGenParam.Owner.GenericParameters[i].Name == tpType.Name)
+// {
+// paramOrder = i;
+// break;
+// }
+// }
+// if (thisGenParam.Owner is MethodReference)
+// CurrPath.Append("``").Append (paramOrder);
+// else
+// CurrPath.Append("`").Append (paramOrder);
+// }
+// }
+// else if (tpType is PointerType)
+// {
+// // parameter is pointer type
+// CurrPath.Append(GetXmlDocParameterPath((tpType as PointerType).ElementType, ExplicitMode));
+// CurrPath.Append("*");
+// }
+// else if (tpType is ArrayType)
+// {
+// ArrayType thisArrayType = tpType as ArrayType;
+// if (thisArrayType.ElementType != null)
+// CurrPath.Append(GetXmlDocParameterPath(thisArrayType.ElementType, ExplicitMode));
+
+// int iRank = thisArrayType.Rank;
+// if (iRank == 1)
+// {
+// CurrPath.Append("[]");
+// }
+// else
+// {
+// bool firstAppend = true;
+// CurrPath.Append("[");
+
+// for (int i = 0; i < (ExplicitMode ? iRank - 1 : iRank); i++)
+// {
+// // in explicit mode for .NET3.5/VS2008,
+// // there is no separator char "," used for multi-dimensional array,
+// // so there are three cases when comma shall be added:
+// // firstAppend = false; ExplicitMode = false; CanAppendSpecialExplicitChar() = true;
+// // firstAppend = false; ExplicitMode = false; CanAppendSpecialExplicitChar() = false;
+// // firstAppend = false; ExplicitMode = true; CanAppendSpecialExplicitChar() = false;
+// // below this is stored in decent manner
+// if (!firstAppend && (!ExplicitMode || !CanAppendSpecialExplicitChar()))
+// CurrPath.Append(",");
+
+// CurrPath.Append(((CanAppendSpecialExplicitChar() && ExplicitMode) ? "@" : "0:"));
+// if (thisArrayType.Dimensions[i].UpperBound > 0)
+// CurrPath.Append(thisArrayType.Dimensions[i].UpperBound.ToString());
+// firstAppend = false;
+// }
+
+// CurrPath.Append("]");
+// }
+// }
+//// else if (!tpType.IsValueType)
+//// {
+//// // parameter is passed by reference
+//// CurrPath.Append(GetXmlDocParameterPath((tpType as ReferenceType).ElementType, false));
+//// CurrPath.Append("@");
+//// }
+//// else if (tpType is ModifierOptional)
+//// {
+//// // parameter has optional modifier
+//// ModifierOptional thisModOpt = tpType as ModifierOptional;
+////
+//// CurrPath.Append(GetXmlDocParameterPath(thisModOpt.ElementType, ExplicitMode));
+//// CurrPath.Append("!");
+//// CurrPath.Append(GetXmlDocParameterPath(thisModOpt.ModifierType, ExplicitMode));
+//// }
+//// else if (tpType is ModifierRequired)
+//// {
+//// // parameter has required modifier
+//// ModifierRequired thisModReq = tpType as ModifierRequired;
+////
+//// CurrPath.Append(GetXmlDocParameterPath(thisModReq.ElementType, ExplicitMode));
+//// CurrPath.Append("|");
+//// CurrPath.Append(GetXmlDocParameterPath(thisModReq.ModifierType, ExplicitMode));
+//// }
+// else if (tpType is FunctionPointerType)
+// {
+// // type is function pointer
+// FunctionPointerType thisFuncPtr = tpType as FunctionPointerType;
+//// string tempString = string.Empty;
+
+// // return type
+// CurrPath.Append("=FUNC:");
+// CurrPath.Append(GetXmlDocParameterPath(thisFuncPtr.ReturnType, ExplicitMode));
+
+// // method's parameters
+// if (thisFuncPtr.Parameters.Count > 0)
+// {
+// bool firstAppend = true;
+// CurrPath.Append("(");
+
+// foreach (ParameterDefinition tempParam in thisFuncPtr.Parameters)
+// {
+// if (!firstAppend)
+// CurrPath.Append(",");
+
+// CurrPath.Append(GetXmlDocParameterPath(tempParam.ParameterType, ExplicitMode));
+// firstAppend = false;
+// }
+
+// CurrPath.Append(")");
+// }
+// else
+// {
+// CurrPath.Append("(System.Void)");
+// }
+// }
+// else if (tpType is PinnedType)
+// {
+// // type is pinned type
+// CurrPath.Append(GetXmlDocParameterPath((tpType as PinnedType).ElementType, ExplicitMode));
+// CurrPath.Append("^");
+// }
+// else if (tpType is TypeReference)
+// {
+// // if nested, scan enclosing type
+// if (tpType.DeclaringType != null)
+// CurrPath.Append(GetXmlDocParameterPath(tpType.DeclaringType, ExplicitMode));
+
+// // determine namespace
+// string strNamespace = string.Empty;
+// if ((tpType.Namespace != null && tpType.Namespace.Length > 0) || tpType.DeclaringType != null)
+// {
+// strNamespace = tpType.Namespace +
+// ((CanAppendSpecialExplicitChar() && ExplicitMode) ? "#" : ".");
+// }
+
+// // concrete type
+// CurrPath.Append(strNamespace).Append (
+// ((CanAppendSpecialExplicitChar() && ExplicitMode) ? tpType.Name.Replace(".", "#") : tpType.Name));
+// }
+// }
+
+// private OperatorType GetOperatorType(MethodDefinition OperatorMethod)
+// {
+// try
+// {
+// return (OperatorType)Enum.Parse(typeof(OperatorType), OperatorMethod.Name.Trim());
+// }
+// catch
+// {
+// return OperatorType.None;
+// }
+// }
+
+// public bool IsNested(
+// TypeReference Type)
+// {
+// if (Type.IsNested)
+// return true;
+
+// return false;
+// }
+
+// private bool IsOperator(MethodDefinition Method)
+// {
+// if (Method.IsSpecialName && Method.Name.StartsWith("op_"))
+// return true;
+
+// return false;
+// }
+
+// private bool CanAppendSpecialExplicitChar()
+// {
+// if (m_compat == CompatibilityType.Net35)
+// return true;
+
+// return false;
+// }
+
+// private string StripGenericName(string OrginalClassName)
+// {
+// if (OrginalClassName.IndexOf("`") != -1)
+// return OrginalClassName.Remove(OrginalClassName.IndexOf("`"));
+// else
+// return OrginalClassName;
+// }
+// #endregion
+
+// #region Private members
+// private CompatibilityType m_compat;
+// #endregion
+// }
+// #endregion
+//}
diff --git a/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.Mac.csproj b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.Mac.csproj
new file mode 100644
index 00000000000..81b333e736b
--- /dev/null
+++ b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.Mac.csproj
@@ -0,0 +1,177 @@
+
+
+
+
+
+ Debug
+ AnyCPU
+ {573d31cf-b22b-4693-820d-ba143266f4d8}
+ $(MDFrameworkVersion)
+ ..\..\..\build\AddIns\MonoDevelop.Debugger
+ $(DefineConstants);WINDOWS
+
+
+
+
+
+
+ Program
+ ..\..\..\build\bin\MonoDevelop.exe
+ --no-redirect
+
+
+
+
+
+
+
+
+ ..\..\..\external\Xamarin.Mac.dll
+ False
+
+
+
+
+
+
+
+
+
+ {7525BB88-6142-4A26-93B9-A30C6983390A}
+ MonoDevelop.Core
+ False
+
+
+ {27096E7F-C91C-4AC6-B289-6897A701DF21}
+ MonoDevelop.Ide
+ False
+
+
+ {91DD5A2D-9FE3-4C3C-9253-876141874DAD}
+ Mono.Addins
+ False
+
+
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}
+ Xwt
+ False
+
+
+ {90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2}
+ Mono.Debugging
+ False
+
+
+ {50D6768C-C072-4E79-AFC5-C1C40767EF45}
+ MacPlatform
+ False
+
+
+ {2357aabd-08c7-4808-a495-8ff2d3cdfdb0}
+ MonoDevelop.Debugger
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/ExceptionCaught/ExceptionCaughtAdornmentManager.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/ExceptionCaught/ExceptionCaughtAdornmentManager.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/ExceptionCaught/ExceptionCaughtAdornmentManager.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/ExceptionCaught/ExceptionCaughtAdornmentManager.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/ExceptionCaught/ExceptionCaughtProvider.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/ExceptionCaught/ExceptionCaughtProvider.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/ExceptionCaught/ExceptionCaughtProvider.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/ExceptionCaught/ExceptionCaughtProvider.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphFactoryProvider.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphFactoryProvider.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphFactoryProvider.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphFactoryProvider.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphMouseProcessor.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphMouseProcessor.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphMouseProcessor.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphMouseProcessor.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphMouseProcessorProvider.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphMouseProcessorProvider.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphMouseProcessorProvider.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/Glyphs/BreakpointGlyphMouseProcessorProvider.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/Glyphs/CurrentStatementGlyphFactoryProvider.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/Glyphs/CurrentStatementGlyphFactoryProvider.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/Glyphs/CurrentStatementGlyphFactoryProvider.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/Glyphs/CurrentStatementGlyphFactoryProvider.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/Glyphs/ReturnStatementGlyphFactoryProvider.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/Glyphs/ReturnStatementGlyphFactoryProvider.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/Glyphs/ReturnStatementGlyphFactoryProvider.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/Glyphs/ReturnStatementGlyphFactoryProvider.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchProvider.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchProvider.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchProvider.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchProvider.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchView.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchView.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchView.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchView.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/QuickInfo/MacDebuggerTooltipWindow.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/QuickInfo/MacDebuggerTooltipWindow.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/QuickInfo/MacDebuggerTooltipWindow.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger.VSTextView/QuickInfo/MacDebuggerTooltipWindow.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectCellViewBase.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectCellViewBase.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectCellViewBase.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectCellViewBase.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectNameView.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectNameView.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectNameView.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectNameView.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectPinView.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectPinView.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectPinView.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectPinView.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectTypeView.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectTypeView.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectTypeView.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectTypeView.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectValueView.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectValueView.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectValueView.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerObjectValueView.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerTextField.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerTextField.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerTextField.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacDebuggerTextField.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueNode.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueNode.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueNode.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueNode.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeView.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeView.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeView.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeView.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeViewDataSource.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeViewDataSource.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeViewDataSource.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeViewDataSource.cs
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeViewDelegate.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeViewDelegate.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeViewDelegate.cs
rename to main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValue/Mac/MacObjectValueTreeViewDelegate.cs
diff --git a/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValuePadMac.cs b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValuePadMac.cs
new file mode 100644
index 00000000000..fa03e289125
--- /dev/null
+++ b/main/src/addins/MonoDevelop.Debugger.Mac/MonoDevelop.Debugger/ObjectValuePadMac.cs
@@ -0,0 +1,276 @@
+// ObjectValuePad.cs
+//
+// Author:
+// Lluis Sanchez Gual
+//
+// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
+//
+// 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 Gtk;
+
+using Mono.Debugging.Client;
+
+using MonoDevelop.Core;
+using MonoDevelop.Ide.Gui;
+using MonoDevelop.Components;
+using Foundation;
+
+namespace MonoDevelop.Debugger
+{
+ public class ObjectValuePadMac : PadContent
+ {
+ protected readonly bool UseNewTreeView = PropertyService.Get ("MonoDevelop.Debugger.UseNewTreeView", true);
+
+ protected ObjectValueTreeViewController controller;
+ protected ObjectValueTreeView tree;
+ // this is for the new treeview
+ protected MacObjectValueTreeView _treeview;
+
+ readonly Control control;
+ PadFontChanger fontChanger;
+ StackFrame lastFrame;
+ bool needsUpdateValues;
+ bool needsUpdateFrame;
+ bool disposed;
+
+ public override Control Control {
+ get { return control; }
+ }
+
+ protected bool IsInitialResume {
+ get; private set;
+ }
+
+ public ObjectValuePad (bool allowWatchExpressions = false)
+ {
+ if (UseNewTreeView) {
+ controller = new ObjectValueTreeViewController (allowWatchExpressions);
+ controller.AllowEditing = true;
+
+ if (Platform.IsMac) {
+ LoggingService.LogInfo ("Using MacObjectValueTreeView for {0}", allowWatchExpressions ? "Watch Pad" : "Locals Pad");
+ var treeView = controller.GetMacControl (ObjectValueTreeViewFlags.ObjectValuePadFlags);
+ treeView.UIElementName = allowWatchExpressions ? "WatchPad" : "LocalsPad";
+ _treeview = treeView;
+
+ fontChanger = new PadFontChanger (treeView, treeView.SetCustomFont, treeView.QueueResize);
+
+ var scrolled = new AppKit.NSScrollView {
+ DocumentView = treeView,
+ AutohidesScrollers = false,
+ HasVerticalScroller = true,
+ HasHorizontalScroller = true,
+ };
+
+ // disable implicit animations
+ scrolled.WantsLayer = true;
+ scrolled.Layer.Actions = new NSDictionary (
+ "actions", NSNull.Null,
+ "contents", NSNull.Null,
+ "hidden", NSNull.Null,
+ "onLayout", NSNull.Null,
+ "onOrderIn", NSNull.Null,
+ "onOrderOut", NSNull.Null,
+ "position", NSNull.Null,
+ "sublayers", NSNull.Null,
+ "transform", NSNull.Null,
+ "bounds", NSNull.Null);
+
+ var host = new GtkNSViewHost (scrolled);
+ host.ShowAll ();
+
+ control = host;
+ } else {
+ LoggingService.LogInfo ("Using GtkObjectValueTreeView for {0}", allowWatchExpressions ? "Watch Pad" : "Locals Pad");
+ var treeView = controller.GetGtkControl (ObjectValueTreeViewFlags.ObjectValuePadFlags);
+ treeView.Show ();
+
+ fontChanger = new PadFontChanger (treeView, treeView.SetCustomFont, treeView.QueueResize);
+
+ var scrolled = new ScrolledWindow {
+ HscrollbarPolicy = PolicyType.Automatic,
+ VscrollbarPolicy = PolicyType.Automatic
+ };
+ scrolled.Add (treeView);
+ scrolled.Show ();
+
+ control = scrolled;
+ }
+ } else {
+ LoggingService.LogInfo ("Using old ObjectValueTreeView for {0}", allowWatchExpressions ? "Watch Pad" : "Locals Pad");
+ tree = new ObjectValueTreeView ();
+ tree.AllowAdding = allowWatchExpressions;
+ tree.AllowEditing = true;
+ tree.Show ();
+
+ fontChanger = new PadFontChanger (tree, tree.SetCustomFont, tree.QueueResize);
+
+ var scrolled = new ScrolledWindow {
+ HscrollbarPolicy = PolicyType.Automatic,
+ VscrollbarPolicy = PolicyType.Automatic
+ };
+ scrolled.Add (tree);
+ scrolled.Show ();
+
+ control = scrolled;
+ }
+
+ DebuggingService.CurrentFrameChanged += OnFrameChanged;
+ DebuggingService.PausedEvent += OnDebuggerPaused;
+ DebuggingService.ResumedEvent += OnDebuggerResumed;
+ DebuggingService.StoppedEvent += OnDebuggerStopped;
+ DebuggingService.EvaluationOptionsChanged += OnEvaluationOptionsChanged;
+ DebuggingService.VariableChanged += OnVariableChanged;
+
+ needsUpdateValues = false;
+ needsUpdateFrame = true;
+
+ //If pad is created/opened while debugging...
+ IsInitialResume = !DebuggingService.IsDebugging;
+ }
+
+ public override void Dispose ()
+ {
+ if (disposed)
+ return;
+
+ if (fontChanger != null) {
+ fontChanger.Dispose ();
+ fontChanger = null;
+ }
+
+ disposed = true;
+
+ DebuggingService.CurrentFrameChanged -= OnFrameChanged;
+ DebuggingService.PausedEvent -= OnDebuggerPaused;
+ DebuggingService.ResumedEvent -= OnDebuggerResumed;
+ DebuggingService.StoppedEvent -= OnDebuggerStopped;
+ DebuggingService.EvaluationOptionsChanged -= OnEvaluationOptionsChanged;
+ DebuggingService.VariableChanged -= OnVariableChanged;
+
+ base.Dispose ();
+ }
+
+ protected override void Initialize (IPadWindow window)
+ {
+ window.PadContentShown += delegate {
+ if (needsUpdateFrame)
+ OnUpdateFrame ();
+ else if (needsUpdateValues)
+ OnUpdateValues ();
+ };
+ }
+
+ public virtual void OnUpdateFrame ()
+ {
+ needsUpdateValues = false;
+ needsUpdateFrame = false;
+
+ if (DebuggingService.CurrentFrame != lastFrame) {
+ if (UseNewTreeView) {
+ controller.SetStackFrame (DebuggingService.CurrentFrame);
+ } else {
+ tree.Frame = DebuggingService.CurrentFrame;
+ }
+ }
+
+ lastFrame = DebuggingService.CurrentFrame;
+ }
+
+ public virtual void OnUpdateValues ()
+ {
+ needsUpdateValues = false;
+ }
+
+ protected virtual void OnFrameChanged (object s, EventArgs a)
+ {
+ if (Window != null && Window.ContentVisible) {
+ OnUpdateFrame ();
+ } else {
+ needsUpdateFrame = true;
+ needsUpdateValues = false;
+ }
+ }
+
+ protected virtual void OnVariableChanged (object s, EventArgs e)
+ {
+ if (Window != null && Window.ContentVisible) {
+ OnUpdateValues ();
+ } else {
+ needsUpdateValues = true;
+ }
+ }
+
+ protected virtual void OnDebuggerPaused (object s, EventArgs a)
+ {
+ }
+
+ protected virtual void OnDebuggerResumed (object s, EventArgs a)
+ {
+ if (UseNewTreeView) {
+ if (!IsInitialResume) {
+ controller.ChangeCheckpoint ();
+ }
+
+ controller.ClearValues ();
+ } else {
+ if (!IsInitialResume) {
+ tree.ChangeCheckpoint ();
+ }
+
+ tree.ClearValues ();
+ }
+
+ IsInitialResume = false;
+ }
+
+ protected virtual void OnDebuggerStopped (object s, EventArgs a)
+ {
+ if (DebuggingService.IsDebugging)
+ return;
+
+ if (UseNewTreeView) {
+ controller.ResetChangeTracking ();
+ controller.ClearAll ();
+ } else {
+ tree.ResetChangeTracking ();
+ tree.ClearAll ();
+ }
+
+ lastFrame = null;
+ IsInitialResume = true;
+ }
+
+ protected virtual void OnEvaluationOptionsChanged (object s, EventArgs a)
+ {
+ if (!DebuggingService.IsRunning) {
+ lastFrame = null;
+ if (Window != null && Window.ContentVisible)
+ OnUpdateFrame ();
+ else
+ needsUpdateFrame = true;
+ }
+ }
+ }
+}
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~contrast.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~contrast.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~contrast.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~contrast.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~contrast@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~contrast@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~contrast@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~contrast@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~contrast~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~contrast~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~contrast~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~contrast~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~contrast~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~contrast~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~contrast~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~contrast~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/continue-16~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/continue-16~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~contrast.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~contrast.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~contrast.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~contrast.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~contrast@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~contrast@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~contrast@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~contrast@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~contrast~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~contrast~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~contrast~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~contrast~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~contrast~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~contrast~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~contrast~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~contrast~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/pause-16~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/pause-16~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~contrast.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~contrast.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~contrast.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~contrast.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~contrast@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~contrast@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~contrast@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~contrast@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~contrast~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~contrast~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~contrast~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~contrast~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~contrast~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~contrast~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~contrast~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~contrast~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~disabled.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~disabled.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~disabled.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~disabled.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~disabled@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~disabled@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~disabled@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~disabled@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~disabled~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~disabled~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~disabled~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~disabled~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~disabled~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~disabled~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-in-16~disabled~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-in-16~disabled~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~contrast.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~contrast.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~contrast.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~contrast.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~contrast@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~contrast@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~contrast@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~contrast@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~contrast~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~contrast~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~contrast~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~contrast~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~contrast~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~contrast~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~contrast~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~contrast~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~disabled.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~disabled.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~disabled.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~disabled.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~disabled@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~disabled@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~disabled@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~disabled@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~disabled~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~disabled~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~disabled~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~disabled~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~disabled~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~disabled~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-out-16~disabled~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-out-16~disabled~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~contrast.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~contrast.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~contrast.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~contrast.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~contrast@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~contrast@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~contrast@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~contrast@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~contrast~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~contrast~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~contrast~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~contrast~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~contrast~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~contrast~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~contrast~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~contrast~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~disabled.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~disabled.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~disabled.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~disabled.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~disabled@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~disabled@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~disabled@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~disabled@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~disabled~dark.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~disabled~dark.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~disabled~dark.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~disabled~dark.png
diff --git a/main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~disabled~dark@2x.png b/main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~disabled~dark@2x.png
similarity index 100%
rename from main/src/addins/MonoDevelop.Debugger/icons/mac/step-over-16~disabled~dark@2x.png
rename to main/src/addins/MonoDevelop.Debugger.Mac/icons/mac/step-over-16~disabled~dark@2x.png
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/QuickInfo/DebuggerQuickInfoSource.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/QuickInfo/DebuggerQuickInfoSource.cs
index 56a431e4570..ca355e8266f 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/QuickInfo/DebuggerQuickInfoSource.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/QuickInfo/DebuggerQuickInfoSource.cs
@@ -33,13 +33,16 @@ public DebuggerQuickInfoSource (DebuggerQuickInfoSourceProvider provider, ITextB
void CurrentFrameChanged (object sender, EventArgs e)
{
+#if DD_Mac_TODO
if (window != null) {
DestroyWindow ();
}
+#endif
}
void TargetProcessExited (object sender, EventArgs e)
{
+#if DD_Mac_TODO
if (window == null)
return;
@@ -47,6 +50,7 @@ void TargetProcessExited (object sender, EventArgs e)
if (debuggerSession == null || debuggerSession == sender) {
DestroyWindow ();
}
+#endif
}
public void Dispose ()
@@ -83,10 +87,10 @@ public async Task GetQuickInfoItemAsync (IAsyncQuickInfoSession s
{
if (DebuggingService.CurrentFrame == null)
return null;
-
+#if DD_Mac_TODO
if (window != null)
await Runtime.RunInMainThread (DestroyWindow);
-
+#endif
var view = session.TextView;
var textViewLines = view.TextViewLines;
var snapshot = textViewLines.FormattedSpan.Snapshot;
@@ -232,10 +236,12 @@ private void LayoutChanged (object sender, TextViewLayoutChangedEventArgs e)
void DestroyWindow ()
{
Runtime.AssertMainThread ();
+#if DD_Mac_TODO
if (window != null) {
window.Close ();
window = null;
}
+#endif
if (lastView != null) {
lastView.LayoutChanged -= LayoutChanged;
#if CLOSE_ON_FOCUS_LOST
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.csproj b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.csproj
index f68700e7607..b8d81890b6f 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.csproj
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.csproj
@@ -25,10 +25,6 @@
-
- ..\..\..\external\Xamarin.Mac.dll
- False
-
@@ -61,11 +57,6 @@
Mono.Debugging
False
-
- {50D6768C-C072-4E79-AFC5-C1C40767EF45}
- MacPlatform
- False
-
@@ -140,8 +131,6 @@
-
-
@@ -184,35 +173,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -478,74 +448,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggerCompletionCommandHandler.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggerCompletionCommandHandler.cs
index 4aa7a663a44..6526d10ab6a 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggerCompletionCommandHandler.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggerCompletionCommandHandler.cs
@@ -55,6 +55,7 @@ public CommandState GetCommandState (EscapeKeyCommandArgs args)
public bool ExecuteCommand (EscapeKeyCommandArgs args, CommandExecutionContext executionContext)
{
+#if DD_Mac_TODO
var cocoaTextView = (ICocoaTextView) args.TextView;
var bgView = cocoaTextView.VisualElement.Superview; // the NSView that draws the background color
var superview = bgView?.Superview;
@@ -63,7 +64,7 @@ public bool ExecuteCommand (EscapeKeyCommandArgs args, CommandExecutionContext e
nameView.CancelEdit ();
else
System.Console.WriteLine ("superview is {0}", superview.GetType ().FullName);
-
+#endif
return true;
}
@@ -78,10 +79,11 @@ public CommandState GetCommandState (ReturnKeyCommandArgs args)
public bool ExecuteCommand (ReturnKeyCommandArgs args, CommandExecutionContext executionContext)
{
+#if DD_Mac_TODO
var cocoaTextView = (ICocoaTextView) args.TextView;
cocoaTextView.VisualElement.ResignFirstResponder ();
-
+#endif
return true;
}
@@ -96,10 +98,11 @@ public CommandState GetCommandState (TabKeyCommandArgs args)
public bool ExecuteCommand (TabKeyCommandArgs args, CommandExecutionContext executionContext)
{
+#if DD_Mac_TODO
var cocoaTextView = (ICocoaTextView) args.TextView;
cocoaTextView.VisualElement.ResignFirstResponder ();
-
+#endif
return true;
}
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs
index 0a8c41c8609..f7896b0ae89 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs
@@ -29,8 +29,9 @@
using System.IO;
using System.Linq;
using System.Collections.Generic;
-
+#if DD_Mac_TODO
using Foundation;
+#endif
using GLib;
using Gtk;
@@ -59,7 +60,9 @@ class ExceptionCaughtDialog : Gtk.Window
VBox vboxAroundInnerExceptionMessage, rightVBox, container;
Button close, helpLinkButton, innerExceptionHelpLinkButton;
TreeView exceptionValueTreeView, stackTraceTreeView;
+#if DD_Mac_TODO
MacObjectValueTreeView macExceptionValueTreeView;
+#endif
InnerExceptionsTree innerExceptionsTreeView;
ObjectValueTreeViewController controller;
CheckButton onlyShowMyCodeCheckbox;
@@ -191,11 +194,13 @@ Widget CreateExceptionValueTreeView ()
controller = new ObjectValueTreeViewController ();
controller.SetStackFrame (DebuggingService.CurrentFrame);
controller.AllowExpanding = true;
-
+#if DD_Mac_TODO
if (Platform.IsMac) {
macExceptionValueTreeView = controller.GetMacControl (ObjectValueTreeViewFlags.ObjectValuePadFlags);
macExceptionValueTreeView.UIElementName = "ExceptionCaughtDialog";
- } else {
+ } else
+#endif
+ {
exceptionValueTreeView = controller.GetGtkControl (ObjectValueTreeViewFlags.ExceptionCaughtFlags);
}
} else {
@@ -209,7 +214,7 @@ Widget CreateExceptionValueTreeView ()
exceptionValueTreeView = objValueTreeView;
}
-
+#if DD_Mac_TODO
if (useNewTreeView && Platform.IsMac) {
var scrolled = new AppKit.NSScrollView {
DocumentView = macExceptionValueTreeView,
@@ -235,7 +240,9 @@ Widget CreateExceptionValueTreeView ()
var host = new GtkNSViewHost (scrolled);
host.ShowAll ();
scrolledWidget = host;
- } else {
+ } else
+#endif
+ {
exceptionValueTreeView.ModifyBase (StateType.Normal, Styles.ExceptionCaughtDialog.ValueTreeBackgroundColor.ToGdkColor ());
exceptionValueTreeView.ModifyBase (StateType.Active, Styles.ObjectValueTreeActiveBackgroundColor.ToGdkColor ());
exceptionValueTreeView.ModifyFont (Pango.FontDescription.FromString (Platform.IsWindows ? "9" : "11"));
@@ -263,7 +270,9 @@ Widget CreateExceptionValueTreeView ()
if (exceptionValueTreeView != null) {
exceptionValueTreeView.SetCommonAccessibilityAttributes ("ExceptionCaughtDialog.ExceptionValueTreeView", label, null);
} else {
+#if DD_Mac_TODO
macExceptionValueTreeView.AccessibilityTitle = new NSString (label.Text);
+#endif
}
var vbox = new VBox ();
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/LocalsPad.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/LocalsPad.cs
index e64938f183b..034346f5b67 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/LocalsPad.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/LocalsPad.cs
@@ -121,12 +121,16 @@ void ReloadValues (bool frameChanged)
DebuggerLoggingService.LogMessage ("End Local Variables");
if (UseNewTreeView) {
+#if DD_Mac_TODO
_treeview.BeginUpdates ();
+#endif
try {
controller.ClearValues ();
controller.AddValues (locals);
} finally {
+#if DD_Mac_TODO
_treeview.EndUpdates ();
+#endif
}
if (EnableFakeNodes)
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs
index aa5fe171d5f..e5f3c7b4f92 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs
@@ -206,7 +206,7 @@ public GtkObjectValueTreeView GetGtkControl (ObjectValueTreeViewFlags flags)
return control;
}
-
+#if DD_Mac_TODO
public MacObjectValueTreeView GetMacControl (ObjectValueTreeViewFlags flags)
{
if (view != null)
@@ -218,12 +218,13 @@ public MacObjectValueTreeView GetMacControl (ObjectValueTreeViewFlags flags)
return control;
}
-
+#endif
public Control GetControl (ObjectValueTreeViewFlags flags)
{
+#if DD_Mac_TODO
if (Platform.IsMac)
return GetMacControl (flags);
-
+#endif
return GetGtkControl (flags);
}
@@ -791,7 +792,7 @@ async Task FetchChildrenAsync (ObjectValueNode node, int count, Cancellatio
#region Evaluation watches
///
/// Registers the ValueChanged event for a node where IsEvaluating is true. If the node is not evaluating, and
- /// sendImmediatelyIfNotEvaluating is true, then fire OnEvaluatingNodeValueChanged immediately
+ /// sendImmediatelyIfNotEvaluating is true, then fire OnEvaluatingNodeValueChanged immediately
///
void RegisterForEvaluationCompletion (ObjectValueNode node, bool sendImmediatelyIfNotEvaluating = false)
{
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValuePad.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValuePad.cs
index 7751d5e2309..9633f4da49b 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValuePad.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValuePad.cs
@@ -34,7 +34,6 @@
using MonoDevelop.Core;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Components;
-using Foundation;
namespace MonoDevelop.Debugger
{
@@ -44,9 +43,9 @@ public class ObjectValuePad : PadContent
protected ObjectValueTreeViewController controller;
protected ObjectValueTreeView tree;
- // this is for the new treeview
+#if DD_Mac_TODO// this is for the new treeview
protected MacObjectValueTreeView _treeview;
-
+#endif
readonly Control control;
PadFontChanger fontChanger;
StackFrame lastFrame;
@@ -67,7 +66,7 @@ public ObjectValuePad (bool allowWatchExpressions = false)
if (UseNewTreeView) {
controller = new ObjectValueTreeViewController (allowWatchExpressions);
controller.AllowEditing = true;
-
+#if DD_Mac_TODO
if (Platform.IsMac) {
LoggingService.LogInfo ("Using MacObjectValueTreeView for {0}", allowWatchExpressions ? "Watch Pad" : "Locals Pad");
var treeView = controller.GetMacControl (ObjectValueTreeViewFlags.ObjectValuePadFlags);
@@ -101,7 +100,10 @@ public ObjectValuePad (bool allowWatchExpressions = false)
host.ShowAll ();
control = host;
- } else {
+ }
+ else
+#endif
+ {
LoggingService.LogInfo ("Using GtkObjectValueTreeView for {0}", allowWatchExpressions ? "Watch Pad" : "Locals Pad");
var treeView = controller.GetGtkControl (ObjectValueTreeViewFlags.ObjectValuePadFlags);
treeView.Show ();
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/WatchPad.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/WatchPad.cs
index 37df2d4af9e..b6ccc6b0e69 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/WatchPad.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/WatchPad.cs
@@ -89,7 +89,9 @@ void RestoreExpressions ()
controller.ExpressionAdded -= OnExpressionAdded;
try {
+#if DD_Mac_TODO
_treeview.BeginUpdates ();
+#endif
try {
// remove the expressions because we're going to rebuild them
controller.ClearAll ();
@@ -97,7 +99,9 @@ void RestoreExpressions ()
// re-add the expressions which will reevaluate the expressions and repopulate the treeview
controller.AddExpressions (expressions);
} finally {
+#if DD_Mac_TODO
_treeview.EndUpdates ();
+#endif
}
} finally {
controller.ExpressionAdded += OnExpressionAdded;
@@ -164,7 +168,7 @@ public override void Dispose ()
base.Dispose ();
}
- #region IMementoCapable implementation
+ #region IMementoCapable implementation
public ICustomXmlSerializer Memento {
get {
@@ -182,7 +186,7 @@ public ICustomXmlSerializer Memento {
}
}
}
-
+
void ICustomXmlSerializer.WriteTo (XmlWriter writer)
{
if (UseNewTreeView) {
@@ -201,11 +205,11 @@ void ICustomXmlSerializer.WriteTo (XmlWriter writer)
}
}
}
-
+
ICustomXmlSerializer ICustomXmlSerializer.ReadFrom (XmlReader reader)
{
expressions.Clear ();
-
+
reader.MoveToContent ();
if (reader.IsEmptyElement) {
reader.Read ();
@@ -223,7 +227,7 @@ ICustomXmlSerializer ICustomXmlSerializer.ReadFrom (XmlReader reader)
reader.ReadEndElement ();
return null;
}
-
- #endregion
+
+ #endregion
}
}
diff --git a/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Mac.csproj b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Mac.csproj
new file mode 100644
index 00000000000..45989912d13
--- /dev/null
+++ b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Mac.csproj
@@ -0,0 +1,95 @@
+
+
+
+
+
+ Debug
+ AnyCPU
+ {364e4fee-0f78-4aec-a170-bb6ac93e8f9a}
+ $(MDFrameworkVersion)
+ ..\..\..\build\AddIns\MonoDevelop.DesignerSupport
+
+
+
+
+
+
+
+ ..\..\..\external\Xamarin.Mac.dll
+ False
+
+
+ {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}
+ Xwt.XamMac
+ False
+
+
+ {E8F4F0EB-C2B1-4116-8459-E076E0E0E485}
+ Xamarin.PropertyEditing.Mac
+
+
+ {A0B6FE73-D046-4E1C-BA9D-F20683889C5A}
+ Xamarin.PropertyEditing
+
+
+
+
+ {2C24D515-4A2C-445C-8419-C09231913CFA}
+ MonoDevelop.DesignerSupport
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {7525BB88-6142-4A26-93B9-A30C6983390A}
+ MonoDevelop.Core
+ False
+
+
+ {27096E7F-C91C-4AC6-B289-6897A701DF21}
+ MonoDevelop.Ide
+ False
+
+
+ {91DD5A2D-9FE3-4C3C-9253-876141874DAD}
+ Mono.Addins
+ False
+
+
+ {92494904-35FA-4DC9-BDE9-3A3E87AC49D3}
+ Xwt
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolbox.cs b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/MacToolbox.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolbox.cs
rename to main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/MacToolbox.cs
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxViewItems.cs b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/MacToolboxViewItems.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxViewItems.cs
rename to main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/MacToolboxViewItems.cs
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidget.cs b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidget.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidget.cs
rename to main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidget.cs
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidgetDataSource.cs b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidgetDataSource.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidgetDataSource.cs
rename to main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidgetDataSource.cs
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidgetFlowLayoutDelegate.cs b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidgetFlowLayoutDelegate.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidgetFlowLayoutDelegate.cs
rename to main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/MacToolboxWidgetFlowLayoutDelegate.cs
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/NativeViews/ClickedButton.cs b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/NativeViews/ClickedButton.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/NativeViews/ClickedButton.cs
rename to main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/NativeViews/ClickedButton.cs
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/NativeViews/SearchTextField.cs b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/NativeViews/SearchTextField.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/NativeViews/SearchTextField.cs
rename to main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/NativeViews/SearchTextField.cs
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/NativeViews/ToggleButton.cs b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/NativeViews/ToggleButton.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.Toolbox/NativeViews/ToggleButton.cs
rename to main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport.Toolbox/NativeViews/ToggleButton.cs
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/MacPropertyGrid.cs b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport/MacPropertyGrid.cs
similarity index 100%
rename from main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/MacPropertyGrid.cs
rename to main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport/MacPropertyGrid.cs
diff --git a/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport/PropertyMacHostWidget.cs b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport/PropertyMacHostWidget.cs
new file mode 100644
index 00000000000..170bc799b70
--- /dev/null
+++ b/main/src/addins/MonoDevelop.DesignerSupport.Mac/MonoDevelop.DesignerSupport/PropertyMacHostWidget.cs
@@ -0,0 +1,120 @@
+//
+// PropertyPad.cs: The pad that holds the MD property grid. Can also
+// hold custom grid widgets.
+//
+// Authors:
+// Michael Hutchinson
+//
+// Copyright (C) 2006 Michael Hutchinson
+//
+//
+// This source code is licenced under The MIT License:
+//
+// 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 Gtk;
+
+namespace MonoDevelop.DesignerSupport
+{
+ class PropertyMacHostWidget : IPropertyGrid
+ {
+ public event EventHandler PropertyGridChanged;
+
+ readonly GtkNSViewHost host;
+
+ MacPropertyGrid view;
+
+ public string Name { get; set; }
+ public bool ShowHelp { get; set; } //not implemented
+
+ public ShadowType ShadowType { get; set; } //not implemented
+ public Widget Widget => host;
+
+ public bool IsGridEditing => view.IsEditing;
+
+ public bool ShowToolbar {
+ get => view.ToolbarVisible;
+ set => view.ToolbarVisible = value;
+ }
+
+ public bool Sensitive {
+ get => view.Sensitive;
+ set => view.Sensitive = value;
+ }
+
+ public object CurrentObject {
+ get => view.CurrentObject;
+ set {
+ view.SetCurrentObject (value, new object [] { value });
+ }
+ }
+
+ public PropertyMacHostWidget ()
+ {
+ view = new MacPropertyGrid ();
+ host = new GtkNSViewHost (view);
+
+ view.PropertyGridChanged += View_PropertyGridChanged;
+ }
+
+ void View_PropertyGridChanged (object sender, EventArgs e)
+ => PropertyGridChanged?.Invoke (this, e);
+
+ public void SetCurrentObject (object obj, object [] propertyProviders)
+ => view.SetCurrentObject (obj, propertyProviders);
+
+ public void BlankPad () => view.BlankPad ();
+ public void Hide () => view.Hidden = true;
+ public void Show () => view.Hidden = false;
+
+ public void OnPadContentShown ()
+ {
+ //not implemented;
+ }
+
+ public void PopulateGrid (bool saveEditSession)
+ {
+ //view.SetCurrentObject (obj, propertyProviders);
+ }
+
+ public void SetToolbarProvider (object toolbarProvider)
+ {
+ //not implemented;
+ }
+
+ public void CommitPendingChanges ()
+ {
+ //not implemented;
+ }
+
+ public void Dispose ()
+ {
+ if (view != null) {
+ view.PropertyGridChanged -= View_PropertyGridChanged;
+ view.Dispose ();
+ view = null;
+ }
+ }
+ }
+
+}
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.csproj b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.csproj
index 14d0c8f1e65..b89174a85de 100644
--- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.csproj
+++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.csproj
@@ -13,25 +13,13 @@
+
+
-
- ..\..\..\external\Xamarin.Mac.dll
- False
-
-
- {B7C1673E-5124-4BE5-8D21-EC8B12F85B6B}
- Xwt.XamMac
- False
-
-
- {E8F4F0EB-C2B1-4116-8459-E076E0E0E485}
- Xamarin.PropertyEditing.Mac
-
{A0B6FE73-D046-4E1C-BA9D-F20683889C5A}
Xamarin.PropertyEditing
-
@@ -71,10 +59,10 @@
-
+
@@ -125,16 +113,8 @@
-
-
-
-
-
-
-
-
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/PropertyPad.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/PropertyPad.cs
index 50b396aa633..3d8560b3966 100644
--- a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/PropertyPad.cs
+++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/PropertyPad.cs
@@ -1,5 +1,5 @@
//
-// PropertyPad.cs: The pad that holds the MD property grid. Can also
+// PropertyPad.cs: The pad that holds the MD property grid. Can also
// hold custom grid widgets.
//
// Authors:
@@ -17,10 +17,10 @@
// 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
@@ -44,86 +44,6 @@
namespace MonoDevelop.DesignerSupport
{
- class PropertyMacHostWidget : IPropertyGrid
- {
- public event EventHandler PropertyGridChanged;
-
- readonly GtkNSViewHost host;
-
- MacPropertyGrid view;
-
- public string Name { get; set; }
- public bool ShowHelp { get; set; } //not implemented
-
- public ShadowType ShadowType { get; set; } //not implemented
- public Widget Widget => host;
-
- public bool IsGridEditing => view.IsEditing;
-
- public bool ShowToolbar {
- get => view.ToolbarVisible;
- set => view.ToolbarVisible = value;
- }
-
- public bool Sensitive {
- get => view.Sensitive;
- set => view.Sensitive = value;
- }
-
- public object CurrentObject {
- get => view.CurrentObject;
- set {
- view.SetCurrentObject (value, new object [] { value });
- }
- }
-
- public PropertyMacHostWidget ()
- {
- view = new MacPropertyGrid ();
- host = new GtkNSViewHost (view);
-
- view.PropertyGridChanged += View_PropertyGridChanged;
- }
-
- void View_PropertyGridChanged (object sender, EventArgs e)
- => PropertyGridChanged?.Invoke (this, e);
-
- public void SetCurrentObject (object obj, object [] propertyProviders)
- => view.SetCurrentObject (obj, propertyProviders);
-
- public void BlankPad () => view.BlankPad ();
- public void Hide () => view.Hidden = true;
- public void Show () => view.Hidden = false;
-
- public void OnPadContentShown ()
- {
- //not implemented;
- }
-
- public void PopulateGrid (bool saveEditSession)
- {
- //view.SetCurrentObject (obj, propertyProviders);
- }
-
- public void SetToolbarProvider (object toolbarProvider)
- {
- //not implemented;
- }
-
- public void CommitPendingChanges ()
- {
- //not implemented;
- }
-
- public void Dispose ()
- {
- if (view != null) {
- view.PropertyGridChanged -= View_PropertyGridChanged;
- view.Dispose ();
- view = null;
- }
- }
- }
public interface IPropertyGrid : IPropertyPad
{
@@ -188,7 +108,7 @@ public PropertyGridWrapper ()
#if MAC
nativeWidget = new PropertyMacHostWidget ();
#else
- nativeWidget = new pg.PropertyGrid ();
+ nativeWidget = new PropertyXwtHostWidget ();
#endif
nativeWidget.PropertyGridChanged += NativeWidget_PropertyGridChanged;
}
@@ -231,6 +151,9 @@ public void CommitPendingChanges () =>
nativeWidget.CommitPendingChanges ();
}
+ ///
+ /// The pad that holds the MD property grid. Can also hold custom grid widgets.
+ ///
public class PropertyPad : PadContent, ICommandDelegator, IPropertyPad
{
public event EventHandler PropertyGridChanged;
@@ -278,17 +201,17 @@ protected override void Initialize (IPadWindow container)
this.container = container;
DesignerSupport.Service.SetPad (this);
}
-
+
internal IPadWindow PadWindow {
get { return container; }
}
-
+
#region AbstractPadContent implementations
-
+
public override Control Control {
get { return frame; }
}
-
+
public override void Dispose()
{
#if MAC
@@ -297,13 +220,13 @@ public override void Dispose()
container.PadContentHidden -= Window_PadContentHidden;
}
#endif
-
+
propertyGridWrapper.PropertyGridChanged -= Grid_Changed;
propertyGridWrapper.Dispose ();
DesignerSupport.Service.SetPad (null);
base.Dispose ();
}
-
+
#endregion
#region ICommandDelegatorRouter implementation
@@ -395,7 +318,7 @@ internal void UseCustomWidget (Gtk.Widget widget)
widget.Visible = container.ContentVisible;
}
}
-
+
void ClearToolbar ()
{
if (container != null) {
@@ -422,11 +345,11 @@ class DockToolbarProvider: pg.PropertyGrid.IToolbarProvider
DockItemToolbar tb;
List buttons = new List ();
bool visible = true;
-
+
public DockToolbarProvider ()
{
}
-
+
public void Attach (DockItemToolbar tb)
{
if (this.tb == tb)
@@ -440,20 +363,20 @@ public void Attach (DockItemToolbar tb)
tb.Add (b);
}
}
-
+
#region IToolbarProvider implementation
public void Insert (Gtk.Widget w, int pos)
{
if (tb != null)
tb.Insert (w, pos);
-
+
if (pos == -1)
buttons.Add (w);
else
buttons.Insert (pos, w);
}
-
-
+
+
public void ShowAll ()
{
if (tb != null)
@@ -463,15 +386,15 @@ public void ShowAll ()
b.Show ();
}
}
-
-
+
+
public Gtk.Widget[] Children {
get {
return buttons.ToArray ();
}
}
-
-
+
+
public bool Visible {
get {
return visible;
@@ -482,7 +405,7 @@ public bool Visible {
tb.Visible = value;
}
}
-
+
#endregion
}
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/PropertyXwtHostWidget.cs b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/PropertyXwtHostWidget.cs
new file mode 100644
index 00000000000..c264492f39c
--- /dev/null
+++ b/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/PropertyXwtHostWidget.cs
@@ -0,0 +1,110 @@
+// Authors:
+// Michael Hutchinson
+// Lytico (http://www.limada.org)
+//
+// Copyright (C) 2006 Michael Hutchinson
+//
+//
+// This source code is licenced under The MIT License:
+//
+// 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 Gtk;
+
+namespace MonoDevelop.DesignerSupport
+{
+
+ class PropertyXwtHostWidget : IPropertyGrid
+ {
+ public event EventHandler PropertyGridChanged;
+
+ Components.PropertyGrid.PropertyGrid view;
+
+ public string Name { get; set; }
+
+ public bool ShowHelp {
+ get => view.ShowHelp;
+ set => view.ShowHelp = value;
+ }
+
+ public ShadowType ShadowType {
+ get => view.ShadowType;
+ set => view.ShadowType = value;
+ }
+
+ public Widget Widget => view;
+
+ public bool IsGridEditing => view.IsEditing;
+
+ public bool ShowToolbar {
+ get => view.ShowToolbar;
+ set => view.ShowToolbar = value;
+ }
+
+ public bool Sensitive {
+ get => view.Sensitive;
+ set => view.Sensitive = value;
+ }
+
+ public object CurrentObject {
+ get => view.CurrentObject;
+ set { view.SetCurrentObject (value, new object[] {value}); }
+ }
+
+ public PropertyXwtHostWidget ()
+ {
+ view = new Components.PropertyGrid.PropertyGrid ();
+ view.Changed += View_PropertyGridChanged;
+ }
+
+ void View_PropertyGridChanged (object sender, EventArgs e)
+ => PropertyGridChanged?.Invoke (this, e);
+
+ public void SetCurrentObject (object obj, object[] propertyProviders)
+ => view.SetCurrentObject (obj, propertyProviders);
+
+ public void BlankPad () => view.BlankPad ();
+ public void Hide () => view.Hide ();
+ public void Show () => view.Show ();
+
+ public void OnPadContentShown () => view.OnPadContentShown ();
+
+ public void PopulateGrid (bool saveEditSession) => view.Populate (saveEditSession);
+
+ public void SetToolbarProvider (object toolbarProvider)
+ {
+ if (toolbarProvider is MonoDevelop.Components.PropertyGrid.PropertyGrid.IToolbarProvider tbP)
+ view.SetToolbarProvider (tbP);
+ }
+
+ public void CommitPendingChanges () => view.CommitPendingChanges ();
+
+ public void Dispose ()
+ {
+ if (view == null) return;
+ view.Changed -= View_PropertyGridChanged;
+ view.Dispose ();
+ view = null;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/main/src/addins/MonoDevelop.DesignerSupport/gtk-gui/MonoDevelop.DesignerSupport.Toolbox.ComponentSelectorDialog.cs b/main/src/addins/MonoDevelop.DesignerSupport/gtk-gui/MonoDevelop.DesignerSupport.Toolbox.ComponentSelectorDialog.cs
index 2aa30754454..57beb8d1d79 100644
--- a/main/src/addins/MonoDevelop.DesignerSupport/gtk-gui/MonoDevelop.DesignerSupport.Toolbox.ComponentSelectorDialog.cs
+++ b/main/src/addins/MonoDevelop.DesignerSupport/gtk-gui/MonoDevelop.DesignerSupport.Toolbox.ComponentSelectorDialog.cs
@@ -1,188 +1,178 @@
-
// This file has been generated by the GUI designer. Do not modify.
+
+using Gtk;
+using Mono.Unix;
+using MonoDevelop.Components;
+using Gui = Stetic.Gui;
+
namespace MonoDevelop.DesignerSupport.Toolbox
{
+
internal partial class ComponentSelectorDialog
{
- private global::Gtk.VBox vbox2;
-
- private global::Gtk.HBox hbox1;
-
- private global::Gtk.Label label1;
-
- private global::Gtk.ComboBox comboType;
-
- private global::Gtk.VSeparator vseparator1;
-
- private global::Gtk.Button button24;
-
- private global::Gtk.HBox hbox2;
-
- private global::MonoDevelop.Components.ImageView imageview1;
-
- private global::Gtk.Label label2;
-
- private global::Gtk.ScrolledWindow scrolledwindow1;
-
- private global::Gtk.TreeView listView;
-
- private global::Gtk.CheckButton checkGroupByCat;
-
- private global::Gtk.Button buttonCancel;
-
- private global::Gtk.Button buttonOk;
+ private VBox vbox2;
+
+ private HBox hbox1;
+
+ private Label label1;
+
+ private ComboBox comboType;
+
+ private VSeparator vseparator1;
+
+ private Button button24;
+
+ private HBox hbox2;
+
+ private ImageView imageview1;
+
+ private Label label2;
+
+ private ScrolledWindow scrolledwindow1;
+
+ private TreeView listView;
+
+ private CheckButton checkGroupByCat;
+
+ private Button buttonCancel;
+
+ private Button buttonOk;
protected virtual void Build ()
{
- global::Stetic.Gui.Initialize (this);
+ Gui.Initialize (this);
// Widget MonoDevelop.DesignerSupport.Toolbox.ComponentSelectorDialog
- this.Name = "MonoDevelop.DesignerSupport.Toolbox.ComponentSelectorDialog";
- this.Title = global::Mono.Unix.Catalog.GetString ("Toolbox Item Selector");
- this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+ Name = "MonoDevelop.DesignerSupport.Toolbox.ComponentSelectorDialog";
+ Title = Catalog.GetString ("Toolbox Item Selector");
+ WindowPosition = WindowPosition.CenterOnParent;
// Internal child MonoDevelop.DesignerSupport.Toolbox.ComponentSelectorDialog.VBox
- global::Gtk.VBox w1 = this.VBox;
+ var w1 = VBox;
w1.Name = "dialog1_VBox";
- w1.BorderWidth = ((uint)(2));
+ w1.BorderWidth = 2;
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.vbox2 = new global::Gtk.VBox ();
- this.vbox2.Name = "vbox2";
- this.vbox2.Spacing = 6;
- this.vbox2.BorderWidth = ((uint)(6));
+ vbox2 = new VBox {Name = "vbox2", Spacing = 6, BorderWidth = 6};
// Container child vbox2.Gtk.Box+BoxChild
- this.hbox1 = new global::Gtk.HBox ();
- this.hbox1.Name = "hbox1";
- this.hbox1.Spacing = 6;
+ hbox1 = new HBox {Name = "hbox1", Spacing = 6};
// Container child hbox1.Gtk.Box+BoxChild
- this.label1 = new global::Gtk.Label ();
- this.label1.Name = "label1";
- this.label1.Xalign = 0F;
- this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("Type of component:");
- this.hbox1.Add (this.label1);
- global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label1]));
+ label1 = new Label {Name = "label1", Xalign = 0F, LabelProp = Catalog.GetString ("Type of component:")};
+ hbox1.Add (label1);
+ var w2 = (Box.BoxChild) hbox1[label1];
w2.Position = 0;
w2.Expand = false;
w2.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
- this.comboType = global::Gtk.ComboBox.NewText ();
- this.comboType.Name = "comboType";
- this.hbox1.Add (this.comboType);
- global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.comboType]));
+ comboType = ComboBox.NewText ();
+ comboType.Name = "comboType";
+ hbox1.Add (comboType);
+ var w3 = (Box.BoxChild) hbox1[comboType];
w3.Position = 1;
// Container child hbox1.Gtk.Box+BoxChild
- this.vseparator1 = new global::Gtk.VSeparator ();
- this.vseparator1.Name = "vseparator1";
- this.hbox1.Add (this.vseparator1);
- global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vseparator1]));
+ vseparator1 = new VSeparator {Name = "vseparator1"};
+ hbox1.Add (vseparator1);
+ var w4 = (Box.BoxChild) hbox1[vseparator1];
w4.Position = 2;
w4.Expand = false;
w4.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
- this.button24 = new global::Gtk.Button ();
- this.button24.CanFocus = true;
- this.button24.Name = "button24";
+ button24 = new Button {CanFocus = true, Name = "button24"};
// Container child button24.Gtk.Container+ContainerChild
- this.hbox2 = new global::Gtk.HBox ();
- this.hbox2.Name = "hbox2";
- this.hbox2.Spacing = 2;
+ hbox2 = new HBox {Name = "hbox2", Spacing = 2};
// Container child hbox2.Gtk.Box+BoxChild
- this.imageview1 = new global::MonoDevelop.Components.ImageView ();
- this.imageview1.Name = "imageview1";
- this.imageview1.IconId = "gtk-add";
- this.imageview1.IconSize = ((global::Gtk.IconSize)(1));
- this.hbox2.Add (this.imageview1);
- global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.imageview1]));
+ imageview1 = new ImageView {Name = "imageview1", IconId = "gtk-add", IconSize = IconSize.Menu};
+ hbox2.Add (imageview1);
+ var w5 = (Box.BoxChild) hbox2[imageview1];
w5.Position = 0;
w5.Expand = false;
w5.Fill = false;
// Container child hbox2.Gtk.Box+BoxChild
- this.label2 = new global::Gtk.Label ();
- this.label2.Name = "label2";
- this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("Add Assembly...");
- this.label2.UseUnderline = true;
- this.hbox2.Add (this.label2);
- global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label2]));
+ label2 = new Label {
+ Name = "label2", LabelProp = Catalog.GetString ("Add Assembly..."), UseUnderline = true
+ };
+ hbox2.Add (label2);
+ var w6 = (Box.BoxChild) hbox2[label2];
w6.Position = 1;
w6.Expand = false;
w6.Fill = false;
- this.button24.Add (this.hbox2);
- this.hbox1.Add (this.button24);
- global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button24]));
+ button24.Add (hbox2);
+ hbox1.Add (button24);
+ var w8 = (Box.BoxChild) hbox1[button24];
w8.Position = 3;
w8.Expand = false;
- this.vbox2.Add (this.hbox1);
- global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
+ vbox2.Add (hbox1);
+ var w9 = (Box.BoxChild) vbox2[hbox1];
w9.Position = 0;
w9.Expand = false;
w9.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
- this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
- this.scrolledwindow1.CanFocus = true;
- this.scrolledwindow1.Name = "scrolledwindow1";
- this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1));
+ scrolledwindow1 =
+ new ScrolledWindow {CanFocus = true, Name = "scrolledwindow1", ShadowType = ShadowType.In};
// Container child scrolledwindow1.Gtk.Container+ContainerChild
- this.listView = new global::Gtk.TreeView ();
- this.listView.CanFocus = true;
- this.listView.Name = "listView";
- this.scrolledwindow1.Add (this.listView);
- this.vbox2.Add (this.scrolledwindow1);
- global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.scrolledwindow1]));
+ listView = new TreeView {CanFocus = true, Name = "listView"};
+ scrolledwindow1.Add (listView);
+ vbox2.Add (scrolledwindow1);
+ var w11 = (Box.BoxChild) vbox2[scrolledwindow1];
w11.Position = 1;
// Container child vbox2.Gtk.Box+BoxChild
- this.checkGroupByCat = new global::Gtk.CheckButton ();
- this.checkGroupByCat.CanFocus = true;
- this.checkGroupByCat.Name = "checkGroupByCat";
- this.checkGroupByCat.Label = global::Mono.Unix.Catalog.GetString ("Group by component category");
- this.checkGroupByCat.DrawIndicator = true;
- this.checkGroupByCat.UseUnderline = true;
- this.vbox2.Add (this.checkGroupByCat);
- global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.checkGroupByCat]));
+ checkGroupByCat = new CheckButton {
+ CanFocus = true,
+ Name = "checkGroupByCat",
+ Label = Catalog.GetString ("Group by component category"),
+ DrawIndicator = true,
+ UseUnderline = true
+ };
+ vbox2.Add (checkGroupByCat);
+ var w12 = (Box.BoxChild) vbox2[checkGroupByCat];
w12.Position = 2;
w12.Expand = false;
w12.Fill = false;
- w1.Add (this.vbox2);
- global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox2]));
+ w1.Add (vbox2);
+ var w13 = (Box.BoxChild) w1[vbox2];
w13.Position = 0;
// Internal child MonoDevelop.DesignerSupport.Toolbox.ComponentSelectorDialog.ActionArea
- global::Gtk.HButtonBox w14 = this.ActionArea;
+ var w14 = ActionArea;
w14.Name = "dialog1_ActionArea";
w14.Spacing = 10;
- w14.BorderWidth = ((uint)(5));
- w14.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+ w14.BorderWidth = 5;
+ w14.LayoutStyle = ButtonBoxStyle.End;
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
- this.buttonCancel = new global::Gtk.Button ();
- this.buttonCancel.CanDefault = true;
- this.buttonCancel.CanFocus = true;
- this.buttonCancel.Name = "buttonCancel";
- this.buttonCancel.UseStock = true;
- this.buttonCancel.UseUnderline = true;
- this.buttonCancel.Label = "gtk-cancel";
- this.AddActionWidget (this.buttonCancel, -6);
- global::Gtk.ButtonBox.ButtonBoxChild w15 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w14 [this.buttonCancel]));
+ buttonCancel = new Button {
+ CanDefault = true,
+ CanFocus = true,
+ Name = "buttonCancel",
+ UseStock = true,
+ UseUnderline = true,
+ Label = "gtk-cancel"
+ };
+ AddActionWidget (buttonCancel, -6);
+ var w15 = (ButtonBox.ButtonBoxChild) w14[buttonCancel];
w15.Expand = false;
w15.Fill = false;
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
- this.buttonOk = new global::Gtk.Button ();
- this.buttonOk.CanDefault = true;
- this.buttonOk.CanFocus = true;
- this.buttonOk.Name = "buttonOk";
- this.buttonOk.UseStock = true;
- this.buttonOk.UseUnderline = true;
- this.buttonOk.Label = "gtk-ok";
- w14.Add (this.buttonOk);
- global::Gtk.ButtonBox.ButtonBoxChild w16 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w14 [this.buttonOk]));
+ buttonOk = new Button {
+ CanDefault = true,
+ CanFocus = true,
+ Name = "buttonOk",
+ UseStock = true,
+ UseUnderline = true,
+ Label = "gtk-ok"
+ };
+ w14.Add (buttonOk);
+ var w16 = (ButtonBox.ButtonBoxChild) w14[buttonOk];
w16.Position = 1;
w16.Expand = false;
w16.Fill = false;
- if ((this.Child != null)) {
- this.Child.ShowAll ();
+ if (Child != null) {
+ Child.ShowAll ();
}
- this.DefaultWidth = 642;
- this.DefaultHeight = 433;
- this.Hide ();
- this.comboType.Changed += new global::System.EventHandler (this.OnComboTypeChanged);
- this.button24.Clicked += new global::System.EventHandler (this.OnButton24Clicked);
- this.checkGroupByCat.Clicked += new global::System.EventHandler (this.OnCheckbutton1Clicked);
- this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
+
+ DefaultWidth = 642;
+ DefaultHeight = 433;
+ Hide ();
+ comboType.Changed += OnComboTypeChanged;
+ button24.Clicked += OnButton24Clicked;
+ checkGroupByCat.Clicked += OnCheckbutton1Clicked;
+ buttonOk.Clicked += OnButtonOkClicked;
}
}
-}
+
+}
\ No newline at end of file
diff --git a/main/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocGenerator.cs b/main/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocGenerator.cs
index 88d441805dc..97c99760b48 100644
--- a/main/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocGenerator.cs
+++ b/main/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocGenerator.cs
@@ -1,4 +1,4 @@
-//
+//
// DocGenerator.cs
//
// Author:
@@ -403,7 +403,7 @@ public void GenerateDoc (ISymbol member)
void Init (ISymbol member)
{
if (member == null)
- throw new ArgumentNullException ("member");
+ throw new ArgumentNullException (nameof(member));
FillDocumentation (GetBaseDocumentation (member));
// if (provider != null && !member.Location.IsEmpty && member.BodyRegion.EndLine > 1) {
// LineSegment start = data.Document.GetLine (member.Region.BeginLine);
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Templating/DotNetCoreProjectTemplateStringTagProvider.cs b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Templating/DotNetCoreProjectTemplateStringTagProvider.cs
index 714b698f000..4816c39be27 100644
--- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Templating/DotNetCoreProjectTemplateStringTagProvider.cs
+++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Templating/DotNetCoreProjectTemplateStringTagProvider.cs
@@ -38,7 +38,7 @@ namespace MonoDevelop.DotNetCore.Templating
[Extension]
class DotNetCoreProjectTemplateStringTagProvider : IStringTagProvider
{
- readonly string [] SupportedSDK = { "2.1", "2.2", "3.0", "3.1" };
+ readonly string [] SupportedSDK = { "2.1", "2.2", "3.0", "3.1", "5.0", "6.0" };
public IEnumerable GetTags (Type type)
{
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Templating/DotNetCoreProjectTemplateWizard.cs b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Templating/DotNetCoreProjectTemplateWizard.cs
index 18674cffe0a..e12599a1cdb 100644
--- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Templating/DotNetCoreProjectTemplateWizard.cs
+++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Templating/DotNetCoreProjectTemplateWizard.cs
@@ -33,6 +33,8 @@ namespace MonoDevelop.DotNetCore.Templating
{
class DotNetCoreProjectTemplateWizard : TemplateWizard
{
+ const string defaultParameterNetCore60 = "UseNetCore60";
+ const string defaultParameterNetCore50 = "UseNetCore50";
const string defaultParameterNetCore30 = "UseNetCore30";
const string defaultParameterNetCore20 = "UseNetCore20";
const string defaultParameterNetCore1x = "UseNetCore1x";
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.csproj b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.csproj
index 188533311a4..b1518171d39 100644
--- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.csproj
+++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.csproj
@@ -7,7 +7,7 @@
{6868153E-41EA-43A4-A81A-C1E7256373F7}
$(MDFrameworkVersion)
..\..\..\build\AddIns\MonoDevelop.DotNetCore
- 1.0.0-beta2-20170430-208
+ 1.0.0-beta2-20170629-269
1.0.0-beta2-20170727-301
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreProjectSupportedTargetFrameworks.cs b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreProjectSupportedTargetFrameworks.cs
index e498d03d2b0..29896551502 100644
--- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreProjectSupportedTargetFrameworks.cs
+++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreProjectSupportedTargetFrameworks.cs
@@ -64,7 +64,7 @@ public IEnumerable GetFrameworks ()
"2.1", "2.0", "1.6", "1.5", "1.4", "1.3", "1.2", "1.1", "1.0"
};
static string [] supportedNetCoreAppVersions = {
- "3.1", "3.0", "2.2", "2.1", "2.0", "1.1", "1.0"
+ "6.0", "5.0", "3.1", "3.0", "2.2", "2.1", "2.0", "1.1", "1.0"
};
public IEnumerable GetKnownFrameworks ()
@@ -96,7 +96,7 @@ static IEnumerable GetKnownNetCoreAppFrameworks ()
public static IEnumerable GetNetStandardTargetFrameworks ()
{
- if (DotNetCoreRuntime.IsNetCore30Installed () || MonoRuntimeInfoExtensions.CurrentRuntimeVersion.SupportsNetStandard21 ())
+ if (DotNetCoreRuntime.IsNetCore3xOrHigherInstalled () || MonoRuntimeInfoExtensions.CurrentRuntimeVersion.SupportsNetStandard21 ())
yield return CreateTargetFramework (".NETStandard", "2.1");
if (DotNetCoreRuntime.IsNetCore2xInstalled () || MonoRuntimeInfoExtensions.CurrentRuntimeVersion.SupportsNetStandard20 ())
@@ -133,7 +133,9 @@ public static IEnumerable GetNetCoreAppTargetFrameworks ()
public static IEnumerable GetNetCoreAppTargetFrameworksWithSdkSupport ()
{
- foreach (var runtimeVersion in GetMajorRuntimeVersions ()) {
+ // explicitly evaluate runtimes list for help during debugging
+ var runtimes = GetMajorRuntimeVersions ();
+ foreach (var runtimeVersion in runtimes) {
// In DotNetCore version 2.1 and above the Runtime always ships in an Sdk with the same Major.Minor version. For older versions, this
// rule does not apply, but as these versions have been deprecated we will not worry about explicit filtering support here as this
// may cause regressions.
@@ -155,8 +157,10 @@ static IEnumerable GetMajorRuntimeVersions ()
static TargetFramework CreateTargetFramework (string identifier, string version)
{
+ // evaluate moniker explicitly to help with debugging
var moniker = new TargetFrameworkMoniker (identifier, version);
- return Runtime.SystemAssemblyService.GetTargetFramework (moniker);
+ var targetFramework = Runtime.SystemAssemblyService.GetTargetFramework (moniker);
+ return targetFramework;
}
IEnumerable GetNetFrameworkTargetFrameworks ()
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreRuntime.cs b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreRuntime.cs
index a8ff897af09..b7e24b927d5 100644
--- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreRuntime.cs
+++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreRuntime.cs
@@ -25,7 +25,7 @@
// THE SOFTWARE.
using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
using MonoDevelop.Core;
@@ -124,6 +124,10 @@ internal static bool IsNetCore30Installed ()
return Versions.Any (version => version.Major == 3 && version.Minor == 0);
}
+ internal static bool IsNetCore3xOrHigherInstalled ()
+ {
+ return Versions.Any (version => version.Major >= 3);
+ }
///
/// Used by unit tests to fake having different .NET Core sdks installed.
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreSdk.cs b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreSdk.cs
index 63dc50df570..2c65d6ed3b2 100644
--- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreSdk.cs
+++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreSdk.cs
@@ -36,7 +36,7 @@ namespace MonoDevelop.DotNetCore
public static class DotNetCoreSdk
{
static readonly Version DotNetCoreVersion2_1 = new Version (2, 1, 0);
- internal static readonly DotNetCoreVersion DotNetCoreUnsupportedTargetFrameworkVersion = new DotNetCoreVersion (3, 2, 0);
+ internal static readonly DotNetCoreVersion DotNetCoreUnsupportedTargetFrameworkVersion = new DotNetCoreVersion (6, 1, 0);
static DotNetCoreSdk ()
{
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreVersion.cs b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreVersion.cs
index 5cb247939ce..d65de6eef6b 100644
--- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreVersion.cs
+++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreVersion.cs
@@ -34,12 +34,14 @@ namespace MonoDevelop.DotNetCore
{
class DotNetCoreVersion : IEquatable, IComparable, IComparable
{
- internal static readonly DotNetCoreVersion MinimumSupportedSdkVersion = new DotNetCoreVersion (2, 1, 602);
+ internal static readonly DotNetCoreVersion MinimumSupportedSdkVersion = new DotNetCoreVersion (2, 1, 30);
internal static readonly DotNetCoreVersion MinimumSupportedSdkVersion22 = new DotNetCoreVersion (2, 2, 202);
internal static readonly DotNetCoreVersion MinimumSupportedSdkVersion30 = new DotNetCoreVersion (3, 0, 100) {
ReleaseLabel = "preview3-010431",
IsPrerelease = true
};
+ internal static readonly DotNetCoreVersion MinimumSupportedSdkVersion50 = new DotNetCoreVersion (5, 0, 400);
+ internal static readonly DotNetCoreVersion MinimumSupportedSdkVersion60 = new DotNetCoreVersion (6, 0, 6);
internal DotNetCoreVersion (int major, int minor, int patch)
: this (new Version (major, minor, patch))
@@ -244,6 +246,16 @@ public static bool IsSdkSupported (DotNetCoreVersion version)
return version >= MinimumSupportedSdkVersion30;
}
+ if (version.Major == 5) {
+ return version >= MinimumSupportedSdkVersion50;
+ }
+
+ if (version.Major == 6) {
+ return version >= MinimumSupportedSdkVersion60;
+ }
+
+
+
return false;
}
}
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/MonoRuntimeInfoExtensions.cs b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/MonoRuntimeInfoExtensions.cs
index 2e9a3999082..b97fc2e7dbb 100644
--- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/MonoRuntimeInfoExtensions.cs
+++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/MonoRuntimeInfoExtensions.cs
@@ -32,8 +32,10 @@ namespace MonoDevelop.DotNetCore
static class MonoRuntimeInfoExtensions
{
static readonly Version MonoVersion5_4 = new Version (5, 4, 0);
+ static readonly Version MonoVersion6_4 = new Version (6, 4, 0);
static readonly Version DotNetCore2_1 = new Version (2, 1);
+
internal static Version CurrentRuntimeVersion { get; set; } = MonoRuntimeInfo.FromCurrentRuntime ()?.RuntimeVersion ?? new Version ();
public static bool SupportsNetStandard20 (this Version monoVersion)
@@ -43,8 +45,8 @@ public static bool SupportsNetStandard20 (this Version monoVersion)
public static bool SupportsNetStandard21 (this Version monoVersion)
{
- //FIXME: update this: which Mono version will support .NET Standadrd 2.1
- return false;
+ // ref https://www.mono-project.com/docs/about-mono/releases/6.4.0/
+ return monoVersion >= MonoVersion6_4; ;
}
public static bool SupportsNetCore (this Version monoVersion, string netCoreVersion)
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/TargetFrameworkExtensions.cs b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/TargetFrameworkExtensions.cs
index b647a31ca62..a953efbd90d 100644
--- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/TargetFrameworkExtensions.cs
+++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/TargetFrameworkExtensions.cs
@@ -96,8 +96,15 @@ public static bool IsNetStandardOrHigher (this TargetFramework framework, DotNet
public static string GetDisplayName (this TargetFramework framework)
{
- if (framework.IsNetCoreApp ())
- return string.Format (".NET Core {0}", framework.Id.Version);
+ DotNetCoreVersion.TryParse (framework.Id.Version, out DotNetCoreVersion version);
+ if (framework.IsNetCoreApp ()) {
+ // Display shortened framework names for .net5.0 and above in NewProject dialog
+ if (version.Major >= 5) {
+ return string.Format (".net{0}", framework.Id.Version);
+ } else {
+ return string.Format (".netcoreapp{0}", framework.Id.Version);
+ }
+ }
if (framework.IsNetStandard ())
return string.Format (".NET Standard {0}", framework.Id.Version);
diff --git a/main/src/addins/MonoDevelop.DotNetCore/Properties/MonoDevelop.DotNetCore.addin.xml b/main/src/addins/MonoDevelop.DotNetCore/Properties/MonoDevelop.DotNetCore.addin.xml
index a7b19e978ff..feb072c6c8f 100644
--- a/main/src/addins/MonoDevelop.DotNetCore/Properties/MonoDevelop.DotNetCore.addin.xml
+++ b/main/src/addins/MonoDevelop.DotNetCore/Properties/MonoDevelop.DotNetCore.addin.xml
@@ -260,6 +260,86 @@
category="netcore/app/general"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1621,4 +2195,5 @@
+
diff --git a/main/src/addins/MonoDevelop.GtkCore/libstetic/PropertyEditorCell.cs b/main/src/addins/MonoDevelop.GtkCore/libstetic/PropertyEditorCell.cs
index aab3a1968f6..8614cf486c8 100644
--- a/main/src/addins/MonoDevelop.GtkCore/libstetic/PropertyEditorCell.cs
+++ b/main/src/addins/MonoDevelop.GtkCore/libstetic/PropertyEditorCell.cs
@@ -275,7 +275,7 @@ void OnValueChanged (object s, EventArgs a)
public void AttachObject (object ob)
{
if (ob == null)
- throw new ArgumentNullException ("ob");
+ throw new ArgumentNullException (nameof(ob));
syncing = true;
this.obj = ob;
diff --git a/main/src/addins/MonoDevelop.GtkCore/libsteticui/Application.cs b/main/src/addins/MonoDevelop.GtkCore/libsteticui/Application.cs
index b8ee8d274a6..8250d01dcc4 100644
--- a/main/src/addins/MonoDevelop.GtkCore/libsteticui/Application.cs
+++ b/main/src/addins/MonoDevelop.GtkCore/libsteticui/Application.cs
@@ -556,7 +556,7 @@ internal Component GetComponent (object cbackend, string name, string type)
c = new WidgetComponent (this, cbackend, name, type != null ? GetComponentType (type) : null);
((ObjectWrapper)cbackend).Frontend = c;
} else if (cbackend == null)
- throw new System.ArgumentNullException ("cbackend");
+ throw new System.ArgumentNullException (nameof(cbackend));
else
throw new System.InvalidOperationException ("Invalid component type: " + cbackend.GetType ());
diff --git a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorView.cs b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorView.cs
index f5f29f6b08f..aceda199255 100644
--- a/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorView.cs
+++ b/main/src/addins/MonoDevelop.HexEditor/MonoDevelop.HexEditor/HexEditorView.cs
@@ -1,4 +1,4 @@
-//
+//
// HexEditorView.cs
//
// Author:
@@ -147,7 +147,7 @@ class UndoGroup : IDisposable
public UndoGroup (HexEditorData data)
{
if (data == null)
- throw new ArgumentNullException ("data");
+ throw new ArgumentNullException (nameof(data));
this.data = data;
data.ByteBuffer.BeginAtomicUndo ();
}
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs
index b5b1fac718b..d79b0f6ab53 100644
--- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs
+++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs
@@ -132,9 +132,13 @@ void UpdateTabAccessibility ()
box.Child.Accessible.SetShouldIgnore (true);
}
var tab = child.Accessible;
+#if DD_Mac_TODO
+
tab.SetRole (AtkCocoa.Roles.AXRadioButton);
tab.SetSubRole (AtkCocoa.SubRoles.AXTabButton);
tab.SetValue (false);
+#endif
+
tabs.Add (tab);
}
a11yGroup.Accessible.SetTabs (tabs.ToArray ());
@@ -205,7 +209,7 @@ void InitializeListView ()
packagesListView.DataSource = packageStore;
AddCellViewsToListView ();
-
+
packagesListView.SelectionChanged += PackagesListViewSelectionChanged;
packagesListView.RowActivated += PackagesListRowActivated;
packagesListView.VerticalScrollControl.ValueChanged += PackagesListViewScrollValueChanged;
@@ -440,7 +444,7 @@ void PackageSourceChanged (object sender, EventArgs e)
viewModel.SelectedPackageSource = selectedPackageSource;
}
}
-
+
void PackagesListViewSelectionChanged (object sender, EventArgs e)
{
try {
@@ -1173,7 +1177,9 @@ static void UpdatePackageResultsLabelA11y (Widget label, bool active)
if (label.Surface.ToolkitEngine.Type == ToolkitType.Gtk) {
var widget = label.Surface.NativeWidget as Gtk.Widget;
if (widget != null) {
+#if DD_Mac_TODO
widget.Accessible.SetValue (active);
+#endif
// FIXME: Accessible.SetValue has no effect, so set the role description instead
widget.Accessible.SetRole (AtkCocoa.Roles.AXRadioButton, active ? "selected tab" : "tab");
}
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.Helpers/FakePackageSearchMetadata.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.Helpers/FakePackageSearchMetadata.cs
index dfb9d686077..ecf0c716d5d 100644
--- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.Helpers/FakePackageSearchMetadata.cs
+++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.Helpers/FakePackageSearchMetadata.cs
@@ -58,6 +58,8 @@ public IEnumerable DependencySets {
public Uri ProjectUrl { get; set; }
+ public Uri ReadmeUrl { get; } // Added for release 5.8.0
+
public DateTimeOffset? Published { get; set; }
public Uri ReportAbuseUrl { get; set; }
@@ -87,6 +89,10 @@ public Task GetDeprecationMetadataAsync ()
{
throw new NotImplementedException ();
}
+
+ public IEnumerable Vulnerabilities { get; } // Added for release 5.8.0
+
+
}
}
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.csproj b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.csproj
index 0e2ce50d9eb..6a5ca6062cd 100644
--- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.csproj
+++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Tests/MonoDevelop.PackageManagement.Tests.csproj
@@ -26,10 +26,10 @@
-
-
+
+
-
+
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.csproj b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.csproj
index 0cee2f7ffa7..1cf8c76547c 100644
--- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.csproj
+++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.csproj
@@ -27,9 +27,10 @@
+
-
+
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/DotNetCoreNuGetProject.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/DotNetCoreNuGetProject.cs
index 960a0d69ed8..02a2adcc1ae 100644
--- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/DotNetCoreNuGetProject.cs
+++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/DotNetCoreNuGetProject.cs
@@ -271,6 +271,20 @@ public override async Task> GetPackageSpecsAsync (Dep
return await CreateProjectPackageSpecs (context);
}
+ //
+ // This method was an addition to the abstract class as NuGet.Client changed from release-5.4 to release-5.6/5.8
+ // It is called via MonoDevelopment.PackageManagement/MonoDevelopBuildIntegratedRestorer.cs (RestorePackages)
+ // This stop-gap implementation serves to use the old 'GetPackageSpecsAsync' code from release-5.4 and return
+ // 'null' for the messages, so that the 'GetPackageSpecsAsync' functionality still works in release-5.8
+ //
+ public override async Task<(IReadOnlyList dgSpecs, IReadOnlyList additionalMessages)> GetPackageSpecsAndAdditionalMessagesAsync (DependencyGraphCacheContext context)
+ {
+ IReadOnlyList messages = null; // HACK - ignore messages for now
+ IReadOnlyList specs = await GetPackageSpecsAsync (context);
+
+ return (specs, messages);
+ }
+
async Task> CreateProjectPackageSpecs (DependencyGraphCacheContext context)
{
DependencyGraphSpec dependencySpec = await MSBuildPackageSpecCreator.GetDependencyGraphSpec (project, configuration, context?.Logger);
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageReferenceNuGetProject.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageReferenceNuGetProject.cs
index b33e243a8a2..3654ac87d0c 100644
--- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageReferenceNuGetProject.cs
+++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageReferenceNuGetProject.cs
@@ -249,6 +249,20 @@ async Task> CreateProjectPackageSpecs (DependencyGrap
throw new InvalidOperationException (GettextCatalog.GetString ("Unable to create package spec for project. '{0}'", project.FileName));
}
+ //
+ // This method was an addition to the abstract class as NuGet.Client changed from release-5.4 to release-5.6/5.8
+ // It is called via MonoDevelopment.PackageManagement/MonoDevelopBuildIntegratedRestorer.cs (RestorePackages)
+ // This stop-gap implementation serves to use the old 'GetPackageSpecsAsync' code from release-5.4 and return
+ // 'null' for the messages, so that the 'GetPackageSpecsAsync' functionality still works in release-5.8
+ //
+ public override async Task<(IReadOnlyList dgSpecs, IReadOnlyList additionalMessages)> GetPackageSpecsAndAdditionalMessagesAsync (DependencyGraphCacheContext context)
+ {
+ IReadOnlyList messages = null; // HACK - ignore messages for now
+ IReadOnlyList specs = await GetPackageSpecsAsync (context);
+
+ return (specs, messages);
+ }
+
public override async Task PostProcessAsync (INuGetProjectContext nuGetProjectContext, CancellationToken token)
{
await Runtime.RunInMainThread (async () => {
@@ -287,6 +301,7 @@ public void NotifyProjectReferencesChanged (bool includeTransitiveProjectReferen
DotNetProject.NotifyModified ("References");
}
+
///
/// Always returns true so the project is re-evaluated after a restore.
/// This ensures any imports in the generated .nuget.g.targets are
@@ -321,5 +336,7 @@ string GetFullPath (string relativePath)
{
return project.BaseDirectory.Combine (relativePath);
}
+
}
+
}
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs
index 336df933d5f..59edc71dc50 100644
--- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs
+++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultsEditorExtension.cs
@@ -310,9 +310,9 @@ class ResultsUpdater
public ResultsUpdater (ResultsEditorExtension ext, IReadOnlyList results, object resultsId, CancellationToken cancellationToken)
{
if (ext == null)
- throw new ArgumentNullException ("ext");
+ throw new ArgumentNullException (nameof(ext));
if (results == null)
- throw new ArgumentNullException ("results");
+ throw new ArgumentNullException (nameof(results));
this.ext = ext;
id = resultsId;
this.cancellationToken = cancellationToken;
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeRefactoringDescriptor.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeRefactoringDescriptor.cs
index 391f8747216..574f00e71c2 100644
--- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeRefactoringDescriptor.cs
+++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeRefactoringDescriptor.cs
@@ -85,9 +85,9 @@ public bool IsEnabled {
internal CodeRefactoringDescriptor (Type codeActionType, ExportCodeRefactoringProviderAttribute attr)
{
if (codeActionType == null)
- throw new ArgumentNullException ("codeActionType");
+ throw new ArgumentNullException (nameof(codeActionType));
if (attr == null)
- throw new ArgumentNullException ("attr");
+ throw new ArgumentNullException (nameof(attr));
this.codeActionType = codeActionType;
this.attr = attr;
}
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/BatchFixer.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/BatchFixer.cs
index f5851befbd6..6cbeed86318 100644
--- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/BatchFixer.cs
+++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/BatchFixer.cs
@@ -1,4 +1,4 @@
-//
+//
// BatchFixer.cs
//
// Author:
@@ -62,7 +62,7 @@ public BatchFixer (IActionMatcher matcher, ProgressMonitor monitor)
public IEnumerable TryFixIssues (IEnumerable actions)
{
if (actions == null)
- throw new ArgumentNullException ("actions");
+ throw new ArgumentNullException (nameof(actions));
// enumerate once
var actionSummaries = actions as IList ?? actions.ToList ();
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/CodeIssuePad.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/CodeIssuePad.cs
index c8758945128..88913cb97bf 100644
--- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/CodeIssuePad.cs
+++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/CodeIssuePad.cs
@@ -253,9 +253,9 @@ void StopAnalyzation (object sender, EventArgs e)
void SetNode (TreeNavigator navigator, IIssueTreeNode node)
{
if (navigator == null)
- throw new ArgumentNullException ("navigator");
+ throw new ArgumentNullException (nameof (navigator));
if (node == null)
- throw new ArgumentNullException ("node");
+ throw new ArgumentNullException (nameof (node));
navigator.SetValue (nodeField, node);
Debug.Assert (!nodePositions.ContainsKey (node));
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/IssueSummary.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/IssueSummary.cs
index 5e7c4d201ce..de302040659 100644
--- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/IssueSummary.cs
+++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/IssueSummary.cs
@@ -222,7 +222,7 @@ public IList Actions {
}
set {
if (value == null)
- throw new ArgumentNullException ("value");
+ throw new ArgumentNullException (nameof(value));
actions = value;
}
}
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/JobContext.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/JobContext.cs
index e15c83c88ed..8f95f4fe918 100644
--- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/JobContext.cs
+++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/JobContext.cs
@@ -38,11 +38,11 @@ public class JobContext : IJobContext
public JobContext(IAnalysisJob job, AnalysisJobQueue queue, CodeAnalysisBatchRunner runner)
{
if (job == null)
- throw new ArgumentNullException ("job");
+ throw new ArgumentNullException (nameof(job));
if (queue == null)
- throw new ArgumentNullException ("queue");
+ throw new ArgumentNullException (nameof(queue));
if (runner == null)
- throw new ArgumentNullException ("runner");
+ throw new ArgumentNullException (nameof(runner));
this.job = job;
this.queue = queue;
this.runner = runner;
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/JobStatus.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/JobStatus.cs
index 02ca3eb1fd6..87eb7d2d445 100644
--- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/JobStatus.cs
+++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/JobStatus.cs
@@ -52,7 +52,7 @@ public class JobStatus
public JobStatus (IAnalysisJob job)
{
if (job == null)
- throw new ArgumentNullException ("job");
+ throw new ArgumentNullException (nameof(job));
this.job = job;
}
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/SimpleAnalysisJob.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/SimpleAnalysisJob.cs
index 156933f3f1f..05af02c48b4 100644
--- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/SimpleAnalysisJob.cs
+++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/Pad/Runner/SimpleAnalysisJob.cs
@@ -1,4 +1,4 @@
-//
+//
// AbstractAnalysisJob.cs
//
// Author:
@@ -49,7 +49,7 @@ public class SimpleAnalysisJob : IAnalysisJob
public SimpleAnalysisJob (IList files)
{
if (files == null)
- throw new ArgumentNullException ("files");
+ throw new ArgumentNullException (nameof(files));
this.files = files;
}
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameRefactoring.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameRefactoring.cs
index bea7f9866de..e7cae55e700 100644
--- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameRefactoring.cs
+++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameRefactoring.cs
@@ -53,9 +53,9 @@ public class RenameRefactoring
public static async Task Rename (ISymbol symbol, string newName)
{
if (symbol == null)
- throw new ArgumentNullException ("symbol");
+ throw new ArgumentNullException (nameof(symbol));
if (newName == null)
- throw new ArgumentNullException ("newName");
+ throw new ArgumentNullException (nameof(newName));
try {
await new RenameRefactoring ().PerformChangesAsync (symbol, new RenameProperties () { NewName = newName });
return true;
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor.Theatrics/AnimatedBox.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor.Theatrics/AnimatedBox.cs
index 7eed8ddcd40..119a0ae9bd1 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor.Theatrics/AnimatedBox.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor.Theatrics/AnimatedBox.cs
@@ -374,7 +374,7 @@ public void PackEnd (Widget widget, uint duration, Easing easing, Blocking block
private void Pack (Widget widget, uint duration, Easing easing, Blocking blocking, bool end)
{
if (widget == null) {
- throw new ArgumentNullException ("widget");
+ throw new ArgumentNullException (nameof(widget));
}
AnimatedWidget animated_widget = new AnimatedWidget (widget, duration, easing, blocking, horizontal);
@@ -444,7 +444,7 @@ public void Remove (Widget widget, uint duration, Easing easing, Blocking blocki
private void RemoveCore (Widget widget, uint duration, Easing easing, Blocking blocking, bool use_easing, bool use_blocking)
{
if (widget == null) {
- throw new ArgumentNullException ("widget");
+ throw new ArgumentNullException (nameof(widget));
}
AnimatedWidget animated_widget = null;
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor.Theatrics/BounceFadePopupWindow.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor.Theatrics/BounceFadePopupWindow.cs
index 58f7b9ada62..50775656529 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor.Theatrics/BounceFadePopupWindow.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor.Theatrics/BounceFadePopupWindow.cs
@@ -48,7 +48,7 @@ public BounceFadePopupWindow (MonoTextEditor editor) : base (Gtk.WindowType.Popu
if (!IsComposited)
throw new InvalidOperationException ("Only works with composited screen. Check Widget.IsComposited.");
if (editor == null)
- throw new ArgumentNullException ("Editor");
+ throw new ArgumentNullException (nameof(Editor));
DoubleBuffered = true;
Decorated = false;
BorderWidth = 0;
@@ -238,7 +238,7 @@ public BounceFadePopupWidget (MonoTextEditor editor)
if (!IsComposited)
throw new InvalidOperationException ("Only works with composited screen. Check Widget.IsComposited.");
if (editor == null)
- throw new ArgumentNullException ("Editor");
+ throw new ArgumentNullException (nameof(Editor));
WidgetFlags |= Gtk.WidgetFlags.NoWindow;
this.editor = editor;
Events = EventMask.ExposureMask;
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/ActionMargin.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/ActionMargin.cs
index a4dab20fa7e..83f7814eacb 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/ActionMargin.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/ActionMargin.cs
@@ -45,7 +45,7 @@ public override double Width {
public ActionMargin (MonoTextEditor editor)
{
if (editor == null)
- throw new ArgumentNullException ("editor");
+ throw new ArgumentNullException (nameof(editor));
this.editor = editor;
marginWidth = 20;
IsVisible = false;
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/LayoutCache.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/LayoutCache.cs
index 9a31affd870..58f8c4378e7 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/LayoutCache.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/LayoutCache.cs
@@ -1,4 +1,4 @@
-//
+//
// LayoutCache.cs
//
// Author:
@@ -41,7 +41,7 @@ class LayoutCache : IDisposable
public LayoutCache (MonoTextEditor widget)
{
if (widget == null)
- throw new ArgumentNullException ("widget");
+ throw new ArgumentNullException (nameof(widget));
this.widget = widget;
}
@@ -73,9 +73,9 @@ internal class LayoutProxy : IDisposable
public LayoutProxy (LayoutCache layoutCache, Pango.Layout layout)
{
if (layoutCache == null)
- throw new ArgumentNullException ("layoutCache");
+ throw new ArgumentNullException (nameof(layoutCache));
if (layout == null)
- throw new ArgumentNullException ("layout");
+ throw new ArgumentNullException (nameof(layout));
this.layoutCache = layoutCache;
this.layout = layout;
}
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MdTextViewLineCollection.MdTextViewLine.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MdTextViewLineCollection.MdTextViewLine.cs
index 0e56dc6e810..d8f2112700d 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MdTextViewLineCollection.MdTextViewLine.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MdTextViewLineCollection.MdTextViewLine.cs
@@ -24,25 +24,25 @@
// 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.Collections.ObjectModel;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
using Microsoft.VisualStudio.Language.Intellisense.Implementation;
-using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Formatting;
using MonoDevelop.Core.Text;
using System.Threading;
using MonoDevelop.Ide;
-
-namespace Mono.TextEditor
-{
+
+namespace Mono.TextEditor
+{
partial class MdTextViewLineCollection
{
internal sealed class MdTextViewLine : ITextViewLine
{
internal readonly DocumentLine line;
internal readonly TextViewMargin.LayoutWrapper layoutWrapper;
- readonly MdTextViewLineCollection collection;
+ readonly MdTextViewLineCollection collection;
MonoTextEditor textEditor;
///
@@ -191,7 +191,7 @@ public TextBounds GetExtendedCharacterBounds(SnapshotPoint bufferPosition)
public TextBounds GetExtendedCharacterBounds(VirtualSnapshotPoint bufferPosition)
{
- // if the point is in virtual space, then it can't be next to any space negotiating adornments,
+ // if the point is in virtual space, then it can't be next to any space negotiating adornments,
// so just return its character bounds. If the point is not in virtual space, then use the regular
// GetExtendedCharacterBounds method for a non-virtual SnapshotPoint
if (bufferPosition.IsInVirtualSpace)
@@ -258,7 +258,7 @@ public bool IntersectsBufferSpan(SnapshotSpan bufferSpan)
{
return new Span (line.Offset, line.LengthIncludingDelimiter).IntersectsWith (bufferSpan);
}
-#if MAC
+
public void SetChange (TextViewLineChange change)
{
throw new NotImplementedException ();
@@ -286,9 +286,9 @@ public void SetLineTransform (LineTransform transform)
public void Dispose ()
{
- throw new NotImplementedException ();
+
}
-#endif
- }
- }
+
+ }
+ }
}
\ No newline at end of file
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MonoTextEditor.ITextView.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MonoTextEditor.ITextView.cs
index 3ab2d0c8dc7..c3e8d9893e6 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MonoTextEditor.ITextView.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MonoTextEditor.ITextView.cs
@@ -58,7 +58,9 @@ partial class MonoTextEditor : IMdTextView
ConnectionManager connectionManager;
- TextEditorInitializationService factoryService;
+ //oe TextEditorInitializationService factoryService;
+ TextEditorFactoryService factoryService;
+
int queuedSpaceReservationStackRefresh = 0; //int so that it can be set via Interlocked.CompareExchange()
// IEditorFormatMap _editorFormatMap;
@@ -67,8 +69,9 @@ partial class MonoTextEditor : IMdTextView
ITextSelection selection;
+ /* oe NOT IMPLEMENTED (int TextEditorFactoryService)...
private IEditorOperations editorOperations;
- internal IEditorOperations EditorOperations
+ internal IEditorOperations EditorOperations
{
get {
if (editorOperations == null) {
@@ -79,7 +82,7 @@ internal IEditorOperations EditorOperations
return editorOperations;
}
- }
+ } */
bool hasAggregateFocus;
@@ -109,7 +112,8 @@ internal IEditorOperations EditorOperations
/// Roles for this view.
/// Parent options for this view.
/// Our handy text editor factory service.
- internal void Initialize (ITextViewModel textViewModel, ITextViewRoleSet roles, IEditorOptions parentOptions, TextEditorInitializationService factoryService, bool initialize = true)
+ //oe internal void Initialize (ITextViewModel textViewModel, ITextViewRoleSet roles, IEditorOptions parentOptions, TextEditorInitializationService factoryService, bool initialize = true)
+ internal void Initialize (ITextViewModel textViewModel, ITextViewRoleSet roles, IEditorOptions parentOptions, TextEditorFactoryService factoryService, bool initialize = true)
{
this.roles = roles;
this.factoryService = factoryService;
@@ -165,7 +169,7 @@ internal void Initialize ()
// Without Undo History Roslyn Completion bails via:
// https://github.com/dotnet/roslyn/blob/a107b43dcad83cf79addd47a9919590c7366d130/src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller_Commit.cs#L66
// See https://devdiv.visualstudio.com/DevDiv/_workitems/edit/669018 for details.
- var instantiateEditorOperations = EditorOperations;
+ //oe var instantiateEditorOperations = EditorOperations;
connectionManager = new ConnectionManager (this, factoryService.TextViewConnectionListeners, factoryService.GuardedOperations);
@@ -502,7 +506,7 @@ internal void QueueAggregateFocusCheck (bool checkForFocus = true)
if (hasAggregateFocus) {
//Got focus so make sure that the view that had focus (which wasn't us since we didn't have focus before) raises its
- //lost focus event before we raise our got focus event. This will potentially do bad things if someone changes focus
+ //lost focus event before we raise our got focus event. This will potentially do bad things if someone changes focus
//if the lost aggregate focus handler.
Debug.Assert (ViewWithAggregateFocus != this);
if (ViewWithAggregateFocus != null) {
@@ -535,25 +539,28 @@ internal void QueueAggregateFocusCheck (bool checkForFocus = true)
public IGuardedOperations GuardedOperations;
internal MDSpaceReservationStack _spaceReservationStack;
-#if MAC
+//oe #if MAC
+
// on Mac ITextView has the extra member GetSpaceReservationManager that isn't there on Windows
ISpaceReservationManager ITextView.GetSpaceReservationManager (string name) => throw new NotImplementedException();
-#endif
+
+//oe #endif
public IMDSpaceReservationManager GetSpaceReservationManager (string name)
{
if (name == null)
- throw new ArgumentNullException ("name");
+ throw new ArgumentNullException (nameof(name));
return _spaceReservationStack.GetOrCreateManager (name);
}
- internal TextEditorInitializationService ComponentContext {
+ //oe internal TextEditorInitializationService ComponentContext {
+ internal TextEditorFactoryService ComponentContext {
get { return factoryService; }
}
- public bool InOuterLayout => false;
-
+ public bool InOuterLayout => false;
+
private IMultiSelectionBroker multiSelectionBroker;
public IMultiSelectionBroker MultiSelectionBroker {
get {
@@ -567,10 +574,10 @@ public IMultiSelectionBroker MultiSelectionBroker {
}
private void OnMultiSelectionSessionChanged (object sender, EventArgs e)
- {
- // The MultiSelectionBroker API has been updated, but currently in VSMac we still have a separate Caret concept.
- // We need to manually synchronize our caret with what MultiSelectionBroker thinks the caret is.
- // The other direction happens when we move our caret.
+ {
+ // The MultiSelectionBroker API has been updated, but currently in VSMac we still have a separate Caret concept.
+ // We need to manually synchronize our caret with what MultiSelectionBroker thinks the caret is.
+ // The other direction happens when we move our caret.
if (TextCaret.Position.VirtualBufferPosition != MultiSelectionBroker.PrimarySelection.InsertionPoint) {
TextCaret.MoveTo (MultiSelectionBroker.PrimarySelection.InsertionPoint);
}
@@ -611,10 +618,10 @@ public double ZoomLevel {
public ITextViewLineSource FormattedLineSource { get; } = null;
- public bool IsKeyboardFocused => HasFocus;
-
- public event EventHandler IsKeyboardFocusedChanged;
-
+ public bool IsKeyboardFocused => HasFocus;
+
+ public event EventHandler IsKeyboardFocusedChanged;
+
public IViewSynchronizationManager SynchronizationManager { get; set; }
#endif
}
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MonoTextEditor.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MonoTextEditor.cs
index aa31159ec69..0254e34948e 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MonoTextEditor.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/MonoTextEditor.cs
@@ -1253,7 +1253,7 @@ public Cairo.Point LocationToPoint (DocumentLocation loc, bool useAbsoluteCoordi
public double ColumnToX (DocumentLine line, int column)
{
if (line == null)
- throw new ArgumentNullException ("line");
+ throw new ArgumentNullException (nameof(line));
return TextViewMargin.ColumnToX (line, column);
}
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextArea.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextArea.cs
index f60bbce0e63..140caa98092 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextArea.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextArea.cs
@@ -341,7 +341,7 @@ int TooltipKeySnooper (Gtk.Widget widget, EventKey evnt)
internal void Initialize (MonoTextEditor editor, TextDocument doc, ITextEditorOptions options, EditMode initialMode)
{
if (doc == null)
- throw new ArgumentNullException ("doc");
+ throw new ArgumentNullException (nameof(doc));
this.editor = editor;
textEditorData = new TextEditorData (doc);
textEditorData.RecenterEditor += TextEditorData_RecenterEditor;
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs
index 66825d944fd..6c5dca0b715 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/Mono.TextEditor/Gui/TextViewMargin.cs
@@ -1,4 +1,4 @@
-//
+//
// TextViewMargin.cs
//
// Author:
@@ -277,7 +277,7 @@ public override AccessibilityElementProxy Accessible {
public TextViewMargin (MonoTextEditor textEditor)
{
if (textEditor == null)
- throw new ArgumentNullException ("textEditor");
+ throw new ArgumentNullException (nameof(textEditor));
// Overwrite the default margin role
if (Accessible != null) {
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.csproj b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.csproj
index 98d7f709566..51f6b3c711f 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.csproj
+++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.csproj
@@ -1,7 +1,7 @@
-
-
-
+
+
+
Debug
AnyCPU
@@ -16,10 +16,10 @@
-->
$(NoWarn);618;612
-
-
-
-
+
+
+
+
Program
mono
@@ -62,378 +62,251 @@
Mono.Debugging
False
-
+
+
+
{C3887A93-B2BD-4097-8E2F-3A063EFF32FD}
- Xwt.Gtk
- False
+ Xwt.GtkSharp
+
+
+
+
+ {C3887A93-B2BD-4097-8E2F-3A063EFF32FD}
+ Xwt.Gtk2
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
..\..\..\external\Xamarin.Mac.dll
False
-
-
-
+
+
+
PreserveNewest
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs
index 42e3275c59d..b5a99e397ad 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs
@@ -1,4 +1,4 @@
-// ExtendibleTextEditor.cs
+// ExtendibleTextEditor.cs
//
// Author:
// Mike Krüger
@@ -116,7 +116,7 @@ class LastEditorExtension : TextEditorExtension
public LastEditorExtension (ExtensibleTextEditor ext)
{
if (ext == null)
- throw new ArgumentNullException ("ext");
+ throw new ArgumentNullException (nameof(ext));
this.ext = ext;
}
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/ConnectionManager.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/ConnectionManager.cs
index b58eacc7fa3..2af1f7e06fa 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/ConnectionManager.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/ConnectionManager.cs
@@ -71,15 +71,15 @@ public ConnectionManager(ITextView textView,
{
if (textView == null)
{
- throw new ArgumentNullException("textView");
+ throw new ArgumentNullException(nameof(textView));
}
if (textViewConnectionListeners == null)
{
- throw new ArgumentNullException("textViewConnectionListeners");
+ throw new ArgumentNullException(nameof(textViewConnectionListeners));
}
if (guardedOperations == null)
{
- throw new ArgumentNullException("guardedOperations");
+ throw new ArgumentNullException(nameof(guardedOperations));
}
_textView = textView;
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/IMdTextView.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/IMdTextView.cs
index cc8724e4bf8..3115d76ef76 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/IMdTextView.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/IMdTextView.cs
@@ -1,6 +1,7 @@
namespace Microsoft.VisualStudio.Text.Editor
{
- internal interface IMdTextView : ITextView2
+// oe NOTICE using the original-Gtk-editor.
+ internal interface IMdTextView : ITextView
{
MonoDevelop.SourceEditor.IMDSpaceReservationManager GetSpaceReservationManager(string name);
@@ -11,4 +12,4 @@ Gtk.Container VisualElement
void Focus();
}
-}
\ No newline at end of file
+}
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/BaseIntellisenseSession.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/BaseIntellisenseSession.cs
index 5b305756584..ea734454c71 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/BaseIntellisenseSession.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/BaseIntellisenseSession.cs
@@ -17,7 +17,7 @@ protected BaseIntellisenseSession(ITextView textView)
{
if (textView == null)
{
- throw new ArgumentNullException("textView");
+ throw new ArgumentNullException(nameof(textView));
}
this.textView = textView;
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSession.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSession.cs
index 756775d29c2..d1609781577 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSession.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSession.cs
@@ -13,7 +13,7 @@ protected IntellisenseSession(ITextView textView, ITrackingPoint triggerPoint)
{
if (triggerPoint == null)
{
- throw new ArgumentNullException("triggerPoint");
+ throw new ArgumentNullException(nameof(triggerPoint));
}
this.triggerPoint = triggerPoint;
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSessionStack.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSessionStack.cs
index 81045c5e5cf..5a1527978ab 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSessionStack.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSessionStack.cs
@@ -138,7 +138,7 @@ public void MoveSessionToTop(IIntellisenseSession session)
// Make sure this session is actually in the stack.
if (session == null)
{
- throw new ArgumentNullException("session");
+ throw new ArgumentNullException(nameof(session));
}
int sessionIndex = _sessions.IndexOf(session);
if (sessionIndex == -1)
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/SmartIndentationService.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/SmartIndentationService.cs
index 46dbdccef93..1bf044fe73f 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/SmartIndentationService.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/SmartIndentationService.cs
@@ -13,7 +13,8 @@ namespace Microsoft.VisualStudio.Text.Editor.Implementation
using Microsoft.VisualStudio.Text.Utilities;
using Microsoft.VisualStudio.Utilities;
- //[Export(typeof(ISmartIndentationService))]
+ // oe NOTICE :: this must be exported.
+ [Export(typeof(ISmartIndentationService))]
internal sealed class SmartIndentationService : ISmartIndentationService, ISmartIndent
{
[ImportMany]
@@ -71,12 +72,12 @@ ISmartIndent CreateSmartIndent(ITextView textView)
else
return GuardedOperations.InvokeBestMatchingFactory
(SmartIndentProviders, textView.TextDataModel.ContentType,
- (provider) => (provider.CreateSmartIndent(textView)), ContentTypeRegistryService, this)
+ (provider) => (provider.CreateSmartIndent(textView)), ContentTypeRegistryService, this)
?? this;
}
///
- /// This is the vacuous implementation for ContentTypes that have no provided ISmartIndent
+ /// This is the vacuous implementation for ContentTypes that have no provided ISmartIndent
///
public int? GetDesiredIndentation(ITextSnapshotLine line)
{
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfToolTipAdornment/Legacy/ToolTipProvider.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfToolTipAdornment/Legacy/ToolTipProvider.cs
index e578b8cf65a..916cd8dedbe 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfToolTipAdornment/Legacy/ToolTipProvider.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfToolTipAdornment/Legacy/ToolTipProvider.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
@@ -54,11 +54,11 @@ public void ClearToolTip()
public void ShowToolTip(ITrackingSpan span, object toolTipContent, PopupStyles style)
{
if (span == null)
- throw new ArgumentNullException("span");
+ throw new ArgumentNullException(nameof(span));
if (span.TextBuffer != _textView.TextBuffer)
throw new ArgumentException("Invalid span");
if (toolTipContent == null)
- throw new ArgumentNullException("toolTipContent");
+ throw new ArgumentNullException(nameof(toolTipContent));
var element = toolTipContent as Control;
if (element == null)
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfView/PopupAgent.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfView/PopupAgent.cs
index f2fec240866..ff644fef226 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfView/PopupAgent.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfView/PopupAgent.cs
@@ -41,15 +41,15 @@ internal class PopupAgent : IMDSpaceReservationAgent
public PopupAgent(Mono.TextEditor.MonoTextEditor textView, IMDSpaceReservationManager manager, ITrackingSpan visualSpan, PopupStyles style, Widget content)
{
if (textView == null)
- throw new ArgumentNullException("textView");
+ throw new ArgumentNullException(nameof(textView));
if (manager == null)
- throw new ArgumentNullException("manager");
+ throw new ArgumentNullException(nameof(manager));
if (visualSpan == null)
- throw new ArgumentNullException("visualSpan");
+ throw new ArgumentNullException(nameof(visualSpan));
if (((int)style & ~(0xff)) != 0) //Union of all the legal style bits.
- throw new ArgumentOutOfRangeException("style");
+ throw new ArgumentOutOfRangeException(nameof(style));
if (content == null)
- throw new ArgumentNullException("content");
+ throw new ArgumentNullException(nameof(content));
if ((style & PopupStyles.DismissOnMouseLeaveText) != 0 && (style & PopupStyles.DismissOnMouseLeaveTextOrContent) != 0)
throw new ArgumentException("Can't specify both PopupStyles.DismissOnMouseLeaveText and PopupStyles.DismissOnMouseLeaveTextOrContent", "style");
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfView/SpaceReservationManager.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfView/SpaceReservationManager.cs
index 09ea66a577d..32b64485026 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfView/SpaceReservationManager.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Text/Impl/WpfView/SpaceReservationManager.cs
@@ -1,4 +1,4 @@
-//
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
@@ -44,13 +44,13 @@ public IMDSpaceReservationAgent CreatePopupAgent(ITrackingSpan visualSpan, Popup
public void UpdatePopupAgent(IMDSpaceReservationAgent agent, ITrackingSpan visualSpan, PopupStyles styles)
{
if (agent == null)
- throw new ArgumentNullException("agent");
+ throw new ArgumentNullException(nameof(agent));
if (visualSpan == null)
- throw new ArgumentNullException("visualSpan");
+ throw new ArgumentNullException(nameof(visualSpan));
PopupAgent popupAgent = agent as PopupAgent;
if (popupAgent == null)
- throw new ArgumentException("The agent is not a PopupAgent", "agent");
+ throw new ArgumentException("The agent is not a PopupAgent", nameof(agent));
popupAgent.SetVisualSpan(visualSpan);
popupAgent._style = styles;
@@ -66,7 +66,7 @@ public ReadOnlyCollection Agents
public void AddAgent(IMDSpaceReservationAgent agent)
{
if (agent == null)
- throw new ArgumentNullException("agent");
+ throw new ArgumentNullException(nameof(agent));
_agents.Add(agent);
this.ChangeAgents(null, agent);
@@ -77,7 +77,7 @@ public void AddAgent(IMDSpaceReservationAgent agent)
public bool RemoveAgent(IMDSpaceReservationAgent agent)
{
if (agent == null)
- throw new ArgumentNullException("agent");
+ throw new ArgumentNullException(nameof(agent));
if (_agents.Remove(agent))
{
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/TextEditorFactoryService.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/TextEditorFactoryService.cs
new file mode 100644
index 00000000000..6aea9cda705
--- /dev/null
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/TextEditorFactoryService.cs
@@ -0,0 +1,199 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// This file contain implementations details that are subject to change without notice.
+// Use at your own risk.
+//
+
+// oe REVERTED from monodevelop-7.8
+// oe REVERTED from monodevelop-7.8
+// oe REVERTED from monodevelop-7.8
+
+namespace Microsoft.VisualStudio.Text.Editor.Implementation
+{
+ using System;
+ using System.Collections.Generic;
+ using System.ComponentModel.Composition;
+ using System.Linq;
+
+ using System.ComponentModel;
+ using Microsoft.VisualStudio.Text.Classification;
+ using Microsoft.VisualStudio.Text.Formatting;
+ using Microsoft.VisualStudio.Text.Operations;
+ using Microsoft.VisualStudio.Text.Outlining;
+ using Microsoft.VisualStudio.Text.Projection;
+ using Microsoft.VisualStudio.Text.Utilities;
+ using Microsoft.VisualStudio.Utilities;
+ using Microsoft.VisualStudio.Text.Editor;
+ using Microsoft.VisualStudio.Text;
+ using MonoDevelop.Ide.Editor;
+ using Microsoft.VisualStudio.Text.Editor.Implementation;
+ using Mono.TextEditor;
+ using Microsoft.VisualStudio.Platform;
+
+ ///
+ /// Provides a VisualStudio Service that aids in creation of Editor Views
+ ///
+ [Export(typeof(ITextEditorFactoryService))]
+ internal sealed class TextEditorFactoryService : ITextEditorFactoryService, IPartImportsSatisfiedNotification
+ {
+ [Import]
+ internal GuardedOperations GuardedOperations { get; set; }
+
+ [Import]
+ internal IContentTypeRegistryService ContentTypeRegistryService { get; set; }
+
+// oe NOT IMPLEMENTED...
+//oe [Import]
+//oe internal IEditorOperationsFactoryService EditorOperationsProvider { get; set; }
+
+ [Import]
+ internal ITextBufferFactoryService TextBufferFactoryService { get; set; }
+
+ [ImportMany]
+ internal List> TextViewModelProviders { get; set; }
+
+ [Import]
+ internal IBufferGraphFactoryService BufferGraphFactoryService { get; set; }
+
+// oe NOT IMPLEMENTED...
+//oe [Import]
+//oe internal IClassificationTypeRegistryService ClassificationTypeRegistryService { get; set; }
+
+ [Import]
+ internal IEditorOptionsFactoryService EditorOptionsFactoryService { get; set; }
+
+// oe NOT IMPLEMENTED...
+//oe [Import]
+//oe internal ITextSearchService2 TextSearchService { get; set; }
+
+ [Import]
+ internal ITextStructureNavigatorSelectorService TextStructureNavigatorSelectorService { get; set; }
+
+ [Import]
+ internal IMultiSelectionBrokerFactory MultiSelectionBrokerFactory { get; set; }
+
+ [ImportMany(typeof(ITextViewCreationListener))]
+ internal List> TextViewCreationListeners { get; set; }
+
+ [ImportMany(typeof(ITextViewConnectionListener))]
+ internal List> TextViewConnectionListeners { get; set; }
+
+ [Import]
+ internal ISmartIndentationService SmartIndentationService { get; set; }
+
+ [Import(AllowDefault=true)]
+ internal IOutliningManagerService OutliningManagerService { get; set; }
+
+ [Import]
+ internal ITextUndoHistoryRegistry UndoHistoryRegistry { get; set; }
+
+ public event EventHandler TextViewCreated;
+
+ private readonly static ITextViewRoleSet _noRoles = new TextViewRoleSet(new string[0]);
+
+ private readonly static ITextViewRoleSet _allRoles = RolesFromParameters(PredefinedTextViewRoles.Analyzable,
+ PredefinedTextViewRoles.Debuggable,
+ PredefinedTextViewRoles.Document,
+ PredefinedTextViewRoles.Editable,
+ PredefinedTextViewRoles.Interactive,
+ PredefinedTextViewRoles.Structured,
+ PredefinedTextViewRoles.Zoomable,
+ PredefinedTextViewRoles.PrimaryDocument);
+
+ private readonly static ITextViewRoleSet _defaultRoles = RolesFromParameters(PredefinedTextViewRoles.Analyzable,
+ PredefinedTextViewRoles.Document,
+ PredefinedTextViewRoles.Editable,
+ PredefinedTextViewRoles.Interactive,
+ PredefinedTextViewRoles.Structured,
+ PredefinedTextViewRoles.Zoomable);
+
+ public ITextView CreateTextView (ITextBuffer textBuffer)
+ {
+ MonoDevelop.Ide.Editor.ITextDocument textDocument = textBuffer.GetTextEditor();
+ TextEditor textEditor = textDocument as TextEditor;
+
+ return CreateTextView(textEditor);
+ }
+
+ public ITextView CreateTextView (MonoDevelop.Ide.Editor.TextEditor textEditor, ITextViewRoleSet roles = null, IEditorOptions parentOptions = null)
+ {
+ if (textEditor == null)
+ {
+ throw new ArgumentNullException(nameof(textEditor));
+ }
+
+ if (roles == null) {
+ roles = _defaultRoles;
+ }
+
+ ITextBuffer textBuffer = textEditor.GetContent().GetTextEditorData().Document.TextBuffer;
+ ITextDataModel dataModel = new VacuousTextDataModel(textBuffer);
+
+ ITextViewModel viewModel = UIExtensionSelector.InvokeBestMatchingFactory
+ (TextViewModelProviders,
+ dataModel.ContentType,
+ roles,
+ (provider) => (provider.CreateTextViewModel(dataModel, roles)),
+ ContentTypeRegistryService,
+ this.GuardedOperations,
+ this) ?? new VacuousTextViewModel(dataModel);
+
+ var view = ((MonoDevelop.SourceEditor.SourceEditorView)textEditor.Implementation).TextEditor;
+ view.Initialize(viewModel, roles, parentOptions ?? this.EditorOptionsFactoryService.GlobalOptions, this);
+ view.Properties.AddProperty(typeof(MonoDevelop.Ide.Editor.TextEditor), textEditor);
+
+ this.TextViewCreated?.Invoke(this, new TextViewCreatedEventArgs(view));
+
+ return view;
+ }
+
+ public ITextViewRoleSet NoRoles
+ {
+ get { return _noRoles; }
+ }
+
+ public ITextViewRoleSet AllPredefinedRoles
+ {
+ get { return _allRoles; }
+ }
+
+ public ITextViewRoleSet DefaultRoles
+ {
+ // notice that Debuggable and PrimaryDocument are excluded!
+ get
+ {
+ return _defaultRoles;
+ }
+ }
+
+ public ITextViewRoleSet CreateTextViewRoleSet(IEnumerable roles)
+ {
+ return new TextViewRoleSet(roles);
+ }
+
+ public ITextViewRoleSet CreateTextViewRoleSet(params string[] roles)
+ {
+ return new TextViewRoleSet(roles);
+ }
+
+ private static ITextViewRoleSet RolesFromParameters (params string[] roles)
+ {
+ return new TextViewRoleSet(roles);
+ }
+
+ [ImportMany]
+ private List> _spaceReservationManagerDefinitions = null;
+ internal Dictionary OrderedSpaceReservationManagerDefinitions = new Dictionary();
+
+ public void OnImportsSatisfied()
+ {
+ IList> orderedManagers = Orderer.Order(_spaceReservationManagerDefinitions);
+ for (int i = 0; (i < orderedManagers.Count); ++i)
+ {
+ this.OrderedSpaceReservationManagerDefinitions.Add(orderedManagers[i].Metadata.Name, i);
+ }
+ }
+ }
+}
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/TextViewRoleSet.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/TextViewRoleSet.cs
index 4f429fdc00d..5e1224e4268 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/TextViewRoleSet.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/TextViewRoleSet.cs
@@ -20,14 +20,14 @@ public TextViewRoleSet(IEnumerable roles)
{
if (roles == null)
{
- throw new ArgumentNullException("roles");
+ throw new ArgumentNullException(nameof(roles));
}
this.roles = new List();
foreach (string role in roles)
{
if (role == null)
{
- throw new ArgumentNullException("roles");
+ throw new ArgumentNullException(nameof(roles));
}
else
{
@@ -40,7 +40,7 @@ public bool Contains(string textViewRole)
{
if (textViewRole == null)
{
- throw new ArgumentNullException("textViewRole");
+ throw new ArgumentNullException(nameof(textViewRole));
}
string upperTextViewRole = textViewRole.ToUpperInvariant();
foreach (string role in this.roles)
@@ -57,7 +57,7 @@ public bool ContainsAny(IEnumerable textViewRoles)
{
if (textViewRoles == null)
{
- throw new ArgumentNullException("textViewRoles");
+ throw new ArgumentNullException(nameof(textViewRoles));
}
foreach (string textViewRole in textViewRoles)
{
@@ -80,7 +80,7 @@ public bool ContainsAll(IEnumerable textViewRoles)
{
if (textViewRoles == null)
{
- throw new ArgumentNullException("textViewRoles");
+ throw new ArgumentNullException(nameof(textViewRoles));
}
foreach (string textViewRole in textViewRoles)
{
@@ -109,7 +109,7 @@ public ITextViewRoleSet UnionWith(ITextViewRoleSet roleSet)
{
if (roleSet == null)
{
- throw new ArgumentNullException("roleSet");
+ throw new ArgumentNullException(nameof(roleSet));
}
var resultRoles = new HashSet(this.roles);
foreach (string role in roleSet)
diff --git a/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/KeyProcessor/DefaultKeyProcessorProvider.cs b/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/KeyProcessor/DefaultKeyProcessorProvider.cs
index 2c7a17a0d07..ac9ff751214 100644
--- a/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/KeyProcessor/DefaultKeyProcessorProvider.cs
+++ b/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/KeyProcessor/DefaultKeyProcessorProvider.cs
@@ -52,7 +52,7 @@ public KeyProcessor GetAssociatedProcessor(IWpfTextView wpfTextView)
{
if (wpfTextView == null)
{
- throw new ArgumentNullException("wpfTextView");
+ throw new ArgumentNullException(nameof(wpfTextView));
}
return new DefaultKeyProcessor(
diff --git a/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/MonoDevelop.TextEditor.Wpf.csproj b/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/MonoDevelop.TextEditor.Wpf.csproj
index 74173a6644a..10b27ece697 100644
--- a/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/MonoDevelop.TextEditor.Wpf.csproj
+++ b/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/MonoDevelop.TextEditor.Wpf.csproj
@@ -9,11 +9,9 @@
true
-
-
+
-
diff --git a/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/Undo/UndoHistoryRegistry.cs b/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/Undo/UndoHistoryRegistry.cs
index 4f8f73668e1..221626e3bc9 100644
--- a/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/Undo/UndoHistoryRegistry.cs
+++ b/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Wpf/Undo/UndoHistoryRegistry.cs
@@ -1,24 +1,24 @@
-//
-// Copyright (c) Microsoft Corp. (https://www.microsoft.com)
-//
-// 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.
-
+//
+// Copyright (c) Microsoft Corp. (https://www.microsoft.com)
+//
+// 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.ComponentModel.Composition;
using System.Runtime.CompilerServices;
@@ -30,7 +30,7 @@ namespace MonoDevelop.Ide.Text
/// This class is intended to be a very simple ITextUndoHistoryRegistry implementation for hosts that
/// don't have a built-in undo mechanism
///
- [Export(typeof(ITextUndoHistoryRegistry))]
+//oe [Export(typeof(ITextUndoHistoryRegistry))] oe NOTICE prevent multiple export of this type; WHICH ONE SHOULD BE USED???
internal sealed class TextUndoHistoryRegistry : ITextUndoHistoryRegistry
{
private readonly ConditionalWeakTable
-
+
\ No newline at end of file
diff --git a/main/src/addins/VBNetBinding/VBNetBinding.csproj b/main/src/addins/VBNetBinding/VBNetBinding.csproj
index cb22703f293..29ce33dd4dc 100644
--- a/main/src/addins/VBNetBinding/VBNetBinding.csproj
+++ b/main/src/addins/VBNetBinding/VBNetBinding.csproj
@@ -1,4 +1,4 @@
-
+
@@ -72,4 +72,4 @@
-
+
\ No newline at end of file
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/MonoDevelop.VersionControl.Git.Tests.csproj b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/MonoDevelop.VersionControl.Git.Tests.csproj
index 683ac2c4b6c..446294e90ee 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/MonoDevelop.VersionControl.Git.Tests.csproj
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git.Tests/MonoDevelop.VersionControl.Git.Tests.csproj
@@ -48,10 +48,6 @@
{D12F0F7B-8DE3-43EC-BA49-41052D065A9B}
GuiUnit_NET_4_5
-
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}
- LibGit2Sharp
-
{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}
MonoDevelop.SourceEditor
@@ -59,27 +55,28 @@
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj
index 90f82cd76e8..ce3af25c5a0 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git.csproj
@@ -93,10 +93,6 @@
Mono.Addins
False
-
- {EE6ED99F-CB12-4683-B055-D28FC7357A34}
- LibGit2Sharp
-
{F8F92AA4-A376-4679-A9D4-60E7B7FBF477}
MonoDevelop.SourceEditor
@@ -110,43 +106,45 @@
+
+
False
PreserveNewest
-
- libgit2.license.txt
- PreserveNewest
-
-
- libssh2.license.txt
- PreserveNewest
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.MiddleArea.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.MiddleArea.cs
index 6c0ec760842..aa4b7431c40 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.MiddleArea.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/EditorCompareWidgetBase.MiddleArea.cs
@@ -160,7 +160,9 @@ void PerformRevert (Hunk hunk)
if (nearestButton != null) {
nearestButton.Accessible.Focused = true;
} else {
+#if DD_VS_API_TODO
Accessible.SetCurrentFocus ();
+#endif
}
}
} catch (Exception e) {
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Core/AppRestartRecovery/ApplicationRestartRecoveryManager.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Core/AppRestartRecovery/ApplicationRestartRecoveryManager.cs
index b0d9e28c27b..6923c1fbc64 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Core/AppRestartRecovery/ApplicationRestartRecoveryManager.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Core/AppRestartRecovery/ApplicationRestartRecoveryManager.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Runtime.InteropServices;
@@ -33,7 +33,7 @@ public static void RegisterForApplicationRecovery(RecoverySettings settings)
{
CoreHelpers.ThrowIfNotVista();
- if (settings == null) { throw new ArgumentNullException("settings"); }
+ if (settings == null) { throw new ArgumentNullException(nameof(settings)); }
GCHandle handle = GCHandle.Alloc(settings.RecoveryData);
@@ -144,7 +144,7 @@ public static void RegisterForApplicationRestart(RestartSettings settings)
{
// Throw PlatformNotSupportedException if the user is not running Vista or beyond
CoreHelpers.ThrowIfNotVista();
- if (settings == null) { throw new ArgumentNullException("settings"); }
+ if (settings == null) { throw new ArgumentNullException(nameof(settings)); }
HResult hr = AppRestartRecoveryNativeMethods.RegisterApplicationRestart(settings.Command, settings.Restrictions);
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Core/PropertySystem/PropVariant.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Core/PropertySystem/PropVariant.cs
index cab1623a61e..e6f92d0c081 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Core/PropertySystem/PropVariant.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Core/PropertySystem/PropVariant.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections.Generic;
@@ -272,7 +272,7 @@ public PropVariant(string value)
///
public PropVariant(string[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
PropVariantNativeMethods.InitPropVariantFromStringVector(value, (uint)value.Length, this);
}
@@ -282,7 +282,7 @@ public PropVariant(string[] value)
///
public PropVariant(bool[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
PropVariantNativeMethods.InitPropVariantFromBooleanVector(value, (uint)value.Length, this);
}
@@ -292,7 +292,7 @@ public PropVariant(bool[] value)
///
public PropVariant(short[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
PropVariantNativeMethods.InitPropVariantFromInt16Vector(value, (uint)value.Length, this);
}
@@ -302,7 +302,7 @@ public PropVariant(short[] value)
///
public PropVariant(ushort[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
PropVariantNativeMethods.InitPropVariantFromUInt16Vector(value, (uint)value.Length, this);
@@ -313,7 +313,7 @@ public PropVariant(ushort[] value)
///
public PropVariant(int[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
PropVariantNativeMethods.InitPropVariantFromInt32Vector(value, (uint)value.Length, this);
}
@@ -323,7 +323,7 @@ public PropVariant(int[] value)
///
public PropVariant(uint[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
PropVariantNativeMethods.InitPropVariantFromUInt32Vector(value, (uint)value.Length, this);
}
@@ -333,7 +333,7 @@ public PropVariant(uint[] value)
///
public PropVariant(long[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
PropVariantNativeMethods.InitPropVariantFromInt64Vector(value, (uint)value.Length, this);
}
@@ -343,7 +343,7 @@ public PropVariant(long[] value)
///
public PropVariant(ulong[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
PropVariantNativeMethods.InitPropVariantFromUInt64Vector(value, (uint)value.Length, this);
}
@@ -353,7 +353,7 @@ public PropVariant(ulong[] value)
///
public PropVariant(double[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
PropVariantNativeMethods.InitPropVariantFromDoubleVector(value, (uint)value.Length, this);
}
@@ -364,7 +364,7 @@ public PropVariant(double[] value)
///
public PropVariant(DateTime[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
System.Runtime.InteropServices.ComTypes.FILETIME[] fileTimeArr =
new System.Runtime.InteropServices.ComTypes.FILETIME[value.Length];
@@ -469,7 +469,7 @@ public PropVariant(decimal value)
/// Decimal array to wrap.
public PropVariant(decimal[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
_valueType = (ushort)(VarEnum.VT_DECIMAL | VarEnum.VT_VECTOR);
_int32 = value.Length;
@@ -498,7 +498,7 @@ public PropVariant(float value)
///
public PropVariant(float[] value)
{
- if (value == null) { throw new ArgumentNullException("value"); }
+ if (value == null) { throw new ArgumentNullException(nameof(value)); }
_valueType = (ushort)(VarEnum.VT_R4 | VarEnum.VT_VECTOR);
_int32 = value.Length;
@@ -556,7 +556,7 @@ internal void SetIUnknown(object value)
/// The new value to set.
internal void SetSafeArray(Array array)
{
- if (array == null) { throw new ArgumentNullException("array"); }
+ if (array == null) { throw new ArgumentNullException(nameof(array)); }
const ushort vtUnknown = 13;
IntPtr psa = PropVariantNativeMethods.SafeArrayCreateVector(vtUnknown, 0, (uint)array.Length);
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/IconReference.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/IconReference.cs
index 9ddcf9b9f69..5d2a6c375f2 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/IconReference.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/IconReference.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using Microsoft.WindowsAPICodePack.Resources;
@@ -28,7 +28,7 @@ public IconReference(string moduleName, int resourceId)
{
if (string.IsNullOrEmpty(moduleName))
{
- throw new ArgumentNullException("moduleName");
+ throw new ArgumentNullException(nameof(moduleName));
}
this.moduleName = moduleName;
@@ -46,7 +46,7 @@ public IconReference(string refPath)
{
if (string.IsNullOrEmpty(refPath))
{
- throw new ArgumentNullException("refPath");
+ throw new ArgumentNullException(nameof(refPath));
}
string[] refParams = refPath.Split(commaSeparator);
@@ -75,7 +75,7 @@ public string ModuleName
{
if (string.IsNullOrEmpty(value))
{
- throw new ArgumentNullException("value");
+ throw new ArgumentNullException(nameof(value));
}
moduleName = value;
}
@@ -99,7 +99,7 @@ public string ReferencePath
{
if (string.IsNullOrEmpty(value))
{
- throw new ArgumentNullException("value");
+ throw new ArgumentNullException(nameof(value));
}
string[] refParams = value.Split(commaSeparator);
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/SearchCondition.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/SearchCondition.cs
index 6906ede53b2..8bf1187cfca 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/SearchCondition.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/SearchCondition.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections.Generic;
@@ -17,7 +17,7 @@ internal SearchCondition(ICondition nativeSearchCondition)
{
if (nativeSearchCondition == null)
{
- throw new ArgumentNullException("nativeSearchCondition");
+ throw new ArgumentNullException(nameof(nativeSearchCondition));
}
NativeSearchCondition = nativeSearchCondition;
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/SearchConditionFactory.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/SearchConditionFactory.cs
index 3c25dc56e76..7e1c4ef2d34 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/SearchConditionFactory.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/SearchConditionFactory.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections.Generic;
@@ -348,7 +348,7 @@ public static SearchCondition CreateNotCondition(SearchCondition conditionToBeNe
{
if (conditionToBeNegated == null)
{
- throw new ArgumentNullException("conditionToBeNegated");
+ throw new ArgumentNullException(nameof(conditionToBeNegated));
}
// Same as the native "IConditionFactory:MakeNot" method
@@ -398,7 +398,7 @@ public static SearchCondition ParseStructuredQuery(string query, CultureInfo cul
{
if (string.IsNullOrEmpty(query))
{
- throw new ArgumentNullException("query");
+ throw new ArgumentNullException(nameof(query));
}
IQueryParserManager nativeQueryParserManager = (IQueryParserManager)new QueryParserManagerCoClass();
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellLibrary.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellLibrary.cs
index ae2ccd10e9f..58aa469a14f 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellLibrary.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellLibrary.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections.Generic;
@@ -295,7 +295,7 @@ public string DefaultSaveFolder
{
if (string.IsNullOrEmpty(value))
{
- throw new ArgumentNullException("value");
+ throw new ArgumentNullException(nameof(value));
}
if (!Directory.Exists(value))
@@ -608,7 +608,7 @@ public static void ShowManageLibraryUI(IKnownFolder sourceKnownFolder, IntPtr wi
/// The folder to add to the library.
public void Add(ShellFileSystemFolder item)
{
- if (item == null) { throw new ArgumentNullException("item"); }
+ if (item == null) { throw new ArgumentNullException(nameof(item)); }
nativeShellLibrary.AddFolder(item.NativeShellItem);
nativeShellLibrary.Commit();
@@ -649,7 +649,7 @@ public void Clear()
/// true if the item was removed.
public bool Remove(ShellFileSystemFolder item)
{
- if (item == null) { throw new ArgumentNullException("item"); }
+ if (item == null) { throw new ArgumentNullException(nameof(item)); }
try
{
@@ -781,7 +781,7 @@ public bool Contains(string fullPath)
{
if (string.IsNullOrEmpty(fullPath))
{
- throw new ArgumentNullException("fullPath");
+ throw new ArgumentNullException(nameof(fullPath));
}
return ItemsList.Any(folder => string.Equals(fullPath, folder.Path, StringComparison.OrdinalIgnoreCase));
@@ -796,7 +796,7 @@ public bool Contains(ShellFileSystemFolder item)
{
if (item == null)
{
- throw new ArgumentNullException("item");
+ throw new ArgumentNullException(nameof(item));
}
return ItemsList.Any(folder => string.Equals(item.Path, folder.Path, StringComparison.OrdinalIgnoreCase));
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellLink.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellLink.cs
index de95815e4ae..759599d787f 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellLink.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellLink.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
@@ -93,7 +93,7 @@ public string Title
{
if (value == null)
{
- throw new ArgumentNullException("value");
+ throw new ArgumentNullException(nameof(value));
}
if (NativeShellItem2 != null)
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellObjectCollection.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellObjectCollection.cs
index 1c1d85dde59..c07ecb50194 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellObjectCollection.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellObjectCollection.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections;
@@ -326,7 +326,7 @@ public bool Contains(ShellObject item)
/// The index into the array at which copying will commence.
public void CopyTo(ShellObject[] array, int arrayIndex)
{
- if (array == null) { throw new ArgumentNullException("array"); }
+ if (array == null) { throw new ArgumentNullException(nameof(array)); }
if (array.Length < arrayIndex + content.Count)
{
throw new ArgumentException(LocalizedMessages.ShellObjectCollectionArrayTooSmall, "array");
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellObjectFactory.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellObjectFactory.cs
index 73c5147f140..d574e0aa869 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellObjectFactory.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellObjectFactory.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
+// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Diagnostics;
@@ -163,7 +163,7 @@ internal static ShellObject Create(string parsingName)
{
if (string.IsNullOrEmpty(parsingName))
{
- throw new ArgumentNullException("parsingName");
+ throw new ArgumentNullException(nameof(parsingName));
}
// Create a native shellitem from our path
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellSearchFolder.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellSearchFolder.cs
index 75b281606c3..ad60b498d10 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellSearchFolder.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellSearchFolder.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections.Generic;
@@ -141,7 +141,7 @@ internal override IShellItem NativeShellItem
/// If one of the given canonical names is invalid.
public void SetStacks(params string[] canonicalNames)
{
- if (canonicalNames == null) { throw new ArgumentNullException("canonicalNames"); }
+ if (canonicalNames == null) { throw new ArgumentNullException(nameof(canonicalNames)); }
List propertyKeyList = new List();
foreach (string prop in canonicalNames)
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellThumbnail.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellThumbnail.cs
index f16409daabd..7263f0be82e 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellThumbnail.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Common/ShellThumbnail.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Drawing;
@@ -39,7 +39,7 @@ internal ShellThumbnail(ShellObject shellObject)
{
if (shellObject == null || shellObject.NativeShellItem == null)
{
- throw new ArgumentNullException("shellObject");
+ throw new ArgumentNullException(nameof(shellObject));
}
shellItemNative = shellObject.NativeShellItem;
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialog.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialog.cs
index 3cb8d2ddeb8..51131fcaa4c 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialog.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialog.cs
@@ -442,7 +442,7 @@ public void AddPlace(ShellContainer place, FileDialogAddPlaceLocation location)
{
if (place == null)
{
- throw new ArgumentNullException("place");
+ throw new ArgumentNullException(nameof(place));
}
// Get our native dialog
@@ -469,7 +469,7 @@ public void AddPlace(ShellContainer place, FileDialogAddPlaceLocation location)
/// One of the enumeration values that indicates placement of the item in the list.
public void AddPlace(string path, FileDialogAddPlaceLocation location)
{
- if (string.IsNullOrEmpty(path)) { throw new ArgumentNullException("path"); }
+ if (string.IsNullOrEmpty(path)) { throw new ArgumentNullException(nameof(path)); }
// Get our native dialog
if (nativeDialog == null)
@@ -581,7 +581,7 @@ public CommonFileDialogResult ShowDialog(Window window)
{
if (window == null)
{
- throw new ArgumentNullException("window");
+ throw new ArgumentNullException(nameof(window));
}
// Set the parent / owner window
@@ -888,7 +888,7 @@ public virtual void ApplyControlPropertyChange(string propertyName, DialogContro
{
if (control == null)
{
- throw new ArgumentNullException("control");
+ throw new ArgumentNullException(nameof(control));
}
CommonFileDialogControl dialogControl = null;
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilter.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilter.cs
index 5d1879c6d7b..41c129371d7 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilter.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilter.cs
@@ -45,7 +45,7 @@ public CommonFileDialogFilter(string rawDisplayName, string extensionList)
{
if (string.IsNullOrEmpty(extensionList))
{
- throw new ArgumentNullException("extensionList");
+ throw new ArgumentNullException(nameof(extensionList));
}
this.rawDisplayName = rawDisplayName;
@@ -85,7 +85,7 @@ public string DisplayName
{
if (string.IsNullOrEmpty(value))
{
- throw new ArgumentNullException("value");
+ throw new ArgumentNullException(nameof(value));
}
rawDisplayName = value;
}
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonSaveFileDialog.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonSaveFileDialog.cs
index a2b707afe7e..fb8a1bf4dec 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonSaveFileDialog.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/CommonFileDialogs/CommonSaveFileDialog.cs
@@ -120,7 +120,7 @@ public void SetSaveAsItem(ShellObject item)
{
if (item == null)
{
- throw new ArgumentNullException("item");
+ throw new ArgumentNullException(nameof(item));
}
InitializeNativeFileDialog();
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/DesktopWindowManager/GlassForm.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/DesktopWindowManager/GlassForm.cs
index b850b08e15b..8e74a0a6a86 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/DesktopWindowManager/GlassForm.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/DesktopWindowManager/GlassForm.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Drawing;
using System.Windows.Forms;
using MS.WindowsAPICodePack.Internal;
@@ -59,7 +59,7 @@ public void SetAeroGlassTransparency()
/// render properly on top of an AeroGlass frame.
public void ExcludeControlFromAeroGlass(Control control)
{
- if (control == null) { throw new ArgumentNullException("control"); }
+ if (control == null) { throw new ArgumentNullException(nameof(control)); }
if (AeroGlassCompositionEnabled)
{
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.cs
index 29ff0921cfe..4d7ffae856a 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Drawing;
@@ -124,7 +124,7 @@ public void Navigate(ShellObject shellObject)
{
if (shellObject == null)
{
- throw new ArgumentNullException("shellObject");
+ throw new ArgumentNullException(nameof(shellObject));
}
if (explorerBrowserControl == null)
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/KnownFolders/KnownFolderHelper.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/KnownFolders/KnownFolderHelper.cs
index c038a7d8c38..d3cc32b61e6 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/KnownFolders/KnownFolderHelper.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/KnownFolders/KnownFolderHelper.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
+// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Diagnostics;
@@ -147,7 +147,7 @@ public static IKnownFolder FromParsingName(string parsingName)
{
if (parsingName == null)
{
- throw new ArgumentNullException("parsingName");
+ throw new ArgumentNullException(nameof(parsingName));
}
IntPtr pidl = IntPtr.Zero;
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyWriter.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyWriter.cs
index d90379f7115..f8a967de530 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyWriter.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyWriter.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Runtime.InteropServices;
@@ -171,7 +171,7 @@ public void WriteProperty(IShellProperty shellProperty, object value)
/// True to allow truncation (default); otherwise False.
public void WriteProperty(IShellProperty shellProperty, object value, bool allowTruncatedValue)
{
- if (shellProperty == null) { throw new ArgumentNullException("shellProperty"); }
+ if (shellProperty == null) { throw new ArgumentNullException(nameof(shellProperty)); }
WriteProperty(shellProperty.PropertyKey, value, allowTruncatedValue);
}
@@ -195,7 +195,7 @@ public void WriteProperty(ShellProperty shellProperty, T value)
/// True to allow truncation (default); otherwise False.
public void WriteProperty(ShellProperty shellProperty, T value, bool allowTruncatedValue)
{
- if (shellProperty == null) { throw new ArgumentNullException("shellProperty"); }
+ if (shellProperty == null) { throw new ArgumentNullException(nameof(shellProperty)); }
WriteProperty(shellProperty.PropertyKey, value, allowTruncatedValue);
}
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/ShellObjectWatcher/ShellObjectWatcher.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/ShellObjectWatcher/ShellObjectWatcher.cs
index 3639abfb77b..2a50379e24e 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/ShellObjectWatcher/ShellObjectWatcher.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/ShellObjectWatcher/ShellObjectWatcher.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.ComponentModel;
@@ -35,7 +35,7 @@ public ShellObjectWatcher(ShellObject shellObject, bool recursive)
{
if (shellObject == null)
{
- throw new ArgumentNullException("shellObject");
+ throw new ArgumentNullException(nameof(shellObject));
}
if (_context == null)
@@ -133,7 +133,7 @@ private void ThrowIfRunning()
protected virtual void ProcessChangeNotificationEvent(WindowMessageEventArgs e)
{
if (!Running) { return; }
- if (e == null) { throw new ArgumentNullException("e"); }
+ if (e == null) { throw new ArgumentNullException(nameof(e)); }
ChangeNotifyLock notifyLock = new ChangeNotifyLock(e.Message);
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategoryCollection.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategoryCollection.cs
index ba917a52121..4931dbcd397 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategoryCollection.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategoryCollection.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections;
@@ -41,7 +41,7 @@ public void Add(JumpListCustomCategory category)
{
if (category == null)
{
- throw new ArgumentNullException("category");
+ throw new ArgumentNullException(nameof(category));
}
categories.Add(category);
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/JumpListLink.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/JumpListLink.cs
index 8aa168c3ea7..1317ed40242 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/JumpListLink.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/JumpListLink.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Runtime.InteropServices;
@@ -25,12 +25,12 @@ public JumpListLink(string pathValue, string titleValue)
{
if (string.IsNullOrEmpty(pathValue))
{
- throw new ArgumentNullException("pathValue", LocalizedMessages.JumpListLinkPathRequired);
+ throw new ArgumentNullException(nameof(pathValue), LocalizedMessages.JumpListLinkPathRequired);
}
if (string.IsNullOrEmpty(titleValue))
{
- throw new ArgumentNullException("titleValue", LocalizedMessages.JumpListLinkTitleRequired);
+ throw new ArgumentNullException(nameof(titleValue), LocalizedMessages.JumpListLinkTitleRequired);
}
Path = pathValue;
@@ -48,7 +48,7 @@ public string Title
{
if (string.IsNullOrEmpty(value))
{
- throw new ArgumentNullException("value", LocalizedMessages.JumpListLinkTitleRequired);
+ throw new ArgumentNullException(nameof(value), LocalizedMessages.JumpListLinkTitleRequired);
}
title = value;
@@ -66,7 +66,7 @@ public string Path
{
if (string.IsNullOrEmpty(value))
{
- throw new ArgumentNullException("value", LocalizedMessages.JumpListLinkTitleRequired);
+ throw new ArgumentNullException(nameof(value), LocalizedMessages.JumpListLinkTitleRequired);
}
path = value;
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnail.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnail.cs
index fe565119da6..f50be6efc4e 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnail.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnail.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Drawing;
@@ -107,7 +107,7 @@ public TabbedThumbnail(IntPtr parentWindowHandle, Control control)
}
if (control == null)
{
- throw new ArgumentNullException("control");
+ throw new ArgumentNullException(nameof(control));
}
WindowHandle = control.Handle;
@@ -128,11 +128,11 @@ public TabbedThumbnail(Window parentWindow, UIElement windowsControl, Vector pee
{
if (windowsControl == null)
{
- throw new ArgumentNullException("windowsControl");
+ throw new ArgumentNullException(nameof(windowsControl));
}
if (parentWindow == null)
{
- throw new ArgumentNullException("parentWindow");
+ throw new ArgumentNullException(nameof(parentWindow));
}
WindowHandle = IntPtr.Zero;
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailManager.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailManager.cs
index 73a7e579dbf..4e4a8376134 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailManager.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailManager.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections.Generic;
@@ -45,7 +45,7 @@ internal TabbedThumbnailManager()
/// If the tabbed thumbnail has already been added
public void AddThumbnailPreview(TabbedThumbnail preview)
{
- if (preview == null) { throw new ArgumentNullException("preview"); }
+ if (preview == null) { throw new ArgumentNullException(nameof(preview)); }
// UI Element has a windowHandle of zero.
if (preview.WindowHandle == IntPtr.Zero)
@@ -96,7 +96,7 @@ public TabbedThumbnail GetThumbnailPreview(Control control)
{
if (control == null)
{
- throw new ArgumentNullException("control");
+ throw new ArgumentNullException(nameof(control));
}
return GetThumbnailPreview(control.Handle);
@@ -111,7 +111,7 @@ public TabbedThumbnail GetThumbnailPreview(UIElement windowsControl)
{
if (windowsControl == null)
{
- throw new ArgumentNullException("windowsControl");
+ throw new ArgumentNullException(nameof(windowsControl));
}
TabbedThumbnail thumbnail;
@@ -127,7 +127,7 @@ public void RemoveThumbnailPreview(TabbedThumbnail preview)
{
if (preview == null)
{
- throw new ArgumentNullException("preview");
+ throw new ArgumentNullException(nameof(preview));
}
if (_tabbedThumbnailCache.ContainsKey(preview.WindowHandle))
@@ -176,7 +176,7 @@ public void RemoveThumbnailPreview(Control control)
{
if (control == null)
{
- throw new ArgumentNullException("control");
+ throw new ArgumentNullException(nameof(control));
}
IntPtr handle = control.Handle;
@@ -191,7 +191,7 @@ public void RemoveThumbnailPreview(Control control)
/// is to be removed from the taskbar
public void RemoveThumbnailPreview(UIElement windowsControl)
{
- if (windowsControl == null) { throw new ArgumentNullException("windowsControl"); }
+ if (windowsControl == null) { throw new ArgumentNullException(nameof(windowsControl)); }
if (!_tabbedThumbnailCacheWPF.ContainsKey(windowsControl))
{
@@ -224,7 +224,7 @@ public void RemoveThumbnailPreview(UIElement windowsControl)
/// If the control/window is not yet added to the tabbed thumbnails list
public void SetActiveTab(TabbedThumbnail preview)
{
- if (preview == null) { throw new ArgumentNullException("preview"); }
+ if (preview == null) { throw new ArgumentNullException(nameof(preview)); }
if (preview.WindowHandle != IntPtr.Zero)
{
@@ -271,7 +271,7 @@ public void SetActiveTab(Control control)
{
if (control == null)
{
- throw new ArgumentNullException("control");
+ throw new ArgumentNullException(nameof(control));
}
SetActiveTab(control.Handle);
}
@@ -287,7 +287,7 @@ public void SetActiveTab(UIElement windowsControl)
{
if (windowsControl == null)
{
- throw new ArgumentNullException("windowsControl");
+ throw new ArgumentNullException(nameof(windowsControl));
}
if (!_tabbedThumbnailCacheWPF.ContainsKey(windowsControl))
@@ -307,7 +307,7 @@ public bool IsThumbnailPreviewAdded(TabbedThumbnail preview)
{
if (preview == null)
{
- throw new ArgumentNullException("preview");
+ throw new ArgumentNullException(nameof(preview));
}
if (preview.WindowHandle != IntPtr.Zero && _tabbedThumbnailCache.ContainsKey(preview.WindowHandle))
@@ -346,7 +346,7 @@ public bool IsThumbnailPreviewAdded(Control control)
{
if (control == null)
{
- throw new ArgumentNullException("control");
+ throw new ArgumentNullException(nameof(control));
}
return _tabbedThumbnailCache.ContainsKey(control.Handle);
@@ -361,7 +361,7 @@ public bool IsThumbnailPreviewAdded(UIElement control)
{
if (control == null)
{
- throw new ArgumentNullException("control");
+ throw new ArgumentNullException(nameof(control));
}
return _tabbedThumbnailCacheWPF.ContainsKey(control);
@@ -445,7 +445,7 @@ public static void SetTabOrder(TabbedThumbnail previewToChange, TabbedThumbnail
{
if (previewToChange == null)
{
- throw new ArgumentNullException("previewToChange");
+ throw new ArgumentNullException(nameof(previewToChange));
}
IntPtr handleToReorder = previewToChange.TaskbarWindow.WindowToTellTaskbarAbout;
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarManager.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarManager.cs
index 80f1677eb0b..23b7b2bbaec 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarManager.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarManager.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Diagnostics;
@@ -216,7 +216,7 @@ public string ApplicationId
{
if (string.IsNullOrEmpty(value))
{
- throw new ArgumentNullException("value");
+ throw new ArgumentNullException(nameof(value));
}
SetCurrentProcessAppId(value);
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarWindow.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarWindow.cs
index c14166267d1..3430ee9b8d2 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarWindow.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarWindow.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
+// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Windows;
@@ -121,12 +121,12 @@ internal TaskbarWindow(System.Windows.UIElement windowsControl, params Thumbnail
{
if (windowsControl == null)
{
- throw new ArgumentNullException("windowsControl");
+ throw new ArgumentNullException(nameof(windowsControl));
}
if (buttons == null || buttons.Length == 0)
{
- throw new ArgumentException(LocalizedMessages.TaskbarWindowEmptyButtonArray, "buttons");
+ throw new ArgumentException(LocalizedMessages.TaskbarWindowEmptyButtonArray, nameof(buttons));
}
// Create our proxy window
@@ -144,7 +144,7 @@ internal TaskbarWindow(System.Windows.UIElement windowsControl, params Thumbnail
internal TaskbarWindow(TabbedThumbnail preview)
{
- if (preview == null) { throw new ArgumentNullException("preview"); }
+ if (preview == null) { throw new ArgumentNullException(nameof(preview)); }
// Create our proxy window
// Bug: This is only called in this constructor. Which will cause the property
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarWindowManager.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarWindowManager.cs
index e750b1be7d8..8c23b71b906 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarWindowManager.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/TaskbarWindowManager.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
+// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections.Generic;
@@ -135,7 +135,7 @@ internal static void AddTabbedThumbnail(TabbedThumbnail preview)
internal static TaskbarWindow GetTaskbarWindow(System.Windows.UIElement windowsControl, TaskbarProxyWindowType taskbarProxyWindowType)
{
- if (windowsControl == null) { throw new ArgumentNullException("windowsControl"); }
+ if (windowsControl == null) { throw new ArgumentNullException(nameof(windowsControl)); }
TaskbarWindow toReturn = _taskbarWindowList.FirstOrDefault(window =>
{
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarManager.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarManager.cs
index 793b2b162a4..8e86fc29337 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarManager.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarManager.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Windows;
@@ -55,7 +55,7 @@ public void AddButtons(IntPtr windowHandle, params ThumbnailToolBarButton[] butt
///
public void AddButtons(UIElement control, params ThumbnailToolBarButton[] buttons)
{
- if (control == null) { throw new ArgumentNullException("control"); }
+ if (control == null) { throw new ArgumentNullException(nameof(control)); }
VerifyButtons(buttons);
// Add the buttons to our window manager, which will also create a proxy window
diff --git a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarProxyWindow.cs b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarProxyWindow.cs
index 012f0ad355d..12799bbfe4d 100644
--- a/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarProxyWindow.cs
+++ b/main/src/addins/WindowsPlatform/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarProxyWindow.cs
@@ -1,4 +1,4 @@
-//Copyright (c) Microsoft Corporation. All rights reserved.
+//Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Windows.Forms;
@@ -48,10 +48,10 @@ internal ThumbnailToolbarProxyWindow(IntPtr windowHandle, ThumbnailToolBarButton
internal ThumbnailToolbarProxyWindow(System.Windows.UIElement windowsControl, ThumbnailToolBarButton[] buttons)
{
- if (windowsControl == null) { throw new ArgumentNullException("windowsControl"); }
+ if (windowsControl == null) { throw new ArgumentNullException(nameof(windowsControl)); }
if (buttons != null && buttons.Length == 0)
{
- throw new ArgumentException(LocalizedMessages.ThumbnailToolbarManagerNullEmptyArray, "buttons");
+ throw new ArgumentException(LocalizedMessages.ThumbnailToolbarManagerNullEmptyArray, nameof(buttons));
}
_internalWindowHandle = IntPtr.Zero;
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs
index d5cb477e854..d3ab9bc4c7f 100644
--- a/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs
+++ b/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs
@@ -405,7 +405,7 @@ protected override RecentFiles CreateRecentFilesProvider ()
public static string QueryAssociationString (string assoc, AssociationString str, AssociationFlags flags, string extra = null)
{
if (assoc == null)
- throw new ArgumentNullException("assoc");
+ throw new ArgumentNullException(nameof(assoc));
flags |= AssociationFlags.NoTruncate;
diff --git a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs
index 8416b4493de..9a5131b12e6 100644
--- a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs
+++ b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Document/TextDocument.cs
@@ -1186,7 +1186,7 @@ class UndoGroup : IDisposable
public UndoGroup (TextDocument doc, OperationType operationType)
{
if (doc == null)
- throw new ArgumentNullException ("doc");
+ throw new ArgumentNullException (nameof(doc));
doc.BeginAtomicUndo (operationType);
this.doc = doc;
}
@@ -2143,14 +2143,14 @@ public IReadonlyTextDocument CreateDocumentSnapshot ()
public void WriteTextTo (TextWriter writer)
{
if (writer == null)
- throw new ArgumentNullException ("writer");
+ throw new ArgumentNullException (nameof(writer));
writer.Write (Text);
}
public void WriteTextTo (TextWriter writer, int offset, int length)
{
if (writer == null)
- throw new ArgumentNullException ("writer");
+ throw new ArgumentNullException (nameof(writer));
writer.Write (GetTextAt (offset, length));
}
@@ -2468,13 +2468,13 @@ public override int Read (char[] buffer, int index, int count) {
if (currentPosition == -1)
throw new ObjectDisposedException("SnapshotSpanToTextReader");
if (buffer == null)
- throw new ArgumentNullException("buffer");
+ throw new ArgumentNullException(nameof(buffer));
if (index < 0)
- throw new ArgumentOutOfRangeException("index");
+ throw new ArgumentOutOfRangeException(nameof(index));
if (count < 0)
- throw new ArgumentOutOfRangeException("count");
+ throw new ArgumentOutOfRangeException(nameof(count));
if (((index + count) < 0) || ((index + count) > buffer.Length))
- throw new ArgumentOutOfRangeException("count");
+ throw new ArgumentOutOfRangeException(nameof(count));
int charactersToRead = System.Math.Min(this.span.Length - currentPosition, count);
this.span.Snapshot.CopyTo(this.span.Start.Position + currentPosition, buffer, index, charactersToRead);
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/SystemAssemblyService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/SystemAssemblyService.cs
index 5eb2a9b08d5..663135e0e8e 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/SystemAssemblyService.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/SystemAssemblyService.cs
@@ -182,17 +182,19 @@ public TargetFramework GetTargetFramework (TargetFrameworkMoniker id)
{
TargetFramework fx;
if (frameworks.TryGetValue (id, out fx))
- return fx;
+ return fx; // found on first check against known .NETFrameworks
- LoggingService.LogDebug ("Unknown TargetFramework '{0}' is being requested from SystemAssemblyService, ensuring runtimes initialized and trying again", id);
+ // otherwise, ensure runtimes have been initialised, then try again
foreach (var r in runtimes)
r.EnsureInitialized ();
if (frameworks.TryGetValue (id, out fx))
return fx;
-
- LoggingService.LogWarning ("Unknown TargetFramework '{0}' is being requested from SystemAssemblyService, returning empty TargetFramework", id);
- UpdateFrameworks (new [] { new TargetFramework (id) });
+ // still not found - don't warn, but add .NETCoreApp and .NETStandard frameworks via 'UpdateFrameworks'
+ // LoggingService.LogWarning ("Unknown TargetFramework '{0}' is being requested from SystemAssemblyService, returning empty TargetFramework", id);
+
+ var tf = new TargetFramework (id);
+ UpdateFrameworks (new [] {tf});
return frameworks [id];
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs
index 92f979c70fd..7c1f30fc0c3 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs
@@ -61,15 +61,34 @@ internal TargetFramework (TargetFrameworkMoniker id)
this.name = id.Profile == null
? string.Format ("{0} {1}", id.Identifier, id.Version)
: string.Format ("{0} {1} {2} Profile", id.Identifier, id.Version, id.Profile);
+
+ if (id.Identifier == ".NETCoreApp") {
+ int i = id.Version.IndexOf ('.');
+ int majorVersion = int.Parse (id.Version.Substring (0, i));
+ if (majorVersion >= 5) {
+ this.name = id.Profile == null
+ ? string.Format (".net{0}", id.Version)
+ : string.Format (".net{0} {1}", id.Version, id.Profile);
+ }
+ }
Assemblies = new AssemblyInfo [0];
}
public string Name {
get {
if (string.IsNullOrEmpty (name)) {
- return string.IsNullOrEmpty (id.Profile)
+ name = id.Profile == null
? string.Format ("{0} {1}", id.Identifier, id.Version)
- : string.Format ("{0} {1} ({2})", id.Identifier, id.Version, id.Profile);
+ : string.Format ("{0} {1} {2} Profile", id.Identifier, id.Version, id.Profile);
+ }
+ if (id.Identifier == ".NETCoreApp") {
+ int i = id.Version.IndexOf ('.');
+ int majorVersion = int.Parse (id.Version.Substring (0, i));
+ if (majorVersion >= 5) {
+ name = id.Profile == null
+ ? string.Format (".net{0}", id.Version)
+ : string.Format (".net{0} {1}", id.Version, id.Profile);
+ }
}
return name;
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFrameworkMoniker.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFrameworkMoniker.cs
index 3eb0c2bd8a2..c6fb48e1080 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFrameworkMoniker.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFrameworkMoniker.cs
@@ -31,6 +31,7 @@
using Mono.Addins;
using MonoDevelop.Core.AddIns;
using Mono.PkgConfig;
+
namespace MonoDevelop.Core.Assemblies
{
///
@@ -70,12 +71,16 @@ public TargetFrameworkMoniker (string identifier, string version, string profile
this.identifier = identifier;
this.version = version;
this.profile = profile;
+ this.shortName = ShortName;
+
}
///
/// The root identifier of the framework, e.g. ".NETFramework" or "Silverlight"
///
- public string Identifier { get { return identifier; } }
+ public string Identifier {
+ get { return identifier; }
+ }
///
/// The version of the framework.
@@ -88,7 +93,7 @@ public TargetFrameworkMoniker (string identifier, string version, string profile
public string Profile { get { return profile; } }
///
- /// Short name (e.g. net471, netcoreapp2.0)
+ /// Short name (e.g. net471, netcoreapp3.1, net5.0, etc)
///
public string ShortName {
get {
@@ -237,12 +242,13 @@ public override int GetHashCode ()
static string GetShortFrameworkName (TargetFrameworkMoniker framework)
{
if (IsNetFramework (framework))
- return GetShortNetFrameworkName (framework);
+ return GetShortNetFrameworkName (framework); // .NETFramework short names
- string identifier = GetShortFrameworkIdentifier (framework);
+ string identifier = GetShortFrameworkIdentifier (framework); // .NETCoreApp and .net short names
return identifier + framework.Version;
}
+ // .NETCoreApp and .net short ('friendly') names
static string GetShortFrameworkIdentifier (TargetFrameworkMoniker framework)
{
if (string.IsNullOrEmpty (framework.Identifier))
@@ -253,12 +259,27 @@ static string GetShortFrameworkIdentifier (TargetFrameworkMoniker framework)
if (shortFrameworkIdentifier [0] == '.')
shortFrameworkIdentifier = shortFrameworkIdentifier.Substring (1);
- return shortFrameworkIdentifier.ToLower ();
+ if (shortFrameworkIdentifier == "NETCoreApp") {
+ // .net5.0 and .net6.0 plus use net5.0 etc rather than netcoreapp5.0 etc
+ // see https://docs.microsoft.com/en-us/dotnet/standard/frameworks#supported-target-frameworks
+ // also allow for eventual net10.0+
+ int i = framework.Version.IndexOf ('.');
+ int majorVersion = int.Parse (framework.Version.Substring (0,i));
+ if (majorVersion >= 5) {
+ return "net";
+ } else {
+ return shortFrameworkIdentifier.ToLower (); // eg netcoreapp
+ }
+ } else {
+ return shortFrameworkIdentifier.ToLower(); // catch anything else
+ }
+
}
+ // Handle .NETFramework (but NOT .NETCoreApp and .net5.0+) names
static string GetShortNetFrameworkName (TargetFrameworkMoniker framework)
{
- return "net" + framework.Version.Replace (".", string.Empty);
+ return "net" + framework.Version.Replace (".", string.Empty); // eg net472 for .NETFramework 4.7.2
}
static bool IsNetFramework (TargetFrameworkMoniker framework)
@@ -344,6 +365,10 @@ public static TargetFrameworkMoniker NET_4_7_2 {
get { return new TargetFrameworkMoniker ("4.7.2"); }
}
+ public static TargetFrameworkMoniker NET_4_8 {
+ get { return new TargetFrameworkMoniker ("4.8"); }
+ }
+
public static TargetFrameworkMoniker PORTABLE_4_0 {
get { return new TargetFrameworkMoniker (ID_PORTABLE, "4.0", "Profile1"); }
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessService.cs
index 6e39a2368d2..f6b488a9795 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessService.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessService.cs
@@ -168,10 +168,10 @@ public ProcessWrapper StartProcess (ProcessStartInfo startInfo, ProcessEventHand
public ProcessStartInfo CreateProcessStartInfo (string command, string arguments, string workingDirectory, bool redirectStandardInput)
{
if (command == null)
- throw new ArgumentNullException("command");
+ throw new ArgumentNullException(nameof(command));
if (command.Length == 0)
- throw new ArgumentException("command");
+ throw new ArgumentException($"\'{nameof(command)}\' cannot be empty", nameof(command));
ProcessStartInfo startInfo = null;
if(String.IsNullOrEmpty (arguments))
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/RequestHelper.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/RequestHelper.cs
index fb298607697..43892821700 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/RequestHelper.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/RequestHelper.cs
@@ -1,4 +1,4 @@
-//
+//
// From NuGet src/Core
//
// Copyright (c) 2010-2014 Outercurve Foundation
@@ -383,12 +383,12 @@ private static bool ShouldKeepAliveBeUsedInRequest(HttpWebRequest request, IHttp
{
if (request == null)
{
- throw new ArgumentNullException("request");
+ throw new ArgumentNullException(nameof(request));
}
if (response == null)
{
- throw new ArgumentNullException("response");
+ throw new ArgumentNullException(nameof(response));
}
return !request.KeepAlive && IsNtlmOrKerberos(response.AuthType);
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj
index 31017530903..4ed1e937e1a 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj
@@ -85,28 +85,30 @@
-
+
-
+
+
-
- Microsoft.VisualStudio.Composition
- true
-
+
+
+
+
+
-
-
-
+
+
+
-
+
@@ -627,7 +629,6 @@
-
@@ -745,10 +746,10 @@
-
+
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/IntrinsicFunctions.Extensions.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/IntrinsicFunctions.Extensions.cs
deleted file mode 100644
index 68e79fa7e24..00000000000
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/IntrinsicFunctions.Extensions.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-//
-// IntrinsicFunctions.Extensions.cs
-//
-// Author:
-// Marius Ungureanu
-//
-// Copyright (c) 2019 Microsoft Inc.
-//
-// 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;
-namespace Microsoft.Build.Evaluation
-{
- internal static partial class IntrinsicFunctions
- {
- // Similar to https://github.com/microsoft/msbuild/pull/4731
- // This avoids creating a string copy for the purpose of evaluation in metadata items.
- internal static string Copy (string value) => value;
- }
-}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/IntrinsicFunctions.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/IntrinsicFunctions.cs
deleted file mode 100644
index ef0da6883ca..00000000000
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/IntrinsicFunctions.cs
+++ /dev/null
@@ -1,513 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-//-----------------------------------------------------------------------
-//
-// Definition of functions which can be accessed from MSBuild files.
-//-----------------------------------------------------------------------
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Runtime.InteropServices;
-using System.Text.RegularExpressions;
-
-using Microsoft.Build.Internal;
-using Microsoft.Build.Shared;
-using Microsoft.Win32;
-
-using MonoDevelop.Core;
-using MonoDevelop.Core.Assemblies;
-
-
-namespace Microsoft.Build.Evaluation
-{
- ///
- /// The Intrinsic class provides static methods that can be accessed from MSBuild's
- /// property functions using $([MSBuild]::Function(x,y))
- ///
- internal static partial class IntrinsicFunctions
- {
- ///
- /// Add two doubles
- ///
- internal static double Add (double a, double b)
- {
- return a + b;
- }
-
- ///
- /// Add two longs
- ///
- internal static long Add (long a, long b)
- {
- return a + b;
- }
-
- ///
- /// Subtract two doubles
- ///
- internal static double Subtract (double a, double b)
- {
- return a - b;
- }
-
- ///
- /// Subtract two longs
- ///
- internal static long Subtract (long a, long b)
- {
- return a - b;
- }
-
- ///
- /// Multiply two doubles
- ///
- internal static double Multiply (double a, double b)
- {
- return a * b;
- }
-
- ///
- /// Multiply two longs
- ///
- internal static long Multiply (long a, long b)
- {
- return a * b;
- }
-
- ///
- /// Divide two doubles
- ///
- internal static double Divide (double a, double b)
- {
- return a / b;
- }
-
- ///
- /// Divide two longs
- ///
- internal static long Divide (long a, long b)
- {
- return a / b;
- }
-
- ///
- /// Modulo two doubles
- ///
- internal static double Modulo (double a, double b)
- {
- return a % b;
- }
-
- ///
- /// Modulo two longs
- ///
- internal static long Modulo (long a, long b)
- {
- return a % b;
- }
-
- ///
- /// Escape the string according to MSBuild's escaping rules
- ///
- internal static string Escape (string unescaped)
- {
- return EscapingUtilities.Escape (unescaped);
- }
-
- ///
- /// Unescape the string according to MSBuild's escaping rules
- ///
- internal static string Unescape (string escaped)
- {
- return EscapingUtilities.UnescapeAll (escaped);
- }
-
- ///
- /// Perform a bitwise OR on the first and second (first | second)
- ///
- internal static int BitwiseOr (int first, int second)
- {
- return first | second;
- }
-
- ///
- /// Perform a bitwise AND on the first and second (first & second)
- ///
- internal static int BitwiseAnd (int first, int second)
- {
- return first & second;
- }
-
- ///
- /// Perform a bitwise XOR on the first and second (first ^ second)
- ///
- internal static int BitwiseXor (int first, int second)
- {
- return first ^ second;
- }
-
- ///
- /// Perform a bitwise NOT on the first and second (~first)
- ///
- internal static int BitwiseNot (int first)
- {
- return ~first;
- }
-
- ///
- /// Get the value of the registry key and value, default value is null
- ///
- internal static object GetRegistryValue(string keyName, string valueName)
- {
- return Registry.GetValue(keyName, valueName, null /* null to match the $(Regsitry:XYZ@ZBC) behaviour */);
- }
-
- ///
- /// Get the value of the registry key and value
- ///
- internal static object GetRegistryValue(string keyName, string valueName, object defaultValue)
- {
- return Registry.GetValue(keyName, valueName, defaultValue);
- }
-
- ///
- /// Get the value of the registry key from one of the RegistryView's specified
- ///
- internal static object GetRegistryValueFromView(string keyName, string valueName, object defaultValue, params object[] views)
- {
- string subKeyName;
-
- // We will take on handing of default value
- // A we need to act on the null return from the GetValue call below
- // so we can keep searching other registry views
- object result = defaultValue;
-
- // If we haven't been passed any views, then we'll just use the default view
- if (views == null || views.Length == 0)
- {
- views = new object[] { RegistryView.Default };
- }
-
- foreach (object viewObject in views)
- {
- string viewAsString = viewObject as string;
-
- if (viewAsString != null)
- {
- string typeLeafName = typeof(RegistryView).Name + ".";
- string typeFullName = typeof(RegistryView).FullName + ".";
-
- // We'll allow the user to specify the leaf or full type name on the RegistryView enum
- viewAsString = viewAsString.Replace(typeFullName, "").Replace(typeLeafName, "");
-
- // This may throw - and that's fine as the user will receive a controlled version
- // of that error.
- RegistryView view = (RegistryView)Enum.Parse(typeof(RegistryView), viewAsString, true);
-
- if (!Platform.IsWindows && !keyName.StartsWith("HKEY_CURRENT_USER", StringComparison.OrdinalIgnoreCase))
- {
- // Fake common requests to HKLM that we can resolve
-
-
- // See if this asks for a specific SDK
- var m = Regex.Match(keyName,
- @"^HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Microsoft SDKs\\Windows\\v(\d+\.\d+)$",
- RegexOptions.IgnoreCase);
- if (m.Success && m.Groups.Count >= 1 && valueName.Equals("InstallRoot", StringComparison.OrdinalIgnoreCase))
- {
- var mr = MonoDevelop.Core.Runtime.SystemAssemblyService.DefaultRuntime as MonoTargetRuntime;
- if (mr != null)
- return Path.Combine (mr.MonoDirectory, m.Groups [0].Value) + Path.DirectorySeparatorChar;
- }
-
- return string.Empty;
- }
-
- using (RegistryKey key = GetBaseKeyFromKeyName(keyName, view, out subKeyName))
- {
- if (key != null)
- {
- using (RegistryKey subKey = key.OpenSubKey(subKeyName, false))
- {
- // If we managed to retrieve the subkey, then move onto locating the value
- if (subKey != null)
- {
- result = subKey.GetValue(valueName);
- }
-
- // We've found a value, so stop looking
- if (result != null)
- {
- break;
- }
- }
- }
- }
- }
- }
-
- // We will have either found a result or defaultValue if one wasn't found at this point
- return result;
- }
-
- ///
- /// Given the absolute location of a file, and a disc location, returns relative file path to that disk location.
- /// Throws UriFormatException.
- ///
- ///
- /// The base path we want to relativize to. Must be absolute.
- /// Should not include a filename as the last segment will be interpreted as a directory.
- ///
- ///
- /// The path we need to make relative to basePath. The path can be either absolute path or a relative path in which case it is relative to the base path.
- /// If the path cannot be made relative to the base path (for example, it is on another drive), it is returned verbatim.
- ///
- /// relative path (can be the full path)
- internal static string MakeRelative (string basePath, string path)
- {
- string result = FileService.AbsoluteToRelativePath (basePath, path);
-
- return result;
- }
-
- ///
- /// Locate a file in either the directory specified or a location in the
- /// direcorty structure above that directory.
- ///
- internal static string GetDirectoryNameOfFileAbove (string startingDirectory, string fileName)
- {
- // Canonicalize our starting location
- string lookInDirectory = Path.GetFullPath (startingDirectory);
-
- do {
- // Construct the path that we will use to test against
- string possibleFileDirectory = Path.Combine (lookInDirectory, fileName);
-
- // If we successfully locate the file in the directory that we're
- // looking in, simply return that location. Otherwise we'll
- // keep moving up the tree.
- if (File.Exists (possibleFileDirectory)) {
- // We've found the file, return the directory we found it in
- return lookInDirectory;
- } else {
- // GetDirectoryName will return null when we reach the root
- // terminating our search
- lookInDirectory = Path.GetDirectoryName (lookInDirectory);
- }
- }
- while (lookInDirectory != null);
-
- // When we didn't find the location, then return an empty string
- return String.Empty;
- }
-
- ///
- /// Searches for a file based on the specified .
- ///
- /// The file to search for.
- /// An optional directory to start the search in. The default location is the directory
- /// of the file containing the property funciton.
- /// The full path of the file if it is found, otherwise an empty string.
- internal static string GetPathOfFileAbove (string file, string startingDirectory)
- {
- // This method does not accept a path, only a file name
- if (file.Any (i => i.Equals (Path.DirectorySeparatorChar) || i.Equals (Path.AltDirectorySeparatorChar))) {
- throw new ArgumentException ("InvalidGetPathOfFileAboveParameter", file);
- }
-
- // Search for a directory that contains that file
- string directoryName = GetDirectoryNameOfFileAbove (startingDirectory, file);
-
- return String.IsNullOrWhiteSpace (directoryName) ? String.Empty : NormalizePath (directoryName, file);
- }
-
- ///
- /// Return the string in parameter 'defaultValue' only if parameter 'conditionValue' is empty
- /// else, return the value conditionValue
- ///
- internal static string ValueOrDefault (string conditionValue, string defaultValue)
- {
- if (String.IsNullOrEmpty (conditionValue)) {
- return defaultValue;
- } else {
- return conditionValue;
- }
- }
-
- ///
- /// Returns true if a task host exists that can service the requested runtime and architecture
- /// values, and false otherwise.
- ///
- internal static bool DoesTaskHostExist (string runtime, string architecture)
- {
- return false;
- }
-
- ///
- /// If the given path doesn't have a trailing slash then add one.
- /// If the path is an empty string, does not modify it.
- ///
- /// The path to check.
- /// The specified path with a trailing slash.
- internal static string EnsureTrailingSlash (string path)
- {
- return FileUtilities.EnsureTrailingSlash (path);
- }
-
- ///
- /// Gets the canonicalized full path of the provided directory and ensures it contains the correct directory separator characters for the current operating system
- /// while ensuring it has a trailing slash.
- ///
- /// One or more directory paths to combine and normalize.
- /// A canonicalized full directory path with the correct directory separators and a trailing slash.
- internal static string NormalizeDirectory (params string [] path)
- {
- return EnsureTrailingSlash (NormalizePath (path));
- }
-
- ///
- /// Gets the canonicalized full path of the provided path and ensures it contains the correct directory separator characters for the current operating system.
- ///
- /// One or more paths to combine and normalize.
- /// A canonicalized full path with the correct directory separators.
- internal static string NormalizePath (params string [] path)
- {
- return FileUtilities.NormalizePath (Path.Combine (path));
- }
-
- ///
- /// Specify whether the current OS platform is
- ///
- /// The platform string. Must be a member of . Case Insensitive
- ///
- internal static bool IsOSPlatform (string platformString)
- {
- return RuntimeInformation.IsOSPlatform (OSPlatform.Create (platformString.ToUpperInvariant ()));
- }
-
- ///
- /// True if current OS is a Unix system.
- ///
- ///
- internal static bool IsOsUnixLike ()
- {
- return !Platform.IsWindows;
- }
-
- //public static string GetCurrentToolsDirectory ()
- //{
- // return BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory;
- //}
-
- //public static string GetToolsDirectory32 ()
- //{
- // return BuildEnvironmentHelper.Instance.MSBuildToolsDirectory32;
- //}
-
- //public static string GetToolsDirectory64 ()
- //{
- // return BuildEnvironmentHelper.Instance.MSBuildToolsDirectory64;
- //}
-
- //public static string GetMSBuildSDKsPath ()
- //{
- // return BuildEnvironmentHelper.Instance.MSBuildSDKsPath;
- //}
-
- //public static string GetVsInstallRoot ()
- //{
- // return BuildEnvironmentHelper.Instance.VisualStudioInstallRootDirectory;
- //}
-
- //public static string GetProgramFiles32 ()
- //{
- // return FrameworkLocationHelper.programFiles32;
- //}
-
- //public static string GetMSBuildExtensionsPath ()
- //{
- // return BuildEnvironmentHelper.Instance.MSBuildExtensionsPath;
- //}
-
- #region Debug only intrinsics
-
- ///
- /// returns if the string contains escaped wildcards
- ///
- internal static List __GetListTest ()
- {
- return new List { "A", "B", "C", "D" };
- }
-
- #endregion
-
- ///
- /// Following function will parse a keyName and returns the basekey for it.
- /// It will also store the subkey name in the out parameter.
- /// If the keyName is not valid, we will throw ArgumentException.
- /// The return value shouldn't be null.
- /// Taken from: \ndp\clr\src\BCL\Microsoft\Win32\Registry.cs
- ///
- private static RegistryKey GetBaseKeyFromKeyName(string keyName, RegistryView view, out string subKeyName)
- {
- if (keyName == null)
- {
- throw new ArgumentNullException("keyName");
- }
-
- string basekeyName;
- int i = keyName.IndexOf('\\');
- if (i != -1)
- {
- basekeyName = keyName.Substring(0, i).ToUpperInvariant();
- }
- else
- {
- basekeyName = keyName.ToUpperInvariant();
- }
-
- RegistryKey basekey = null;
-
- switch (basekeyName)
- {
- case "HKEY_CURRENT_USER":
- basekey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, view);
- break;
- case "HKEY_LOCAL_MACHINE":
- basekey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, view);
- break;
- case "HKEY_CLASSES_ROOT":
- basekey = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, view);
- break;
- case "HKEY_USERS":
- basekey = RegistryKey.OpenBaseKey(RegistryHive.Users, view);
- break;
- case "HKEY_PERFORMANCE_DATA":
- basekey = RegistryKey.OpenBaseKey(RegistryHive.PerformanceData, view);
- break;
- case "HKEY_CURRENT_CONFIG":
- basekey = RegistryKey.OpenBaseKey(RegistryHive.CurrentConfig, view);
- break;
- case "HKEY_DYN_DATA":
- basekey = RegistryKey.OpenBaseKey(RegistryHive.DynData, view);
- break;
- default:
- throw new ArgumentException (keyName);
- }
-
- if (i == -1 || i == keyName.Length)
- {
- subKeyName = string.Empty;
- }
- else
- {
- subKeyName = keyName.Substring(i + 1, keyName.Length - i - 1);
- }
-
- return basekey;
- }
- }
-}
\ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildEvaluationContext.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildEvaluationContext.cs
index 34d9058f179..9b52d8ca38f 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildEvaluationContext.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.MSBuild/MSBuildEvaluationContext.cs
@@ -32,10 +32,10 @@
using System.Text;
using MonoDevelop.Core;
using System.Reflection;
+using Microsoft.Build.Evaluation;
using Microsoft.Build.Utilities;
using MonoDevelop.Projects.MSBuild.Conditions;
using System.Globalization;
-using Microsoft.Build.Evaluation;
using Microsoft.Build.Exceptions;
using MonoDevelop.Projects.Extensions;
using System.Collections;
@@ -89,10 +89,10 @@ public MSBuildEvaluationContext (MSBuildEvaluationContext parentContext)
internal void InitEvaluation (MSBuildProject project)
{
- this.project = project;
-
- // Project file properties
-
+ this.project = project;
+
+ // Project file properties
+
properties.Add ("MSBuildThisFile", Path.GetFileName (project.FileName));
properties.Add ("MSBuildThisFileName", project.FileName.FileNameWithoutExtension);
properties.Add ("MSBuildThisFileExtension", Path.GetExtension (project.FileName));
@@ -100,10 +100,10 @@ internal void InitEvaluation (MSBuildProject project)
string dir = Path.GetDirectoryName (project.FileName) + Path.DirectorySeparatorChar;
properties.Add ("MSBuildThisFileDirectory", MSBuildProjectService.ToMSBuildPath (null, dir));
- properties.Add ("MSBuildThisFileDirectoryNoRoot", MSBuildProjectService.ToMSBuildPath (null, dir.Substring (Path.GetPathRoot (dir).Length)));
-
- // Properties only set for the root project, not for imported projects
-
+ properties.Add ("MSBuildThisFileDirectoryNoRoot", MSBuildProjectService.ToMSBuildPath (null, dir.Substring (Path.GetPathRoot (dir).Length)));
+
+ // Properties only set for the root project, not for imported projects
+
if (parentContext == null) {
properties.Add ("VisualStudioReferenceAssemblyVersion", project.ToolsVersion + ".0.0");
properties.Add ("MSBuildProjectDefaultTargets", project.DefaultTargets);
@@ -117,13 +117,18 @@ internal void InitEvaluation (MSBuildProject project)
properties.Add ("MSBuildProjectDirectoryNoRoot", MSBuildProjectService.ToMSBuildPath (null, dir.Substring (Path.GetPathRoot (dir).Length)));
InitEngineProperties (project.TargetRuntime ?? Runtime.SystemAssemblyService.DefaultRuntime, properties, out searchPaths);
- }
+ }
}
- static void InitEngineProperties (Core.Assemblies.TargetRuntime runtime, Dictionary properties, out List searchPaths)
+ // These are initialised in 'InitEngineProperties' below
+ static Type typeofIntrinsicFunctions; // = typeof ("Microsoft.Build.Evaluation.IntrinsicFunctions")
+ static Dictionary cachedIntrinsicFunctions;
+
+ static void InitEngineProperties (Core.Assemblies.TargetRuntime runtime, Dictionary properties, out List searchPaths)
{
string toolsVersion = "Current";
string visualStudioVersion = "16.0";
+ string monoMSBuildVersion = "16.0"; // This is the last 'Mono' MSBuild version. Version 17.0+ is 'dotnet' MSBuild
var toolsPath = runtime.GetMSBuildToolsPath (toolsVersion);
if (toolsPath == null) {
@@ -132,6 +137,12 @@ static void InitEngineProperties (Core.Assemblies.TargetRuntime runtime, Diction
toolsPath = runtime.GetMSBuildToolsPath (toolsVersion);
}
+ // From net6.0 onwards, a Reserved Property "MSBuilVersion" is evaluated to compare with "16.0" or "17.0"
+ // This property is currently not in the project properties, and as a result throws an exception.
+ // Adding this property, and setting it to the final Mono "MSBuildVersion", fixes this for now (Dec 2022)
+ // However, this value is not 'dynamic', as it doesn't read the *actual* version of the current MSBuild
+ properties.Add ("MSBuildVersion", monoMSBuildVersion);
+
properties.Add ("MSBuildAssemblyVersion", toolsVersion);
//VisualStudioVersion is a property set by MSBuild itself
properties.Add ("VisualStudioVersion", visualStudioVersion);
@@ -150,39 +161,50 @@ static void InitEngineProperties (Core.Assemblies.TargetRuntime runtime, Diction
var frameworkToolsPath = ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.VersionLatest);
var frameworkToolsPathEscaped = MSBuildProjectService.ToMSBuildPath (null, frameworkToolsPath);
properties.Add ("MSBuildFrameworkToolsPath", frameworkToolsPathEscaped);
- properties.Add ("MSBuildFrameworkToolsPath32", frameworkToolsPathEscaped);
-
+ properties.Add ("MSBuildFrameworkToolsPath32", frameworkToolsPathEscaped);
+
searchPaths = MSBuildProjectService.GetProjectImportSearchPaths (runtime, true).ToList ();
- if (Platform.IsWindows) {
- //first use extensions path relative to bindir (MSBuild/15.0/Bin). this works for dev15 isolated install.
- var msBuildExtensionsPath = Path.GetFullPath (Path.Combine (msBuildBinPath, "..", ".."));
- var msBuildExtensionsPathEscaped = MSBuildProjectService.ToMSBuildPath (null, msBuildExtensionsPath);
- properties.Add ("MSBuildExtensionsPath", msBuildExtensionsPathEscaped);
- properties.Add ("MSBuildExtensionsPath32", msBuildExtensionsPathEscaped);
- properties.Add ("MSBuildExtensionsPath64", msBuildExtensionsPathEscaped);
-
+ // initialise the static Dictionary 'cachedIntrinsicFunctions' from Microsoft.Build.dll IntrinsicFunctions
+ // this avoids re-importing all msBuild IntrinsicFunctions into MonoDevelop code whenever they change (ie often)
+
+ Assembly microsoftBuild = Assembly.LoadFrom (msBuildBinPath + "/Microsoft.Build.dll");
+ typeofIntrinsicFunctions = microsoftBuild.GetType ("Microsoft.Build.Evaluation.IntrinsicFunctions");
+
+ cachedIntrinsicFunctions = typeofIntrinsicFunctions
+ .GetMethods (BindingFlags.NonPublic | BindingFlags.IgnoreCase | BindingFlags.Static)
+ .ToLookup (x => x.Name)
+ .ToDictionary (x => x.Key, x => x.ToArray (), StringComparer.OrdinalIgnoreCase);
+
+ if (Platform.IsWindows) {
+ //first use extensions path relative to bindir (MSBuild/15.0/Bin). this works for dev15 isolated install.
+ var msBuildExtensionsPath = Path.GetFullPath (Path.Combine (msBuildBinPath, "..", ".."));
+ var msBuildExtensionsPathEscaped = MSBuildProjectService.ToMSBuildPath (null, msBuildExtensionsPath);
+ properties.Add ("MSBuildExtensionsPath", msBuildExtensionsPathEscaped);
+ properties.Add ("MSBuildExtensionsPath32", msBuildExtensionsPathEscaped);
+ properties.Add ("MSBuildExtensionsPath64", msBuildExtensionsPathEscaped);
+
var vsToolsPathEscaped = MSBuildProjectService.ToMSBuildPath (null, Path.Combine (msBuildExtensionsPath, "Microsoft", "VisualStudio", "v" + visualStudioVersion));
- properties.Add ("VSToolsPath", vsToolsPathEscaped);
-
- //like the dev15 toolset, add fallbacks to the old global paths
-
- // Taken from MSBuild source:
+ properties.Add ("VSToolsPath", vsToolsPathEscaped);
+
+ //like the dev15 toolset, add fallbacks to the old global paths
+
+ // Taken from MSBuild source:
var programFiles = Environment.GetFolderPath (Environment.SpecialFolder.ProgramFiles);
var programFiles32 = Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86);
if (string.IsNullOrEmpty (programFiles32))
- programFiles32 = programFiles; // 32 bit box
-
+ programFiles32 = programFiles; // 32 bit box
+
string programFiles64;
- if (programFiles == programFiles32) {
- // either we're in a 32-bit window, or we're on a 32-bit machine.
- // if we're on a 32-bit machine, ProgramW6432 won't exist
- // if we're on a 64-bit machine, ProgramW6432 will point to the correct Program Files.
+ if (programFiles == programFiles32) {
+ // either we're in a 32-bit window, or we're on a 32-bit machine.
+ // if we're on a 32-bit machine, ProgramW6432 won't exist
+ // if we're on a 64-bit machine, ProgramW6432 will point to the correct Program Files.
programFiles64 = Environment.GetEnvironmentVariable ("ProgramW6432");
}
- else {
- // 64-bit window on a 64-bit machine; %ProgramFiles% points to the 64-bit
- // Program Files already.
+ else {
+ // 64-bit window on a 64-bit machine; %ProgramFiles% points to the 64-bit
+ // Program Files already.
programFiles64 = programFiles;
}
@@ -191,16 +213,16 @@ static void InitEngineProperties (Core.Assemblies.TargetRuntime runtime, Diction
if (programFiles64 != null) {
var extensionsPath64Escaped = MSBuildProjectService.ToMSBuildPath (null, Path.Combine (programFiles64, "MSBuild"));
- searchPaths.Insert (0, new ImportSearchPathExtensionNode { Property = "MSBuildExtensionsPath64", Path = extensionsPath64Escaped });
- }
-
- //yes, dev15's toolset has the 64-bit path fall back to the 32-bit one
- searchPaths.Insert (0, new ImportSearchPathExtensionNode { Property = "MSBuildExtensionsPath64", Path = extensionsPath32Escaped });
-
- // MSBuildExtensionsPath: The way this used to work is that it would point to "Program Files\MSBuild" on both
- // 32-bit and 64-bit machines. We have a switch to continue using that behavior; however the default is now for
- // MSBuildExtensionsPath to always point to the same location as MSBuildExtensionsPath32.
-
+ searchPaths.Insert (0, new ImportSearchPathExtensionNode { Property = "MSBuildExtensionsPath64", Path = extensionsPath64Escaped });
+ }
+
+ //yes, dev15's toolset has the 64-bit path fall back to the 32-bit one
+ searchPaths.Insert (0, new ImportSearchPathExtensionNode { Property = "MSBuildExtensionsPath64", Path = extensionsPath32Escaped });
+
+ // MSBuildExtensionsPath: The way this used to work is that it would point to "Program Files\MSBuild" on both
+ // 32-bit and 64-bit machines. We have a switch to continue using that behavior; however the default is now for
+ // MSBuildExtensionsPath to always point to the same location as MSBuildExtensionsPath32.
+
bool useLegacyMSBuildExtensionsPathBehavior = !string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("MSBUILDLEGACYEXTENSIONSPATH"));
string extensionsPath;
@@ -215,23 +237,23 @@ static void InitEngineProperties (Core.Assemblies.TargetRuntime runtime, Diction
var msBuildExtensionsPathEscaped = MSBuildProjectService.ToMSBuildPath (null, msBuildExtensionsPath);
properties.Add ("MSBuildExtensionsPath", msBuildExtensionsPathEscaped);
properties.Add ("MSBuildExtensionsPath32", msBuildExtensionsPathEscaped);
- properties.Add ("MSBuildExtensionsPath64", msBuildExtensionsPathEscaped);
-
+ properties.Add ("MSBuildExtensionsPath64", msBuildExtensionsPathEscaped);
+
var vsToolsPathEscaped = MSBuildProjectService.ToMSBuildPath (null, Path.Combine (msBuildExtensionsPath, "Microsoft", "VisualStudio", "v" + visualStudioVersion));
properties.Add ("VSToolsPath", vsToolsPathEscaped);
- }
-
- // Environment
-
- properties.Add ("MSBuildProgramFiles32", MSBuildProjectService.ToMSBuildPath (null, Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86)));
-
- // Custom override of MSBuildExtensionsPath using an env var
-
+ }
+
+ // Environment
+
+ properties.Add ("MSBuildProgramFiles32", MSBuildProjectService.ToMSBuildPath (null, Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86)));
+
+ // Custom override of MSBuildExtensionsPath using an env var
+
var customExtensionsPath = Environment.GetEnvironmentVariable ("MSBuildExtensionsPath");
if (!string.IsNullOrEmpty (customExtensionsPath)) {
- if (IsExternalMSBuildExtensionsPath (customExtensionsPath))
- // This is actually an override of the mono extensions path. Don't replace the default MSBuildExtensionsPath value since
- // core targets still need to be loaded from there.
+ if (IsExternalMSBuildExtensionsPath (customExtensionsPath))
+ // This is actually an override of the mono extensions path. Don't replace the default MSBuildExtensionsPath value since
+ // core targets still need to be loaded from there.
searchPaths.Insert (0, new ImportSearchPathExtensionNode { Property = "MSBuildExtensionsPath", Path = customExtensionsPath });
else
properties["MSBuildExtensionsPath"] = MSBuildProjectService.ToMSBuildPath (null, customExtensionsPath);
@@ -287,12 +309,19 @@ internal void ClearItemContext ()
string GetPropertyValue (string name)
{
string val;
+ // Try properties and parentContext properties
if (properties.TryGetValue (name, out val))
return val;
if (parentContext != null)
return parentContext.GetPropertyValue (name);
- return (string)envVars [name];
+ // if not found, try environment variables
+ if (envVars [name] != null) {
+ return (string)envVars [name];
+ }
+
+ // PropertyValue [name] not found
+ return "";
}
public string GetMetadataValue (string name)
@@ -457,8 +486,10 @@ string Evaluate (string str, StringBuilder sb, List evalua
int j = i;
object val;
bool nie;
+
if (!EvaluateReference (str.AsSpan (), evaluatedItemsCollection, ref j, out val, out nie))
allResolved = false;
+
needsItemEvaluation |= nie;
sb.Append (ValueToString (val));
last = j;
@@ -557,6 +588,7 @@ bool EvaluateProperty (ReadOnlySpan prop, bool ignorePropsWithTransforms,
{
needsItemEvaluation = false;
val = null;
+
if (prop [0] == '[') {
int i = prop.IndexOf (']');
if (i == -1 || (prop.Length - i) < 3 || prop [i + 1] != ':' || prop [i + 2] != ':')
@@ -604,7 +636,6 @@ bool EvaluateMemberOrIndexer (Type type, object instance, ReadOnlySpan str
internal bool EvaluateMember (Type type, object instance, ReadOnlySpan str, int i, out object val)
{
val = null;
-
// Find the delimiter of the member
int j = str.IndexOfAny (MemberDelimiter, i);
if (j == -1)
@@ -618,6 +649,7 @@ internal bool EvaluateMember (Type type, object instance, ReadOnlySpan str
// It is a method invocation
object [] parameterValues;
j++;
+
if (!EvaluateParameters (str, ref j, out parameterValues))
return false;
@@ -690,6 +722,7 @@ internal bool EvaluateMember (ReadOnlySpan str, Type type, string memberNa
var member = ResolveMember (type, memberName, instance == null, MemberTypes.Method);
if (member == null || member.Length == 0)
return false;
+
return EvaluateMethod (str, member, instance, parameterValues, out val);
}
@@ -699,18 +732,19 @@ bool EvaluateMethod (ReadOnlySpan str, MemberInfo[] member, object instanc
// Find a method with a matching number of parameters
var (method, methodParams) = FindBestOverload (member, parameterValues, out var paramsArgType);
+
if (method == null)
return false;
try {
// Convert the given parameters to the types specified in the method signature
- var convertedArgs = (methodParams.Length == parameterValues.Length) ? parameterValues : new object [methodParams.Length];
+ var convertedArgs = (methodParams.Length == parameterValues.Length) ? parameterValues : new object [methodParams.Length];
int numArgs = methodParams.Length;
if (paramsArgType != null)
numArgs--;
- if (method.DeclaringType == typeof (IntrinsicFunctions) && method.Name == nameof (IntrinsicFunctions.GetPathOfFileAbove) && parameterValues.Length == methodParams.Length - 1) {
+ if (method.DeclaringType == typeofIntrinsicFunctions && method.Name == "GetPathOfFileAbove" && parameterValues.Length == methodParams.Length - 1) {
string startingDirectory = String.IsNullOrWhiteSpace (FullFileName) ? String.Empty : Path.GetDirectoryName (FullFileName);
var last = convertedArgs.Length - 1;
convertedArgs [last] = ConvertArg (method, last, startingDirectory, methodParams [last].ParameterType);
@@ -758,6 +792,7 @@ bool EvaluateMethod (ReadOnlySpan str, MemberInfo[] member, object instanc
}
}
val = method.Invoke (instance, convertedArgs);
+
} catch (Exception ex) {
LoggingService.LogError ("MSBuild property evaluation failed: " + str.ToString (), ex);
return false;
@@ -817,7 +852,7 @@ internal bool EvaluateParameters (ReadOnlySpan str, ref int i, out object[
var argInfo = m.GetParameters ();
if (args.Length == argInfo.Length - 1) {
- if (m.DeclaringType == typeof (IntrinsicFunctions) && m.Name == nameof (IntrinsicFunctions.GetPathOfFileAbove)) {
+ if (m.DeclaringType == typeofIntrinsicFunctions && m.Name == "GetPathOfFileAbove") {
validMatch = (m, argInfo);
continue;
}
@@ -986,7 +1021,7 @@ object ConvertArg (MethodBase method, int argNum, object value, Type parameterTy
else if (method.DeclaringType == typeof (System.IO.Path))
// The windows path is already converted to a native path, but it may contain escape sequences
res = MSBuildProjectService.UnescapePath ((string)res);
- else if (method.DeclaringType == typeof (IntrinsicFunctions)) {
+ else if (method.DeclaringType == typeofIntrinsicFunctions) {
if (method.Name == "MakeRelative")
convertPath = true;
else if (method.Name == "GetDirectoryNameOfFileAbove" && argNum == 0)
@@ -1017,7 +1052,7 @@ bool EvaluateList (ReadOnlySpan prop, List evaluated
Type ResolveType (string typeName)
{
if (typeName == "MSBuild")
- return typeof (Microsoft.Build.Evaluation.IntrinsicFunctions);
+ return typeofIntrinsicFunctions;
foreach (var kvp in supportedTypeMembers) {
if (kvp.Key.FullName == typeName)
@@ -1026,24 +1061,15 @@ Type ResolveType (string typeName)
return null;
}
- static readonly Dictionary cachedIntrinsicFunctions = typeof (IntrinsicFunctions)
- .GetMethods (BindingFlags.NonPublic | BindingFlags.IgnoreCase | BindingFlags.Static)
- .ToLookup (x => x.Name)
- .ToDictionary(x => x.Key, x => x.ToArray (), StringComparer.OrdinalIgnoreCase);
-
- MemberInfo[] ResolveMember (Type type, string memberName, bool isStatic, MemberTypes memberTypes)
+ MemberInfo [] ResolveMember (Type type, string memberName, bool isStatic, MemberTypes memberTypes)
{
- if (type == typeof (string)) {
- if (memberName == "new" || memberName == "Copy") {
- type = typeof (IntrinsicFunctions);
- memberName = "Copy";
- }
- } else {
- if (type.IsArray)
- type = typeof (Array);
- }
+ if (type == typeof (string) && memberName == "new")
+ memberName = "Copy";
+
+ if (type.IsArray)
+ type = typeof (Array);
- if (type == typeof(IntrinsicFunctions)) {
+ if (type == typeofIntrinsicFunctions) {
return cachedIntrinsicFunctions.TryGetValue (memberName, out var result) ? result : null;
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Utilities/LibraryTools.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Utilities/LibraryTools.cs
new file mode 100644
index 00000000000..e774bb3fef0
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Utilities/LibraryTools.cs
@@ -0,0 +1,101 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace MonoDevelop.Utilities
+{
+ public class LibraryTools
+ {
+ private class Windows
+ {
+ [DllImport ("kernel32", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)]
+ public static extern IntPtr GetProcAddress (IntPtr hModule, string procName);
+
+ [DllImport ("kernel32", SetLastError = true, CharSet = CharSet.Unicode)]
+ public static extern IntPtr LoadLibraryW (string lpszLib);
+ }
+
+ private class Linux
+ {
+ [DllImport ("libdl.so.2")]
+ public static extern IntPtr dlopen (string path, int flags);
+
+ [DllImport ("libdl.so.2")]
+ public static extern IntPtr dlsym (IntPtr handle, string symbol);
+ }
+
+ private class OSX
+ {
+ [DllImport ("/usr/lib/libSystem.dylib")]
+ public static extern IntPtr dlopen (string path, int flags);
+
+ [DllImport ("/usr/lib/libSystem.dylib")]
+ public static extern IntPtr dlsym (IntPtr handle, string symbol);
+ }
+
+ [DllImport ("libc")]
+ private static extern int uname (IntPtr buf);
+
+ private const int RTLD_LAZY = 0x0001;
+ private const int RTLD_GLOBAL = 0x0100;
+
+ public static bool IsWindows, IsOSX;
+
+ static LibraryTools ()
+ {
+ switch (Environment.OSVersion.Platform) {
+ case PlatformID.Win32NT:
+ case PlatformID.Win32S:
+ case PlatformID.Win32Windows:
+ case PlatformID.WinCE:
+ IsWindows = true;
+ break;
+ case PlatformID.MacOSX:
+ IsOSX = true;
+ break;
+ case PlatformID.Unix:
+ try {
+ var buf = Marshal.AllocHGlobal (8192);
+ if (uname (buf) == 0 && Marshal.PtrToStringAnsi (buf) == "Darwin")
+ IsOSX = true;
+
+ Marshal.FreeHGlobal (buf);
+ } catch { }
+
+ break;
+ }
+ }
+
+ public static IntPtr LoadLibrary (string libname)
+ {
+ if (IsWindows)
+ return Windows.LoadLibraryW (libname);
+
+ if (IsOSX)
+ return OSX.dlopen (libname, RTLD_GLOBAL | RTLD_LAZY);
+
+ return Linux.dlopen (libname, RTLD_GLOBAL | RTLD_LAZY);
+ }
+
+ public static IntPtr GetProcAddress (IntPtr library, string function)
+ {
+ var ret = IntPtr.Zero;
+
+ if (IsWindows)
+ ret = Windows.GetProcAddress (library, function);
+ else if (IsOSX)
+ ret = OSX.dlsym (library, function);
+ else
+ ret = Linux.dlsym (library, function);
+
+ return ret;
+ }
+
+ public static T LoadFunction (IntPtr procaddress)
+ {
+ if (procaddress == IntPtr.Zero)
+ return default (T);
+
+ return Marshal.GetDelegateForFunctionPointer (procaddress);
+ }
+ }
+}
\ No newline at end of file
diff --git a/main/src/core/MonoDevelop.GtkExtensions/Gtk/ComboBoxEntry.cs b/main/src/core/MonoDevelop.GtkExtensions/Gtk/ComboBoxEntry.cs
new file mode 100644
index 00000000000..a68995a8dd2
--- /dev/null
+++ b/main/src/core/MonoDevelop.GtkExtensions/Gtk/ComboBoxEntry.cs
@@ -0,0 +1,12 @@
+namespace Gtk
+{
+#if GTK3
+
+ public class ComboBoxEntry : ComboBox
+ {
+ public int TextColumn { get; set; }
+ }
+
+#endif
+
+}
\ No newline at end of file
diff --git a/main/src/core/MonoDevelop.GtkExtensions/Gtk/GtkSharpWorkarounds.cs b/main/src/core/MonoDevelop.GtkExtensions/Gtk/GtkSharpWorkarounds.cs
new file mode 100644
index 00000000000..81f40519d7b
--- /dev/null
+++ b/main/src/core/MonoDevelop.GtkExtensions/Gtk/GtkSharpWorkarounds.cs
@@ -0,0 +1,88 @@
+using System;
+using Gdk;
+using Gtk;
+
+namespace Gtk
+{
+
+#if GTK3
+
+ public static class GtkSharpWorkarounds
+ {
+
+ public static Color ToGdkColor (this Gdk.RGBA color) => new Color ((byte) (color.Red * 255),
+ (byte) (color.Green * 255), (byte) (color.Blue * 255));
+
+ public static Gdk.Color ColorFor (this Gtk.StyleContext ctx, string postfix, Gtk.StateType state)
+ {
+ var prefix = string.Empty;
+ // see: https://developer.gnome.org/gtk3/stable/gtk-migrating-GtkStyleContext-css.html
+ // examples: (see: gtk.css) selected_bg_color insensitive_bg_color base_color theme_text_color insensitive_base_color theme_unfocused_fg_color theme_unfocused_text_color theme_unfocused_bg_color
+
+ switch (state) {
+ case StateType.Normal:
+ prefix = "theme_unfocused_";
+ break;
+ case StateType.Active:
+ break;
+ case StateType.Prelight:
+ break;
+ case StateType.Selected:
+ prefix = "selected_";
+ break;
+ case StateType.Insensitive:
+ prefix = "insensitive_";
+ break;
+ case StateType.Inconsistent:
+ break;
+ case StateType.Focused:
+ break;
+ default:
+ throw new ArgumentOutOfRangeException (nameof(state), state, null);
+ }
+
+ if (ctx.LookupColor ($"{prefix}{postfix}_color", out var col)) {
+ return col.ToGdkColor ();
+ }
+
+ ctx.LookupColor ("base_color", out col);
+ return col.ToGdkColor ();
+ }
+
+ public static Gdk.Color Background (this Gtk.Style it, Gtk.StateType state)
+ {
+ return it.Context.ColorFor ("bg", state);
+ }
+
+ public static Gdk.Color Dark (this Gtk.Style it, Gtk.StateType state)
+ {
+ // TODO
+ return it.Foreground (state);
+ }
+
+ public static Gdk.Color Foreground (this Gtk.Style it, Gtk.StateType state)
+ {
+ return it.Context.ColorFor ("fg", state);
+ }
+
+ public static Gdk.Color Base (this Gtk.Style it, Gtk.StateType state)
+ {
+ return it.Context.ColorFor ("", state);
+ }
+
+ public static void ModifyBase (this Gtk.Widget it, Gtk.StateType state, Gdk.Color color)
+ {
+ // TODO
+ }
+
+ public static void PaintFocus (this Style style, Cairo.Context context, StateType stateType, Widget widget,
+ string detail, int x, int y, int width, int height)
+ {
+ style.Context.RenderFocus (context, x, y, width, height);
+ }
+
+ }
+
+#endif
+
+}
\ No newline at end of file
diff --git a/main/src/core/MonoDevelop.GtkExtensions/MonoDevelop.GtkExtensions.csproj b/main/src/core/MonoDevelop.GtkExtensions/MonoDevelop.GtkExtensions.csproj
new file mode 100644
index 00000000000..80f964a1859
--- /dev/null
+++ b/main/src/core/MonoDevelop.GtkExtensions/MonoDevelop.GtkExtensions.csproj
@@ -0,0 +1,13 @@
+
+
+
+
+ $(MDTargetFramework)
+ {288994D1-C7E1-4740-99AB-A52B572EBA8A}
+ $(RootDirectory)\build\bin
+ false
+ MonoDevelop.GtkWorkarounds
+
+
+
+
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
index e9d314c67c1..23e34193af4 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
@@ -300,7 +300,7 @@
-
+
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs
index f7bf217adac..91bfacedac9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs
@@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
+using MonoDevelop.Core;
#if MAC
using AppKit;
@@ -209,14 +210,18 @@ public ActionDelegate (Gtk.Widget widget)
return;
}
- HandleSignalAttachment ((signal, handler) => signal.AddDelegate (handler));
+ if (Platform.IsMac) {
+ HandleSignalAttachment ((signal, handler) => signal.AddDelegate (handler));
+ }
}
void WidgetDestroyed (object sender, EventArgs e)
{
FreeActions ();
+ if (Platform.IsMac) {
+ HandleSignalAttachment ((signal, handler) => signal.RemoveDelegate (handler));
+ }
- HandleSignalAttachment ((signal, handler) => signal.RemoveDelegate (handler));
owner = null;
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest.Results/GtkTreeModelResult.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest.Results/GtkTreeModelResult.cs
index af2f847622a..ad6db4ba8b3 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest.Results/GtkTreeModelResult.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest.Results/GtkTreeModelResult.cs
@@ -28,6 +28,9 @@
using System.Reflection;
using Gtk;
using System.Linq;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Components.AutoTest.Results
{
@@ -216,7 +219,7 @@ List FetchIterChildren (TreeIter iter, GtkTreeModelResult result, boo
child.PreviousSibling = previousSibling;
if (previousSibling != null)
previousSibling.NextSibling = child;
-
+
newList.Add (child);
if (recursive) {
var childrenIter = FetchIterChildren (childIter, child, recursive);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest.Results/GtkWidgetResult.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest.Results/GtkWidgetResult.cs
index 960f42a8284..a0db36e478d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest.Results/GtkWidgetResult.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest.Results/GtkWidgetResult.cs
@@ -30,6 +30,9 @@
using System.Runtime.InteropServices;
using System.Xml;
using Gtk;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Components.AutoTest.Results
{
@@ -338,7 +341,7 @@ void SendKeyEvent (Gtk.Widget target, uint keyval, Gdk.ModifierType state, Gdk.E
time = Gtk.Global.CurrentEventTime
};
- IntPtr ptr = GLib.Marshaller.StructureToPtrAlloc (nativeEvent);
+ IntPtr ptr = GLib.Marshaller.StructureToPtrAlloc (nativeEvent);
try {
Gdk.EventHelper.Put (new Gdk.EventKey (ptr));
} finally {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
index c1be68eb9e9..79a229c3900 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
@@ -511,7 +511,7 @@ void OnKeyReleased (object o, Gtk.KeyReleaseEventArgs e)
bool complete;
// KeyboardShortcut[] accels =
KeyBindingManager.AccelsFromKey (e.Event, out complete);
-
+#if DD_Mac_TODO
if (currentEvent != null &&
currentEvent.Type == AppKit.NSEventType.KeyUp &&
firstResponder is AppKit.NSView view &&
@@ -521,7 +521,9 @@ firstResponder is AppKit.NSView view &&
SimulateViewKeyActionBehaviour (view, currentEvent);
retVal = true;
}
-
+#else
+ var retVal = true;
+#endif
if (!complete) {
// incomplete accel
NotifyIncompleteKeyReleased (e.Event);
@@ -1414,17 +1416,17 @@ public void ShowContextMenu (Control parent, int x, int y, Gtk.Menu menu,
internal bool ShowContextMenu (Xwt.Widget parent, int x, int y, CommandEntrySet entrySet,
object initialCommandTarget = null)
{
- #if MAC
+#if MAC
var menu = CreateNSMenu (entrySet, initialCommandTarget ?? parent);
if (parent.Surface.NativeWidget is AppKit.NSView view)
ContextMenuExtensionsMac.ShowContextMenu (view, x, y, menu);
else
ContextMenuExtensionsMac.ShowContextMenu ((Gtk.Widget)parent.Surface.NativeWidget, x, y, menu);
- #else
+#else
var menu = CreateMenu (entrySet);
if (menu != null)
ShowContextMenu ((Gtk.Widget)parent.Surface.NativeWidget, x, y, menu, initialCommandTarget);
- #endif
+#endif
return true;
}
@@ -2259,7 +2261,7 @@ object GetNextCommandTarget (CommandTargetRoute targetRoute, object cmdTarget, b
cmdTarget = ((ICommandRouter)cmdTarget).GetNextCommandTarget ();
else if (cmdTarget is Gtk.Widget)
cmdTarget = ((Gtk.Widget)cmdTarget).Parent;
- #if MAC
+#if MAC
else if (cmdTarget is AppKit.NSView) {
var v = (AppKit.NSView) cmdTarget;
if (v.Superview != null && IsRootGdkQuartzView (v.Superview))
@@ -2269,7 +2271,7 @@ object GetNextCommandTarget (CommandTargetRoute targetRoute, object cmdTarget, b
else
cmdTarget = v.Superview;
}
- #endif
+#endif
else
cmdTarget = null;
@@ -2353,7 +2355,7 @@ object GetActiveWidget (Window win)
Control widget = win;
if (win != null) {
- #if MAC
+#if MAC
var nw = win.nativeWidget as AppKit.NSWindow;
if (nw != null) {
var v = nw.FirstResponder as AppKit.NSView;
@@ -2370,14 +2372,14 @@ object GetActiveWidget (Window win)
return v;
}
}
- #endif
+#endif
- #if WINDOWS
+#if WINDOWS
var wpfWidget = GetFocusedWpfWidget();
if (wpfWidget != null) {
return wpfWidget;
}
- #endif
+#endif
widget = GetFocusedChild (widget);
}
@@ -2424,8 +2426,11 @@ Windows.GtkWPFWidget GetFocusedWpfWidget ()
Gtk.Widget GetFocusedChild (Control widget)
{
Gtk.Container container;
+#if DD_Mac_TODO
+
if (widget?.nativeWidget is AppKit.NSWindow window)
widget = Mac.GtkMacInterop.GetGtkWindow (window)?.Child;
+#endif
do {
container = widget?.nativeWidget is Gtk.Container ? widget.GetNativeWidget () : null;
if (container != null) {
@@ -2470,7 +2475,7 @@ bool IsEmbeddedNSView (AppKit.NSView view)
return IsEmbeddedNSView (view.Superview);
return false;
}
- #endif
+#endif
bool UpdateStatus ()
{
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/TabStrip.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/TabStrip.cs
index bf5404c1d26..8e630bcfa8a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/TabStrip.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/TabStrip.cs
@@ -228,7 +228,7 @@ public TabStrip (DockNotebook notebook)
QueueDraw ();
}
};
-
+
foreach (var tab in notebook.Tabs) {
if (tab.Accessible != null) {
Accessible.AddAccessibleElement (tab.Accessible);
@@ -1178,7 +1178,7 @@ void DrawTab (Context ctx, DockNotebookTab tab, Gdk.Rectangle allocation, Gdk.Re
var closeButtonAlloation = new Cairo.Rectangle (tabBounds.Right - rightPadding - (tabCloseImage.Width / 2) - CloseButtonMarginRight,
tabBounds.Height - bottomPadding - tabCloseImage.Height - CloseButtonMarginBottom,
tabCloseImage.Width, tabCloseImage.Height);
-
+
tab.CloseButtonActiveArea = closeButtonAlloation.Inflate (2, 2);
var spinButtonX = closeButtonAlloation.X - Math.Max (tabPinnedImage.Width + CloseButtonMarginRight, rightPadding);
@@ -1201,7 +1201,7 @@ void DrawTab (Context ctx, DockNotebookTab tab, Gdk.Rectangle allocation, Gdk.Re
if (drawCloseButton)
ctx.DrawImage (this, tabCloseImage.WithAlpha ((closeButtonHovered ? 1.0 : 0.5) * tab.Opacity), closeButtonAlloation.X, closeButtonAlloation.Y);
-
+
if (drawPinButton)
ctx.DrawImage (this, (tab.IsPinned ? tabPinnedImage : tabUnPinnedImage).WithAlpha ((pinButtonHovered ? 1.0 : 0.5) * tab.Opacity), spinButtonAllocation.X, spinButtonAllocation.Y);
@@ -1218,7 +1218,7 @@ void DrawTab (Context ctx, DockNotebookTab tab, Gdk.Rectangle allocation, Gdk.Re
double ty = tabBounds.Height - bottomPadding - baseline;
ctx.MoveTo (tx, ty);
- if (!MonoDevelop.Core.Platform.IsMac && !MonoDevelop.Core.Platform.IsWindows) {
+ if (MonoDevelop.Core.Platform.IsLinux) {
// This is a work around for a linux specific problem.
// A bug in the proprietary ATI driver caused TAB text not to draw.
// If that bug get's fixed remove this HACK asap.
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs
index 0fc393e2fac..4d557575444 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs
@@ -1,21 +1,21 @@
-//
+//
// MainToolbar.cs
-//
+//
// Author:
// Mike Krüger
-//
+//
// Copyright (c) 2012 Xamarin Inc. (http://xamarin.com)
-//
+//
// 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
@@ -46,6 +46,9 @@
using System.Text;
using MonoDevelop.Components.AtkCocoaHelper;
using System.Diagnostics;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Components.MainToolbar
{
@@ -60,7 +63,7 @@ class MainToolbar: Gtk.EventBox, IMainToolbarView
ComboBox runConfigurationCombo;
TreeStore runConfigurationStore = new TreeStore (typeof (string), typeof (IRunConfigurationModel));
-
+
ComboBox runtimeCombo;
TreeStore runtimeStore = new TreeStore (typeof(IRuntimeModel));
@@ -149,7 +152,7 @@ public MainToolbar ()
var runConfigurationComboVBox = new VBox ();
runConfigurationComboVBox.PackStart (runConfigurationCombo, true, false, 0);
configurationCombosBox.PackStart (runConfigurationComboVBox, false, false, 0);
-
+
configurationCombo = new Gtk.ComboBox ();
configurationCombo.Model = configurationStore;
configurationCombo.PackStart (ctx, true);
@@ -461,14 +464,14 @@ public bool ConfigurationPlatformSensitivity {
}
static bool FindIter (TreeStore store, Func match, out TreeIter iter)
- {
- if (store.GetIterFirst (out iter)) {
+ {
+ if (store.GetIterFirst (out iter)) {
do {
- if (match((T)store.GetValue (iter, 1)))
- return true;
- } while (store.IterNext (ref iter));
+ if (match((T)store.GetValue (iter, 1)))
+ return true;
+ } while (store.IterNext (ref iter));
}
- return false;
+ return false;
}
public IConfigurationModel ActiveConfiguration {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/CollectionEditor.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/CollectionEditor.cs
index a4070bdd75a..8359a97bd79 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/CollectionEditor.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid.Editors/CollectionEditor.cs
@@ -1,16 +1,16 @@
-/*
+/*
* CollectionEditor.cs - The base class for the visual type editors
- *
- * Part of PropertyGrid - A Gtk# widget that displays and allows
- * editing of all of an object's public properties
- *
- * Authors:
+ *
+ * Part of PropertyGrid - A Gtk# widget that displays and allows
+ * editing of all of an object's public properties
+ *
+ * Authors:
* Michael Hutchinson
- *
+ *
* Copyright (C) 2005 Michael Hutchinson
*
* This sourcecode is licenced under The MIT License:
- *
+ *
* 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
@@ -18,7 +18,7 @@
* 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.
*
@@ -29,13 +29,16 @@
* 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 Gtk;
-using System.ComponentModel;
+using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Components.PropertyGrid.PropertyEditors
{
@@ -44,11 +47,11 @@ class CollectionEditor : PropertyEditorCell
//TODO: Support for multiple object types
private Type[] types;
- protected override void Initialize ()
- {
- base.Initialize ();
+ protected override void Initialize ()
+ {
+ base.Initialize ();
this.types = new Type[] { EditorManager.GetCollectionItemType (Property.PropertyType) };
- }
+ }
protected virtual Type[] NewItemTypes ()
{
@@ -62,18 +65,18 @@ public override bool DialogueEdit
public override bool EditsReadOnlyObject {
get { return true; }
- }
-
- protected override string GetValueText ()
- {
- return MonoDevelop.Core.GettextCatalog.GetString ("(Collection)");
+ }
+
+ protected override string GetValueText ()
+ {
+ return MonoDevelop.Core.GettextCatalog.GetString ("(Collection)");
}
public override void LaunchDialogue ()
{
//the Type in the collection
- IList collection = (IList) Value;
- string displayName = Property.DisplayName;
+ IList collection = (IList) Value;
+ string displayName = Property.DisplayName;
//populate list with existing items
ListStore itemStore = new ListStore (typeof (object), typeof (int), typeof (string));
@@ -81,7 +84,7 @@ public override void LaunchDialogue ()
itemStore.AppendValues(collection [i], i, collection [i].ToString ());
#region Building Dialogue
-
+
TreeView itemTree;
PropertyGrid grid;
TreeIter previousIter = TreeIter.Zero;
@@ -97,10 +100,10 @@ public override void LaunchDialogue ()
var toplevel = this.Container.GetNativeWidget ().Toplevel as Gtk.Window;
if (toplevel != null)
dialog.TransientFor = toplevel;
-
+
dialog.AddActionWidget (new Button (Stock.Cancel), ResponseType.Cancel);
dialog.AddActionWidget (new Button (Stock.Ok), ResponseType.Ok);
-
+
//three columns for items, sorting, PropGrid
HBox hBox = new HBox ();
dialog.VBox.PackStart (hBox, true, true, 5);
@@ -117,7 +120,7 @@ public override void LaunchDialogue ()
VBox buttonBox = new VBox ();
buttonBox.Spacing = 6;
hBox.PackEnd (buttonBox, false, false, 5);
-
+
//add/remove buttons
Button addButton = new Button (new ImageView (Stock.Add, IconSize.Button));
buttonBox.PackStart (addButton, false, false, 0);
@@ -125,7 +128,7 @@ public override void LaunchDialogue ()
addButton.Sensitive = false;
Button removeButton = new Button (new ImageView (Stock.Remove, IconSize.Button));
buttonBox.PackStart (removeButton, false, false, 0);
-
+
//sorting buttons
Button upButton = new Button (new ImageView (Stock.GoUp, IconSize.Button));
buttonBox.PackStart (upButton, false, false, 0);
@@ -137,7 +140,7 @@ public override void LaunchDialogue ()
listScroll.WidthRequest = 200;
listScroll.HeightRequest = 320;
hBox.PackStart (listScroll, false, false, 5);
-
+
itemTree = new TreeView (itemStore);
itemTree.Selection.Mode = SelectionMode.Single;
itemTree.HeadersVisible = false;
@@ -156,85 +159,85 @@ public override void LaunchDialogue ()
addButton.Clicked += delegate {
//create the object
object instance = System.Activator.CreateInstance (types[0]);
-
+
//get existing selection and insert after it
TreeIter oldIter, newIter;
if (itemTree.Selection.GetSelected (out oldIter))
newIter = itemStore.InsertAfter (oldIter);
- //or append if no previous selection
+ //or append if no previous selection
else
newIter = itemStore.Append ();
itemStore.SetValue (newIter, 0, instance);
-
+
//select, set name and update all the indices
itemTree.Selection.SelectIter (newIter);
UpdateName (itemStore, newIter);
UpdateIndices (itemStore);
};
-
+
removeButton.Clicked += delegate {
//get selected iter and the replacement selection
TreeIter iter, newSelection;
if (!itemTree.Selection.GetSelected (out iter))
return;
-
+
newSelection = iter;
if (!IterPrev (itemStore, ref newSelection)) {
newSelection = iter;
if (!itemStore.IterNext (ref newSelection))
newSelection = TreeIter.Zero;
}
-
+
//new selection. Zeroing previousIter prevents trying to update name of deleted iter.
previousIter = TreeIter.Zero;
if (itemStore.IterIsValid (newSelection))
itemTree.Selection.SelectIter (newSelection);
-
+
//and the removal and index update
itemStore.Remove (ref iter);
UpdateIndices (itemStore);
};
-
+
upButton.Clicked += delegate {
TreeIter iter, prev;
if (!itemTree.Selection.GetSelected (out iter))
return;
-
+
//get previous iter
prev = iter;
if (!IterPrev (itemStore, ref prev))
return;
-
+
//swap the two
itemStore.Swap (iter, prev);
-
+
//swap indices too
object prevVal = itemStore.GetValue (prev, 1);
object iterVal = itemStore.GetValue (iter, 1);
itemStore.SetValue (prev, 1, iterVal);
itemStore.SetValue (iter, 1, prevVal);
};
-
+
downButton.Clicked += delegate {
TreeIter iter, next;
if (!itemTree.Selection.GetSelected (out iter))
return;
-
+
//get next iter
next = iter;
if (!itemStore.IterNext (ref next))
return;
-
+
//swap the two
itemStore.Swap (iter, next);
-
+
//swap indices too
object nextVal = itemStore.GetValue (next, 1);
object iterVal = itemStore.GetValue (iter, 1);
itemStore.SetValue (next, 1, iterVal);
itemStore.SetValue (iter, 1, nextVal);
};
-
+
itemTree.Selection.Changed += delegate {
TreeIter iter;
if (!itemTree.Selection.GetSelected (out iter)) {
@@ -242,91 +245,91 @@ public override void LaunchDialogue ()
return;
}
removeButton.Sensitive = true;
-
+
//update grid
object obj = itemStore.GetValue (iter, 0);
grid.CurrentObject = obj;
-
+
//update previously selected iter's name
UpdateName (itemStore, previousIter);
-
+
//update current selection so we can update
//name next selection change
previousIter = iter;
};
-
+
grid.Changed += delegate {
TreeIter iter;
if (itemTree.Selection.GetSelected (out iter))
UpdateName (itemStore, iter);
};
-
+
TreeIter selectionIter;
removeButton.Sensitive = itemTree.Selection.GetSelected (out selectionIter);
-
+
dialog.ShowAll ();
grid.ShowToolbar = false;
-
+
#endregion
-
+
//if 'OK' put items back in collection
using (dialog) {
- if (MonoDevelop.Ide.MessageService.ShowCustomDialog (dialog, toplevel) == (int)ResponseType.Ok) {
- DesignerTransaction tran = CreateTransaction (Instance);
- object old = collection;
-
- try {
+ if (MonoDevelop.Ide.MessageService.ShowCustomDialog (dialog, toplevel) == (int)ResponseType.Ok) {
+ DesignerTransaction tran = CreateTransaction (Instance);
+ object old = collection;
+
+ try {
collection.Clear ();
foreach (object[] o in itemStore)
- collection.Add (o [0]);
- EndTransaction (Instance, tran, old, collection, true);
- } catch {
- EndTransaction (Instance, tran, old, collection, false);
- throw;
+ collection.Add (o [0]);
+ EndTransaction (Instance, tran, old, collection, true);
+ } catch {
+ EndTransaction (Instance, tran, old, collection, false);
+ throw;
}
}
}
- }
-
- //This and EndTransaction are from Mono internal class System.ComponentModel.ReflectionPropertyDescriptor
- // Lluis Sanchez Gual (lluis@ximian.com), (C) Novell, Inc, MIT X11 license
- DesignerTransaction CreateTransaction (object obj)
- {
- IComponent com = obj as IComponent;
- if (com == null || com.Site == null) return null;
-
- IDesignerHost dh = (IDesignerHost) com.Site.GetService (typeof(IDesignerHost));
- if (dh == null) return null;
-
- DesignerTransaction tran = dh.CreateTransaction ();
- IComponentChangeService ccs = (IComponentChangeService) com.Site.GetService (typeof(IComponentChangeService));
- if (ccs != null)
- ccs.OnComponentChanging (com, Property);
- return tran;
- }
-
- void EndTransaction (object obj, DesignerTransaction tran, object oldValue, object newValue, bool commit)
- {
- if (tran == null) return;
-
- if (commit) {
- IComponent com = obj as IComponent;
- IComponentChangeService ccs = (IComponentChangeService) com.Site.GetService (typeof(IComponentChangeService));
- if (ccs != null)
- ccs.OnComponentChanged (com, Property, oldValue, newValue);
- tran.Commit ();
- }
- else
- tran.Cancel ();
}
-
+
+ //This and EndTransaction are from Mono internal class System.ComponentModel.ReflectionPropertyDescriptor
+ // Lluis Sanchez Gual (lluis@ximian.com), (C) Novell, Inc, MIT X11 license
+ DesignerTransaction CreateTransaction (object obj)
+ {
+ IComponent com = obj as IComponent;
+ if (com == null || com.Site == null) return null;
+
+ IDesignerHost dh = (IDesignerHost) com.Site.GetService (typeof(IDesignerHost));
+ if (dh == null) return null;
+
+ DesignerTransaction tran = dh.CreateTransaction ();
+ IComponentChangeService ccs = (IComponentChangeService) com.Site.GetService (typeof(IComponentChangeService));
+ if (ccs != null)
+ ccs.OnComponentChanging (com, Property);
+ return tran;
+ }
+
+ void EndTransaction (object obj, DesignerTransaction tran, object oldValue, object newValue, bool commit)
+ {
+ if (tran == null) return;
+
+ if (commit) {
+ IComponent com = obj as IComponent;
+ IComponentChangeService ccs = (IComponentChangeService) com.Site.GetService (typeof(IComponentChangeService));
+ if (ccs != null)
+ ccs.OnComponentChanged (com, Property, oldValue, newValue);
+ tran.Commit ();
+ }
+ else
+ tran.Cancel ();
+ }
+
static void UpdateIndices (ListStore itemStore)
{
TreeIter iter;
int i = 0;
- if (!itemStore.GetIterFirst (out iter))
+ if (!itemStore.GetIterFirst (out iter))
return;
-
+
do {
itemStore.SetValue (iter, 1, i);
i++;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Cairo/CairoExtensions.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Cairo/CairoExtensions.cs
new file mode 100644
index 00000000000..1981c4d0e48
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Cairo/CairoExtensions.cs
@@ -0,0 +1,869 @@
+//
+// CairoExtensions.cs
+//
+// Author:
+// Aaron Bockover
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+// 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.Reflection;
+using System.Runtime.InteropServices;
+
+using Gdk;
+using Cairo;
+using MonoDevelop.Core;
+using MonoDevelop.Utilities;
+
+namespace MonoDevelop.Components
+{
+ [Flags]
+ public enum CairoCorners
+ {
+ None = 0,
+ TopLeft = 1,
+ TopRight = 2,
+ BottomLeft = 4,
+ BottomRight = 8,
+ All = 15
+ }
+
+ public static class CairoExtensions
+ {
+ static IntPtr cairo_library;
+ static IntPtr CairoLib {
+ get {
+ if (cairo_library == IntPtr.Zero)
+ cairo_library = LibraryTools.LoadLibrary (CairoLibraryDefinition.Library);
+ return cairo_library;
+ }
+ }
+
+ public static Cairo.Rectangle ToCairoRect (this Gdk.Rectangle rect)
+ {
+ return new Cairo.Rectangle (rect.X, rect.Y, rect.Width, rect.Height);
+ }
+
+ public static Surface CreateSurfaceForPixbuf (Context cr, Pixbuf pixbuf)
+ {
+ Surface surface;
+ using (var t = cr.GetTarget ()) {
+ surface = t.CreateSimilar (t.Content, pixbuf.Width, pixbuf.Height);
+ }
+ using (Context surface_cr = new Context (surface)) {
+ CairoHelper.SetSourcePixbuf (surface_cr, pixbuf, 0, 0);
+ surface_cr.Paint ();
+ surface_cr.Dispose ();
+ }
+ return surface;
+ }
+
+ public static Cairo.Color AlphaBlend (Cairo.Color ca, Cairo.Color cb, double alpha)
+ {
+ return new Cairo.Color (
+ (1.0 - alpha) * ca.R + alpha * cb.R,
+ (1.0 - alpha) * ca.G + alpha * cb.G,
+ (1.0 - alpha) * ca.B + alpha * cb.B);
+ }
+ public static Gdk.Color CairoColorToGdkColor (Cairo.Color color)
+ {
+ return new Gdk.Color ((byte)(color.R * 255), (byte)(color.G * 255), (byte)(color.B * 255));
+ }
+
+ public static Cairo.Color GdkColorToCairoColor (Gdk.Color color)
+ {
+ return GdkColorToCairoColor (color, 1.0);
+ }
+
+ public static Cairo.Color GdkColorToCairoColor (Gdk.Color color, double alpha)
+ {
+ return new Cairo.Color (
+ (double)(color.Red >> 8) / 255.0,
+ (double)(color.Green >> 8) / 255.0,
+ (double)(color.Blue >> 8) / 255.0,
+ alpha);
+ }
+
+ public static Cairo.Color RgbToColor (uint rgbColor)
+ {
+ return RgbaToColor ((rgbColor << 8) | 0x000000ff);
+ }
+
+ public static Cairo.Color RgbaToColor (uint rgbaColor)
+ {
+ return new Cairo.Color (
+ (byte)(rgbaColor >> 24) / 255.0,
+ (byte)(rgbaColor >> 16) / 255.0,
+ (byte)(rgbaColor >> 8) / 255.0,
+ (byte)(rgbaColor & 0x000000ff) / 255.0);
+ }
+
+ public static Cairo.Color InterpolateColors (Cairo.Color start, Cairo.Color end, float amount)
+ {
+ return new Cairo.Color (start.R + (end.R - start.R) * amount,
+ start.G + (end.G - start.G) * amount,
+ start.B + (end.B - start.B) * amount,
+ start.A + (end.A - start.A) * amount);
+ }
+
+ public static bool ColorIsDark (Cairo.Color color)
+ {
+ double h, s, b;
+ HsbFromColor (color, out h, out s, out b);
+ return b < 0.5;
+ }
+
+ public static void HsbFromColor (Cairo.Color color, out double hue,
+ out double saturation, out double brightness)
+ {
+ double min, max, delta;
+ double red = color.R;
+ double green = color.G;
+ double blue = color.B;
+
+ hue = 0;
+ saturation = 0;
+ brightness = 0;
+
+ if (red > green) {
+ max = Math.Max (red, blue);
+ min = Math.Min (green, blue);
+ } else {
+ max = Math.Max (green, blue);
+ min = Math.Min (red, blue);
+ }
+
+ brightness = (max + min) / 2;
+
+ if (Math.Abs (max - min) < 0.0001) {
+ hue = 0;
+ saturation = 0;
+ } else {
+ saturation = brightness <= 0.5
+ ? (max - min) / (max + min)
+ : (max - min) / (2 - max - min);
+
+ delta = max - min;
+
+ if (red == max) {
+ hue = (green - blue) / delta;
+ } else if (green == max) {
+ hue = 2 + (blue - red) / delta;
+ } else if (blue == max) {
+ hue = 4 + (red - green) / delta;
+ }
+
+ hue *= 60;
+ if (hue < 0) {
+ hue += 360;
+ }
+ }
+ }
+
+ private static double Modula (double number, double divisor)
+ {
+ return ((int)number % divisor) + (number - (int)number);
+ }
+
+ public static Cairo.Color ColorFromHsb (double hue, double saturation, double brightness)
+ {
+ int i;
+ double [] hue_shift = { 0, 0, 0 };
+ double [] color_shift = { 0, 0, 0 };
+ double m1, m2, m3;
+
+ m2 = brightness <= 0.5
+ ? brightness * (1 + saturation)
+ : brightness + saturation - brightness * saturation;
+
+ m1 = 2 * brightness - m2;
+
+ hue_shift [0] = hue + 120;
+ hue_shift [1] = hue;
+ hue_shift [2] = hue - 120;
+
+ color_shift [0] = color_shift [1] = color_shift [2] = brightness;
+
+ i = saturation == 0 ? 3 : 0;
+
+ for (; i < 3; i++) {
+ m3 = hue_shift [i];
+
+ if (m3 > 360) {
+ m3 = Modula (m3, 360);
+ } else if (m3 < 0) {
+ m3 = 360 - Modula (Math.Abs (m3), 360);
+ }
+
+ if (m3 < 60) {
+ color_shift [i] = m1 + (m2 - m1) * m3 / 60;
+ } else if (m3 < 180) {
+ color_shift [i] = m2;
+ } else if (m3 < 240) {
+ color_shift [i] = m1 + (m2 - m1) * (240 - m3) / 60;
+ } else {
+ color_shift [i] = m1;
+ }
+ }
+
+ return new Cairo.Color (color_shift [0], color_shift [1], color_shift [2]);
+ }
+
+ public static Cairo.Color ColorShade (Cairo.Color @base, double ratio)
+ {
+ double h, s, b;
+
+ HsbFromColor (@base, out h, out s, out b);
+
+ b = Math.Max (Math.Min (b * ratio, 1), 0);
+ s = Math.Max (Math.Min (s * ratio, 1), 0);
+
+ Cairo.Color color = ColorFromHsb (h, s, b);
+ color.A = @base.A;
+ return color;
+ }
+
+ public static Cairo.Color ColorAdjustBrightness (Cairo.Color @base, double br)
+ {
+ double h, s, b;
+ HsbFromColor (@base, out h, out s, out b);
+ b = Math.Max (Math.Min (br, 1), 0);
+ return ColorFromHsb (h, s, b);
+ }
+
+ public static string ColorGetHex (Cairo.Color color, bool withAlpha = false)
+ {
+ if (withAlpha) {
+ return String.Format ("#{0:x2}{1:x2}{2:x2}{3:x2}", (byte)(color.R * 255), (byte)(color.G * 255),
+ (byte)(color.B * 255), (byte)(color.A * 255));
+ } else {
+ return String.Format ("#{0:x2}{1:x2}{2:x2}", (byte)(color.R * 255), (byte)(color.G * 255),
+ (byte)(color.B * 255));
+ }
+ }
+
+ public static void RoundedRectangle (this Cairo.Context cr, double x, double y, double w, double h, double r)
+ {
+ RoundedRectangle (cr, x, y, w, h, r, CairoCorners.All, false);
+ }
+
+ public static void RoundedRectangle (this Cairo.Context cr, double x, double y, double w, double h,
+ double r, CairoCorners corners)
+ {
+ RoundedRectangle (cr, x, y, w, h, r, corners, false);
+ }
+
+ public static void RoundedRectangle (this Cairo.Context cr, double x, double y, double w, double h,
+ double r, CairoCorners corners, bool topBottomFallsThrough)
+ {
+ if (topBottomFallsThrough && corners == CairoCorners.None) {
+ cr.MoveTo (x, y - r);
+ cr.LineTo (x, y + h + r);
+ cr.MoveTo (x + w, y - r);
+ cr.LineTo (x + w, y + h + r);
+ return;
+ } else if (r < 0.0001 || corners == CairoCorners.None) {
+ cr.Rectangle (x, y, w, h);
+ return;
+ }
+
+ if ((corners & (CairoCorners.TopLeft | CairoCorners.TopRight)) == 0 && topBottomFallsThrough) {
+ y -= r;
+ h += r;
+ cr.MoveTo (x + w, y);
+ } else {
+ if ((corners & CairoCorners.TopLeft) != 0) {
+ cr.MoveTo (x + r, y);
+ } else {
+ cr.MoveTo (x, y);
+ }
+
+ if ((corners & CairoCorners.TopRight) != 0) {
+ cr.Arc (x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2);
+ } else {
+ cr.LineTo (x + w, y);
+ }
+ }
+
+ if ((corners & (CairoCorners.BottomLeft | CairoCorners.BottomRight)) == 0 && topBottomFallsThrough) {
+ h += r;
+ cr.LineTo (x + w, y + h);
+ cr.MoveTo (x, y + h);
+ cr.LineTo (x, y + r);
+ cr.Arc (x + r, y + r, r, Math.PI, Math.PI * 1.5);
+ } else {
+ if ((corners & CairoCorners.BottomRight) != 0) {
+ cr.Arc (x + w - r, y + h - r, r, 0, Math.PI * 0.5);
+ } else {
+ cr.LineTo (x + w, y + h);
+ }
+
+ if ((corners & CairoCorners.BottomLeft) != 0) {
+ cr.Arc (x + r, y + h - r, r, Math.PI * 0.5, Math.PI);
+ } else {
+ cr.LineTo (x, y + h);
+ }
+
+ if ((corners & CairoCorners.TopLeft) != 0) {
+ cr.Arc (x + r, y + r, r, Math.PI, Math.PI * 1.5);
+ } else {
+ cr.LineTo (x, y);
+ }
+ }
+ }
+
+ static void ShadowGradient (Cairo.Gradient lg, double strength)
+ {
+ lg.AddColorStop (0, new Cairo.Color (0, 0, 0, strength));
+ lg.AddColorStop (1.0 / 6.0, new Cairo.Color (0, 0, 0, .85 * strength));
+ lg.AddColorStop (2.0 / 6.0, new Cairo.Color (0, 0, 0, .54 * strength));
+ lg.AddColorStop (3.0 / 6.0, new Cairo.Color (0, 0, 0, .24 * strength));
+ lg.AddColorStop (4.0 / 6.0, new Cairo.Color (0, 0, 0, .07 * strength));
+ lg.AddColorStop (5.0 / 6.0, new Cairo.Color (0, 0, 0, .01 * strength));
+ lg.AddColorStop (1, new Cairo.Color (0, 0, 0, 0));
+ }
+
+ // VERY SLOW, only use on cached renders
+ public static void RenderOuterShadow (this Cairo.Context self, Gdk.Rectangle area, int size, int rounding, double strength)
+ {
+ area.Inflate (-1, -1);
+ size++;
+
+ int doubleRounding = rounding * 2;
+ // left side
+ self.Rectangle (area.X - size, area.Y + rounding, size, area.Height - doubleRounding - 1);
+ using (var lg = new LinearGradient (area.X, 0, area.X - size, 0)) {
+ ShadowGradient (lg, strength);
+ self.SetSource (lg);
+ self.Fill ();
+ }
+
+ // right side
+ self.Rectangle (area.Right, area.Y + rounding, size, area.Height - doubleRounding - 1);
+ using (var lg = new LinearGradient (area.Right, 0, area.Right + size, 0)) {
+ ShadowGradient (lg, strength);
+ self.SetSource (lg);
+ self.Fill ();
+ }
+
+ // top side
+ self.Rectangle (area.X + rounding, area.Y - size, area.Width - doubleRounding - 1, size);
+ using (var lg = new LinearGradient (0, area.Y, 0, area.Y - size)) {
+ ShadowGradient (lg, strength);
+ self.SetSource (lg);
+ self.Fill ();
+ }
+
+ // bottom side
+ self.Rectangle (area.X + rounding, area.Bottom, area.Width - doubleRounding - 1, size);
+ using (var lg = new LinearGradient (0, area.Bottom, 0, area.Bottom + size)) {
+ ShadowGradient (lg, strength);
+ self.SetSource (lg);
+ self.Fill ();
+ }
+
+ // top left corner
+ self.Rectangle (area.X - size, area.Y - size, size + rounding, size + rounding);
+ using (var rg = new RadialGradient (area.X + rounding, area.Y + rounding, rounding, area.X + rounding, area.Y + rounding, size + rounding)) {
+ ShadowGradient (rg, strength);
+ self.SetSource (rg);
+ self.Fill ();
+ }
+
+ // top right corner
+ self.Rectangle (area.Right - rounding, area.Y - size, size + rounding, size + rounding);
+ using (var rg = new RadialGradient (area.Right - rounding, area.Y + rounding, rounding, area.Right - rounding, area.Y + rounding, size + rounding)) {
+ ShadowGradient (rg, strength);
+ self.SetSource (rg);
+ self.Fill ();
+ }
+
+ // bottom left corner
+ self.Rectangle (area.X - size, area.Bottom - rounding, size + rounding, size + rounding);
+ using (var rg = new RadialGradient (area.X + rounding, area.Bottom - rounding, rounding, area.X + rounding, area.Bottom - rounding, size + rounding)) {
+ ShadowGradient (rg, strength);
+ self.SetSource (rg);
+ self.Fill ();
+ }
+
+ // bottom right corner
+ self.Rectangle (area.Right - rounding, area.Bottom - rounding, size + rounding, size + rounding);
+ using (var rg = new RadialGradient (area.Right - rounding, area.Bottom - rounding, rounding, area.Right - rounding, area.Bottom - rounding, size + rounding)) {
+ ShadowGradient (rg, strength);
+ self.SetSource (rg);
+ self.Fill ();
+ }
+ }
+
+ ///
+ /// Is used to describe how pattern color/alpha will be determined for areas "outside" the pattern's natural area,
+ /// (for example, outside the surface bounds or outside the gradient geometry).
+ ///
+ public enum CairoExtend {
+ CAIRO_EXTEND_NONE,
+ CAIRO_EXTEND_REPEAT,
+ CAIRO_EXTEND_REFLECT,
+ CAIRO_EXTEND_PAD
+ }
+
+ public static void RenderTiled (this Cairo.Context self, Gtk.Widget target, Xwt.Drawing.Image source, Gdk.Rectangle area, Gdk.Rectangle clip, double opacity = 1)
+ {
+ var ctx = Xwt.Toolkit.CurrentEngine.WrapContext (target, self);
+ ctx.Save ();
+ ctx.Rectangle (clip.X, clip.Y, clip.Width, clip.Height);
+ ctx.Clip ();
+ ctx.Pattern = new Xwt.Drawing.ImagePattern (source);
+ ctx.Rectangle (area.X, area.Y, area.Width, area.Height);
+ ctx.Fill ();
+ ctx.Restore ();
+ }
+
+ public static void DisposeContext (Cairo.Context cr)
+ {
+ cr.Dispose ();
+ }
+
+ private struct CairoInteropCall
+ {
+ public string Name;
+ public MethodInfo ManagedMethod;
+ public bool CallNative;
+
+ public CairoInteropCall (string name)
+ {
+ Name = name;
+ ManagedMethod = null;
+ CallNative = false;
+ }
+ }
+
+
+ #region LibraryCalls
+ private delegate void cairo_pattern_set_extend_delegate (IntPtr ptr, Cairo.Extend extend);
+ private static cairo_pattern_set_extend_delegate cairo_pattern_set_extend;
+
+ ///
+ /// Sets the mode to be used for drawing outside the area of a pattern.
+ ///
+ /// The extend mode to be used.
+ public static void PatternSetExtend (this Cairo.Pattern pattern, CairoExtend extend = CairoExtend.CAIRO_EXTEND_NONE)
+ {
+ var cairoExtendAsInt = (int)extend;
+
+ if (cairo_pattern_set_extend is null) {
+ var procAddress = LibraryTools.GetProcAddress (CairoLib, CairoLibraryDefinition.API.PatternSetExtend);
+ cairo_pattern_set_extend = LibraryTools.LoadFunction (procAddress);
+ }
+ cairo_pattern_set_extend (pattern.Handle, (Cairo.Extend)cairoExtendAsInt);
+ }
+
+ private delegate void cairo_get_source_delegate (IntPtr ptr);
+ private static cairo_get_source_delegate cairo_get_source;
+
+ ///
+ /// Gets the current source pattern.
+ ///
+ public static void GetSource (this Cairo.Context cr)
+ {
+ if (cairo_get_source is null) {
+ var procAddress = LibraryTools.GetProcAddress (CairoLib, CairoLibraryDefinition.API.GetSource);
+ cairo_get_source = LibraryTools.LoadFunction (procAddress);
+ }
+ cairo_get_source (cr.Handle);
+ }
+
+ private static bool native_push_pop_exists = true;
+
+ private delegate void cairo_push_group_delegate (IntPtr ptr);
+ private static cairo_push_group_delegate cairo_push_group;
+ ///
+ /// Temporarily redirects drawing to an intermediate surface known as a group.
+ /// The redirection lasts until the group is completed by a call to .
+ ///
+ public static void PushGroup (this Cairo.Context cr)
+ {
+ if (!native_push_pop_exists) {
+ return;
+ }
+
+ try {
+ if (cairo_push_group is null) {
+ var procAddress = LibraryTools.GetProcAddress (CairoLib, CairoLibraryDefinition.API.PushGroup);
+ cairo_push_group = LibraryTools.LoadFunction (procAddress);
+ }
+ cairo_push_group (cr.Handle);
+
+ } catch (EntryPointNotFoundException){
+ native_push_pop_exists = false;
+ }
+ }
+
+ private delegate void cairo_push_group_with_content_delegate (IntPtr ptr, Cairo.Content content);
+ private static cairo_push_group_with_content_delegate cairo_push_group_with_content;
+
+ ///
+ /// Temporarily redirects drawing to an intermediate surface known as a group.
+ /// The redirection lasts until the group is completed by a call to .
+ ///
+ /// a content indicating the type of group that will be created.
+ public static void PushGroupWithContent (this Cairo.Context cr, Content content)
+ {
+ if (!native_push_pop_exists) {
+ return;
+ }
+
+ try {
+ if (cairo_push_group_with_content is null) {
+ var procAddress = LibraryTools.GetProcAddress (CairoLib, CairoLibraryDefinition.API.PushGroup);
+ cairo_push_group_with_content = LibraryTools.LoadFunction (procAddress);
+ }
+ cairo_push_group_with_content (cr.Handle, content);
+
+ } catch (EntryPointNotFoundException) {
+ native_push_pop_exists = false;
+ }
+ }
+
+ private delegate void cairo_pop_group_to_source_delegate (IntPtr ptr);
+ private static cairo_pop_group_to_source_delegate cairo_pop_group_to_source;
+
+ ///
+ /// Terminates the redirection begun by a call to
+ /// and installs the resulting pattern as the source pattern in the given cairo context.
+ ///
+ public static void PopGroupToSource (this Cairo.Context cr)
+ {
+ if (!native_push_pop_exists) {
+ return;
+ }
+
+ try {
+ if (cairo_pop_group_to_source is null) {
+ var procAddress = LibraryTools.GetProcAddress (CairoLib, CairoLibraryDefinition.API.PopGroupToSource);
+ cairo_pop_group_to_source = LibraryTools.LoadFunction (procAddress);
+ }
+ cairo_pop_group_to_source (cr.Handle);
+
+ } catch (EntryPointNotFoundException) {
+ native_push_pop_exists = false;
+ }
+ }
+
+ private delegate void cairo_pop_group_delegate (IntPtr ptr);
+ private static cairo_pop_group_delegate cairo_pop_group;
+
+ ///
+ /// Terminates the redirection begun by a call to
+ /// and installs the resulting pattern as the source pattern in the given cairo context.
+ ///
+ public static void PopGroup (this Cairo.Context cr)
+ {
+ if (!native_push_pop_exists) {
+ return;
+ }
+
+ try {
+ if (cairo_pop_group is null) {
+ var procAddress = LibraryTools.GetProcAddress (CairoLib, CairoLibraryDefinition.API.PopGroup);
+ cairo_pop_group = LibraryTools.LoadFunction (procAddress);
+ }
+ cairo_pop_group (cr.Handle);
+
+ } catch (EntryPointNotFoundException) {
+ native_push_pop_exists = false;
+ }
+ }
+ #endregion
+
+ public static Cairo.Color ParseColor (string s, double alpha = 1)
+ {
+ if (s.StartsWith ("#"))
+ s = s.Substring (1);
+ if (s.Length == 3)
+ s = "" + s[0]+s[0]+s[1]+s[1]+s[2]+s[2];
+ double r = ((double) int.Parse (s.Substring (0,2), System.Globalization.NumberStyles.HexNumber)) / 255;
+ double g = ((double) int.Parse (s.Substring (2,2), System.Globalization.NumberStyles.HexNumber)) / 255;
+ double b = ((double) int.Parse (s.Substring (4,2), System.Globalization.NumberStyles.HexNumber)) / 255;
+ return new Cairo.Color (r, g, b, alpha);
+ }
+
+ public static ImageSurface LoadImage (Assembly assembly, string resource)
+ {
+ byte[] buffer;
+ using (var stream = assembly.GetManifestResourceStream (resource)) {
+ buffer = new byte [stream.Length];
+ stream.Read (buffer, 0, (int)stream.Length);
+ }
+/* This should work, but doesn't:
+ using (var px = new Gdk.Pixbuf (buffer))
+ return new ImageSurface (px.Pixels, Format.Argb32, px.Width, px.Height, px.Rowstride);*/
+
+ // Workaround: loading from file name.
+ var tmp = System.IO.Path.GetTempFileName ();
+ System.IO.File.WriteAllBytes (tmp, buffer);
+ var img = new ImageSurface (tmp);
+ try {
+ System.IO.File.Delete (tmp);
+ } catch (Exception e) {
+ LoggingService.LogWarning ($"Unable to delete {tmp} due to exception {e}");
+
+ // Only want to dispose when the Delete failed
+ img.Dispose ();
+ throw;
+ }
+ return img;
+ }
+
+ public static Cairo.Color WithAlpha (Cairo.Color c, double alpha)
+ {
+ return new Cairo.Color (c.R, c.G, c.B, alpha);
+ }
+
+ public static Cairo.Color MultiplyAlpha (this Cairo.Color self, double alpha)
+ {
+ return new Cairo.Color (self.R, self.G, self.B, self.A * alpha);
+ }
+
+ public static void CachedDraw (this Cairo.Context self, ref SurfaceWrapper surface, Gdk.Point position, Gdk.Size size,
+ object parameters = null, float opacity = 1.0f, Action draw = null, double? forceScale = null)
+ {
+ self.CachedDraw (ref surface, new Gdk.Rectangle (position, size), parameters, opacity, draw, forceScale);
+ }
+
+ public static void CachedDraw (this Cairo.Context self, ref SurfaceWrapper surface, Gdk.Rectangle region,
+ object parameters = null, float opacity = 1.0f, Action draw = null, double? forceScale = null)
+ {
+ double displayScale = forceScale.HasValue ? forceScale.Value : QuartzSurface.GetRetinaScale (self);
+ int targetWidth = (int) (region.Width * displayScale);
+ int targetHeight = (int) (region.Height * displayScale);
+
+ bool redraw = false;
+ if (surface == null || surface.Width != targetWidth || surface.Height != targetHeight) {
+ if (surface != null)
+ surface.Dispose ();
+ surface = new SurfaceWrapper (self, targetWidth, targetHeight);
+ redraw = true;
+ } else if ((surface.Data == null && parameters != null) || (surface.Data != null && !surface.Data.Equals (parameters))) {
+ redraw = true;
+ }
+
+
+ if (redraw) {
+ surface.Data = parameters;
+ using (var context = new Cairo.Context (surface.Surface)) {
+ context.Operator = Operator.Clear;
+ context.Paint();
+ context.Operator = Operator.Over;
+ context.Save ();
+ context.Scale (displayScale, displayScale);
+ draw(context, 1.0f);
+ context.Restore ();
+ }
+ }
+
+ self.Save ();
+ self.Translate (region.X, region.Y);
+ self.Scale (1 / displayScale, 1 / displayScale);
+ self.SetSourceSurface (surface.Surface, 0, 0);
+ self.PaintWithAlpha (opacity);
+ self.Restore ();
+ }
+ }
+
+ public class SurfaceWrapper : IDisposable
+ {
+ public Cairo.Surface Surface { get; private set; }
+ public int Width { get; private set; }
+ public int Height { get; private set; }
+ public object Data { get; set; }
+ public bool IsDisposed { get; private set; }
+
+ public SurfaceWrapper (Cairo.Context similar, int width, int height)
+ {
+ if (Platform.IsMac) {
+ Surface = new QuartzSurface (Cairo.Format.ARGB32, width, height);
+ } else if (Platform.IsWindows) {
+ using (var target = similar.GetTarget ()) {
+ Surface = target.CreateSimilar (Cairo.Content.ColorAlpha, width, height);
+ }
+ } else {
+ Surface = new ImageSurface (Cairo.Format.ARGB32, width, height);
+ }
+ Width = width;
+ Height = height;
+ }
+
+ public SurfaceWrapper (Cairo.Context similar, Gdk.Pixbuf source)
+ {
+ Cairo.Surface surface;
+ // There is a bug in Cairo for OSX right now that prevents creating additional accellerated surfaces.
+ if (Platform.IsMac) {
+ surface = new QuartzSurface (Format.ARGB32, source.Width, source.Height);
+ } else if (Platform.IsWindows) {
+ using (var t = similar.GetTarget ()) {
+ surface = t.CreateSimilar (Content.ColorAlpha, source.Width, source.Height);
+ }
+ } else {
+ surface = new ImageSurface (Format.ARGB32, source.Width, source.Height);
+ }
+
+ using (Context context = new Context (surface)) {
+ Gdk.CairoHelper.SetSourcePixbuf (context, source, 0, 0);
+ context.Paint ();
+ }
+
+ Surface = surface;
+ Width = source.Width;
+ Height = source.Height;
+ }
+
+ public void Dispose ()
+ {
+ IsDisposed = true;
+ if (Surface != null) {
+ ((IDisposable)Surface).Dispose ();
+ }
+ }
+ }
+
+#warning gluckez: Is there still any intent to support macOS quartz rendering system?
+ public class QuartzSurface : Cairo.Surface
+ {
+ static IntPtr cairo_library;
+ static IntPtr get_cairo_lib ()
+ {
+ if(cairo_library == IntPtr.Zero)
+ cairo_library = LibraryTools.LoadLibrary (CairoLibraryDefinition.Library);
+
+ return cairo_library;
+ }
+ const string CoreGraphics = "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/CoreGraphics";
+
+ private delegate IntPtr cairo_quartz_surface_create_delegate (Cairo.Format format, uint width, uint height);
+ private static cairo_quartz_surface_create_delegate cairo_quartz_surface_create;
+
+ ///
+ /// Creates a Quartz surface backed by a CGBitmap. The surface is created using the Device RGB (or Device Gray, for A8) color space.
+ /// All Cairo operations, including those that require software rendering, will succeed on this surface.
+ ///
+ public static IntPtr QuartzSurfaceCreate (Cairo.Format format, uint width, uint height)
+ {
+ if (cairo_quartz_surface_create is null) {
+ var procAddress = LibraryTools.GetProcAddress (get_cairo_lib(), CairoLibraryDefinition.API.QuartzSurfaceCreate);
+ cairo_quartz_surface_create = LibraryTools.LoadFunction (procAddress);
+ }
+ return cairo_quartz_surface_create (format, width, height);
+ }
+
+ private delegate IntPtr cairo_quartz_surface_get_cg_context_delegate (IntPtr ptr);
+ private static cairo_quartz_surface_get_cg_context_delegate cairo_quartz_surface_get_cg_context;
+
+ ///
+ /// Returns the CGContextRef that the given Quartz surface is backed by.
+ ///
+ public static IntPtr QuartzGetCGContext (Cairo.Surface surface)
+ {
+ if (cairo_quartz_surface_get_cg_context is null) {
+ var procAddress = LibraryTools.GetProcAddress (get_cairo_lib (), CairoLibraryDefinition.API.QuartzSurfaceGetCGContext);
+ cairo_quartz_surface_get_cg_context = LibraryTools.LoadFunction (procAddress);
+ }
+ return cairo_quartz_surface_get_cg_context (surface.Handle);
+ }
+
+ private delegate IntPtr cairo_get_target_delegate (IntPtr ptr);
+ private static cairo_get_target_delegate cairo_get_target;
+ ///
+ /// Gets the target surface for the cairo context.
+ ///
+ public static IntPtr GetTarget (Cairo.Context ctx)
+ {
+ if (cairo_get_target is null) {
+ var procAddress = LibraryTools.GetProcAddress (get_cairo_lib (), CairoLibraryDefinition.API.GetTarget);
+ cairo_get_target = LibraryTools.LoadFunction (procAddress);
+ }
+ return cairo_get_target (ctx.Handle);
+ }
+
+ [DllImport (CoreGraphics, EntryPoint="CGContextConvertRectToDeviceSpace", CallingConvention = CallingConvention.Cdecl)]
+ static extern CGRect32 CGContextConvertRectToDeviceSpace32 (IntPtr contextRef, CGRect32 cgrect);
+
+ [DllImport (CoreGraphics, EntryPoint="CGContextConvertRectToDeviceSpace", CallingConvention = CallingConvention.Cdecl)]
+ static extern CGRect64 CGContextConvertRectToDeviceSpace64 (IntPtr contextRef, CGRect64 cgrect);
+
+ public static double GetRetinaScale (Cairo.Context context) {
+ if (!Platform.IsMac)
+ return 1;
+
+ // Use C call to avoid dispose bug in cairo bindings for OSX
+ var cgContext = cairo_quartz_surface_get_cg_context (cairo_get_target (context.Handle));
+
+ if (IntPtr.Size == 8)
+ return CGContextConvertRectToDeviceSpace64 (cgContext, CGRect64.Unit).X;
+
+ return CGContextConvertRectToDeviceSpace32 (cgContext, CGRect32.Unit).X;
+ }
+
+ struct CGRect32
+ {
+ public CGRect32 (float x, float y, float width, float height)
+ {
+ this.X = x;
+ this.Y = y;
+ this.Width = width;
+ this.Height = height;
+ }
+
+ public float X, Y, Width, Height;
+
+ public static CGRect32 Unit {
+ get {
+ return new CGRect32 (1, 1, 1, 1);
+ }
+ }
+ }
+
+ struct CGRect64
+ {
+ public CGRect64 (double x, double y, double width, double height)
+ {
+ this.X = x;
+ this.Y = y;
+ this.Width = width;
+ this.Height = height;
+ }
+
+ public double X, Y, Width, Height;
+
+ public static CGRect64 Unit {
+ get {
+ return new CGRect64 (1, 1, 1, 1);
+ }
+ }
+ }
+
+ public QuartzSurface (Cairo.Format format, int width, int height)
+ : base (QuartzSurfaceCreate (format, (uint)width, (uint)height), true)
+ {
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Cairo/CairoLibraryDefinition.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Cairo/CairoLibraryDefinition.cs
new file mode 100644
index 00000000000..bf5c3735081
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Cairo/CairoLibraryDefinition.cs
@@ -0,0 +1,78 @@
+//
+// CairoLibraryDefinition.cs
+//
+// Author:
+// glenn <>
+//
+// Copyright (c) 2022
+//
+// 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;
+
+namespace MonoDevelop.Components
+{
+ ///
+ /// A class containing definitions for the cairo library api's.
+ ///
+ public static class CairoLibraryDefinition
+ {
+ static readonly PlatformID currentOS;
+ static readonly string linuxCairoLib = "libcairo.so.2";
+ static readonly string winCairoLib = "libcairo-2.dll";
+ static readonly string macOsCairoLib = "libcairo.2.dylib";
+
+ static readonly Dictionary libraries
+ = new Dictionary (){
+ { PlatformID.Unix, linuxCairoLib },
+ { PlatformID.Win32NT, winCairoLib },
+ { PlatformID.Win32S, winCairoLib },
+ { PlatformID.Win32Windows, winCairoLib },
+ { PlatformID.WinCE, winCairoLib },
+ {PlatformID.MacOSX, macOsCairoLib}
+ };
+
+ static CairoLibraryDefinition ()
+ {
+ currentOS = Environment.OSVersion.Platform;
+ Library = libraries.First (lib => lib.Key == currentOS).Value;
+ }
+
+ ///
+ /// Gets the name of the library to be loaded.
+ ///
+ public static readonly string Library;
+
+ ///
+ /// Contains the method names defined in the library.
+ ///
+ public static class API
+ {
+ public static readonly string PushGroup = "cairo_push_group";
+ public static readonly string PopGroup = "cairo_pop_group";
+ public static readonly string PopGroupToSource = "cairo_pop_group_to_source";
+ public static readonly string GetSource = "cairo_get_source";
+ public static readonly string PatternSetExtend = "cairo_pattern_set_extend";
+ public static readonly string QuartzSurfaceCreate = "cairo_quartz_surface_create";
+ public static readonly string QuartzSurfaceGetCGContext = "cairo_quartz_surface_get_cg_context";
+ public static readonly string GetTarget = "cairo_get_target";
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/CairoExtensions.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/CairoExtensions.cs
deleted file mode 100644
index e92fe4c2294..00000000000
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/CairoExtensions.cs
+++ /dev/null
@@ -1,740 +0,0 @@
-//
-// CairoExtensions.cs
-//
-// Author:
-// Aaron Bockover
-//
-// Copyright (C) 2007 Novell, Inc.
-//
-// 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.Reflection;
-using System.Runtime.InteropServices;
-
-using Gdk;
-using Cairo;
-using MonoDevelop.Core;
-
-namespace MonoDevelop.Components
-{
- [Flags]
- public enum CairoCorners
- {
- None = 0,
- TopLeft = 1,
- TopRight = 2,
- BottomLeft = 4,
- BottomRight = 8,
- All = 15
- }
-
- public static class CairoExtensions
- {
- internal const string LIBCAIRO = "libcairo-2.dll";
- public static Cairo.Rectangle ToCairoRect (this Gdk.Rectangle rect)
- {
- return new Cairo.Rectangle (rect.X, rect.Y, rect.Width, rect.Height);
- }
-
- public static Surface CreateSurfaceForPixbuf (Context cr, Pixbuf pixbuf)
- {
- Surface surface;
- using (var t = cr.GetTarget ()) {
- surface = t.CreateSimilar (t.Content, pixbuf.Width, pixbuf.Height);
- }
- using (Context surface_cr = new Context (surface)) {
- CairoHelper.SetSourcePixbuf (surface_cr, pixbuf, 0, 0);
- surface_cr.Paint ();
- surface_cr.Dispose ();
- }
- return surface;
- }
-
- public static Cairo.Color AlphaBlend (Cairo.Color ca, Cairo.Color cb, double alpha)
- {
- return new Cairo.Color (
- (1.0 - alpha) * ca.R + alpha * cb.R,
- (1.0 - alpha) * ca.G + alpha * cb.G,
- (1.0 - alpha) * ca.B + alpha * cb.B);
- }
- public static Gdk.Color CairoColorToGdkColor(Cairo.Color color)
- {
- return new Gdk.Color ((byte)(color.R * 255), (byte)(color.G * 255), (byte)(color.B * 255));
- }
-
- public static Cairo.Color GdkColorToCairoColor(Gdk.Color color)
- {
- return GdkColorToCairoColor(color, 1.0);
- }
-
- public static Cairo.Color GdkColorToCairoColor(Gdk.Color color, double alpha)
- {
- return new Cairo.Color(
- (double)(color.Red >> 8) / 255.0,
- (double)(color.Green >> 8) / 255.0,
- (double)(color.Blue >> 8) / 255.0,
- alpha);
- }
-
- public static Cairo.Color RgbToColor (uint rgbColor)
- {
- return RgbaToColor ((rgbColor << 8) | 0x000000ff);
- }
-
- public static Cairo.Color RgbaToColor (uint rgbaColor)
- {
- return new Cairo.Color (
- (byte)(rgbaColor >> 24) / 255.0,
- (byte)(rgbaColor >> 16) / 255.0,
- (byte)(rgbaColor >> 8) / 255.0,
- (byte)(rgbaColor & 0x000000ff) / 255.0);
- }
-
- public static Cairo.Color InterpolateColors (Cairo.Color start, Cairo.Color end, float amount)
- {
- return new Cairo.Color (start.R + (end.R - start.R) * amount,
- start.G + (end.G - start.G) * amount,
- start.B + (end.B - start.B) * amount,
- start.A + (end.A - start.A) * amount);
- }
-
- public static bool ColorIsDark (Cairo.Color color)
- {
- double h, s, b;
- HsbFromColor (color, out h, out s, out b);
- return b < 0.5;
- }
-
- public static void HsbFromColor(Cairo.Color color, out double hue,
- out double saturation, out double brightness)
- {
- double min, max, delta;
- double red = color.R;
- double green = color.G;
- double blue = color.B;
-
- hue = 0;
- saturation = 0;
- brightness = 0;
-
- if(red > green) {
- max = Math.Max(red, blue);
- min = Math.Min(green, blue);
- } else {
- max = Math.Max(green, blue);
- min = Math.Min(red, blue);
- }
-
- brightness = (max + min) / 2;
-
- if(Math.Abs(max - min) < 0.0001) {
- hue = 0;
- saturation = 0;
- } else {
- saturation = brightness <= 0.5
- ? (max - min) / (max + min)
- : (max - min) / (2 - max - min);
-
- delta = max - min;
-
- if(red == max) {
- hue = (green - blue) / delta;
- } else if(green == max) {
- hue = 2 + (blue - red) / delta;
- } else if(blue == max) {
- hue = 4 + (red - green) / delta;
- }
-
- hue *= 60;
- if(hue < 0) {
- hue += 360;
- }
- }
- }
-
- private static double Modula(double number, double divisor)
- {
- return ((int)number % divisor) + (number - (int)number);
- }
-
- public static Cairo.Color ColorFromHsb(double hue, double saturation, double brightness)
- {
- int i;
- double [] hue_shift = { 0, 0, 0 };
- double [] color_shift = { 0, 0, 0 };
- double m1, m2, m3;
-
- m2 = brightness <= 0.5
- ? brightness * (1 + saturation)
- : brightness + saturation - brightness * saturation;
-
- m1 = 2 * brightness - m2;
-
- hue_shift[0] = hue + 120;
- hue_shift[1] = hue;
- hue_shift[2] = hue - 120;
-
- color_shift[0] = color_shift[1] = color_shift[2] = brightness;
-
- i = saturation == 0 ? 3 : 0;
-
- for(; i < 3; i++) {
- m3 = hue_shift[i];
-
- if(m3 > 360) {
- m3 = Modula(m3, 360);
- } else if(m3 < 0) {
- m3 = 360 - Modula(Math.Abs(m3), 360);
- }
-
- if(m3 < 60) {
- color_shift[i] = m1 + (m2 - m1) * m3 / 60;
- } else if(m3 < 180) {
- color_shift[i] = m2;
- } else if(m3 < 240) {
- color_shift[i] = m1 + (m2 - m1) * (240 - m3) / 60;
- } else {
- color_shift[i] = m1;
- }
- }
-
- return new Cairo.Color(color_shift[0], color_shift[1], color_shift[2]);
- }
-
- public static Cairo.Color ColorShade (Cairo.Color @base, double ratio)
- {
- double h, s, b;
-
- HsbFromColor (@base, out h, out s, out b);
-
- b = Math.Max (Math.Min (b * ratio, 1), 0);
- s = Math.Max (Math.Min (s * ratio, 1), 0);
-
- Cairo.Color color = ColorFromHsb (h, s, b);
- color.A = @base.A;
- return color;
- }
-
- public static Cairo.Color ColorAdjustBrightness(Cairo.Color @base, double br)
- {
- double h, s, b;
- HsbFromColor(@base, out h, out s, out b);
- b = Math.Max(Math.Min(br, 1), 0);
- return ColorFromHsb(h, s, b);
- }
-
- public static string ColorGetHex (Cairo.Color color, bool withAlpha = false)
- {
- if (withAlpha) {
- return String.Format("#{0:x2}{1:x2}{2:x2}{3:x2}", (byte)(color.R * 255), (byte)(color.G * 255),
- (byte)(color.B * 255), (byte)(color.A * 255));
- } else {
- return String.Format("#{0:x2}{1:x2}{2:x2}", (byte)(color.R * 255), (byte)(color.G * 255),
- (byte)(color.B * 255));
- }
- }
-
- public static void RoundedRectangle(this Cairo.Context cr, double x, double y, double w, double h, double r)
- {
- RoundedRectangle(cr, x, y, w, h, r, CairoCorners.All, false);
- }
-
- public static void RoundedRectangle(this Cairo.Context cr, double x, double y, double w, double h,
- double r, CairoCorners corners)
- {
- RoundedRectangle(cr, x, y, w, h, r, corners, false);
- }
-
- public static void RoundedRectangle(this Cairo.Context cr, double x, double y, double w, double h,
- double r, CairoCorners corners, bool topBottomFallsThrough)
- {
- if(topBottomFallsThrough && corners == CairoCorners.None) {
- cr.MoveTo(x, y - r);
- cr.LineTo(x, y + h + r);
- cr.MoveTo(x + w, y - r);
- cr.LineTo(x + w, y + h + r);
- return;
- } else if(r < 0.0001 || corners == CairoCorners.None) {
- cr.Rectangle(x, y, w, h);
- return;
- }
-
- if((corners & (CairoCorners.TopLeft | CairoCorners.TopRight)) == 0 && topBottomFallsThrough) {
- y -= r;
- h += r;
- cr.MoveTo(x + w, y);
- } else {
- if((corners & CairoCorners.TopLeft) != 0) {
- cr.MoveTo(x + r, y);
- } else {
- cr.MoveTo(x, y);
- }
-
- if((corners & CairoCorners.TopRight) != 0) {
- cr.Arc(x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2);
- } else {
- cr.LineTo(x + w, y);
- }
- }
-
- if((corners & (CairoCorners.BottomLeft | CairoCorners.BottomRight)) == 0 && topBottomFallsThrough) {
- h += r;
- cr.LineTo(x + w, y + h);
- cr.MoveTo(x, y + h);
- cr.LineTo(x, y + r);
- cr.Arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
- } else {
- if((corners & CairoCorners.BottomRight) != 0) {
- cr.Arc(x + w - r, y + h - r, r, 0, Math.PI * 0.5);
- } else {
- cr.LineTo(x + w, y + h);
- }
-
- if((corners & CairoCorners.BottomLeft) != 0) {
- cr.Arc(x + r, y + h - r, r, Math.PI * 0.5, Math.PI);
- } else {
- cr.LineTo(x, y + h);
- }
-
- if((corners & CairoCorners.TopLeft) != 0) {
- cr.Arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
- } else {
- cr.LineTo(x, y);
- }
- }
- }
-
- static void ShadowGradient (Cairo.Gradient lg, double strength)
- {
- lg.AddColorStop (0, new Cairo.Color (0, 0, 0, strength));
- lg.AddColorStop (1.0/6.0, new Cairo.Color (0, 0, 0, .85 * strength));
- lg.AddColorStop (2.0/6.0, new Cairo.Color (0, 0, 0, .54 * strength));
- lg.AddColorStop (3.0/6.0, new Cairo.Color (0, 0, 0, .24 * strength));
- lg.AddColorStop (4.0/6.0, new Cairo.Color (0, 0, 0, .07 * strength));
- lg.AddColorStop (5.0/6.0, new Cairo.Color (0, 0, 0, .01 * strength));
- lg.AddColorStop (1, new Cairo.Color (0, 0, 0, 0));
- }
-
- // VERY SLOW, only use on cached renders
- public static void RenderOuterShadow (this Cairo.Context self, Gdk.Rectangle area, int size, int rounding, double strength)
- {
- area.Inflate (-1, -1);
- size++;
-
- int doubleRounding = rounding * 2;
- // left side
- self.Rectangle (area.X - size, area.Y + rounding, size, area.Height - doubleRounding - 1);
- using (var lg = new LinearGradient (area.X, 0, area.X - size, 0)) {
- ShadowGradient (lg, strength);
- self.SetSource (lg);
- self.Fill ();
- }
-
- // right side
- self.Rectangle (area.Right, area.Y + rounding, size, area.Height - doubleRounding - 1);
- using (var lg = new LinearGradient (area.Right, 0, area.Right + size, 0)) {
- ShadowGradient (lg, strength);
- self.SetSource (lg);
- self.Fill ();
- }
-
- // top side
- self.Rectangle (area.X + rounding, area.Y - size, area.Width - doubleRounding - 1, size);
- using (var lg = new LinearGradient (0, area.Y, 0, area.Y - size)) {
- ShadowGradient (lg, strength);
- self.SetSource (lg);
- self.Fill ();
- }
-
- // bottom side
- self.Rectangle (area.X + rounding, area.Bottom, area.Width - doubleRounding - 1, size);
- using (var lg = new LinearGradient (0, area.Bottom, 0, area.Bottom + size)) {
- ShadowGradient (lg, strength);
- self.SetSource (lg);
- self.Fill ();
- }
-
- // top left corner
- self.Rectangle (area.X - size, area.Y - size, size + rounding, size + rounding);
- using (var rg = new RadialGradient (area.X + rounding, area.Y + rounding, rounding, area.X + rounding, area.Y + rounding, size + rounding)) {
- ShadowGradient (rg, strength);
- self.SetSource (rg);
- self.Fill ();
- }
-
- // top right corner
- self.Rectangle (area.Right - rounding, area.Y - size, size + rounding, size + rounding);
- using (var rg = new RadialGradient (area.Right - rounding, area.Y + rounding, rounding, area.Right - rounding, area.Y + rounding, size + rounding)) {
- ShadowGradient (rg, strength);
- self.SetSource (rg);
- self.Fill ();
- }
-
- // bottom left corner
- self.Rectangle (area.X - size, area.Bottom - rounding, size + rounding, size + rounding);
- using (var rg = new RadialGradient (area.X + rounding, area.Bottom - rounding, rounding, area.X + rounding, area.Bottom - rounding, size + rounding)) {
- ShadowGradient (rg, strength);
- self.SetSource (rg);
- self.Fill ();
- }
-
- // bottom right corner
- self.Rectangle (area.Right - rounding, area.Bottom - rounding, size + rounding, size + rounding);
- using (var rg = new RadialGradient (area.Right - rounding, area.Bottom - rounding, rounding, area.Right - rounding, area.Bottom - rounding, size + rounding)) {
- ShadowGradient (rg, strength);
- self.SetSource (rg);
- self.Fill ();
- }
- }
-
- [DllImport (LIBCAIRO, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr cairo_pattern_set_extend(IntPtr pattern, CairoExtend extend);
-
- [DllImport (LIBCAIRO, CallingConvention=CallingConvention.Cdecl)]
- internal static extern IntPtr cairo_get_source (IntPtr cr);
-
- enum CairoExtend {
- CAIRO_EXTEND_NONE,
- CAIRO_EXTEND_REPEAT,
- CAIRO_EXTEND_REFLECT,
- CAIRO_EXTEND_PAD
- }
-
- public static void RenderTiled (this Cairo.Context self, Gtk.Widget target, Xwt.Drawing.Image source, Gdk.Rectangle area, Gdk.Rectangle clip, double opacity = 1)
- {
- var ctx = Xwt.Toolkit.CurrentEngine.WrapContext (target, self);
- ctx.Save ();
- ctx.Rectangle (clip.X, clip.Y, clip.Width, clip.Height);
- ctx.Clip ();
- ctx.Pattern = new Xwt.Drawing.ImagePattern (source);
- ctx.Rectangle (area.X, area.Y, area.Width, area.Height);
- ctx.Fill ();
- ctx.Restore ();
- }
-
- public static void DisposeContext (Cairo.Context cr)
- {
- cr.Dispose ();
- }
-
- private struct CairoInteropCall
- {
- public string Name;
- public MethodInfo ManagedMethod;
- public bool CallNative;
-
- public CairoInteropCall (string name)
- {
- Name = name;
- ManagedMethod = null;
- CallNative = false;
- }
- }
-
- private static bool CallCairoMethod (Cairo.Context cr, ref CairoInteropCall call)
- {
- if (call.ManagedMethod == null && !call.CallNative) {
- MemberInfo [] members = typeof (Cairo.Context).GetMember (call.Name, MemberTypes.Method,
- BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public);
-
- if (members != null && members.Length > 0 && members[0] is MethodInfo) {
- call.ManagedMethod = (MethodInfo)members[0];
- } else {
- call.CallNative = true;
- }
- }
-
- if (call.ManagedMethod != null) {
- call.ManagedMethod.Invoke (cr, null);
- return true;
- }
-
- return false;
- }
-
- private static bool native_push_pop_exists = true;
-
- [DllImport (LIBCAIRO, CallingConvention = CallingConvention.Cdecl)]
- private static extern void cairo_push_group (IntPtr ptr);
- private static CairoInteropCall cairo_push_group_call = new CairoInteropCall ("PushGroup");
-
- public static void PushGroup (Cairo.Context cr)
- {
- if (!native_push_pop_exists) {
- return;
- }
-
- try {
- if (!CallCairoMethod (cr, ref cairo_push_group_call)) {
- cairo_push_group (cr.Handle);
- }
- } catch {
- native_push_pop_exists = false;
- }
- }
-
- [DllImport (LIBCAIRO, CallingConvention = CallingConvention.Cdecl)]
- private static extern void cairo_pop_group_to_source (IntPtr ptr);
- private static CairoInteropCall cairo_pop_group_to_source_call = new CairoInteropCall ("PopGroupToSource");
-
- public static void PopGroupToSource (Cairo.Context cr)
- {
- if (!native_push_pop_exists) {
- return;
- }
-
- try {
- if (!CallCairoMethod (cr, ref cairo_pop_group_to_source_call)) {
- cairo_pop_group_to_source (cr.Handle);
- }
- } catch (EntryPointNotFoundException) {
- native_push_pop_exists = false;
- }
- }
-
- public static Cairo.Color ParseColor (string s, double alpha = 1)
- {
- if (s.StartsWith ("#"))
- s = s.Substring (1);
- if (s.Length == 3)
- s = "" + s[0]+s[0]+s[1]+s[1]+s[2]+s[2];
- double r = ((double) int.Parse (s.Substring (0,2), System.Globalization.NumberStyles.HexNumber)) / 255;
- double g = ((double) int.Parse (s.Substring (2,2), System.Globalization.NumberStyles.HexNumber)) / 255;
- double b = ((double) int.Parse (s.Substring (4,2), System.Globalization.NumberStyles.HexNumber)) / 255;
- return new Cairo.Color (r, g, b, alpha);
- }
-
- public static ImageSurface LoadImage (Assembly assembly, string resource)
- {
- byte[] buffer;
- using (var stream = assembly.GetManifestResourceStream (resource)) {
- buffer = new byte [stream.Length];
- stream.Read (buffer, 0, (int)stream.Length);
- }
-/* This should work, but doesn't:
- using (var px = new Gdk.Pixbuf (buffer))
- return new ImageSurface (px.Pixels, Format.Argb32, px.Width, px.Height, px.Rowstride);*/
-
- // Workaround: loading from file name.
- var tmp = System.IO.Path.GetTempFileName ();
- System.IO.File.WriteAllBytes (tmp, buffer);
- var img = new ImageSurface (tmp);
- try {
- System.IO.File.Delete (tmp);
- } catch (Exception e) {
- LoggingService.LogWarning ($"Unable to delete {tmp} due to exception {e}");
-
- // Only want to dispose when the Delete failed
- img.Dispose ();
- throw;
- }
- return img;
- }
-
- public static Cairo.Color WithAlpha (Cairo.Color c, double alpha)
- {
- return new Cairo.Color (c.R, c.G, c.B, alpha);
- }
-
- public static Cairo.Color MultiplyAlpha (this Cairo.Color self, double alpha)
- {
- return new Cairo.Color (self.R, self.G, self.B, self.A * alpha);
- }
-
- public static void CachedDraw (this Cairo.Context self, ref SurfaceWrapper surface, Gdk.Point position, Gdk.Size size,
- object parameters = null, float opacity = 1.0f, Action draw = null, double? forceScale = null)
- {
- self.CachedDraw (ref surface, new Gdk.Rectangle (position, size), parameters, opacity, draw, forceScale);
- }
-
- public static void CachedDraw (this Cairo.Context self, ref SurfaceWrapper surface, Gdk.Rectangle region,
- object parameters = null, float opacity = 1.0f, Action draw = null, double? forceScale = null)
- {
- double displayScale = forceScale.HasValue ? forceScale.Value : QuartzSurface.GetRetinaScale (self);
- int targetWidth = (int) (region.Width * displayScale);
- int targetHeight = (int) (region.Height * displayScale);
-
- bool redraw = false;
- if (surface == null || surface.Width != targetWidth || surface.Height != targetHeight) {
- if (surface != null)
- surface.Dispose ();
- surface = new SurfaceWrapper (self, targetWidth, targetHeight);
- redraw = true;
- } else if ((surface.Data == null && parameters != null) || (surface.Data != null && !surface.Data.Equals (parameters))) {
- redraw = true;
- }
-
-
- if (redraw) {
- surface.Data = parameters;
- using (var context = new Cairo.Context (surface.Surface)) {
- context.Operator = Operator.Clear;
- context.Paint();
- context.Operator = Operator.Over;
- context.Save ();
- context.Scale (displayScale, displayScale);
- draw(context, 1.0f);
- context.Restore ();
- }
- }
-
- self.Save ();
- self.Translate (region.X, region.Y);
- self.Scale (1 / displayScale, 1 / displayScale);
- self.SetSourceSurface (surface.Surface, 0, 0);
- self.PaintWithAlpha (opacity);
- self.Restore ();
- }
- }
-
- public class SurfaceWrapper : IDisposable
- {
- public Cairo.Surface Surface { get; private set; }
- public int Width { get; private set; }
- public int Height { get; private set; }
- public object Data { get; set; }
- public bool IsDisposed { get; private set; }
-
- public SurfaceWrapper (Cairo.Context similar, int width, int height)
- {
- if (Platform.IsMac) {
- Surface = new QuartzSurface (Cairo.Format.ARGB32, width, height);
- } else if (Platform.IsWindows) {
- using (var target = similar.GetTarget ()) {
- Surface = target.CreateSimilar (Cairo.Content.ColorAlpha, width, height);
- }
- } else {
- Surface = new ImageSurface (Cairo.Format.ARGB32, width, height);
- }
- Width = width;
- Height = height;
- }
-
- public SurfaceWrapper (Cairo.Context similar, Gdk.Pixbuf source)
- {
- Cairo.Surface surface;
- // There is a bug in Cairo for OSX right now that prevents creating additional accellerated surfaces.
- if (Platform.IsMac) {
- surface = new QuartzSurface (Format.ARGB32, source.Width, source.Height);
- } else if (Platform.IsWindows) {
- using (var t = similar.GetTarget ()) {
- surface = t.CreateSimilar (Content.ColorAlpha, source.Width, source.Height);
- }
- } else {
- surface = new ImageSurface (Format.ARGB32, source.Width, source.Height);
- }
-
- using (Context context = new Context (surface)) {
- Gdk.CairoHelper.SetSourcePixbuf (context, source, 0, 0);
- context.Paint ();
- }
-
- Surface = surface;
- Width = source.Width;
- Height = source.Height;
- }
-
- public void Dispose ()
- {
- IsDisposed = true;
- if (Surface != null) {
- ((IDisposable)Surface).Dispose ();
- }
- }
- }
-
- public class QuartzSurface : Cairo.Surface
- {
- const string CoreGraphics = "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/CoreGraphics";
-
- [DllImport (CairoExtensions.LIBCAIRO, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr cairo_quartz_surface_create (Cairo.Format format, uint width, uint height);
-
- [DllImport (CairoExtensions.LIBCAIRO, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr cairo_quartz_surface_get_cg_context (IntPtr surface);
-
- [DllImport (CairoExtensions.LIBCAIRO, CallingConvention = CallingConvention.Cdecl)]
- static extern IntPtr cairo_get_target (IntPtr context);
-
- [DllImport (CoreGraphics, EntryPoint="CGContextConvertRectToDeviceSpace", CallingConvention = CallingConvention.Cdecl)]
- static extern CGRect32 CGContextConvertRectToDeviceSpace32 (IntPtr contextRef, CGRect32 cgrect);
-
- [DllImport (CoreGraphics, EntryPoint="CGContextConvertRectToDeviceSpace", CallingConvention = CallingConvention.Cdecl)]
- static extern CGRect64 CGContextConvertRectToDeviceSpace64 (IntPtr contextRef, CGRect64 cgrect);
-
- public static double GetRetinaScale (Cairo.Context context) {
- if (!Platform.IsMac)
- return 1;
-
- // Use C call to avoid dispose bug in cairo bindings for OSX
- var cgContext = cairo_quartz_surface_get_cg_context (cairo_get_target (context.Handle));
-
- if (IntPtr.Size == 8)
- return CGContextConvertRectToDeviceSpace64 (cgContext, CGRect64.Unit).X;
-
- return CGContextConvertRectToDeviceSpace32 (cgContext, CGRect32.Unit).X;
- }
-
- struct CGRect32
- {
- public CGRect32 (float x, float y, float width, float height)
- {
- this.X = x;
- this.Y = y;
- this.Width = width;
- this.Height = height;
- }
-
- public float X, Y, Width, Height;
-
- public static CGRect32 Unit {
- get {
- return new CGRect32 (1, 1, 1, 1);
- }
- }
- }
-
- struct CGRect64
- {
- public CGRect64 (double x, double y, double width, double height)
- {
- this.X = x;
- this.Y = y;
- this.Width = width;
- this.Height = height;
- }
-
- public double X, Y, Width, Height;
-
- public static CGRect64 Unit {
- get {
- return new CGRect64 (1, 1, 1, 1);
- }
- }
- }
-
- public QuartzSurface (Cairo.Format format, int width, int height)
- : base (cairo_quartz_surface_create (format, (uint)width, (uint)height), true)
- {
- }
- }
-}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuTreeView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuTreeView.cs
index ff04e416b2b..0d6bb648722 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuTreeView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuTreeView.cs
@@ -1,21 +1,21 @@
-//
+//
// ContextMenuTreeView.cs
-//
+//
// Author:
// Michael Hutchinson
-//
+//
// Copyright (c) 2011 Xamarin Inc. (http://xamarin.com)
-//
+//
// 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
@@ -25,6 +25,11 @@
// THE SOFTWARE.
using System;
using MonoDevelop.Components.AtkCocoaHelper;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#else
+using TreeModel = Gtk.TreeModel;
+#endif
namespace MonoDevelop.Components
{
@@ -40,7 +45,7 @@ public ContextMenuTreeView ()
ActionHandler.PerformShowMenu += PerformShowMenu;
}
- public ContextMenuTreeView (Gtk.TreeModel model) : base (model)
+ public ContextMenuTreeView (TreeModel model) : base (model)
{
}
@@ -51,7 +56,7 @@ public ContextMenuTreeView (Gtk.TreeModel model) : base (model)
// Workaround for Bug 31712 - Solution pad doesn't refresh properly after resizing application window
// If the treeview size is modified while the pad is unrealized (autohidden), the treeview
- // doesn't update its internal vertical offset. This can lead to items becoming offset outside the
+ // doesn't update its internal vertical offset. This can lead to items becoming offset outside the
// visible area and therefore becoming unreachable. The only way to force the treeview to recalculate
// this offset is by setting the Vadjustment.Value, but it ignores values the same as the current value.
// Therefore we simply set it to something slightly different then back again.
@@ -130,12 +135,12 @@ protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
if (!this.IsClickedNodeSelected ((int)evnt.X, (int)evnt.Y)) {
res = base.OnButtonPressEvent (evnt);
}
-
+
if (DoPopupMenu != null) {
DoPopupMenu (evnt);
return true;
}
-
+
return res;
}
@@ -165,11 +170,11 @@ protected override bool OnButtonReleaseEvent (Gdk.EventButton evnt)
selectOnRelease = false;
bool res = base.OnButtonReleaseEvent (evnt);
-
+
if (DoPopupMenu != null && evnt.IsContextMenuButton ()) {
return true;
}
-
+
return res;
}
@@ -184,7 +189,7 @@ internal void ClearSelectOnRelease ()
Selection.SelectFunction = DefaultTreeSelectFunction;
}
- static bool DefaultTreeSelectFunction (Gtk.TreeSelection selection, Gtk.TreeModel model, Gtk.TreePath path, bool selected)
+ static bool DefaultTreeSelectFunction (Gtk.TreeSelection selection, TreeModel model, Gtk.TreePath path, bool selected)
{
return true;
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkWorkarounds.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkWorkarounds.cs
index 89306b0e64b..8e8de3984e2 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkWorkarounds.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkWorkarounds.cs
@@ -28,6 +28,7 @@
using System.Drawing;
using System.Runtime.InteropServices;
using System.Collections.Generic;
+using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using Gtk;
@@ -43,11 +44,15 @@
#if WIN32
using System.Windows.Input;
#endif
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Components
{
public static partial class GtkWorkarounds
{
+#if DD_GTK3_CHECK_FOR_REMOVE
const string USER32DLL = "User32.dll";
static System.Reflection.MethodInfo glibObjectGetProp, glibObjectSetProp;
@@ -212,22 +217,28 @@ static Gdk.Rectangle WindowsGetUsableMonitorGeometry (Gdk.Screen screen, int mon
return new Gdk.Rectangle (x, y, width, height);
}
-
+#endif
public static Gdk.Rectangle GetUsableMonitorGeometry (this Gdk.Screen screen, int monitor)
{
+ return Xwt.GtkBackend.GtkWorkarounds.GetUsableMonitorGeometry (screen, monitor);
+#if DD_GTK3_CHECK_FOR_REMOVE
#if WIN32
return WindowsGetUsableMonitorGeometry (screen, monitor);
#elif MAC
return MacGetUsableMonitorGeometry (screen, monitor);
#else
return screen.GetMonitorGeometry (monitor);
+#endif
#endif
}
public static int RunDialogWithNotification (Gtk.Dialog dialog)
{
+ return Xwt.GtkBackend.GtkWorkarounds.RunDialogWithNotification (dialog);
+#if DD_GTK3_CHECK_FOR_REMOVE
#if MAC
MacRequestAttention (dialog.Modal);
+#endif
#endif
return dialog.Run ();
@@ -235,30 +246,44 @@ public static int RunDialogWithNotification (Gtk.Dialog dialog)
public static void PresentWindowWithNotification (this Gtk.Window window)
{
+ Xwt.GtkBackend.GtkWorkarounds.PresentWindowWithNotification (window);
+#if DD_GTK3_CHECK_FOR_REMOVE
window.Present ();
#if MAC
MacRequestAttention (window is Gtk.Dialog && window.Modal);
+#endif
#endif
}
public static GLib.Value GetProperty (this GLib.Object obj, string name)
{
+ return Xwt.GtkBackend.GtkWorkarounds.GetProperty (obj, name);
+#if DD_GTK3_CHECK_FOR_REMOVE
return (GLib.Value) glibObjectGetProp.Invoke (obj, new object[] { name });
+#endif
}
public static void SetProperty (this GLib.Object obj, string name, GLib.Value value)
{
+ Xwt.GtkBackend.GtkWorkarounds.SetProperty (obj, name,value);
+#if DD_GTK3_CHECK_FOR_REMOVE
glibObjectSetProp.Invoke (obj, new object[] { name, value });
+#endif
}
public static bool TriggersContextMenu (this Gdk.EventButton evt)
{
+ return Xwt.GtkBackend.GtkWorkarounds.TriggersContextMenu (evt);
+#if DD_GTK3_CHECK_FOR_REMOVE
return evt.Type == Gdk.EventType.ButtonPress && IsContextMenuButton (evt);
+#endif
}
public static bool IsContextMenuButton (this Gdk.EventButton evt)
{
+ return Xwt.GtkBackend.GtkWorkarounds.IsContextMenuButton (evt);
+#if DD_GTK3_CHECK_FOR_REMOVE
if (evt.Button == 3 &&
(evt.State & (Gdk.ModifierType.Button1Mask | Gdk.ModifierType.Button2Mask)) == 0)
return true;
@@ -273,34 +298,42 @@ public static bool IsContextMenuButton (this Gdk.EventButton evt)
}
return false;
+#endif
+
}
public static Gdk.ModifierType GetCurrentKeyModifiers ()
{
+ return Xwt.GtkBackend.GtkWorkarounds.GetCurrentKeyModifiers ();
+#if DD_GTK3_CHECK_FOR_REMOVE
#if WIN32
- Gdk.ModifierType mtype = Gdk.ModifierType.None;
- ModifierKeys mod = Keyboard.Modifiers;
- if ((mod & ModifierKeys.Shift) > 0)
- mtype |= Gdk.ModifierType.ShiftMask;
- if ((mod & ModifierKeys.Control) > 0)
- mtype |= Gdk.ModifierType.ControlMask;
- if ((mod & ModifierKeys.Alt) > 0)
- mtype |= Gdk.ModifierType.Mod1Mask; // Alt key
- if ((mod & ModifierKeys.Windows) > 0)
- mtype |= Gdk.ModifierType.Mod2Mask; // Command key
- return mtype;
+ Gdk.ModifierType mtype = Gdk.ModifierType.None;
+ ModifierKeys mod = Keyboard.Modifiers;
+ if ((mod & ModifierKeys.Shift) > 0)
+ mtype |= Gdk.ModifierType.ShiftMask;
+ if ((mod & ModifierKeys.Control) > 0)
+ mtype |= Gdk.ModifierType.ControlMask;
+ if ((mod & ModifierKeys.Alt) > 0)
+ mtype |= Gdk.ModifierType.Mod1Mask; // Alt key
+ if ((mod & ModifierKeys.Windows) > 0)
+ mtype |= Gdk.ModifierType.Mod2Mask; // Command key
+ return mtype;
#elif MAC
return GtkMacInterop.ConvertModifierMask (NSEvent.CurrentModifierFlags);
#else
Gdk.ModifierType mtype;
Gtk.Global.GetCurrentEventState (out mtype);
return mtype;
+#endif
#endif
}
public static void GetPageScrollPixelDeltas (this Gdk.EventScroll evt, double pageSizeX, double pageSizeY,
out double deltaX, out double deltaY)
{
+ Xwt.GtkBackend.GtkWorkarounds.GetPageScrollPixelDeltas (evt, pageSizeX, pageSizeY, out deltaX, out deltaY);
+
+#if DD_GTK3_CHECK_FOR_REMOVE
if (!GetEventScrollDeltas (evt, out deltaX, out deltaY)) {
var direction = evt.Direction;
deltaX = deltaY = 0;
@@ -316,19 +349,27 @@ public static void GetPageScrollPixelDeltas (this Gdk.EventScroll evt, double pa
deltaX = -deltaX;
}
}
+#endif
}
public static void AddValueClamped (this Gtk.Adjustment adj, double value)
{
+ Xwt.GtkBackend.GtkWorkarounds.AddValueClamped (adj, value);
+#if DD_GTK3_CHECK_FOR_REMOVE
adj.Value = System.Math.Max (adj.Lower, System.Math.Min (adj.Value + value, adj.Upper - adj.PageSize));
+#endif
}
+#if DD_GTK3_CHECK_FOR_REMOVE
[DllImport (PangoUtil.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
extern static bool gdk_event_get_scroll_deltas (IntPtr eventScroll, out double deltaX, out double deltaY);
static bool scrollDeltasNotSupported;
-
+#endif
public static bool GetEventScrollDeltas (Gdk.EventScroll evt, out double deltaX, out double deltaY)
{
+ return Xwt.GtkBackend.GtkWorkarounds.GetEventScrollDeltas (evt, out deltaX, out deltaY);
+#if DD_GTK3_CHECK_FOR_REMOVE
+
if (!scrollDeltasNotSupported) {
try {
return gdk_event_get_scroll_deltas (evt.Handle, out deltaX, out deltaY);
@@ -338,10 +379,12 @@ public static bool GetEventScrollDeltas (Gdk.EventScroll evt, out double deltaX,
}
deltaX = deltaY = 0;
return false;
+#endif
}
static void ShowContextMenuInternal (Gtk.Menu menu, Gtk.Widget parent, int ix, int iy, Gdk.Rectangle caret, Gdk.Window window, uint time, uint button)
{
+
Gtk.MenuPositionFunc posFunc = null;
if (parent != null) {
@@ -425,6 +468,7 @@ public static void ShowContextMenu (Gtk.Menu menu, Gtk.Widget parent, Gdk.EventB
public static void ShowContextMenu (Gtk.Menu menu, Gtk.Widget parent, int ix, int iy, Gdk.Rectangle caret)
{
+
int x, y;
var window = parent.GdkWindow;
var alloc = parent.Allocation;
@@ -442,11 +486,15 @@ public static void ShowContextMenu (Gtk.Menu menu, Gtk.Widget parent, int ix, in
}
ShowContextMenuInternal (menu, parent, x, y, caret, window, Gtk.Global.CurrentEventTime, 0);
+
}
public static void ShowContextMenu (Gtk.Menu menu, Gtk.Widget parent, Gdk.EventButton evt)
{
+ Xwt.GtkBackend.GtkWorkarounds.ShowContextMenu (menu, parent, evt);
+#if DD_GTK3_CHECK_FOR_REMOVE
ShowContextMenu (menu, parent, evt, Gdk.Rectangle.Zero);
+#endif
}
public static void ShowContextMenu (Gtk.Menu menu, Gtk.Widget parent, int x, int y)
@@ -459,6 +507,7 @@ public static void ShowContextMenu (Gtk.Menu menu, Gtk.Widget parent, Gdk.Rectan
ShowContextMenu (menu, parent, null, caret);
}
+#if DD_GTK3_CHECK_FOR_REMOVE
struct MappedKeys
{
public Gdk.Key Key;
@@ -476,6 +525,7 @@ struct MappedKeys
static Gdk.Keymap keymap = Gdk.Keymap.Default;
static Dictionary mappedKeys = new Dictionary ();
+#endif
/// Map raw GTK key input to work around platform bugs and decompose accelerator keys
/// The raw key event
@@ -485,6 +535,10 @@ struct MappedKeys
public static void MapKeys (Gdk.EventKey evt, out Gdk.Key key, out Gdk.ModifierType state,
out KeyboardShortcut[] shortcuts)
{
+ Xwt.GtkBackend.GtkWorkarounds.MapKeys (evt,out key, out state, out var _shortcuts);
+ shortcuts = _shortcuts.Select (s => new KeyboardShortcut (s.Key, s.Modifier))
+ .ToArray ();
+#if DD_GTK3_CHECK_FOR_REMOVE
//this uniquely identifies the raw key
ulong id;
unchecked {
@@ -503,8 +557,11 @@ public static void MapKeys (Gdk.EventKey evt, out Gdk.Key key, out Gdk.ModifierT
if (remapKey) {
key = (Gdk.Key)evt.KeyValue;
}
+#endif
}
+#if DD_GTK3_CHECK_FOR_REMOVE
+
static MappedKeys MapKeys (Gdk.EventKey evt)
{
MappedKeys mapped;
@@ -582,7 +639,7 @@ static MappedKeys MapKeys (Gdk.EventKey evt)
}
// Workaround for bug "Bug 688247 - Ctrl+Alt key not work on windows7 with bootcamp on a Mac Book Pro"
- // Ctrl+Alt should behave like right alt key - unfortunately TranslateKeyboardState doesn't handle it.
+ // Ctrl+Alt should behave like right alt key - unfortunately TranslateKeyboardState doesn't handle it.
static void TranslateKeyboardState (Gdk.EventKey evt, Gdk.ModifierType state, int group, out uint keyval,
out int effective_group, out int level, out Gdk.ModifierType consumed_modifiers)
{
@@ -594,7 +651,7 @@ static void TranslateKeyboardState (Gdk.EventKey evt, Gdk.ModifierType state, in
state = (state & ~ctrlAlt) | Gdk.ModifierType.Mod2Mask;
group = 1;
}
- // Case: Caps lock on + shift + key
+ // Case: Caps lock on + shift + key
// See: Bug 8069 - [UI Refresh] If caps lock is on, holding the shift key prevents typed characters from appearing
if (state.HasFlag (Gdk.ModifierType.ShiftMask)) {
state &= ~Gdk.ModifierType.ShiftMask;
@@ -608,6 +665,7 @@ static void TranslateKeyboardState (Gdk.EventKey evt, Gdk.ModifierType state, in
keyval = evt.KeyValue;
}
}
+#endif
public static Gdk.Key[] KeysForMod (Gdk.ModifierType mod)
{
@@ -626,12 +684,15 @@ public static Gdk.Key[] KeysForMod (Gdk.ModifierType mod)
return new Gdk.Key [0];
}
+#if DD_GTK3_CHECK_FOR_REMOVE
+
static void AddIfNotDuplicate (List list, T item) where T : IEquatable
{
if (!list.Contains (item))
list.Add (item);
}
+
[System.Runtime.InteropServices.DllImport (PangoUtil.LIBGDK, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gdk_win32_drawable_get_handle (IntPtr drawable);
@@ -673,9 +734,13 @@ public Win32Rect (int left, int top, int right, int bottom)
[DllImport (USER32DLL)]
static extern bool GetWindowRect (IntPtr hwnd, out Win32Rect rect);
+#endif
public static void SetImCursorLocation (Gtk.IMContext ctx, Gdk.Window clientWindow, Gdk.Rectangle cursor)
{
+ Xwt.GtkBackend.GtkWorkarounds.SetImCursorLocation (ctx, clientWindow, cursor);
+
+#if DD_GTK3_CHECK_FOR_REMOVE
// work around GTK+ Bug 663096 - Windows IME position is wrong when Aero glass is enabled
// https://bugzilla.gnome.org/show_bug.cgi?id=663096
if (Platform.IsWindows && System.Environment.OSVersion.Version.Major >= 6) {
@@ -693,49 +758,54 @@ public static void SetImCursorLocation (Gtk.IMContext ctx, Gdk.Window clientWind
}
}
ctx.CursorLocation = cursor;
+#endif
}
/// X coordinate of the pixels inside the right edge of the rectangle
/// Workaround for inconsistency of Right property between GTK# versions
- public static int RightInside (this Gdk.Rectangle rect)
- {
- return rect.X + rect.Width - 1;
- }
+ public static int RightInside (this Gdk.Rectangle rect) => Xwt.GtkBackend.GtkWorkarounds.RightInside (rect);
/// Y coordinate of the pixels inside the bottom edge of the rectangle
/// Workaround for inconsistency of Bottom property between GTK# versions#
- public static int BottomInside (this Gdk.Rectangle rect)
- {
- return rect.Y + rect.Height - 1;
- }
+ public static int BottomInside (this Gdk.Rectangle rect)=> Xwt.GtkBackend.GtkWorkarounds.BottomInside (rect);
///
/// Shows or hides the shadow of the window rendered by the native toolkit
///
public static void ShowNativeShadow (Gtk.Window window, bool show)
{
+ Xwt.GtkBackend.GtkWorkarounds.ShowNativeShadow (window, show);
+#if DD_GTK3_CHECK_FOR_REMOVE
#if MAC
var nsWindow = GtkMacInterop.GetNSWindow (window);
if (nsWindow != null)
nsWindow.HasShadow = show;
+#endif
#endif
}
public static void UpdateNativeShadow (Gtk.Window window)
{
+ Xwt.GtkBackend.GtkWorkarounds.UpdateNativeShadow (window);
+#if DD_GTK3_CHECK_FOR_REMOVE
#if MAC
var nsWindow = GtkMacInterop.GetNSWindow (window);
if (nsWindow != null)
nsWindow.InvalidateShadow ();
#endif
+#endif
+
}
+#if DD_GTK3_CHECK_FOR_REMOVE
+
[DllImport (PangoUtil.LIBGTKGLUE, CallingConvention = CallingConvention.Cdecl)]
static extern void gtksharp_container_leak_fixed_marker ();
static HashSet fixedContainerTypes;
static Dictionary forallCallbacks;
static bool containerLeakFixed;
+#endif
// Works around BXC #3801 - Managed Container subclasses are incorrectly resurrected, then leak.
// It does this by registering an alternative callback for gtksharp_container_override_forall, which
@@ -745,13 +815,16 @@ public static void UpdateNativeShadow (Gtk.Window window)
// per-instance delegates.
public static void FixContainerLeak (Gtk.Container c)
{
+ Xwt.GtkBackend.GtkWorkarounds.FixContainerLeak (c);
+#if DD_GTK3_CHECK_FOR_REMOVE
if (containerLeakFixed) {
return;
}
FixContainerLeak (c.GetType ());
+#endif
}
-
+#if DD_GTK3_CHECK_FOR_REMOVE
static void FixContainerLeak (Type t)
{
if (containerLeakFixed) {
@@ -884,29 +957,19 @@ static ForallDelegate CreateForallCallback (IntPtr gtype)
[DllImport(PangoUtil.LIBGTKGLUE, CallingConvention = CallingConvention.Cdecl)]
static extern void gtksharp_container_override_forall (IntPtr gtype, ForallDelegate cb);
+#endif
- const string urlRegexStr = @"(http|ftp)s?\:\/\/[\w\d\.,;_/\-~%@()+:?&^=#!]*[\w\d/]";
- static readonly Regex UrlRegex = new Regex (urlRegexStr, RegexOptions.Compiled | RegexOptions.ExplicitCapture);
-
- public static string MarkupLinks (string text)
- {
- if (GtkMinorVersion < 18)
- return text;
- return UrlRegex.Replace (text, MatchToUrl);
- }
-
- static string MatchToUrl (System.Text.RegularExpressions.Match m)
- {
- var s = m.ToString ();
- return String.Format ("{1}", s, s.Replace ("_", "__"));
- }
+ public static string MarkupLinks (string text) => Xwt.GtkBackend.GtkWorkarounds.MarkupLinks (text);
public static void SetLinkHandler (this Gtk.Label label, Action urlHandler)
{
+ Xwt.GtkBackend.GtkWorkarounds.SetLinkHandler (label,urlHandler);
+#if DD_GTK3_CHECK_FOR_REMOVE
if (GtkMinorVersion >= 18)
new UrlHandlerClosure (urlHandler).ConnectTo (label);
+#endif
}
-
+#if DD_GTK3_CHECK_FOR_REMOVE
//create closure manually so we can apply ConnectBefore
class UrlHandlerClosure
{
@@ -935,7 +998,9 @@ class ActivateLinkEventArgs : GLib.SignalArgs
public string Url { get { return (string)base.Args [0]; } }
}
}
+#endif
+#if DD_GTK3_CHECK_FOR_REMOVE
static bool canSetOverlayScrollbarPolicy = true;
[DllImport (PangoUtil.LIBQUARTZ)]
@@ -943,9 +1008,11 @@ class ActivateLinkEventArgs : GLib.SignalArgs
[DllImport (PangoUtil.LIBQUARTZ)]
static extern void gtk_scrolled_window_get_overlay_policy (IntPtr sw, out Gtk.PolicyType hpolicy, out Gtk.PolicyType vpolicy);
-
+#endif
public static void SetOverlayScrollbarPolicy (Gtk.ScrolledWindow sw, Gtk.PolicyType hpolicy, Gtk.PolicyType vpolicy)
{
+ Xwt.GtkBackend.GtkWorkarounds.SetOverlayScrollbarPolicy (sw, hpolicy, vpolicy);
+#if DD_GTK3_CHECK_FOR_REMOVE
// we know the .dll isn't there on Windows, so don't even try (avoids a first-chance DllNotFoundException)
if (Platform.IsWindows) {
canSetOverlayScrollbarPolicy = false;
@@ -962,10 +1029,13 @@ public static void SetOverlayScrollbarPolicy (Gtk.ScrolledWindow sw, Gtk.PolicyT
} catch (EntryPointNotFoundException) {
}
canSetOverlayScrollbarPolicy = false;
+#endif
}
public static void GetOverlayScrollbarPolicy (Gtk.ScrolledWindow sw, out Gtk.PolicyType hpolicy, out Gtk.PolicyType vpolicy)
{
+ Xwt.GtkBackend.GtkWorkarounds.GetOverlayScrollbarPolicy (sw, out hpolicy, out vpolicy);
+#if DD_GTK3_CHECK_FOR_REMOVE
if (!canSetOverlayScrollbarPolicy) {
hpolicy = vpolicy = 0;
return;
@@ -978,26 +1048,33 @@ public static void GetOverlayScrollbarPolicy (Gtk.ScrolledWindow sw, out Gtk.Pol
}
hpolicy = vpolicy = 0;
canSetOverlayScrollbarPolicy = false;
+#endif
}
-
+#if DD_GTK3_CHECK_FOR_REMOVE
[DllImport (PangoUtil.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_tree_view_get_tooltip_context (IntPtr raw, ref int x, ref int y, bool keyboard_tip, out IntPtr model, out IntPtr path, IntPtr iter);
-
+#endif
//the GTK# version of this has 'out' instead of 'ref', preventing passing the x,y values in
public static bool GetTooltipContext (this TreeView tree, ref int x, ref int y, bool keyboardTip,
out TreeModel model, out TreePath path, out Gtk.TreeIter iter)
{
+ return Xwt.GtkBackend.GtkWorkarounds.GetTooltipContext (tree, ref x, ref y, keyboardTip, out model,
+ out path, out iter);
+#if DD_GTK3_CHECK_FOR_REMOVE
IntPtr intPtr = Marshal.AllocHGlobal (Marshal.SizeOf (typeof(TreeIter)));
IntPtr handle;
IntPtr intPtr2;
- bool result = gtk_tree_view_get_tooltip_context (tree.Handle, ref x, ref y, keyboardTip, out handle, out intPtr2, intPtr);
+ bool result =
+ gtk_tree_view_get_tooltip_context (tree.Handle, ref x, ref y, keyboardTip, out handle, out intPtr2, intPtr);
model = TreeModelAdapter.GetObject (handle, false);
path = intPtr2 == IntPtr.Zero ? null : ((TreePath)GLib.Opaque.GetOpaque (intPtr2, typeof(TreePath), false));
iter = TreeIter.New (intPtr);
Marshal.FreeHGlobal (intPtr);
return result;
+#endif
}
+#if DD_GTK3_CHECK_FOR_REMOVE
static bool supportsHiResIcons = true;
[DllImport (PangoUtil.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
@@ -1020,19 +1097,28 @@ public static bool GetTooltipContext (this TreeView tree, ref int x, ref int y,
[DllImport (PangoUtil.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_icon_set_render_icon_scaled (IntPtr handle, IntPtr style, int direction, int state, int size, IntPtr widget, IntPtr intPtr, ref double scale);
+#endif
public static IntPtr GetData (GLib.Object o, string name)
{
+ return Xwt.GtkBackend.GtkWorkarounds.GetData (o, name);
+#if DD_GTK3_CHECK_FOR_REMOVE
return g_object_get_data (o.Handle, name);
+#endif
}
public static void SetData (GLib.Object o, string name, IntPtr dataHandle)
{
+ Xwt.GtkBackend.GtkWorkarounds.SetData (o, name, dataHandle);
+#if DD_GTK3_CHECK_FOR_REMOVE
g_object_set_data (o.Handle, name, dataHandle);
+#endif
}
public static bool SetSourceScale (Gtk.IconSource source, double scale)
{
+ return Xwt.GtkBackend.GtkWorkarounds.SetSourceScale (source, scale);
+#if DD_GTK3_CHECK_FOR_REMOVE
if (!supportsHiResIcons)
return false;
@@ -1044,10 +1130,13 @@ public static bool SetSourceScale (Gtk.IconSource source, double scale)
}
supportsHiResIcons = false;
return false;
+#endif
}
public static bool SetSourceScaleWildcarded (Gtk.IconSource source, bool setting)
{
+ return Xwt.GtkBackend.GtkWorkarounds.SetSourceScaleWildcarded (source, setting);
+#if DD_GTK3_CHECK_FOR_REMOVE
if (!supportsHiResIcons)
return false;
@@ -1059,10 +1148,13 @@ public static bool SetSourceScaleWildcarded (Gtk.IconSource source, bool setting
}
supportsHiResIcons = false;
return false;
+#endif
}
public static Gdk.Pixbuf Get2xVariant (Gdk.Pixbuf px)
{
+ return Xwt.GtkBackend.GtkWorkarounds.Get2xVariant (px);
+#if DD_GTK3_CHECK_FOR_REMOVE
if (!supportsHiResIcons)
return null;
@@ -1077,14 +1169,20 @@ public static Gdk.Pixbuf Get2xVariant (Gdk.Pixbuf px)
}
supportsHiResIcons = false;
return null;
+#endif
}
public static void Set2xVariant (Gdk.Pixbuf px, Gdk.Pixbuf variant2x)
{
+ Xwt.GtkBackend.GtkWorkarounds.Set2xVariant (px, variant2x);
+#if DD_GTK3_CHECK_FOR_REMOVE
+#endif
}
public static double GetScaleFactor (Gtk.Widget w)
{
+ return Xwt.GtkBackend.GtkWorkarounds.GetScaleFactor (w);
+#if DD_GTK3_CHECK_FOR_REMOVE
if (!supportsHiResIcons)
return 1;
@@ -1095,10 +1193,13 @@ public static double GetScaleFactor (Gtk.Widget w)
}
supportsHiResIcons = false;
return 1;
+#endif
}
public static double GetScaleFactor (this Gdk.Screen screen, int monitor)
{
+ return Xwt.GtkBackend.GtkWorkarounds.GetScaleFactor (screen, monitor);
+#if DD_GTK3_CHECK_FOR_REMOVE
if (!supportsHiResIcons)
return 1;
@@ -1109,6 +1210,7 @@ public static double GetScaleFactor (this Gdk.Screen screen, int monitor)
}
supportsHiResIcons = false;
return 1;
+#endif
}
public static double GetScaleFactor ()
@@ -1118,6 +1220,8 @@ public static double GetScaleFactor ()
public static Gdk.Pixbuf RenderIcon (this Gtk.IconSet iconset, Gtk.Style style, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail, double scale)
{
+ return Xwt.GtkBackend.GtkWorkarounds.RenderIcon (iconset,style,direction,state,size,widget,detail,scale);
+#if DD_GTK3_CHECK_FOR_REMOVE
if (scale == 1d)
return iconset.RenderIcon (style, direction, state, size, widget, detail);
@@ -1135,8 +1239,10 @@ public static Gdk.Pixbuf RenderIcon (this Gtk.IconSet iconset, Gtk.Style style,
}
supportsHiResIcons = false;
return null;
+#endif
}
+#if DD_GTK3_CHECK_FOR_REMOVE
[DllImport (PangoUtil.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_object_set_data (IntPtr raw, IntPtr key, IntPtr data);
@@ -1150,10 +1256,11 @@ public static void SetData (Gtk.Object gtkobject, string key, T data) where T
GLib.Marshaller.Free (pkey);
gtkobject.Data [key] = data;
}
+#endif
public static void SetTransparentBgHint (this Widget widget, bool enable)
{
- SetData (widget, "transparent-bg-hint", enable);
+ Xwt.GtkBackend.GtkWorkarounds.SetTransparentBgHint (widget,enable);
}
public static void SetMarkup (this Gtk.TextView view, string pangoMarkup)
@@ -1207,6 +1314,9 @@ public static void InsertMarkup (this Gtk.TextBuffer buffer, TextIter iter, stri
public static bool GetTagForAttributes (this Pango.AttrIterator iter, string name, out TextTag tag)
{
+ return Xwt.GtkBackend.GtkWorkarounds.GetTagForAttributes (iter, name, out tag);
+
+#if DD_GTK3_CHECK_FOR_REMOVE
tag = new TextTag (name);
bool result = false;
Pango.Attribute attr;
@@ -1282,13 +1392,18 @@ public static bool GetTagForAttributes (this Pango.AttrIterator iter, string nam
}
return result;
+#endif
}
-
+#if DD_GTK3_CHECK_FOR_REMOVE
[DllImport (PangoUtil.LIBPANGO, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr pango_attr_iterator_get (IntPtr raw, int type);
-
+#endif
public static bool SafeGet (this Pango.AttrIterator iter, Pango.AttrType type, out Pango.Attribute attr)
{
+ attr = Xwt.GtkBackend.GtkWorkarounds.SafeGetCopy (iter, type);
+ return attr != null;
+
+#if DD_GTK3_CHECK_FOR_REMOVE
attr = null;
try {
IntPtr raw = pango_attr_iterator_get (iter.Handle, (int)type);
@@ -1300,6 +1415,7 @@ public static bool SafeGet (this Pango.AttrIterator iter, Pango.AttrType type, o
} catch {
return false;
}
+#endif
}
public static bool IsChildOf (this Gtk.Widget child, Gtk.Widget widget)
@@ -1387,6 +1503,7 @@ static IntPtr GetMainBundle ()
return result;
}
+#if MAC
[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_get_current_event ();
@@ -1400,6 +1517,10 @@ public static void FreeEvent (IntPtr raw)
if (raw != IntPtr.Zero)
gdk_event_free (raw);
}
+#endif
+
+ public static int GtkMinorVersion => Xwt.GtkBackend.GtkWorkarounds.GtkMinorVersion;
+
}
public readonly struct KeyboardShortcut : IEquatable
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/CodeTemplatePanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/CodeTemplatePanel.cs
index 034be041640..2d39fe4a143 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/CodeTemplatePanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/CodeTemplatePanel.cs
@@ -1,21 +1,21 @@
-//
+//
// CodeTemplatePanel.cs
-//
+//
// Author:
// Mike Krüger
-//
+//
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -33,6 +33,9 @@
using MonoDevelop.Components;
using MonoDevelop.Ide.Editor;
using MonoDevelop.Ide.Gui;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.CodeTemplates
{
@@ -51,29 +54,29 @@ public CodeTemplatePanelWidget (OptionsDialog parent)
Gtk.Widget control = textEditor;
scrolledwindow1.AddWithViewport (control);
control.ShowAll ();
-
+
templateStore = new TreeStore (typeof (CodeTemplate), typeof (string), typeof (string));
-
-
+
+
TreeViewColumn column = new TreeViewColumn ();
column.Title = GettextCatalog.GetString ("Key");
-
+
pixbufCellRenderer = new CellRendererImage ();
column.PackStart (pixbufCellRenderer, false);
column.SetCellDataFunc (pixbufCellRenderer, new Gtk.TreeCellDataFunc (RenderIcon));
-
+
templateCellRenderer = new CellRendererText ();
column.PackStart (templateCellRenderer, true);
column.SetCellDataFunc (templateCellRenderer, new Gtk.TreeCellDataFunc (RenderTemplateName));
-
-
+
+
treeviewCodeTemplates.AppendColumn (column);
-
+
treeviewCodeTemplates.Model = templateStore;
treeviewCodeTemplates.SearchColumn = -1; // disable the interactive search
templates = new List (CodeTemplateService.Templates);
templates.ForEach (t => InsertTemplate (t));
-
+
treeviewCodeTemplates.ExpandAll ();
treeviewCodeTemplates.Selection.Changed += HandleChanged;
@@ -121,7 +124,7 @@ void ButtonEditClicked (object sender, EventArgs e)
HandleChanged (this, EventArgs.Empty);
}
}
-
+
CodeTemplate GetSelectedTemplate ()
{
TreeIter selected;
@@ -141,7 +144,7 @@ void ButtonAddClicked (object sender, EventArgs e)
}
}
}
-
+
public void Store ()
{
templatesToSave.ForEach (CodeTemplateService.SaveTemplate);
@@ -150,8 +153,8 @@ public void Store ()
templatesToRemove.Clear ();
CodeTemplateService.Templates = templates;
}
-
- static void RenderIcon (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+
+ static void RenderIcon (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter)
{
CodeTemplate template = (CodeTemplate)model.GetValue (iter, 0);
@@ -161,10 +164,10 @@ static void RenderIcon (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.Tr
} else {
cri.Image = ImageService.GetIcon (template.Icon, IconSize.Menu);
}
-
+
}
-
- void RenderTemplateName (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+
+ void RenderTemplateName (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter)
{
CodeTemplate template = (CodeTemplate)model.GetValue (iter, 0);
var crt = (CellRendererText)cell;
@@ -172,17 +175,17 @@ void RenderTemplateName (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.T
crt.Markup = (string)model.GetValue (iter, 2);
return;
}
-
+
if (((TreeView)column.TreeView).Selection.IterIsSelected (iter)) {
- crt.Markup = GLib.Markup.EscapeText (template.Shortcut) + " (" +
+ crt.Markup = GLib.Markup.EscapeText (template.Shortcut) + " (" +
GLib.Markup.EscapeText (GettextCatalog.GetString (template.Description)) + ")";
} else {
- crt.Markup = GLib.Markup.EscapeText (template.Shortcut) + " ("
+ crt.Markup = GLib.Markup.EscapeText (template.Shortcut) + " ("
+ GLib.Markup.EscapeText (GettextCatalog.GetString (template.Description)) + ")";
}
}
-
+
void HandleChanged (object sender, EventArgs e)
{
TreeIter iter;
@@ -197,7 +200,7 @@ void HandleChanged (object sender, EventArgs e)
}
}
}
-
+
TreeIter GetGroup (string groupName)
{
TreeIter iter;
@@ -210,7 +213,7 @@ TreeIter GetGroup (string groupName)
}
return templateStore.AppendValues (null, groupName, "" + groupName + "");
}
-
+
TreeIter InsertTemplate (CodeTemplate template)
{
TreeIter iter = GetGroup (template.Group);
@@ -221,13 +224,13 @@ TreeIter InsertTemplate (CodeTemplate template)
internal class CodeTemplatePane : OptionsPanel
{
CodeTemplatePanelWidget codeTemplatePanelWidget;
-
+
public override Control CreatePanelWidget ()
{
-
+
return codeTemplatePanelWidget = new CodeTemplatePanelWidget (this.ParentDialog);
}
-
+
public override void ApplyChanges ()
{
codeTemplatePanelWidget.Store ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/EditTemplateDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/EditTemplateDialog.cs
index e02b80ba359..1572d2e707f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/EditTemplateDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeTemplates/EditTemplateDialog.cs
@@ -1,21 +1,21 @@
-//
+//
// EditTemplateDialog.cs
-//
+//
// Author:
// Mike Krüger
-//
+//
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -29,12 +29,14 @@
using System.Collections.Generic;
using MonoDevelop.Components;
using Gtk;
-
+
using MonoDevelop.Core;
using Gdk;
using MonoDevelop.Ide.Editor;
using MonoDevelop.Core.Text;
-
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.CodeTemplates
{
@@ -46,9 +48,9 @@ partial class EditTemplateDialog : Gtk.Dialog
ListStore variablesListStore;
List variables = new List ();
MonoDevelop.Components.PropertyGrid.PropertyGrid grid;
-
+
TreeStore variableStore;
-
+
public EditTemplateDialog (CodeTemplate template, bool isNew)
{
this.Build();
@@ -60,10 +62,10 @@ public EditTemplateDialog (CodeTemplate template, bool isNew)
this.entryDescription.Text = template.Description ?? "";
this.textEditor.MimeType = template.MimeType;
this.textEditor.Text = template.Code ?? "";
-
+
checkbuttonExpansion.Active = (template.CodeTemplateType & CodeTemplateType.Expansion) == CodeTemplateType.Expansion;
checkbuttonSurroundWith.Active = (template.CodeTemplateType & CodeTemplateType.SurroundsWith) == CodeTemplateType.SurroundsWith;
-
+
Gtk.Widget control = textEditor;
scrolledwindow1.AddWithViewport (control);
control.ShowAll ();
@@ -86,40 +88,40 @@ public EditTemplateDialog (CodeTemplate template, bool isNew)
}
textEditor.TextChanged += DocumentTextReplaced;
this.buttonOk.Clicked += ButtonOkClicked;
-
+
checkbuttonWhiteSpaces.Hide ();
-
+
variablesListStore = new ListStore (typeof (string), typeof (CodeTemplateVariable));
comboboxVariables.Model = variablesListStore;
comboboxVariables.Changed += ComboboxVariablesChanged;
-
+
variableStore = new TreeStore (typeof (string), typeof (CodeTemplateVariable), typeof (string), typeof (int));
treeviewVariable.Model = variableStore;
treeviewVariable.HeadersVisible = false;
-
+
treeviewVariable.AppendColumn ("", new Gtk.CellRendererText (), "text", 0);
CellRendererText nameRenderer = new CellRendererText ();
treeviewVariable.AppendColumn ("", nameRenderer, delegate (TreeViewColumn col, CellRenderer cell, TreeModel model, TreeIter iter) {
nameRenderer.Markup = ((string)model.GetValue (iter, 2));
});
-
+
grid = new MonoDevelop.Components.PropertyGrid.PropertyGrid ();
grid.PropertySort = MonoDevelop.Components.PropertyGrid.PropertySort.Alphabetical;
grid.ShowHelp = true;
grid.ShowAll ();
grid.ShowToolbar = false;
-
+
vbox4.Remove (scrolledwindow2);
vbox4.PackEnd (grid, true, true, 0);
-
+
UpdateVariables ();
}
- protected override void OnDestroyed ()
- {
- textEditor.TextChanged -= DocumentTextReplaced;
- textEditor.CaretPositionChanged -= CaretPositionChanged;
- base.OnDestroyed ();
+ protected override void OnDestroyed ()
+ {
+ textEditor.TextChanged -= DocumentTextReplaced;
+ textEditor.CaretPositionChanged -= CaretPositionChanged;
+ base.OnDestroyed ();
}
void ComboboxVariablesChanged (object sender, EventArgs e)
@@ -185,7 +187,7 @@ void CaretPositionChanged (object sender, EventArgs e)
return;
start--;
}
-
+
int end = offset;
while (end < textEditor.Length) {
char ch = textEditor.GetCharAt (end);
@@ -209,15 +211,15 @@ void CaretPositionChanged (object sender, EventArgs e)
}
} while (variablesListStore.IterNext (ref iter));
}
-
+
}
}
-
+
void FillVariableTree (CodeTemplateVariable var)
{
grid.CurrentObject = var;
}
-
+
void UpdateVariables ()
{
variablesListStore.Clear ();
@@ -227,7 +229,7 @@ void UpdateVariables ()
foreach (CodeTemplateVariable var in template.Variables) {
variablesListStore.AppendValues (var.Name, var);
}
-
+
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/WindowCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/WindowCommands.cs
index 230a36b320c..5b51552ee05 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/WindowCommands.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/WindowCommands.cs
@@ -253,14 +253,20 @@ internal class OpenWindowListHandler : CommandHandler
protected override void Update (CommandArrayInfo info)
{
foreach (Components.Window window in IdeApp.CommandService.TopLevelWindowStack) {
-#if !WINDOWS
+#if !WINDOWS
+
//we don't want include hidden windows
- if (!window.IsRealized || !window.IsVisible || Components.Mac.GtkMacInterop.IsGdkQuartzWindow (window))
+ if (!window.IsRealized || !window.IsVisible
+#if DD_Mac_TODO
+
+ || Components.Mac.GtkMacInterop.IsGdkQuartzWindow (window)
+#endif
+ )
continue;
#endif
- //Create CommandInfo object
- var commandInfo = new CommandInfo ();
+ //Create CommandInfo object
+ var commandInfo = new CommandInfo ();
commandInfo.Text = window.Title.Replace ("_", "__").Replace ("-", "\u2013").Replace (" \u2013 " + BrandingService.ApplicationName, "");
if (string.IsNullOrEmpty (commandInfo.Text)) {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.Caching.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.Caching.cs
index e86ef0e4c59..81617cbf71f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.Caching.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.Caching.cs
@@ -1,34 +1,34 @@
-//
-// CompositionManager.Caching.cs
-//
-// Author:
-// Marius Ungureanu
-//
-// Copyright (c) 2018 Microsoft
-//
-// 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.
-#nullable enable
+//
+// CompositionManager.Caching.cs
+//
+// Author:
+// Marius Ungureanu
+//
+// Copyright (c) 2018 Microsoft
+//
+// 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.
+#nullable enable
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using System.Reflection;
+using System.Reflection;
using System.Reflection.Metadata;
using System.Reflection.PortableExecutable;
using System.Threading.Tasks;
@@ -49,10 +49,10 @@ internal interface ICachingFaultInjector
{
void FaultAssemblyInfo (MefControlCacheAssemblyInfo info);
void FaultWritingComposition ();
- }
-
+ }
+
internal class RuntimeCompositionExceptionHandler
- {
+ {
public virtual void HandleException (string message, Exception e)
{
LoggingService.LogInternalError (message, e);
@@ -64,28 +64,28 @@ public virtual void HandleException (string message, Exception e)
///
internal class Caching
{
- readonly ICachingFaultInjector? cachingFaultInjector;
- readonly RuntimeCompositionExceptionHandler exceptionHandler;
-
+ readonly ICachingFaultInjector? cachingFaultInjector;
+ readonly RuntimeCompositionExceptionHandler exceptionHandler;
+
Task saveTask = Task.CompletedTask;
- readonly HashSet loadedAssemblies;
- public HashSet MefAssemblies { get; }
+ readonly HashSet loadedAssemblies;
+ public HashSet MefAssemblies { get; }
internal string MefCacheFile { get; }
internal string MefCacheControlFile { get; }
public Caching (HashSet mefAssemblies, RuntimeCompositionExceptionHandler exceptionHandler, Func? getCacheFilePath = null, ICachingFaultInjector? cachingFaultInjector = null)
{
- getCacheFilePath = getCacheFilePath ?? (file => Path.Combine (AddinManager.CurrentAddin.PrivateDataPath, file));
+ getCacheFilePath = getCacheFilePath ?? (file => Path.Combine (AddinManager.CurrentAddin.PrivateDataPath, file));
// TODO: .NET 4.7.2 has a capacity constructor - https://github.com/mono/monodevelop/issues/7198
- loadedAssemblies = new HashSet ();
+ loadedAssemblies = new HashSet ();
foreach (var asm in AppDomain.CurrentDomain.GetAssemblies ()) {
- if (asm.IsDynamic)
- continue;
-
+ if (asm.IsDynamic)
+ continue;
+
loadedAssemblies.Add (asm);
- }
-
+ }
+
MefAssemblies = mefAssemblies;
MefCacheFile = getCacheFilePath ("mef-cache");
MefCacheControlFile = getCacheFilePath ("mef-cache-control");
@@ -123,7 +123,7 @@ internal bool CanUse (bool handleExceptions = true)
// If we don't have a control file, bail early
if (!File.Exists (MefCacheControlFile) || !File.Exists (MefCacheFile))
return false;
-
+
// Read the cache from disk
var serializer = new JsonSerializer ();
MefControlCache controlCache;
@@ -139,39 +139,39 @@ internal bool CanUse (bool handleExceptions = true)
}
//this can return null (if the cache format changed?). clean up and start over.
- if (controlCache == null) {
+ if (controlCache == null) {
LoggingService.LogError ("MEF cache control deserialized as null");
DeleteFiles ();
- return false;
- }
+ return false;
+ }
try {
- // Short-circuit on number of assemblies change
+ // Short-circuit on number of assemblies change
if (controlCache.MefAssemblyInfos.Count != MefAssemblies.Count)
return false;
-
- if (!ValidateAssemblyCacheListIntegrity (MefAssemblies, controlCache.MefAssemblyInfos, cachingFaultInjector))
+
+ if (!ValidateAssemblyCacheListIntegrity (MefAssemblies, controlCache.MefAssemblyInfos, cachingFaultInjector))
return false;
-
- if (!ValidateAssemblyCacheListIntegrity (loadedAssemblies, controlCache.AdditionalInputAssemblyInfos, cachingFaultInjector))
+
+ if (!ValidateAssemblyCacheListIntegrity (loadedAssemblies, controlCache.AdditionalInputAssemblyInfos, cachingFaultInjector))
return false;
- } catch (Exception e) {
- if (!handleExceptions)
- throw;
-
+ } catch (Exception e) {
+ if (!handleExceptions)
+ throw;
+
LoggingService.LogError ("MEF cache validation failed", e);
return false;
- }
+ }
return true;
- }
-
+ }
+
static bool ValidateAssemblyCacheListIntegrity (HashSet assemblies, List cachedAssemblyInfos, ICachingFaultInjector? cachingFaultInjector)
- {
- var currentAssemblies = new Dictionary (assemblies.Count);
+ {
+ var currentAssemblies = new Dictionary (assemblies.Count);
foreach (var asm in assemblies)
currentAssemblies.Add (asm.Location, asm.ManifestModule.ModuleVersionId);
-
+
foreach (var assemblyInfo in cachedAssemblyInfos) {
cachingFaultInjector?.FaultAssemblyInfo (assemblyInfo);
@@ -180,7 +180,7 @@ static bool ValidateAssemblyCacheListIntegrity (HashSet assemblies, Li
if (mvid != assemblyInfo.ModuleVersionId)
return false;
- }
+ }
return true;
}
@@ -193,9 +193,9 @@ internal Task Write (RuntimeComposition runtimeComposition, ComposableCatalog ca
try {
cachingFaultInjector?.FaultWritingComposition ();
await WriteMefCache (runtimeComposition, catalog, cacheManager);
- } catch (Exception ex) {
- DeleteFiles ();
-
+ } catch (Exception ex) {
+ DeleteFiles ();
+
Runtime.RunInMainThread (() => {
exceptionHandler.HandleException ("Failed to write MEF cache", ex);
}).Ignore ();
@@ -221,40 +221,46 @@ async Task WriteMefCache (RuntimeComposition runtimeComposition, ComposableCatal
}
void WriteMefCacheControl (ComposableCatalog catalog, ITimeTracker timer)
- {
- var mefAssemblyNames = new HashSet ();
- var mefAssemblyInfos = new List ();
-
+ {
+ var mefAssemblyNames = new HashSet ();
+ var mefAssemblyInfos = new List ();
+
foreach (var assembly in MefAssemblies) {
- mefAssemblyNames.Add (assembly.GetName ().ToString ());
-
+ mefAssemblyNames.Add (assembly.GetName ().ToString ());
+
mefAssemblyInfos.Add (new MefControlCacheAssemblyInfo {
Location = assembly.Location,
ModuleVersionId = assembly.ManifestModule.ModuleVersionId,
});
- }
-
- var additionalInputAssemblies = new List ();
- var loadedMap = loadedAssemblies.ToDictionary (x => x.FullName, x => x);
-
- foreach (var asm in catalog.GetInputAssemblies ()) {
+ }
+
+ var additionalInputAssemblies = new List ();
+ var loadedMap = loadedAssemblies.ToDictionary (x => x.FullName, x => x);
+
+ foreach (var asm in catalog.GetInputAssemblies ()) {
var assemblyName = asm.ToString ();
- if (mefAssemblyNames.Contains (assemblyName))
- continue;
-
- if (!loadedMap.TryGetValue (assemblyName, out var assembly)) {
- throw new InvalidRuntimeCompositionException (assemblyName);
- }
-
+ if (mefAssemblyNames.Contains (assemblyName))
+ continue;
+
+ if (!loadedMap.TryGetValue (assemblyName, out var assembly)) {
+#if DD_VS_API_TODO
+ throw new InvalidRuntimeCompositionException (assemblyName);
+#else
+ LoggingService.LogError ("Invalid runtime composition", new InvalidRuntimeCompositionException (assemblyName));
+ continue;
+#endif
+
+ }
+
additionalInputAssemblies.Add (new MefControlCacheAssemblyInfo {
- Location = assembly.Location,
+ Location = assembly.Location,
ModuleVersionId = assembly.ManifestModule.ModuleVersionId,
});
}
// Create cache control data.
var controlCache = new MefControlCache {
- MefAssemblyInfos = mefAssemblyInfos,
+ MefAssemblyInfos = mefAssemblyInfos,
AdditionalInputAssemblyInfos = additionalInputAssemblies,
};
@@ -266,13 +272,13 @@ void WriteMefCacheControl (ComposableCatalog catalog, ITimeTracker timer)
}
timer.Trace ("Composition control file written");
}
- }
-
- internal sealed class InvalidRuntimeCompositionException : Exception
- {
+ }
+
+ internal sealed class InvalidRuntimeCompositionException : Exception
+ {
public InvalidRuntimeCompositionException (string assemblyName) : base($"Input assemblies contained {assemblyName}, not found in the '/MonoDevelop/Ide/Composition' extension point")
{
- }
+ }
}
[Serializable]
@@ -281,7 +287,7 @@ class MefControlCache
[JsonRequired]
public List MefAssemblyInfos;
- [JsonRequired]
+ [JsonRequired]
public List AdditionalInputAssemblyInfos;
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.cs
index abc1ead084f..f3aab2d21f3 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.cs
@@ -25,43 +25,43 @@
//
//
-using System;
+using System;
using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-using System.Xml.Serialization;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Serialization;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Host.Mef;
-using Microsoft.VisualStudio.Composition;
-using Mono.Addins;
-using MonoDevelop.Core;
+using Microsoft.VisualStudio.Composition;
+using Mono.Addins;
+using MonoDevelop.Core;
using MonoDevelop.Core.AddIns;
-using MonoDevelop.Core.Instrumentation;
-
-namespace MonoDevelop.Ide.Composition
+using MonoDevelop.Core.Instrumentation;
+
+namespace MonoDevelop.Ide.Composition
{
- ///
- /// The host of the MonoDevelop MEF composition. Uses https://github.com/Microsoft/vs-mef.
+ ///
+ /// The host of the MonoDevelop MEF composition. Uses https://github.com/Microsoft/vs-mef.
///
- [DefaultServiceImplementation]
- public partial class CompositionManager: Service
+ [DefaultServiceImplementation]
+ public partial class CompositionManager: Service
{
- static CompositionManager instance;
-
- static readonly Resolver StandardResolver = Resolver.DefaultInstance;
- static readonly PartDiscovery Discovery = PartDiscovery.Combine (
- new AttributedPartDiscoveryV1 (StandardResolver),
- new AttributedPartDiscovery (StandardResolver, true));
-
+ static CompositionManager instance;
+
+ static readonly Resolver StandardResolver = Resolver.DefaultInstance;
+ static readonly PartDiscovery Discovery = PartDiscovery.Combine (
+ new AttributedPartDiscoveryV1 (StandardResolver),
+ new AttributedPartDiscovery (StandardResolver, true));
+
public static CompositionManager Instance {
get {
if (instance == null) {
var task = Runtime.GetService ();
if (!task.IsCompleted && Runtime.IsMainThread) {
- LoggingService.LogWarning ("UI thread queried MEF while it was still being built:{0}{1}", Environment.NewLine, Environment.StackTrace);
+ LoggingService.LogWarning ("UI thread queried MEF while it was still being built:{0}{1}", Environment.NewLine, Environment.StackTrace);
}
instance = task.WaitAndGetResult ();
}
@@ -70,88 +70,91 @@ public static CompositionManager Instance {
}
}
- protected override Task OnInitialize (ServiceProvider serviceProvider)
+ protected override Task OnInitialize (ServiceProvider serviceProvider)
{
- return Runtime.RunInMainThread (() => {
- var timings = new Dictionary ();
- var metadata = new CompositionLoadMetadata (timings);
-
- var timer = Counters.CompositionLoad.BeginTiming (metadata);
- var stepTimer = System.Diagnostics.Stopwatch.StartNew ();
-
- var mefAssemblies = ReadAssembliesFromAddins (timer);
-
- timings ["ReadFromAddins"] = stepTimer.ElapsedMilliseconds;
-
- return Task.Run (() => InitializeInstanceAsync (timer, mefAssemblies));
+ return Runtime.RunInMainThread (() => {
+ var timings = new Dictionary ();
+ var metadata = new CompositionLoadMetadata (timings);
+
+ var timer = Counters.CompositionLoad.BeginTiming (metadata);
+ var stepTimer = System.Diagnostics.Stopwatch.StartNew ();
+
+ var mefAssemblies = ReadAssembliesFromAddins (timer);
+
+ timings ["ReadFromAddins"] = stepTimer.ElapsedMilliseconds;
+
+ return Task.Run (() => InitializeInstanceAsync (timer, mefAssemblies));
});
- }
-
- ///
- /// Returns an instance of type T that is exported by some composition part. The instance is shared (singleton).
- ///
+ }
+
+ ///
+ /// Returns an instance of type T that is exported by some composition part. The instance is shared (singleton).
+ ///
public T GetExportedValue () => ExportProvider.GetExportedValue ();
///
/// Returns all instances of type T that are exported by some composition part. The instances are shared (singletons).
///
- public IEnumerable GetExportedValues () => ExportProvider.GetExportedValues ();
-
+ public IEnumerable GetExportedValues () => ExportProvider.GetExportedValues ();
+
///
/// Returns a lazy holding the instance of type T that is exported by some composition part. The instance is shared (singleton).
///
public static Lazy GetExport () => new Lazy (() => Instance.ExportProvider.GetExportedValue ());
-
+
///
/// Returns a lazy holding all instances of type T that are exported by some composition part. The instances are shared (singletons).
///
public static Lazy> GetExports () => new Lazy> (() => Instance.ExportProvider.GetExportedValues ());
-
- public RuntimeComposition RuntimeComposition { get; private set; }
- public IExportProviderFactory ExportProviderFactory { get; private set; }
- public ExportProvider ExportProvider { get; private set; }
- public HostServices HostServices { get; private set; }
-
- internal CompositionManager ()
- {
- }
-
- async Task InitializeInstanceAsync (ITimeTracker timer, HashSet mefAssemblies)
+
+ public RuntimeComposition RuntimeComposition { get; private set; }
+ public IExportProviderFactory ExportProviderFactory { get; private set; }
+ public ExportProvider ExportProvider { get; private set; }
+ public HostServices HostServices { get; private set; }
+
+ internal CompositionManager ()
{
- var metadata = timer.Metadata;
+ }
+
+ async Task InitializeInstanceAsync (ITimeTracker timer, HashSet mefAssemblies)
+ {
+ var metadata = timer.Metadata;
var fullTimer = System.Diagnostics.Stopwatch.StartNew ();
var stepTimer = System.Diagnostics.Stopwatch.StartNew ();
-
- var caching = new Caching (mefAssemblies, new IdeRuntimeCompositionExceptionHandler ());
-
- // Try to use cached MEF data
- using (timer) {
- var canUse = metadata.ValidCache = caching.CanUse ();
- if (canUse) {
- LoggingService.LogInfo ("Creating MEF composition from cache");
- RuntimeComposition = await TryCreateRuntimeCompositionFromCache (caching);
- }
- metadata.Timings ["LoadFromCache"] = stepTimer.ElapsedMilliseconds;
- stepTimer.Restart ();
-
- // Otherwise fallback to runtime discovery.
- if (RuntimeComposition == null) {
- LoggingService.LogInfo ("Creating MEF composition from runtime");
- var (runtimeComposition, catalog) = await CreateRuntimeCompositionFromDiscovery (caching, timer);
- RuntimeComposition = runtimeComposition;
-
- CachedComposition cacheManager = new CachedComposition ();
- caching.Write (RuntimeComposition, catalog, cacheManager).Ignore ();
- }
- metadata.Timings ["LoadRuntimeComposition"] = stepTimer.ElapsedMilliseconds;
- stepTimer.Restart ();
-
- ExportProviderFactory = RuntimeComposition.CreateExportProviderFactory ();
- ExportProvider = ExportProviderFactory.CreateExportProvider ();
- HostServices = Microsoft.VisualStudio.LanguageServices.VisualStudioMefHostServices.Create (ExportProvider);
-
- metadata.Timings ["CreateServices"] = stepTimer.ElapsedMilliseconds;
- metadata.Duration = fullTimer.ElapsedMilliseconds;
+
+ var caching = new Caching (mefAssemblies, new IdeRuntimeCompositionExceptionHandler ());
+
+ // Try to use cached MEF data
+ using (timer) {
+
+ // oe NOTICE caching is NOT working... exception when trying to write cache.
+ //oe var canUse = metadata.ValidCache = caching.CanUse ();
+ //oe if (canUse) {
+ //oe LoggingService.LogInfo ("Creating MEF composition from cache");
+ //oe RuntimeComposition = await TryCreateRuntimeCompositionFromCache (caching);
+ //oe }
+
+ metadata.Timings ["LoadFromCache"] = stepTimer.ElapsedMilliseconds;
+ stepTimer.Restart ();
+
+ // Otherwise fallback to runtime discovery.
+ if (RuntimeComposition == null) {
+ LoggingService.LogInfo ("Creating MEF composition from runtime");
+ var (runtimeComposition, catalog) = await CreateRuntimeCompositionFromDiscovery (caching, timer);
+ RuntimeComposition = runtimeComposition;
+
+ CachedComposition cacheManager = new CachedComposition ();
+ caching.Write (RuntimeComposition, catalog, cacheManager).Ignore ();
+ }
+ metadata.Timings ["LoadRuntimeComposition"] = stepTimer.ElapsedMilliseconds;
+ stepTimer.Restart ();
+
+ ExportProviderFactory = RuntimeComposition.CreateExportProviderFactory ();
+ ExportProvider = ExportProviderFactory.CreateExportProvider ();
+ HostServices = Microsoft.VisualStudio.LanguageServices.VisualStudioMefHostServices.Create (ExportProvider);
+
+ metadata.Timings ["CreateServices"] = stepTimer.ElapsedMilliseconds;
+ metadata.Duration = fullTimer.ElapsedMilliseconds;
}
}
@@ -159,9 +162,9 @@ internal static async Task TryCreateRuntimeCompositionFromCa
{
var cacheManager = new CachedComposition ();
- try {
- using (var cacheStream = caching.OpenCacheStream ()) {
- return await cacheManager.LoadRuntimeCompositionAsync (cacheStream, StandardResolver);
+ try {
+ using (var cacheStream = caching.OpenCacheStream ()) {
+ return await cacheManager.LoadRuntimeCompositionAsync (cacheStream, StandardResolver);
}
} catch (Exception ex) {
LoggingService.LogError ("Could not deserialize MEF cache", ex);
@@ -199,6 +202,18 @@ internal static async Task TryCreateRuntimeCompositionFromCa
// For now while we're still transitioning to VSMEF it's useful to work
// even if the composition has some errors. TODO: re-enable this.
+
+var _errors = configuration.CompositionErrors.ToArray ();
+var _messages = _errors.SelectMany (e => e).Select (e => e.Message);
+var _text = string.Join (Environment.NewLine, _messages);
+Console.WriteLine( "" );
+Console.WriteLine( "" );
+Console.WriteLine( "oeDEBUG :: SOME MEF PROBLEMS:" );
+Console.WriteLine( _text );
+Console.WriteLine( "" );
+Console.WriteLine( "" );
+
+ // oe NOTICE : un-comment this to stop on any errors:
//configuration.ThrowOnErrors ();
}
timer?.Trace ("Composition configured");
@@ -213,16 +228,98 @@ internal static HashSet ReadAssembliesFromAddins (ITimeTracker ();
+
+
+ string[] extraLibraries = new [] {
+
+ "MonoDevelop.Ide", // PlaformCatalog
+
+// oe NOTICE these are .dll names, but without the ".dll" extension...
+// oe NOTICE these are .dll names, but without the ".dll" extension...
+// oe NOTICE these are .dll names, but without the ".dll" extension...
+
+ "Microsoft.VisualStudio.Composition",
+ "Microsoft.VisualStudio.Composition.NetFxAttributes",
+ "Microsoft.VisualStudio.CoreUtility",
+ "Microsoft.VisualStudio.CoreUtilityImplementation",
+ "Microsoft.VisualStudio.ImageCatalog",
+ "Microsoft.VisualStudio.Imaging",
+ "Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime",
+ "Microsoft.VisualStudio.Language",
+ "Microsoft.VisualStudio.Language.Implementation",
+ "Microsoft.VisualStudio.Language.Intellisense",
+ "Microsoft.VisualStudio.Language.StandardClassification",
+ "Microsoft.VisualStudio.Language.Utilities",
+ "Microsoft.VisualStudio.Logic.Text.BufferUndoManager.Implementation",
+ "Microsoft.VisualStudio.Logic.Text.Classification.Aggregator.Implementation",
+ "Microsoft.VisualStudio.Logic.Text.Classification.LookUp.Implementation",
+ "Microsoft.VisualStudio.Logic.Text.Find.Implementation",
+ "Microsoft.VisualStudio.Logic.Text.Navigation.Implementation",
+ "Microsoft.VisualStudio.Logic.Text.Tagging.Aggregator.Implementation",
+ "Microsoft.VisualStudio.Text.BraceCompletion.Implementation",
+ "Microsoft.VisualStudio.Text.Data",
+ "Microsoft.VisualStudio.Text.Data.Utilities",
+ "Microsoft.VisualStudio.Text.Differencing.Implementation",
+ "Microsoft.VisualStudio.Text.EditorOptions.Implementation",
+ "Microsoft.VisualStudio.Text.Implementation.StandaloneUndo",
+ "Microsoft.VisualStudio.Text.Internal",
+ "Microsoft.VisualStudio.Text.Logic",
+ "Microsoft.VisualStudio.Text.Logic.Utilities",
+ "Microsoft.VisualStudio.Text.Model.Implementation",
+ "Microsoft.VisualStudio.Text.MultiCaret.Implementation",
+ "Microsoft.VisualStudio.Text.Outlining.Implementation",
+ "Microsoft.VisualStudio.Text.PatternMatching.Implementation",
+ "Microsoft.VisualStudio.Text.UI.Common",
+ "Microsoft.VisualStudio.Text.UI",
+ "Microsoft.VisualStudio.Text.UI.Gtk",
+ "Microsoft.VisualStudio.Text.UI.Gtk.Utilities",
+ "Microsoft.VisualStudio.Text.UI.Utilities",
+ "Microsoft.VisualStudio.Text.UI.Wpf",
+ "Microsoft.VisualStudio.Threading",
+ "Microsoft.VisualStudio.UI.Text.Commanding.Implementation",
+ "Microsoft.VisualStudio.UI.Text.EditorOperations.Implementation",
+ "Microsoft.VisualStudio.UI.Text.EditorPrimitives.Implementation",
+ "Microsoft.VisualStudio.Utilities",
+ "Microsoft.VisualStudio.Validation"
+
+ };
+
+ foreach (var asmName in extraLibraries) {
+
+Console.WriteLine( "oeDEBUG :: CompositionManager :: INIT-1 " + asmName );
+
+ try {
+ var asm = Assembly.Load (asmName);
+ if (asm == null)
+ continue;
+
+// foreach ( Type t in asm.GetTypes() ) {
+// Console.WriteLine( "oeDEBUG :: CompositionManager :: I1-type " + t.Name );
+// }
+
+ readAssemblies.Add (asm);
+ } catch (Exception ex) {
+ LoggingService.LogError ("Error - can't load extra assembly: " + asmName, ex);
+ }
+ }
+
+
+
+Console.WriteLine( "oeDEBUG :: CompositionManager :: INIT-addins-start" );
timer?.Trace ("Start: reading assemblies");
ReadAssemblies (readAssemblies, "/MonoDevelop/Ide/TypeService/PlatformMefHostServices");
ReadAssemblies (readAssemblies, "/MonoDevelop/Ide/TypeService/MefHostServices");
ReadAssemblies (readAssemblies, "/MonoDevelop/Ide/Composition");
timer?.Trace ("Start: end reading assemblies");
+Console.WriteLine( "oeDEBUG :: CompositionManager :: INIT-addins-completed" );
return readAssemblies;
void ReadAssemblies (HashSet assemblies, string extensionPath)
{
+
+Console.WriteLine( "oeDEBUG :: ReadAssembliesFromAddins : from extensionPath " + extensionPath );
+
foreach (var node in AddinManager.GetExtensionNodes (extensionPath)) {
if (node is AssemblyExtensionNode assemblyNode) {
try {
@@ -234,6 +331,9 @@ void ReadAssemblies (HashSet assemblies, string extensionPath)
AddinManager.LoadAddin (null, id);
var assemblyFilePath = assemblyNode.Addin.GetFilePath (assemblyNode.FileName);
+
+Console.WriteLine( "oeDEBUG :: ReadAssembliesFromAddins " + assemblyFilePath );
+
var assembly = Runtime.LoadAssemblyFrom (assemblyFilePath);
assemblies.Add (assembly);
} catch (Exception e) {
@@ -242,46 +342,53 @@ void ReadAssemblies (HashSet assemblies, string extensionPath)
}
}
}
- }
-
- sealed class IdeRuntimeCompositionExceptionHandler : RuntimeCompositionExceptionHandler
- {
- static class Strings
- {
- public static string Quit = GettextCatalog.GetString ("Quit");
- public static string Restart = GettextCatalog.GetString ("Restart");
- }
-
- public override void HandleException (string message, Exception e)
- {
- base.HandleException (message, e);
-
- if (e is IOException)
- return;
-
- if (!IdeApp.IsInitialized) {
- Console.WriteLine (e);
- return;
- }
-
- var text = GettextCatalog.GetString ("There was a problem loading one or more extensions and {0} needs to be restarted.", BrandingService.ApplicationName);
- var quitButton = new AlertButton (Strings.Quit);
- var restartButton = new AlertButton (Strings.Restart);
-
- var result = MessageService.GenericAlert (
- IdeServices.DesktopService.GetFocusedTopLevelWindow (),
- Gui.Stock.Error,
- text,
- secondaryText: null,
- defaultButton: 1,
- quitButton,
- restartButton
- );
- if (result == restartButton)
- IdeApp.Restart (false).Ignore ();
- else
- IdeApp.Exit ().Ignore ();
- }
- }
- }
-}
+ }
+
+ sealed class IdeRuntimeCompositionExceptionHandler : RuntimeCompositionExceptionHandler
+ {
+ static class Strings
+ {
+ public static string Quit = GettextCatalog.GetString ("Quit");
+ public static string Restart = GettextCatalog.GetString ("Restart");
+ }
+
+ public override void HandleException (string message, Exception e)
+ {
+ base.HandleException (message, e);
+
+ if (e is IOException)
+ return;
+
+ if (!IdeApp.IsInitialized) {
+ Console.WriteLine (e);
+ return;
+ }
+
+ var text = GettextCatalog.GetString ("There was a problem loading one or more extensions and {0} needs to be restarted.", BrandingService.ApplicationName);
+
+// oeDEBUG print out more specific message.
+text += "\n";
+text += "message : " + message + "\n";
+text += "\n";
+text += "exception : " + e.ToString() + "\n";
+
+ var quitButton = new AlertButton (Strings.Quit);
+ var restartButton = new AlertButton (Strings.Restart);
+
+ var result = MessageService.GenericAlert (
+ IdeServices.DesktopService.GetFocusedTopLevelWindow (),
+ Gui.Stock.Error,
+ text,
+ secondaryText: null,
+ defaultButton: 1,
+ quitButton,
+ restartButton
+ );
+ if (result == restartButton)
+ IdeApp.Restart (false).Ignore ();
+ else
+ IdeApp.Exit ().Ignore ();
+ }
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/PlatformCatalog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/PlatformCatalog.cs
index 7489fc11b18..104131e5b4c 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/PlatformCatalog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/PlatformCatalog.cs
@@ -1,7 +1,7 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-//
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
using System;
using System.Collections.Immutable;
using System.ComponentModel.Composition;
@@ -13,8 +13,8 @@
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Tagging;
using Microsoft.VisualStudio.Utilities;
-using MonoDevelop.Ide.Composition;
-
+using MonoDevelop.Ide.Composition;
+
namespace Microsoft.VisualStudio.Platform
{
[Export]
@@ -40,19 +40,103 @@ public static PlatformCatalog Instance {
[Import]
internal ITextDocumentFactoryService TextDocumentFactoryService { get; private set; }
+ // oe REVERTED...
+ [Import]
+ internal ITextEditorFactoryService TextEditorFactoryService { get; private set; }
+
+ // oe REVERTED...
+ [Import]
+ internal IMimeToContentTypeRegistryService MimeToContentTypeRegistryService { get; private set; }
+
[Import]
internal IContentTypeRegistryService ContentTypeRegistryService { get; private set; }
[Import]
internal IBufferTagAggregatorFactoryService BufferTagAggregatorFactoryService { get; private set; }
- [Import]
+ [Import]
internal IClassifierAggregatorService ClassifierAggregatorService { get; private set; }
[Import]
internal IViewClassifierAggregatorService ViewClassifierAggregatorService { get; private set; }
}
+ // oe REVERTED...
+ public interface IMimeToContentTypeRegistryService
+ {
+ string GetMimeType(IContentType type);
+ IContentType GetContentType(string type);
+
+ void LinkTypes(string mimeType, IContentType contentType);
+ }
+
+ // oe REVERTED...
+ [Export(typeof(IMimeToContentTypeRegistryService))]
+ public class MimeToContentTypeRegistryService : IMimeToContentTypeRegistryService, IPartImportsSatisfiedNotification
+ {
+ [Import]
+ IContentTypeRegistryService ContentTypeRegistryService { get; set; }
+
+ [Export]
+ [Name ("csharp")]
+ [BaseDefinition ("code")]
+ public ContentTypeDefinition codeContentType;
+
+ public string GetMimeType(IContentType type)
+ {
+ string mimeType;
+ if (this.maps.Item2.TryGetValue(type, out mimeType))
+ {
+ return mimeType;
+ }
+
+ return (ContentTypeRegistryService as IContentTypeRegistryService2).GetMimeType (type);
+ }
+
+ public IContentType GetContentType(string type)
+ {
+ IContentType contentType;
+ if (this.maps.Item1.TryGetValue(type, out contentType))
+ {
+ return contentType;
+ }
+
+ return (ContentTypeRegistryService as IContentTypeRegistryService2).GetContentTypeForMimeType (type);
+ }
+
+ public void LinkTypes(string mimeType, IContentType contentType)
+ {
+ var oldMap = Volatile.Read(ref this.maps);
+ while (true)
+ {
+ if (oldMap.Item1.ContainsKey(mimeType) || oldMap.Item2.ContainsKey(contentType))
+ break;
+
+ var newMap = Tuple.Create(oldMap.Item1.Add(mimeType, contentType), oldMap.Item2.Add(contentType, mimeType));
+ var result = Interlocked.CompareExchange(ref this.maps, newMap, oldMap);
+ if (result == oldMap)
+ {
+ break;
+ }
+
+ oldMap = result;
+ }
+ }
+
+ void LinkTypes (string mimeType, string contentType)
+ {
+ LinkTypes (mimeType, ContentTypeRegistryService.GetContentType (contentType));
+ }
+
+ void IPartImportsSatisfiedNotification.OnImportsSatisfied ()
+ {
+ LinkTypes ("text/plain", "text");
+ LinkTypes ("text/x-csharp", "csharp");
+ }
+
+ Tuple, ImmutableDictionary> maps = Tuple.Create(ImmutableDictionary.Empty, ImmutableDictionary.Empty);
+ }
+
// Fold back into Text.Def.TextData.TextSnapshotToTextReader
// TODO: editor obsolete
internal sealed class NewTextSnapshotToTextReader : TextReader
@@ -124,13 +208,13 @@ public override int Read(char[] buffer, int index, int count)
if (_currentPosition == -1)
throw new ObjectDisposedException("TextSnapshotToTextReader");
if (buffer == null)
- throw new ArgumentNullException("buffer");
+ throw new ArgumentNullException(nameof(buffer));
if (index < 0)
- throw new ArgumentOutOfRangeException("index");
+ throw new ArgumentOutOfRangeException(nameof(index));
if (count < 0)
- throw new ArgumentOutOfRangeException("count");
+ throw new ArgumentOutOfRangeException(nameof(count));
if (((index + count) < 0) || ((index + count) > buffer.Length))
- throw new ArgumentOutOfRangeException("count");
+ throw new ArgumentOutOfRangeException(nameof(count));
int charactersToRead = System.Math.Min(_end - _currentPosition, count);
_snapshot.CopyTo(_currentPosition, buffer, index, charactersToRead);
@@ -210,7 +294,7 @@ public override string ReadToEnd()
public NewTextSnapshotToTextReader(ITextSnapshot textSnapshot)
{
if (textSnapshot == null)
- throw new ArgumentNullException("textSnapshot");
+ throw new ArgumentNullException(nameof(textSnapshot));
_snapshot = textSnapshot;
_end = textSnapshot.Length;
@@ -219,12 +303,12 @@ public NewTextSnapshotToTextReader(ITextSnapshot textSnapshot)
public NewTextSnapshotToTextReader(ITextSnapshot textSnapshot, int offset, int length)
{
if (textSnapshot == null)
- throw new ArgumentNullException("textSnapshot");
+ throw new ArgumentNullException(nameof(textSnapshot));
if ((offset < 0) || (offset > textSnapshot.Length))
- throw new ArgumentOutOfRangeException("offset");
+ throw new ArgumentOutOfRangeException(nameof(offset));
int end = offset + length;
if ((end < offset) || (end > textSnapshot.Length))
- throw new ArgumentOutOfRangeException("length");
+ throw new ArgumentOutOfRangeException(nameof(length));
_snapshot = textSnapshot;
_currentPosition = offset;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/Regex.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/Regex.cs
index 5b4b6931597..67ed410a544 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/Regex.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/Regex.cs
@@ -208,9 +208,9 @@ private Regex(String pattern, RegexOptions options, TimeSpan matchTimeout, bool
string cultureKey = null;
if (pattern == null)
- throw new ArgumentNullException("pattern");
+ throw new ArgumentNullException(nameof(pattern));
if (options < RegexOptions.None || ( ((int) options) >> MaxOptionShift) != 0)
- throw new ArgumentOutOfRangeException("options");
+ throw new ArgumentOutOfRangeException(nameof(options));
if ((options & RegexOptions.ECMAScript) != 0
&& (options & ~(RegexOptions.ECMAScript |
RegexOptions.IgnoreCase |
@@ -435,7 +435,7 @@ internal RegexRunnerFactory Compile(RegexCode code, RegexOptions roptions) {
///
public static String Escape(String str) {
if (str==null)
- throw new ArgumentNullException("str");
+ throw new ArgumentNullException(nameof(str));
return RegexParser.Escape(str);
}
@@ -451,7 +451,7 @@ public static String Escape(String str) {
[SuppressMessage("Microsoft.Naming","CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="Unescape", Justification="[....]: already shipped since v1 - can't fix without causing a breaking change")]
public static String Unescape(String str) {
if (str==null)
- throw new ArgumentNullException("str");
+ throw new ArgumentNullException(nameof(str));
return RegexParser.Unescape(str);
}
@@ -645,7 +645,7 @@ public int GroupNumberFromName(String name) {
int result = -1;
if (name == null)
- throw new ArgumentNullException("name");
+ throw new ArgumentNullException(nameof(name));
// look up name if we have a hashtable of names
if (capnames != null) {
@@ -733,7 +733,7 @@ static bool IsMatch(string input, String pattern, RegexOptions options, TimeSpan
public bool IsMatch(string input) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return IsMatch(input, UseOptionR() ? input.Length : 0);
}
@@ -752,7 +752,7 @@ public bool IsMatch(string input) {
public bool IsMatch(string input, int startat) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return (null == Run(true, -1, input, 0, input.Length, startat, internalMatchTimeout));
}
@@ -807,7 +807,7 @@ static Match Match (string input, String pattern, RegexOptions options, TimeSpan
public Match Match (string input) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return Match(input, UseOptionR() ? input.Length : 0);
}
@@ -822,7 +822,7 @@ public Match Match (string input) {
public Match Match(string input, int startat) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return Run(false, -1, input, 0, input.Length, startat, internalMatchTimeout);
}
@@ -896,7 +896,7 @@ static MatchCollection Matches(string input, String pattern, RegexOptions option
public MatchCollection Matches(string input) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return Matches(input, UseOptionR() ? input.Length : 0);
}
@@ -914,7 +914,7 @@ public MatchCollection Matches(string input) {
public MatchCollection Matches(string input, int startat) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return new MatchCollection(this, input, 0, input.Length, startat);
}
@@ -969,7 +969,7 @@ static String Replace(string input, String pattern, String replacement, RegexOpt
public String Replace(string input, String replacement) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return Replace(input, replacement, -1, UseOptionR() ? input.Length : 0);
}
@@ -986,7 +986,7 @@ public String Replace(string input, String replacement) {
public String Replace(string input, String replacement, int count) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return Replace(input, replacement, count, UseOptionR() ? input.Length : 0);
}
@@ -1004,10 +1004,10 @@ public String Replace(string input, String replacement, int count) {
public String Replace(string input, String replacement, int count, int startat) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
if (replacement == null)
- throw new ArgumentNullException("replacement");
+ throw new ArgumentNullException(nameof(replacement));
// a little code to grab a cached parsed replacement object
RegexReplacement repl = (RegexReplacement) replref.Get();
@@ -1049,7 +1049,7 @@ static String Replace(string input, String pattern, MatchEvaluator evaluator, Re
public String Replace(string input, MatchEvaluator evaluator) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return Replace(input, evaluator, -1, UseOptionR() ? input.Length : 0);
}
@@ -1060,7 +1060,7 @@ public String Replace(string input, MatchEvaluator evaluator) {
public String Replace(string input, MatchEvaluator evaluator, int count) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return Replace(input, evaluator, count, UseOptionR() ? input.Length : 0);
}
@@ -1071,7 +1071,7 @@ public String Replace(string input, MatchEvaluator evaluator, int count) {
public String Replace(string input, MatchEvaluator evaluator, int count, int startat) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return RegexReplacement.Replace(evaluator, this, input, count, startat);
}
@@ -1116,7 +1116,7 @@ static string[] Split(string input, String pattern, RegexOptions options, TimeSp
public string[] Split(string input) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return Split(input, 0, UseOptionR() ? input.Length : 0);
}
@@ -1127,7 +1127,7 @@ public string[] Split(string input) {
public string[] Split(string input, int count) {
if (input == null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return RegexReplacement.Split(this, input, count, UseOptionR() ? input.Length : 0);
}
@@ -1137,7 +1137,7 @@ public string[] Split(string input, int count) {
*/
public string[] Split(string input, int count, int startat) {
if (input==null)
- throw new ArgumentNullException("input");
+ throw new ArgumentNullException(nameof(input));
return RegexReplacement.Split(this, input, count, startat);
}
@@ -1184,10 +1184,10 @@ public static void CompileToAssembly(RegexCompilationInfo[] regexinfos, Assembly
[ResourceConsumption(ResourceScope.Machine)]
private static void CompileToAssemblyInternal (RegexCompilationInfo[] regexinfos, AssemblyName assemblyname, CustomAttributeBuilder[] attributes, String resourceFile) {
if (assemblyname == null)
- throw new ArgumentNullException("assemblyname");
+ throw new ArgumentNullException(nameof(assemblyname));
if (regexinfos == null)
- throw new ArgumentNullException("regexinfos");
+ throw new ArgumentNullException(nameof(regexinfos));
RegexCompiler.CompileToAssembly(regexinfos, assemblyname, attributes, resourceFile);
}
@@ -1453,7 +1453,7 @@ internal Object Get() {
*/
internal void Release(Object obj) {
if (obj == null)
- throw new ArgumentNullException("obj");
+ throw new ArgumentNullException(nameof(obj));
// if this reference owns the lock, release it
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCaptureCollection.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCaptureCollection.cs
index 58f7e53112d..1b655ae0f07 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCaptureCollection.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCaptureCollection.cs
@@ -117,7 +117,7 @@ public Capture this[int i]
///
public void CopyTo(Array array, int arrayIndex) {
if (array == null)
- throw new ArgumentNullException("array");
+ throw new ArgumentNullException(nameof(array));
for (int i = arrayIndex, j = 0; j < Count; i++, j++) {
array.SetValue(this[j], i);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCompilationInfo.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCompilationInfo.cs
index d586cfa1147..e13175945ce 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCompilationInfo.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCompilationInfo.cs
@@ -61,7 +61,7 @@ public String Pattern {
get { return pattern; }
set {
if (value == null)
- throw new ArgumentNullException("value");
+ throw new ArgumentNullException(nameof(value));
pattern = value;
}
}
@@ -85,7 +85,7 @@ public String Name {
get { return name; }
set {
if (value == null) {
- throw new ArgumentNullException("value");
+ throw new ArgumentNullException(nameof(value));
}
if (value.Length == 0) {
@@ -105,7 +105,7 @@ public String Namespace {
get { return nspace; }
set {
if (value == null)
- throw new ArgumentNullException("value");
+ throw new ArgumentNullException(nameof(value));
nspace = value;
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCompiler.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCompiler.cs
index 04b1ea52be0..8869d955164 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCompiler.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexCompiler.cs
@@ -222,7 +222,7 @@ internal static void CompileToAssembly(RegexCompilationInfo[] regexes, AssemblyN
for (int i=0; i
public void CopyTo(Array array, int arrayIndex) {
if (array == null)
- throw new ArgumentNullException("array");
+ throw new ArgumentNullException(nameof(array));
for (int i = arrayIndex, j = 0; j < Count; i++, j++) {
array.SetValue(this[j], i);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexMatch.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexMatch.cs
index d09033a5b97..1192cbcdbd3 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexMatch.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexMatch.cs
@@ -157,7 +157,7 @@ public virtual String Result(String replacement) {
RegexReplacement repl;
if (replacement == null)
- throw new ArgumentNullException("replacement");
+ throw new ArgumentNullException(nameof(replacement));
if (_regex == null)
throw new NotSupportedException();
@@ -212,7 +212,7 @@ static public Match Synchronized(Match inner) {
static internal Match Synchronized(Match inner) {
#endif
if (inner == null)
- throw new ArgumentNullException("inner");
+ throw new ArgumentNullException(nameof(inner));
int numgroups = inner._matchcount.Length;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexReplacement.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexReplacement.cs
index a73e8ec6194..f1550053b76 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexReplacement.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexReplacement.cs
@@ -268,11 +268,11 @@ internal static String Replace(MatchEvaluator evaluator, Regex regex,
Match match;
if (evaluator == null)
- throw new ArgumentNullException("evaluator");
+ throw new ArgumentNullException(nameof(evaluator));
if (count < -1)
- throw new ArgumentOutOfRangeException("count");
+ throw new ArgumentOutOfRangeException(nameof(count));
if (startat < 0 || startat > input.Length)
- throw new ArgumentOutOfRangeException("startat");
+ throw new ArgumentOutOfRangeException(nameof(startat));
if (count == 0)
return input.ToString ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RoslynClassificationHighlighting.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RoslynClassificationHighlighting.cs
new file mode 100644
index 00000000000..1fe62dfd719
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RoslynClassificationHighlighting.cs
@@ -0,0 +1,209 @@
+//
+// RoslynClassificationHighlighting.cs
+//
+// Author:
+// Mike Krüger
+//
+// Copyright (c) 2017 Microsoft Corporation
+//
+// 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 MonoDevelop.Ide.Editor.Extension;
+using Microsoft.CodeAnalysis.Text;
+using MonoDevelop.Ide.TypeSystem;
+using Microsoft.CodeAnalysis.Classification;
+using Microsoft.CodeAnalysis;
+using System.Linq;
+using MonoDevelop.Ide.Editor.Highlighting;
+using MonoDevelop.Ide.Editor;
+using System.Collections.Immutable;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+
+// oe REVERTED from oe-20180406-7.4.3.8-dd to fix editor highlighting.
+// oe REVERTED from oe-20180406-7.4.3.8-dd to fix editor highlighting.
+// oe REVERTED from oe-20180406-7.4.3.8-dd to fix editor highlighting.
+
+namespace MonoDevelop.Ide.Editor.Highlighting
+{
+ public class RoslynClassificationHighlighting : ISyntaxHighlighting
+ {
+ readonly DocumentId documentId;
+ readonly MonoDevelopWorkspace workspace;
+ readonly ScopeStack defaultScope;
+ readonly ScopeStack userScope;
+
+ readonly Dictionary classificationMap;
+
+ public DocumentId DocumentId => documentId;
+
+ public RoslynClassificationHighlighting (MonoDevelopWorkspace workspace, DocumentId documentId, string defaultScope)
+ {
+ this.workspace = workspace;
+ this.documentId = documentId;
+ this.defaultScope = new ScopeStack (defaultScope);
+ this.userScope = this.defaultScope.Push (EditorThemeColors.UserTypes);
+
+ classificationMap = new Dictionary {
+ [ClassificationTypeNames.Comment] = MakeScope ("comment." + defaultScope),
+ [ClassificationTypeNames.ExcludedCode] = MakeScope ("comment.excluded." + defaultScope),
+ [ClassificationTypeNames.Identifier] = MakeScope (defaultScope),
+ [ClassificationTypeNames.Keyword] = MakeScope ("keyword." + defaultScope),
+ [ClassificationTypeNames.NumericLiteral] = MakeScope ("constant.numeric." + defaultScope),
+ [ClassificationTypeNames.Operator] = MakeScope (defaultScope),
+ [ClassificationTypeNames.PreprocessorKeyword] = MakeScope ("meta.preprocessor." + defaultScope),
+ [ClassificationTypeNames.StringLiteral] = MakeScope ("string." + defaultScope),
+ [ClassificationTypeNames.WhiteSpace] = MakeScope ("text." + defaultScope),
+ [ClassificationTypeNames.Text] = MakeScope ("text." + defaultScope),
+
+ [ClassificationTypeNames.PreprocessorText] = MakeScope ("meta.preprocessor.region.name." + defaultScope),
+ [ClassificationTypeNames.Punctuation] = MakeScope ("punctuation." + defaultScope),
+ [ClassificationTypeNames.VerbatimStringLiteral] = MakeScope ("string.verbatim." + defaultScope),
+
+ [ClassificationTypeNames.ClassName] = MakeScope ("entity.name.class." + defaultScope),
+ [ClassificationTypeNames.DelegateName] = MakeScope ("entity.name.delegate." + defaultScope),
+ [ClassificationTypeNames.EnumName] = MakeScope ("entity.name.enum." + defaultScope),
+ [ClassificationTypeNames.InterfaceName] = MakeScope ("entity.name.interface." + defaultScope),
+ [ClassificationTypeNames.ModuleName] = MakeScope ("entity.name.module." + defaultScope),
+ [ClassificationTypeNames.StructName] = MakeScope ("entity.name.struct." + defaultScope),
+ [ClassificationTypeNames.TypeParameterName] = MakeScope ("entity.name.typeparameter." + defaultScope),
+
+ [ClassificationTypeNames.XmlDocCommentAttributeName] = MakeScope ("comment.line.documentation." + defaultScope),
+ [ClassificationTypeNames.XmlDocCommentAttributeQuotes] = MakeScope ("comment.line.documentation." + defaultScope),
+ [ClassificationTypeNames.XmlDocCommentAttributeValue] = MakeScope ("comment.line.documentation." + defaultScope),
+ [ClassificationTypeNames.XmlDocCommentCDataSection] = MakeScope ("comment.line.documentation." + defaultScope),
+ [ClassificationTypeNames.XmlDocCommentComment] = MakeScope ("comment.line.documentation." + defaultScope),
+ [ClassificationTypeNames.XmlDocCommentDelimiter] = MakeScope ("comment.line.documentation." + defaultScope),
+ [ClassificationTypeNames.XmlDocCommentEntityReference] = MakeScope ("comment.line.documentation." + defaultScope),
+ [ClassificationTypeNames.XmlDocCommentName] = MakeScope ("comment.line.documentation." + defaultScope),
+ [ClassificationTypeNames.XmlDocCommentProcessingInstruction] = MakeScope ("comment.line.documentation." + defaultScope),
+ [ClassificationTypeNames.XmlDocCommentText] = MakeScope ("comment.line.documentation." + defaultScope),
+
+ [ClassificationTypeNames.XmlLiteralAttributeName] = MakeScope ("entity.other.attribute-name." + defaultScope),
+ [ClassificationTypeNames.XmlLiteralAttributeQuotes] = MakeScope ("punctuation.definition.string." + defaultScope),
+ [ClassificationTypeNames.XmlLiteralAttributeValue] = MakeScope ("string.quoted." + defaultScope),
+ [ClassificationTypeNames.XmlLiteralCDataSection] = MakeScope ("text." + defaultScope),
+ [ClassificationTypeNames.XmlLiteralComment] = MakeScope ("comment.block." + defaultScope),
+ [ClassificationTypeNames.XmlLiteralDelimiter] = MakeScope (defaultScope),
+ [ClassificationTypeNames.XmlLiteralEmbeddedExpression] = MakeScope (defaultScope),
+ [ClassificationTypeNames.XmlLiteralEntityReference] = MakeScope (defaultScope),
+ [ClassificationTypeNames.XmlLiteralName] = MakeScope ("entity.name.tag.localname." + defaultScope),
+ [ClassificationTypeNames.XmlLiteralProcessingInstruction] = MakeScope (defaultScope),
+ [ClassificationTypeNames.XmlLiteralText] = MakeScope ("text." + defaultScope),
+ };
+ }
+
+ ScopeStack MakeScope (string scope)
+ {
+ return defaultScope.Push (scope);
+ }
+
+ protected virtual void OnHighlightingStateChanged (global::MonoDevelop.Ide.Editor.LineEventArgs e)
+ {
+ HighlightingStateChanged?.Invoke (this, e);
+ }
+
+ public event EventHandler HighlightingStateChanged;
+
+ public async Task GetHighlightedLineAsync (IDocumentLine line, CancellationToken cancellationToken)
+ {
+ var document = workspace.GetDocument (DocumentId);
+ if (document == null)
+ return await DefaultSyntaxHighlighting.Instance.GetHighlightedLineAsync (line, cancellationToken);
+
+ // Empirical testing shows that we end up not reallocating the list if we pre-allocate that we have at least 2 times more colored segments than classifiers per line.
+ // Current Roslyn API does not allow for a Count getting without iteration, so leave it with a magic number which yields similar results.
+ var coloredSegments = new List (32);
+
+ int offset = line.Offset;
+ int length = line.Length;
+ var span = new TextSpan (offset, length);
+
+// Console.WriteLine( "oeDEBUG :: RCH.GetHighlightedLineAsync : line=" + line.LineNumber );
+
+ var classifications = Classifier.GetClassifiedSpans (await document.GetSemanticModelAsync ().ConfigureAwait (false), span, workspace, cancellationToken);
+
+ int lastClassifiedOffsetEnd = offset;
+ ScopeStack scopeStack;
+
+ int prevStart = -1;
+ int prevLength = -1;
+
+ foreach (var curSpan in classifications) {
+ if (curSpan.TextSpan.Start > lastClassifiedOffsetEnd) {
+ scopeStack = userScope;
+ ColoredSegment whitespaceSegment = new ColoredSegment (lastClassifiedOffsetEnd - offset, curSpan.TextSpan.Start - lastClassifiedOffsetEnd, scopeStack);
+ coloredSegments.Add (whitespaceSegment);
+ }
+
+// Console.WriteLine( "oeDEBUG :: RCH.GetHighlightedLineAsync : SPAN start=" + curSpan.TextSpan.Start + " length=" + curSpan.TextSpan.Length + " ClassificationType=" + curSpan.ClassificationType );
+
+// 20201006 : problem after loading/using a "bridge.net" nuget package, which replaces the normal standard/core library (System namespace etc) with an another.
+// as a consequence, the class names, method names etc appear as duplicated in the editor (like ConsoleConsole.WriteLineWriteLine(...)) while the actual file content is correct.
+// it seems that overlapping classifications are received here, with type "static symbol" and identical span with the previous classification => skip these segments.
+// NOTICE there may be valid classifications that span over multiple lines, for example in case of a multiline /* block comment */ ...
+
+ if ( curSpan.TextSpan.Start == prevStart && curSpan.TextSpan.Length == prevLength )
+ {
+// Console.WriteLine( "RCH.GetHighlightedLineAsync : SKIP overlapping SPAN start=" + curSpan.TextSpan.Start + " length=" + curSpan.TextSpan.Length + " ClassificationType='" + curSpan.ClassificationType + "'" );
+// Console.WriteLine( "RCH.GetHighlightedLineAsync : SKIP overlapping SPAN start=" + curSpan.TextSpan.Start + " length=" + curSpan.TextSpan.Length + " ClassificationType='" + curSpan.ClassificationType + "' lastClassifiedOffsetEnd=" + lastClassifiedOffsetEnd );
+ }
+ else
+ {
+ scopeStack = GetStyleScopeStackFromClassificationType (curSpan.ClassificationType);
+ ColoredSegment curColoredSegment = new ColoredSegment (curSpan.TextSpan.Start - offset, curSpan.TextSpan.Length, scopeStack);
+ coloredSegments.Add (curColoredSegment);
+
+ prevStart = curSpan.TextSpan.Start;
+ prevLength = curSpan.TextSpan.Length;
+
+ }
+
+ lastClassifiedOffsetEnd = curSpan.TextSpan.End;
+ }
+
+ if (offset + length > lastClassifiedOffsetEnd) {
+ scopeStack = userScope;
+ ColoredSegment whitespaceSegment = new ColoredSegment (lastClassifiedOffsetEnd - offset, offset + length - lastClassifiedOffsetEnd, scopeStack);
+ coloredSegments.Add (whitespaceSegment);
+ }
+
+ return new HighlightedLine (line, coloredSegments);
+ }
+
+ ScopeStack GetStyleScopeStackFromClassificationType (string classificationType)
+ {
+ ScopeStack result;
+ if (classificationMap.TryGetValue (classificationType, out result))
+ return result;
+ return defaultScope;
+ }
+
+ public Task GetScopeStackAsync (int offset, CancellationToken cancellationToken)
+ {
+ return Task.FromResult (defaultScope);
+ }
+
+ public void Dispose ()
+ {
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/ITextEditorFactoryService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/ITextEditorFactoryService.cs
new file mode 100644
index 00000000000..2ce035ab839
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/ITextEditorFactoryService.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+
+// oe REVERTED from monodevelop-7.8
+// oe REVERTED from monodevelop-7.8
+// oe REVERTED from monodevelop-7.8
+
+namespace Microsoft.VisualStudio.Text.Editor
+{
+ using System;
+ using System.Collections.Generic;
+ using Microsoft.VisualStudio.Text.Document;
+
+ ///
+ /// Creates editor views.
+ ///
+ /// This is a MEF component part, and should be imported as follows:
+ /// [Import]
+ /// ITextEditorFactoryService factory = null;
+ ///
+ public interface ITextEditorFactoryService
+ {
+ ITextView CreateTextView (MonoDevelop.Ide.Editor.TextEditor textEditor, ITextViewRoleSet roles = null, IEditorOptions parentOptions = null);
+
+ ///
+ /// The empty ITextViewRoleSet.
+ ///
+ ITextViewRoleSet NoRoles { get; }
+
+ ///
+ /// The set of all predefined text view roles.
+ ///
+ ITextViewRoleSet AllPredefinedRoles { get; }
+
+ ///
+ /// The set of roles that are used when creating a text view without specifying text view roles.
+ ///
+ ITextViewRoleSet DefaultRoles { get; }
+
+ ///
+ /// Creates a containing the given roles.
+ ///
+ /// The roles of interest.
+ /// The text view role set.
+ /// roles is null.
+ ITextViewRoleSet CreateTextViewRoleSet(IEnumerable roles);
+
+ ///
+ /// Creates a containing the given roles.
+ ///
+ /// The roles of interest.
+ /// The text view role set.
+ ITextViewRoleSet CreateTextViewRoleSet(params string[] roles);
+
+ ///
+ /// Raised when any is created.
+ ///
+ event EventHandler TextViewCreated;
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditor.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditor.cs
index afda87a61d1..aeeb4f2e1a8 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditor.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextEditor.cs
@@ -285,7 +285,7 @@ public DocumentRegion SelectionRegion {
textEditorImpl.SelectionRegion = value;
}
}
-
+
public int SelectionAnchorOffset {
get {
return textEditorImpl.SelectionAnchorOffset;
@@ -741,7 +741,7 @@ public IEnumerable GetTextSegmentMarkersAt (int offset, int
if (offset + length < 0 || offset + length > Length)
throw new ArgumentOutOfRangeException (nameof (length), "needs to be 0 <= offset + length (" + length + ") < Length=" + this.Length);
-
+
return textEditorImpl.GetTextSegmentMarkersAt (new TextSegment (offset, length));
}
@@ -895,7 +895,7 @@ public void WriteTextTo (TextWriter writer, int offset, int length)
///
public void CopyTo (int sourceIndex, char [] destination, int destinationIndex, int count)
{
- ReadOnlyTextDocument.CopyTo (sourceIndex, destination, destinationIndex, count);
+ ReadOnlyTextDocument.CopyTo (sourceIndex, destination, destinationIndex, count);
}
public void ScrollTo (int offset)
@@ -1017,7 +1017,7 @@ internal TextEditorExtension TextEditorExtensionChain {
get {
return textEditorImpl.EditorExtension;
}
- }
+ }
internal ITextMarkerFactory TextMarkerFactory {
get {
@@ -1059,7 +1059,9 @@ internal TextEditor (ITextEditorImpl textEditorImpl, TextEditorType textEditorTy
TextEditor_MimeTypeChanged (null, null);
- this.TextView = CompositionManager.Instance.GetExportedValue ().CreateTextView (this);
+ // oe NOTICE old-editor instance creation...
+ //oe this.TextView = CompositionManager.Instance.GetExportedValue ().CreateTextView (this);
+ this.TextView = Microsoft.VisualStudio.Platform.PlatformCatalog.Instance.TextEditorFactoryService.CreateTextView(this);
}
void TextEditor_ZoomLevelChanged (object sender, EventArgs e)
@@ -1198,18 +1200,18 @@ internal void SetExtensionChain (DocumentContext documentContext, IEnumerable GetContents (Type type)
}
if (type.IsInstanceOfType (textEditorImpl))
res = res.Concat (textEditorImpl);
-
+
var ext = textEditorImpl.EditorExtension;
while (ext != null) {
res = res.Concat (ext.OnGetContents (type));
@@ -1438,7 +1440,7 @@ public IEnumerable Annotations
}
internal bool SuppressTooltips {
- get { return textEditorImpl.SuppressTooltips; }
+ get { return textEditorImpl.SuppressTooltips; }
set { textEditorImpl.SuppressTooltips = value; }
}
#endregion
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs
index 803b6f3985e..a9f02dc6527 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.ExternalTools/ExternalToolPanel.cs
@@ -13,10 +13,10 @@
// 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
@@ -38,6 +38,9 @@
using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Components.Commands;
using System.Linq;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
#pragma warning disable 612
@@ -51,7 +54,7 @@ public override Control CreatePanelWidget ()
{
return widget = new ExternalToolPanelWidget ();
}
-
+
public override bool ValidateChanges ()
{
return widget.Validate ();
@@ -62,29 +65,29 @@ public override void ApplyChanges ()
widget.Store ();
}
}
-
- public partial class ExternalToolPanelWidget : Gtk.Bin
+
+ public partial class ExternalToolPanelWidget : Gtk.Bin
{
// gtk controls
ListStore toolListBoxStore;
-
+
// these are the control names which are enabled/disabled depending if tool is selected
Widget[] dependendControls;
-
+
// needed for treeview listbox
int toolListBoxItemCount = 0;
bool lockStoreValues = false;
EventBoxTooltip keyBindingInfoTooltip;
- public ExternalToolPanelWidget ()
+ public ExternalToolPanelWidget ()
{
Build ();
- // instantiate controls
+ // instantiate controls
toolListBoxStore = new ListStore (typeof (string), typeof (ExternalTool));
dependendControls = new Widget[] {
- titleTextBox, argumentTextBox,
+ titleTextBox, argumentTextBox,
workingDirTextBox, promptArgsCheckBox, useOutputPadCheckBox,
titleLabel, argumentLabel, commandLabel, defaultKeyLabel,
defaultKeyTextBox, keyBindingInfoEventBox,
@@ -93,7 +96,7 @@ public ExternalToolPanelWidget ()
saveCurrentFileCheckBox,
tagSelectorArgs, tagSelectorPath
};
-
+
foreach (ExternalTool tool in ExternalToolService.Tools) {
toolListBoxStore.AppendValues (tool.MenuCommand, tool);
toolListBoxItemCount ++;
@@ -109,7 +112,7 @@ public ExternalToolPanelWidget ()
tagSelectorArgs.TagModel = IdeApp.Workbench.GetStringTagModelDescription ();
tagSelectorArgs.TargetEntry = argumentTextBox;
-
+
tagSelectorPath.TagModel = IdeApp.Workbench.GetStringTagModelDescription ();
tagSelectorPath.TargetEntry = workingDirTextBox;
@@ -122,7 +125,7 @@ public ExternalToolPanelWidget ()
addButton.Clicked += AddButtonClicked;
moveUpButton.Clicked += MoveUpButtonClicked;
moveDownButton.Clicked += MoveDownButtonClicked;
-
+
browseButton.PathChanged += StoreValuesInSelectedTool;
titleTextBox.Changed += StoreValuesInSelectedTool;
argumentTextBox.Changed += StoreValuesInSelectedTool;
@@ -177,25 +180,25 @@ void MoveUpButtonClicked (object sender, EventArgs e)
{
if (toolListBox.Selection.CountSelectedRows () == 1) {
TreeIter selectedItem;
- TreeModel ls;
+ TreeModel ls;
((ListStore)toolListBox.Model).GetIter (out selectedItem, (TreePath)toolListBox.Selection.GetSelectedRows (out ls)[0]);
// we know we have a selected item so get it's index
// use that to get the path of the item before it, and swap the two
int index = GetSelectedIndex (toolListBox);
// only swap if at the top
if (index > 0) {
- TreeIter prev;
+ TreeIter prev;
if (toolListBox.Model.GetIterFromString (out prev, (index - 1).ToString ()))
((ListStore)ls).Swap (selectedItem, prev);
}
}
}
-
+
void MoveDownButtonClicked (object sender, EventArgs e)
{
if (toolListBox.Selection.CountSelectedRows () == 1) {
TreeIter selectedItem;
- TreeModel ls;
+ TreeModel ls;
((ListStore)toolListBox.Model).GetIter (out selectedItem, (TreePath) toolListBox.Selection.GetSelectedRows(out ls)[0]);
// swap it with the next one
TreeIter toSwap = selectedItem;
@@ -298,15 +301,15 @@ void OnDefaultKeyEntryKeyRelease (object sender, KeyReleaseEventArgs e)
if (accelIncomplete)
CurrentKey = chord != null ? chord : string.Empty;
}
-
+
void StoreValuesInSelectedTool (object sender, EventArgs e)
{
- if (lockStoreValues)
+ if (lockStoreValues)
return;
ExternalTool selectedItem = SelectedTool;
- if (selectedItem == null)
+ if (selectedItem == null)
return;
-
+
toolListBoxStore.SetValue (SelectedIter, 0, titleTextBox.Text);
selectedItem.MenuCommand = titleTextBox.Text;
selectedItem.Command = browseButton.Path.Trim ();
@@ -316,7 +319,7 @@ void StoreValuesInSelectedTool (object sender, EventArgs e)
selectedItem.UseOutputPad = useOutputPadCheckBox.Active;
selectedItem.SaveCurrentFile = saveCurrentFileCheckBox.Active;
}
-
+
TreeIter SelectedIter {
get {
if (toolListBox.Selection.CountSelectedRows () == 1) {
@@ -339,7 +342,7 @@ ExternalTool SelectedTool {
return null;
}
}
-
+
void DisplayTool (ExternalTool externalTool)
{
SetEnabledStatus (externalTool != null, dependendControls);
@@ -364,13 +367,13 @@ void DisplayTool (ExternalTool externalTool)
lockStoreValues = false;
}
}
-
+
void SelectionChanged (object sender, EventArgs e)
{
SetEnabledStatus (toolListBox.Selection.CountSelectedRows () > 0, removeButton);
DisplayTool (SelectedTool);
}
-
+
void RemoveButtonClicked (object sender, EventArgs e)
{
int selectedItemCount = toolListBox.Selection.CountSelectedRows ();
@@ -385,14 +388,14 @@ void RemoveButtonClicked (object sender, EventArgs e)
((ListStore)lv).GetIter (out selectedIters[i], path);
maxIndex = path.Indices[0];
}
-
+
// now delete each item in that list
foreach (TreeIter toDelete in selectedIters) {
TreeIter itr = toDelete;
toolListBoxItemCount--;
((ListStore)lv).Remove (ref itr);
}
-
+
if (toolListBoxItemCount == 0) {
SelectionChanged (this, EventArgs.Empty);
} else {
@@ -400,7 +403,7 @@ void RemoveButtonClicked (object sender, EventArgs e)
}
}
}
-
+
void AddButtonClicked (object sender, EventArgs e)
{
TreeIter itr = toolListBoxStore.AppendValues (GettextCatalog.GetString ("New Tool"), new ExternalTool());
@@ -408,7 +411,7 @@ void AddButtonClicked (object sender, EventArgs e)
toolListBox.Selection.UnselectAll ();
toolListBox.Selection.SelectIter (itr);
}
-
+
// added this event to get the last select row index from gtk TreeView
int GetSelectedIndex (Gtk.TreeView tv)
{
@@ -416,13 +419,13 @@ int GetSelectedIndex (Gtk.TreeView tv)
TreeIter selectedIter;
TreeModel lv;
((ListStore) toolListBox.Model).GetIter(out selectedIter, (TreePath) toolListBox.Selection.GetSelectedRows (out lv)[0]);
-
+
// return index of first level node (since only 1 level list model)
return lv.GetPath (selectedIter).Indices[0];
}
return -1;
}
-
+
// added this event to set a specific row as selected from index
void SetSelectedIndex (Gtk.TreeView tv, int index)
{
@@ -431,7 +434,7 @@ void SetSelectedIndex (Gtk.TreeView tv, int index)
tv.Selection.UnselectAll ();
tv.Selection.SelectPath (path);
}
-
+
// disables or enables (sets sensitivty) a specified array of widgets
public void SetEnabledStatus (bool enabled, params Widget[] controls)
{
@@ -443,7 +446,7 @@ public void SetEnabledStatus (bool enabled, params Widget[] controls)
}
}
}
-
+
static string FilterPath (string path)
{
return StringParserService.Parse (path);
@@ -480,7 +483,7 @@ public bool Validate ()
}
return true;
}
-
+
public bool Store ()
{
List newlist = new List ();
@@ -493,7 +496,7 @@ public bool Store ()
newlist.Add (tool);
} while (toolListBox.Model.IterNext (ref current));
}
-
+
ExternalToolService.Tools = newlist;
ExternalToolService.SaveTools ();
return true;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
index b6780c58c68..e381f7226d4 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
@@ -1,21 +1,21 @@
-//
+//
// FindInFilesDialog.cs
-//
+//
// Author:
// Mike Krüger
-//
+//
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -24,7 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using System;
+using System;
using System.Linq;
using System.Threading;
using System.Text;
@@ -50,7 +50,7 @@ public enum PathMode {
public partial class FindInFilesDialog : Gtk.Dialog
{
readonly bool writeScope = true;
-
+
enum SearchScope {
WholeWorkspace,
CurrentProject,
@@ -59,74 +59,74 @@ enum SearchScope {
CurrentDocument,
Selection
}
-
+
CheckButton checkbuttonRecursively;
ComboBoxEntry comboboxentryReplace;
ComboBoxEntry comboboxentryPath;
- SearchEntry searchentryFileMask;
+ MonoDevelop.Components.SearchEntry searchentryFileMask;
Button buttonBrowsePaths;
Button buttonReplace;
Label labelFileMask;
Label labelReplace;
Label labelPath;
HBox hboxPath;
-
+
Properties properties = null;
bool replaceMode = false;
-
+
static void SetButtonIcon (Button button, string stockIcon)
{
Alignment alignment = new Alignment (0.5f, 0.5f, 0f, 0f);
Label label = new Label (button.Label);
HBox hbox = new HBox (false, 2);
ImageView image = new ImageView ();
-
+
image.Image = ImageService.GetIcon (stockIcon, IconSize.Menu);
image.Show ();
hbox.Add (image);
-
+
label.Show ();
hbox.Add (label);
-
+
hbox.Show ();
alignment.Add (hbox);
-
+
button.Child.Destroy ();
-
+
alignment.Show ();
button.Add (alignment);
}
-
+
static Widget GetChildWidget (Container toplevel, Type type)
{
foreach (var child in ((Container) toplevel).Children) {
if (child.GetType () == type)
return child;
-
+
if (child is Container) {
var w = GetChildWidget ((Container) child, type);
if (w != null)
return w;
}
}
-
+
return null;
}
-
+
static void OverrideStockLabel (Button button, string label)
{
var widget = GetChildWidget ((Container) button.Child, typeof (Label));
if (widget != null)
((Label) widget).LabelProp = label;
}
-
+
FindInFilesDialog (bool showReplace, string directory) : this (showReplace)
{
comboboxScope.Active = (int)SearchScope.Directories;
comboboxentryPath.Entry.Text = directory;
writeScope = false;
}
-
+
public static string FormatPatternToSelectionOption (string pattern, bool regex)
{
if (pattern == null)
@@ -147,7 +147,7 @@ public static string FormatPatternToSelectionOption (string pattern, bool regex)
{
Build ();
IdeTheme.ApplyTheme (this);
-
+
properties = PropertyService.Get ("MonoDevelop.FindReplaceDialogs.SearchOptions", new Properties ());
SetButtonIcon (toggleReplaceInFiles, "gtk-find-and-replace");
SetButtonIcon (toggleFindInFiles, "gtk-find");
@@ -161,21 +161,21 @@ public static string FormatPatternToSelectionOption (string pattern, bool regex)
toggleReplaceInFiles.Active = showReplace;
toggleFindInFiles.Active = !showReplace;
-
+
toggleFindInFiles.Toggled += delegate {
if (toggleFindInFiles.Active) {
Title = GettextCatalog.GetString ("Find in Files");
HideReplaceUI ();
}
};
-
+
toggleReplaceInFiles.Toggled += delegate {
if (toggleReplaceInFiles.Active) {
Title = GettextCatalog.GetString ("Replace in Files");
ShowReplaceUI ();
}
};
-
+
buttonSearch.Clicked += HandleSearchClicked;
buttonClose.Clicked += (sender, e) => Destroy ();
DeleteEvent += (o, args) => Destroy ();
@@ -200,7 +200,7 @@ public static string FormatPatternToSelectionOption (string pattern, bool regex)
comboboxScope.Changed += HandleScopeChanged;
InitFromProperties ();
-
+
if (showReplace)
toggleReplaceInFiles.Toggle ();
else
@@ -212,7 +212,7 @@ public static string FormatPatternToSelectionOption (string pattern, bool regex)
string selectedText = FormatPatternToSelectionOption (view.Selection.SelectedSpans.FirstOrDefault ().GetText(), properties.Get ("RegexSearch", false));
if (!string.IsNullOrEmpty (selectedText)) {
if (selectedText.Any (c => c == '\n' || c == '\r')) {
-// comboboxScope.Active = ScopeSelection;
+// comboboxScope.Active = ScopeSelection;
} else {
if (comboboxScope.Active == (int) SearchScope.Selection)
comboboxScope.Active = (int) SearchScope.CurrentDocument;
@@ -221,7 +221,7 @@ public static string FormatPatternToSelectionOption (string pattern, bool regex)
} else if (comboboxScope.Active == (int) SearchScope.Selection) {
comboboxScope.Active = (int) SearchScope.CurrentDocument;
}
-
+
}
}
comboboxentryFind.Entry.SelectRegion (0, comboboxentryFind.ActiveText.Length);
@@ -281,23 +281,23 @@ static void TableAddRow (Table table, uint row, Widget column1, Widget column2)
{
uint rows = table.NRows;
Table.TableChild tr;
-
+
table.NRows = rows + 1;
-
+
foreach (var child in table.Children) {
tr = (Table.TableChild) table[child];
uint bottom = tr.BottomAttach;
uint top = tr.TopAttach;
-
+
if (top >= row && top < rows) {
tr.BottomAttach = bottom + 1;
tr.TopAttach = top + 1;
}
}
-
+
if (column1 != null) {
table.Add (column1);
-
+
tr = (Table.TableChild) table[column1];
tr.XOptions = (AttachOptions) 4;
tr.YOptions = (AttachOptions) 4;
@@ -306,10 +306,10 @@ static void TableAddRow (Table table, uint row, Widget column1, Widget column2)
tr.LeftAttach = 0;
tr.RightAttach = 1;
}
-
+
if (column2 != null) {
table.Add (column2);
-
+
tr = (Table.TableChild) table[column2];
tr.XOptions = (AttachOptions) 4;
tr.YOptions = (AttachOptions) 4;
@@ -319,48 +319,48 @@ static void TableAddRow (Table table, uint row, Widget column1, Widget column2)
tr.RightAttach = 2;
}
}
-
+
static void TableRemoveRow (Table table, uint row, Widget column1, Widget column2, bool destroy)
{
uint rows = table.NRows;
-
+
foreach (var child in table.Children) {
var tr = (Table.TableChild) table[child];
uint bottom = tr.BottomAttach;
uint top = tr.TopAttach;
-
+
if (top >= row && top < rows) {
tr.BottomAttach = bottom - 1;
tr.TopAttach = top - 1;
}
}
-
+
if (column1 != null) {
table.Remove (column1);
if (destroy)
column1.Destroy ();
}
-
+
if (column2 != null) {
table.Remove (column2);
if (destroy)
column2.Destroy ();
}
-
+
table.NRows--;
}
-
+
static uint TableGetRowForItem (Table table, Widget item)
{
var child = (Table.TableChild) table[item];
return child.TopAttach;
}
-
+
void ShowReplaceUI ()
{
if (replaceMode)
return;
-
+
labelReplace = new Label { Text = GettextCatalog.GetString ("_Replace:"), Xalign = 0f, UseUnderline = true };
comboboxentryReplace = new ComboBoxEntry ();
LoadHistory ("MonoDevelop.FindReplaceDialogs.ReplaceHistory", comboboxentryReplace);
@@ -369,7 +369,7 @@ void ShowReplaceUI ()
SetupAccessibilityForReplace ();
TableAddRow (tableFindAndReplace, 1, labelReplace, comboboxentryReplace);
-
+
buttonReplace = new Button () {
Label = "gtk-find-and-replace",
UseUnderline = true,
@@ -382,60 +382,60 @@ void ShowReplaceUI ()
OverrideStockLabel (buttonReplace, GettextCatalog.GetString ("R_eplace"));
buttonReplace.Clicked += HandleReplaceClicked;
buttonReplace.Show ();
-
+
AddActionWidget (buttonReplace, 0);
buttonReplace.GrabDefault ();
-
+
replaceMode = true;
-
+
Requisition req = SizeRequest ();
Resize (req.Width, req.Height);
}
-
+
void HideReplaceUI ()
{
if (!replaceMode)
return;
-
+
buttonReplace.Destroy ();
buttonReplace = null;
-
+
buttonSearch.GrabDefault ();
-
+
StoreHistory ("MonoDevelop.FindReplaceDialogs.ReplaceHistory", comboboxentryReplace);
TableRemoveRow (tableFindAndReplace, 1, labelReplace, comboboxentryReplace, true);
comboboxentryReplace = null;
labelReplace = null;
-
+
replaceMode = false;
-
+
Requisition req = SizeRequest ();
Resize (req.Width, req.Height);
}
-
+
void ShowDirectoryPathUI ()
{
if (labelPath != null)
return;
-
- // We want to add the Path combo box right below the Scope
+
+ // We want to add the Path combo box right below the Scope
uint row = TableGetRowForItem (tableFindAndReplace, labelScope) + 1;
-
+
// DirectoryScope
labelPath = new Label {
LabelProp = GettextCatalog.GetString ("_Path:"),
- UseUnderline = true,
+ UseUnderline = true,
Xalign = 0f
};
labelPath.Show ();
-
+
hboxPath = new HBox ();
comboboxentryPath = new ComboBoxEntry ();
comboboxentryPath.Destroyed += ComboboxentryPathDestroyed;
LoadHistory ("MonoDevelop.FindReplaceDialogs.PathHistory", comboboxentryPath);
comboboxentryPath.Show ();
hboxPath.PackStart (comboboxentryPath);
-
+
labelPath.MnemonicWidget = comboboxentryPath;
buttonBrowsePaths = new Button { Label = "…" };
@@ -443,34 +443,34 @@ void ShowDirectoryPathUI ()
buttonBrowsePaths.Show ();
hboxPath.PackStart (buttonBrowsePaths, false, false, 0);
hboxPath.Show ();
-
+
// Add the Directory Path row to the table
TableAddRow (tableFindAndReplace, row++, labelPath, hboxPath);
-
+
// Add a checkbox for searching the directory recursively...
checkbuttonRecursively = new CheckButton {
Label = GettextCatalog.GetString ("Re_cursively"),
Active = properties.Get ("SearchPathRecursively", true),
UseUnderline = true
};
-
+
checkbuttonRecursively.Destroyed += CheckbuttonRecursivelyDestroyed;
checkbuttonRecursively.Show ();
-
+
TableAddRow (tableFindAndReplace, row, null, checkbuttonRecursively);
SetupAccessibilityForPath ();
}
-
+
void HideDirectoryPathUI ()
{
if (labelPath == null)
return;
-
+
uint row = TableGetRowForItem (tableFindAndReplace, checkbuttonRecursively);
TableRemoveRow (tableFindAndReplace, row, null, checkbuttonRecursively, true);
checkbuttonRecursively = null;
-
+
row = TableGetRowForItem (tableFindAndReplace, labelPath);
TableRemoveRow (tableFindAndReplace, row, labelPath, hboxPath, true);
// comboboxentryPath and buttonBrowsePaths are destroyed with hboxPath
@@ -479,27 +479,27 @@ void HideDirectoryPathUI ()
labelPath = null;
hboxPath = null;
}
-
+
void ShowFileMaskUI ()
{
if (labelFileMask != null)
return;
-
+
uint row;
-
+
if (checkbuttonRecursively != null)
row = TableGetRowForItem (tableFindAndReplace, checkbuttonRecursively) + 1;
else
row = TableGetRowForItem (tableFindAndReplace, labelScope) + 1;
-
+
labelFileMask = new Label {
LabelProp = GettextCatalog.GetString ("_File Mask:"),
- UseUnderline = true,
+ UseUnderline = true,
Xalign = 0f
};
labelFileMask.Show ();
-
- searchentryFileMask = new SearchEntry () {
+
+ searchentryFileMask = new MonoDevelop.Components.SearchEntry () {
ForceFilterButtonVisible = false,
IsCheckMenu = true,
ActiveFilterID = 0,
@@ -507,24 +507,24 @@ void ShowFileMaskUI ()
Ready = true,
};
-
+
searchentryFileMask.Query = properties.Get ("MonoDevelop.FindReplaceDialogs.FileMask", "");
-
+
searchentryFileMask.Entry.ActivatesDefault = true;
searchentryFileMask.Show ();
SetupAccessibilityForSearch ();
-
+
TableAddRow (tableFindAndReplace, row, labelFileMask, searchentryFileMask);
}
-
+
void HideFileMaskUI ()
{
if (labelFileMask == null)
return;
-
+
properties.Set ("MonoDevelop.FindReplaceDialogs.FileMask", searchentryFileMask.Query);
-
+
uint row = TableGetRowForItem (tableFindAndReplace, labelFileMask);
TableRemoveRow (tableFindAndReplace, row, labelFileMask, searchentryFileMask, true);
searchentryFileMask = null;
@@ -610,13 +610,13 @@ void ButtonBrowsePathsClicked (object sender, EventArgs e)
var dlg = new SelectFolderDialog (GettextCatalog.GetString ("Select directory")) {
TransientFor = this,
};
-
+
string defaultFolder = comboboxentryPath.Entry.Text;
if (string.IsNullOrEmpty (defaultFolder))
defaultFolder = IdeApp.Preferences.ProjectsDefaultPath;
if (!string.IsNullOrEmpty (defaultFolder))
dlg.CurrentFolder = defaultFolder;
-
+
if (dlg.Run ())
comboboxentryPath.Entry.Text = dlg.SelectedFile;
}
@@ -630,7 +630,7 @@ void CheckbuttonRecursivelyDestroyed (object sender, EventArgs e)
void InitFromProperties ()
{
comboboxScope.Active = properties.Get ("Scope", (int) SearchScope.WholeWorkspace);
-
+
//checkbuttonRecursively.Active = properties.Get ("SearchPathRecursively", true);
//checkbuttonFileMask.Active = properties.Get ("UseFileMask", false);
checkbuttonCaseSensitive.Active = properties.Get ("CaseSensitive", false);
@@ -638,7 +638,7 @@ void InitFromProperties ()
checkbuttonRegexSearch.Active = properties.Get ("RegexSearch", false);
LoadHistory ("MonoDevelop.FindReplaceDialogs.FindHistory", comboboxentryFind);
-
+
// LoadHistory ("MonoDevelop.FindReplaceDialogs.PathHistory", comboboxentryPath);
// LoadHistory ("MonoDevelop.FindReplaceDialogs.FileMaskHistory", comboboxentryFileMask);
}
@@ -726,24 +726,24 @@ protected override void OnDestroyed ()
StorePoperties ();
base.OnDestroyed ();
}
-
+
public static void ShowFind ()
{
ShowSingleInstance (new FindInFilesDialog (false));
}
-
+
public static void ShowReplace ()
{
ShowSingleInstance (new FindInFilesDialog (true));
}
-
+
public static void FindInPath (string path)
{
ShowSingleInstance (new FindInFilesDialog (false, path));
}
-
+
static FindInFilesDialog currentFindDialog;
-
+
static void ShowSingleInstance (FindInFilesDialog newDialog)
{
if (currentFindDialog != null) {
@@ -779,19 +779,19 @@ Scope GetScope ()
case SearchScope.AllOpenFiles:
scope = new AllOpenFilesScope ();
break;
- case SearchScope.Directories:
+ case SearchScope.Directories:
if (!System.IO.Directory.Exists (comboboxentryPath.Entry.Text)) {
MessageService.ShowError (string.Format (GettextCatalog.GetString ("Directory not found: {0}"),
comboboxentryPath.Entry.Text));
return null;
}
-
+
scope = new DirectoryScope (comboboxentryPath.Entry.Text, checkbuttonRecursively.Active);
break;
default:
throw new ApplicationException ("Unknown scope:" + comboboxScope.Active);
}
-
+
return scope;
}
@@ -846,7 +846,7 @@ internal static void SearchReplace (string findPattern, string replacePattern, S
if (scope == null)
return;
-
+
find = new FindReplace ();
string pattern = findPattern;
@@ -884,7 +884,7 @@ internal static void SearchReplace (string findPattern, string replacePattern, S
DateTime timer = DateTime.Now;
string errorMessage = null;
-
+
try {
var results = new List ();
foreach (SearchResult result in find.FindAll (scope, searchMonitor, pattern, replacePattern, options, token)) {
@@ -897,7 +897,7 @@ internal static void SearchReplace (string findPattern, string replacePattern, S
errorMessage = ex.Message;
LoggingService.LogError ("Error while search", ex);
}
-
+
string message = null;
if (errorMessage != null) {
message = GettextCatalog.GetString ("The search could not be finished: {0}", errorMessage);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
index 10fab0c566e..b88cc761d8e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
@@ -1,21 +1,21 @@
-//
+//
// SearchResultWidget.cs
-//
+//
// Author:
// Mike Krüger
-//
+//
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -46,6 +46,9 @@
using MonoDevelop.Ide.Editor.Highlighting;
using System.Threading.Tasks;
using MonoDevelop.Ide.TypeSystem;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.FindInFiles
{
@@ -56,10 +59,10 @@ class SearchResultWidget : HBox, ILocationList
readonly ToolButton buttonStop;
readonly ToggleToolButton buttonPin;
-
+
const int SearchResultColumn = 0;
const int DidReadColumn = 1;
-
+
EditorTheme highlightStyle;
internal EditorTheme HighlightStyle {
@@ -68,7 +71,7 @@ internal EditorTheme HighlightStyle {
}
}
- ScrolledWindow scrolledwindowLogView;
+ ScrolledWindow scrolledwindowLogView;
PadTreeView treeviewSearchResults;
Label labelStatus;
TextView textviewLog;
@@ -89,11 +92,11 @@ internal PathMode PathMode {
}
public bool AllowReuse {
- get {
- return !buttonStop.Sensitive && !buttonPin.Active;
+ get {
+ return !buttonStop.Sensitive && !buttonPin.Active;
}
}
-
+
public SearchResultWidget ()
{
var vbox = new VBox ();
@@ -119,11 +122,11 @@ public SearchResultWidget ()
Editable = false,
};
scrolledwindowLogView.Add (textviewLog);
-
+
store = new ListStore (typeof (SearchResult),
typeof (bool) // didRead
);
-
+
treeviewSearchResults = new PadTreeView () {
Model = store,
HeadersClickable = true,
@@ -162,7 +165,7 @@ public SearchResultWidget ()
var fileNamePixbufRenderer = new CellRendererImage ();
fileNameColumn.PackStart (fileNamePixbufRenderer, false);
fileNameColumn.SetCellDataFunc (fileNamePixbufRenderer, FileIconDataFunc);
-
+
fileNameColumn.PackStart (renderer, true);
fileNameColumn.SetCellDataFunc (renderer, FileNameDataFunc);
treeviewSearchResults.AppendColumn (fileNameColumn);
@@ -187,7 +190,7 @@ public SearchResultWidget ()
store.SetSortFunc (3, CompareFilePaths);
treeviewSearchResults.RowActivated += TreeviewSearchResultsRowActivated;
-
+
buttonStop = new ToolButton (new ImageView (Gui.Stock.Stop, Gtk.IconSize.Menu), null) { Sensitive = false };
buttonStop.Clicked += ButtonStopClicked;
buttonStop.TooltipText = GettextCatalog.GetString ("Stop");
@@ -197,13 +200,13 @@ public SearchResultWidget ()
buttonClear.Clicked += ButtonClearClicked;
buttonClear.TooltipText = GettextCatalog.GetString ("Clear results");
toolbar.Insert (buttonClear, -1);
-
+
var buttonOutput = new ToggleToolButton ();
buttonOutput.IconWidget = new ImageView (Gui.Stock.OutputIcon, Gtk.IconSize.Menu);
buttonOutput.Clicked += ButtonOutputClicked;
buttonOutput.TooltipText = GettextCatalog.GetString ("Show output");
toolbar.Insert (buttonOutput, -1);
-
+
buttonPin = new ToggleToolButton ();
buttonPin.IconWidget = new ImageView (Gui.Stock.PinUp, Gtk.IconSize.Menu);
buttonPin.Clicked += ButtonPinClicked;
@@ -212,7 +215,7 @@ public SearchResultWidget ()
// store.SetSortColumnId (3, SortType.Ascending);
ShowAll ();
-
+
scrolledwindowLogView.Hide ();
treeviewSearchResults.FixedHeightMode = true;
@@ -263,7 +266,7 @@ void TreeviewSearchResultsRowActivated(object o, RowActivatedArgs args)
{
OpenSelectedMatches ();
}
-
+
public void BeginProgress ()
{
IdeApp.Workbench.ActiveLocationList = this;
@@ -272,12 +275,12 @@ public void BeginProgress ()
newStore.SetSortFunc (1, CompareProjectFileNames);
newStore.SetSortFunc (2, CompareFileNames);
newStore.SetSortFunc (3, CompareFilePaths);
- newStore.SetSortColumnId (2, SortType.Ascending);
+ newStore.SetSortColumnId (2, SortType.Ascending);
Reset ();
buttonStop.Sensitive = true;
treeviewSearchResults.FreezeChildNotify ();
}
-
+
ListStore newStore;
public void EndProgress ()
@@ -293,10 +296,10 @@ public void FocusPad ()
{
treeviewSearchResults.GrabFocus ();
TreeIter iter;
- if (store.GetIterFirst (out iter))
+ if (store.GetIterFirst (out iter))
treeviewSearchResults.Selection.SelectIter (iter);
}
-
+
public void Reset ()
{
if (treeviewSearchResults.IsRealized)
@@ -307,7 +310,7 @@ public void Reset ()
labelStatus.Text = "";
textviewLog.Buffer.Clear ();
}
-
+
protected override void OnDestroyed ()
{
Reset ();
@@ -330,7 +333,7 @@ internal static Color AdjustColor (Color baseColor, Color color)
}
return color;
}
-
+
internal string AdjustColors (string markup)
{
var result = new StringBuilder ();
@@ -342,7 +345,7 @@ internal string AdjustColors (string markup)
// On mac it's not possible to get the white background color with the Base or Background
// methods. If this bug is fixed or a better work around is found - remove this hack.
Color baseColor = Platform.IsMac ?treeviewSearchResults.Style.Light (treeviewSearchResults.State) : treeviewSearchResults.Style.Base (treeviewSearchResults.State);
-
+
while (idx > 0) {
idx += "foreground=\"".Length;
result.Append (markup, offset, idx - offset);
@@ -352,7 +355,7 @@ internal string AdjustColors (string markup)
}
offset = idx + 7;
string colorStr = markup.Substring (idx, 7);
-
+
Color color = Color.Zero;
if (Color.Parse(colorStr, ref color))
@@ -369,19 +372,19 @@ public static string ColorToPangoMarkup (Gdk.Color color)
return string.Format ("#{0:X2}{1:X2}{2:X2}", color.Red >> 8, color.Green >> 8, color.Blue >> 8);
}
void DoPopupMenu (Gdk.EventButton evt)
- {
+ {
IdeApp.CommandService.ShowContextMenu (this.treeviewSearchResults, evt, new CommandEntrySet {
new CommandEntry (ViewCommands.Open),
new CommandEntry (EditCommands.Copy),
new CommandEntry (EditCommands.SelectAll),
}, this);
}
-
+
public void ShowStatus (string text)
{
labelStatus.Text = text;
}
-
+
static void FileIconDataFunc (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
{
if (TreeIter.Zero.Equals (iter))
@@ -397,7 +400,7 @@ static string MarkupText (string text, bool didRead)
{
return string.Format ("{0}", GLib.Markup.EscapeText (text), didRead ? "normal" : "bold");
}
-
+
void FileNameDataFunc (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
{
if (TreeIter.Zero.Equals (iter))
@@ -409,14 +412,14 @@ void FileNameDataFunc (TreeViewColumn column, CellRenderer cell, TreeModel model
return;
fileNameRenderer.Markup = MarkupText (System.IO.Path.GetFileName (searchResult.FileName) + ":" + searchResult.GetLineNumber (this), didRead);
}
-
+
int CompareLineNumbers (TreeModel model, TreeIter first, TreeIter second)
{
var loc1 = ((SearchResult)model.GetValue (first, SearchResultColumn)).GetLocation (this);
var loc2 = ((SearchResult)model.GetValue (second, SearchResultColumn)).GetLocation (this);
return loc1.Line.CompareTo (loc2.Line);
}
-
+
static int DefaultSortFunc (TreeModel model, TreeIter first, TreeIter second)
{
return 0;
@@ -456,7 +459,7 @@ static int CompareFilePaths (TreeModel model, TreeIter first, TreeIter second)
return System.IO.Path.GetDirectoryName (searchResult1.FileName).CompareTo (System.IO.Path.GetDirectoryName (searchResult2.FileName));
}
-
+
void ResultPathDataFunc (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
{
if (TreeIter.Zero.Equals (iter))
@@ -548,7 +551,7 @@ static int FindPosition (string markup, int pos, out string tag)
break;
case ';':
inChar = false;
- if (!inTag)
+ if (!inTag)
realPos++;
break;
case '<':
@@ -559,7 +562,7 @@ static int FindPosition (string markup, int pos, out string tag)
inTag = false;
break;
default:
- if (!inTag && !inChar)
+ if (!inTag && !inChar)
realPos++;
if (inTag)
lastTag.Append (ch);
@@ -567,7 +570,7 @@ static int FindPosition (string markup, int pos, out string tag)
}
}
tag = lastTag.ToString ();
- if (realPos >= pos)
+ if (realPos >= pos)
return markup.Length;
return -1;
}
@@ -579,24 +582,24 @@ public void WriteText (string text)
if (text.EndsWith ("\n", StringComparison.Ordinal))
textviewLog.ScrollMarkOnscreen (textviewLog.Buffer.InsertMark);
}
-
+
public int ResultCount {
get;
private set;
}
-
+
public void Add (SearchResult result)
{
newStore.InsertWithValues (ResultCount++, result, false);
}
-
+
public void AddRange (IEnumerable results)
{
foreach (var result in results) {
Add (result);
}
}
-
+
void OpenDocumentAt (TreeIter iter)
{
var result = store.GetValue (iter, SearchResultColumn) as SearchResult;
@@ -607,7 +610,7 @@ void OpenDocumentAt (TreeIter iter)
}
}
-
+
public void OpenSelectedMatches ()
{
foreach (TreePath path in treeviewSearchResults.Selection.GetSelectedRows ()) {
@@ -618,12 +621,12 @@ public void OpenSelectedMatches ()
}
IdeApp.Workbench.ActiveLocationList = this;
}
-
+
public void SelectAll ()
{
treeviewSearchResults.Selection.SelectAll ();
}
-
+
public void CopySelection ()
{
TreeModel model;
@@ -645,37 +648,37 @@ public void CopySelection ()
}
Clipboard clipboard = Clipboard.Get (Atom.Intern ("CLIPBOARD", false));
clipboard.Text = sb.ToString ();
-
+
clipboard = Clipboard.Get (Atom.Intern ("PRIMARY", false));
clipboard.Text = sb.ToString ();
}
-
+
public string ItemName {
get {
return GettextCatalog.GetString ("Search Result");
}
}
-
+
public NavigationPoint GetNextLocation ()
{
TreeIter iter;
TreePath[] path = treeviewSearchResults.Selection.GetSelectedRows ();
if (path != null && path.Length > 0 && store.GetIter (out iter, path[0])) {
- if (!store.IterNext (ref iter))
+ if (!store.IterNext (ref iter))
store.GetIterFirst (out iter);
} else {
store.GetIterFirst (out iter);
}
-
+
return GetLocation (iter);
}
-
+
public NavigationPoint GetPreviousLocation ()
{
TreeIter iter;
TreeIter prevIter = TreeIter.Zero;
TreePath selPath = treeviewSearchResults.Selection.GetSelectedRows ().LastOrDefault ();
-
+
bool hasNext = store.GetIterFirst (out iter);
if (hasNext && IsIterSelected (selPath, iter))
selPath = null;
@@ -685,7 +688,7 @@ public NavigationPoint GetPreviousLocation ()
prevIter = iter;
hasNext = store.IterNext (ref iter);
}
-
+
return GetLocation (prevIter);
}
@@ -708,13 +711,13 @@ NavigationPoint GetLocation (TreeIter iter)
return null;
return new SearchTextFileNavigationPoint (searchResult.FileName, location.Line, location.Column);
}
-
- class SearchTextFileNavigationPoint : TextFileNavigationPoint
+
+ class SearchTextFileNavigationPoint : TextFileNavigationPoint
{
public SearchTextFileNavigationPoint (FilePath file, int line, int column) : base (file, line, column)
{
}
-
+
protected override async Task DoShow ()
{
var doc = await base.DoShow ();
@@ -725,10 +728,10 @@ public SearchTextFileNavigationPoint (FilePath file, int line, int column) : bas
doc.DisableAutoScroll ();
JumpToCurrentLocation (textView);
});
-
+
return doc;
}
-
+
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontChooserPanelWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontChooserPanelWidget.cs
index fa40fab0c26..0195fb5a46d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontChooserPanelWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontChooserPanelWidget.cs
@@ -1,21 +1,21 @@
-//
+//
// FontChooserPanelWidget.cs
-//
+//
// Author:
// Mike Krüger
-//
+//
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -33,8 +33,8 @@
using Xwt.Drawing;
#if MAC
-using AppKit;
-using Foundation;
+//using AppKit; oe REMOVED...
+//using Foundation; oe REMOVED...
#endif
namespace MonoDevelop.Ide.Fonts
@@ -44,19 +44,19 @@ public partial class FontChooserPanelWidget : Gtk.Bin
Dictionary selectedFonts = new Dictionary ();
Dictionary customFonts = new Dictionary ();
-
+
public void SetFont (string fontName, string fontDescription)
{
customFonts [fontName] = fontDescription;
IdeServices.FontService.SetFont (fontName, fontDescription);
}
-
+
public string GetFont (string fontName)
{
if (customFonts.ContainsKey (fontName))
return customFonts [fontName];
-
+
return IdeServices.FontService.GetUnderlyingFontName (fontName);
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExecutionModeComboBox.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExecutionModeComboBox.cs
index c8d022c9c96..62e1dfc0102 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExecutionModeComboBox.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExecutionModeComboBox.cs
@@ -1,21 +1,21 @@
-//
+//
// ExecutionModeComboBox.cs
-//
+//
// Author:
// Lluis Sanchez Gual
-//
+//
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -30,7 +30,9 @@
using MonoDevelop.Core.Execution;
using MonoDevelop.Ide.Execution;
using MonoDevelop.Core;
-
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Gui.Components
{
@@ -38,26 +40,26 @@ namespace MonoDevelop.Ide.Gui.Components
public partial class ExecutionModeComboBox : Gtk.Bin
{
List modes = new List ();
-
+
public event EventHandler SelectionChanged;
-
+
public ExecutionModeComboBox ()
{
this.Build ();
-
+
comboMode.RowSeparatorFunc = delegate (TreeModel model, TreeIter iter) {
string item = (string) comboMode.Model.GetValue (iter, 0);
return item == "--";
};
}
-
+
public delegate bool ExecutionModeIncludeFilter (IExecutionMode mode);
-
+
public void Load (CommandExecutionContext ctx, bool includeDefault, bool includeDefaultCustomizer)
{
Load (ctx, includeDefault, includeDefaultCustomizer, null);
}
-
+
public void Load (CommandExecutionContext ctx, bool includeDefault, bool includeDefaultCustomizer, ExecutionModeIncludeFilter filter)
{
bool separate = false;
@@ -84,13 +86,13 @@ protected virtual void OnComboModeChanged (object sender, System.EventArgs e)
if (SelectionChanged != null)
SelectionChanged (this, e);
}
-
+
public bool IsDefaultSelected {
get {
return comboMode.Active != -1 && SelectedMode == null;
}
}
-
+
public IExecutionMode SelectedMode {
get {
if (comboMode.Active == -1)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
index 006571c6d03..7182dfa744a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
@@ -1,34 +1,34 @@
-//
-// ExtensibleTreeView.cs
-//
-// Author:
-// Lluis Sanchez Gual
-// Mike Krüger
-//
-// Copyright (C) 2005-2008 Novell, Inc (http://www.novell.com)
-//
-// 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.
-//
-
-//#define TREE_VERIFY_INTEGRITY
-
+//
+// ExtensibleTreeView.cs
+//
+// Author:
+// Lluis Sanchez Gual
+// Mike Krüger
+//
+// Copyright (C) 2005-2008 Novell, Inc (http://www.novell.com)
+//
+// 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.
+//
+
+//#define TREE_VERIFY_INTEGRITY
+
using System;
using System.Collections;
using System.Collections.Generic;
@@ -39,10 +39,15 @@
using MonoDevelop.Components.Commands;
using MonoDevelop.Core;
using MonoDevelop.Ide.Commands;
-using MonoDevelop.Ide.Extensions;
+using MonoDevelop.Ide.Extensions;
using MonoDevelop.Ide.Gui.Pads;
using MonoDevelop.Projects.Extensions;
-
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#else
+using TreeModel = Gtk.TreeModel;
+#endif
+
namespace MonoDevelop.Ide.Gui.Components
{
public partial class ExtensibleTreeView : Control, ICommandRouter
@@ -303,7 +308,7 @@ bool Checker ()
}
#endif
- static void SetIconCellData (Gtk.TreeViewColumn col, Gtk.CellRenderer renderer, Gtk.TreeModel model, Gtk.TreeIter it)
+ static void SetIconCellData (Gtk.TreeViewColumn col, Gtk.CellRenderer renderer, TreeModel model, Gtk.TreeIter it)
{
if (model == null)
return;
@@ -321,7 +326,7 @@ static void SetIconCellData (Gtk.TreeViewColumn col, Gtk.CellRenderer renderer,
cell.OverlayTopRight = info.OverlayTopRight;
}
- static void SetTextCellData (Gtk.TreeViewColumn col, Gtk.CellRenderer renderer, Gtk.TreeModel model, Gtk.TreeIter it)
+ static void SetTextCellData (Gtk.TreeViewColumn col, Gtk.CellRenderer renderer, TreeModel model, Gtk.TreeIter it)
{
if (model == null)
return;
@@ -835,7 +840,7 @@ public void AddNodeInsertCallback (object dataObject, TreeNodeCallback callback)
callback (GetNodeAtObject (dataObject));
return;
}
-
+
if (callbacks.TryGetValue (dataObject, out var list)) {
list.Add (callback);
} else {
@@ -1268,12 +1273,12 @@ public void PasteToCurrentItem ()
try {
LockUpdates ();
- var node = (TreeNodeNavigator) GetSelectedNode ();
-
- if (!TryHandlePaste(node, copyObjects, currentTransferOperation, false, false)) {
- // if the current node can't handle the data, try to paste it into the parent node
- if (node.MoveToParent ())
- TryHandlePaste (node, copyObjects, currentTransferOperation, false, true);
+ var node = (TreeNodeNavigator) GetSelectedNode ();
+
+ if (!TryHandlePaste(node, copyObjects, currentTransferOperation, false, false)) {
+ // if the current node can't handle the data, try to paste it into the parent node
+ if (node.MoveToParent ())
+ TryHandlePaste (node, copyObjects, currentTransferOperation, false, true);
}
if (currentTransferOperation == DragOperation.Move)
CancelTransfer ();
@@ -1288,34 +1293,34 @@ internal void UpdatePasteToCurrentItem (CommandInfo info)
if (editingText) {
info.Bypass = true;
return;
- }
+ }
var node = (TreeNodeNavigator)GetSelectedNode ();
info.Enabled = TryHandlePaste (node, copyObjects, currentTransferOperation, true, false);
// if the current node can't handle the data, see if the parent can
- if (!info.Enabled && node.MoveToParent ())
+ if (!info.Enabled && node.MoveToParent ())
info.Enabled = TryHandlePaste (node, copyObjects, currentTransferOperation, true, true);
- }
-
- static bool TryHandlePaste (TreeNodeNavigator node, object[] copyObjects, DragOperation currentTransferOperation, bool simulatePaste, bool parentDrop)
- {
- if (node == null || copyObjects == null || copyObjects.Length == 0)
- return false;
- var pos = node.CurrentPosition;
+ }
+
+ static bool TryHandlePaste (TreeNodeNavigator node, object[] copyObjects, DragOperation currentTransferOperation, bool simulatePaste, bool parentDrop)
+ {
+ if (node == null || copyObjects == null || copyObjects.Length == 0)
+ return false;
+ var pos = node.CurrentPosition;
foreach (var b in node.NodeBuilderChain) {
var handler = b.CommandHandler;
- handler.SetCurrentNode (node);
- if (parentDrop && !handler.CanHandleDropFromChild (copyObjects, currentTransferOperation, DropPosition.Into))
+ handler.SetCurrentNode (node);
+ if (parentDrop && !handler.CanHandleDropFromChild (copyObjects, currentTransferOperation, DropPosition.Into))
return false;
if (handler.CanDropMultipleNodes (copyObjects, currentTransferOperation, DropPosition.Into)) {
if (!simulatePaste) {
node.MoveToPosition (pos);
handler.OnMultipleNodeDrop (copyObjects, currentTransferOperation, DropPosition.Into);
}
- return true;
+ return true;
}
node.MoveToPosition (pos);
- }
- return false;
+ }
+ return false;
}
void CancelTransfer ()
@@ -1595,7 +1600,7 @@ TypeNodeBuilder GetTypeNodeBuilder (Gtk.TreeIter iter)
return null;
}
- internal int CompareNodes (Gtk.TreeModel model, Gtk.TreeIter a, Gtk.TreeIter b)
+ internal int CompareNodes (TreeModel model, Gtk.TreeIter a, Gtk.TreeIter b)
{
sorting = true;
try {
@@ -1986,7 +1991,7 @@ CommandEntrySet BuildEntrySet ()
ctx.RegisterCondition ("ItemType", new ItemTypeCondition (tnav.DataItem.GetType (), contextMenuTypeNameAliases));
if (tnav.DataItem is MonoDevelop.Projects.IFileItem fileItem) {
var fileTypeCondition = new FileTypeCondition ();
- fileTypeCondition.SetFileName (fileItem.FileName);
+ fileTypeCondition.SetFileName (fileItem.FileName);
ctx.RegisterCondition ("FileType", fileTypeCondition);
}
@@ -2064,7 +2069,7 @@ public void CollapseTree ()
void OnKeyPress (object o, Gtk.KeyPressEventArgs args)
{
HideStatusMessage ();
-
+
if (args.Event.Key == Gdk.Key.Delete || args.Event.Key == Gdk.Key.KP_Delete) {
DeleteCurrentItem ();
args.RetVal = true;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/PadTreeView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/PadTreeView.cs
index f4ff469969b..34d4f65f342 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/PadTreeView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/PadTreeView.cs
@@ -1,21 +1,21 @@
-//
+//
// PadTreeView.cs
-//
+//
// Author:
// Michael Hutchinson
-//
+//
// Copyright (c) 2009 Novell, Inc. (http://www.novell.com)
-//
+//
// 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
@@ -30,6 +30,9 @@
using Gtk;
using MonoDevelop.Components;
using MonoDevelop.Core;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Gui.Components
{
@@ -55,7 +58,7 @@ public PadTreeView ()
{
Init ();
}
-
+
public PadTreeView (TreeModel model) : base (model)
{
Init ();
@@ -93,19 +96,19 @@ protected override void OnDestroyed ()
// Workaround for Bug 1698 - Error list scroll position doesn't reset when list changes, hides items
// If the store of a pad treeview is modified while the pad is unrealized (autohidden), the treeview
- // doesn't update its internal vertical offset. This can lead to items becoming offset outside the
+ // doesn't update its internal vertical offset. This can lead to items becoming offset outside the
// visible area and therefore becoming unreachable. The only way to force the treeview to recalculate
// this offset is by setting the Vadjustment.Value, but it ignores values the same as the current value.
// Therefore we simply set it to something slightly different then back again.
-
+
bool forceInternalOffsetUpdate;
-
+
protected override void OnUnrealized ()
{
base.OnUnrealized ();
forceInternalOffsetUpdate = true;
}
-
+
protected override void OnSizeAllocated (Gdk.Rectangle allocation)
{
base.OnSizeAllocated (allocation);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs
index 2e2f1c595be..2c7929085cf 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/StringTagSelectorButton.cs
@@ -1,21 +1,21 @@
-//
+//
// StringTagSelectorButton.cs
-//
+//
// Author:
// Lluis Sanchez Gual
-//
+//
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -34,7 +34,7 @@
namespace MonoDevelop.Ide.Gui.Components
{
[System.ComponentModel.ToolboxItem(true)]
- public class StringTagSelectorButton : MenuButton
+ public class StringTagSelectorButton : MonoDevelop.Components.MenuButton
{
public StringTagSelectorButton ()
{
@@ -42,9 +42,9 @@ public StringTagSelectorButton ()
}
public StringTagModelDescription TagModel { get; set; }
-
+
public Entry TargetEntry { get; set; }
-
+
void InsertTag (string tag)
{
if (TargetEntry != null) {
@@ -54,7 +54,7 @@ void InsertTag (string tag)
}
}
- ContextMenu CreateMenu(MenuButton button)
+ ContextMenu CreateMenu(MonoDevelop.Components.MenuButton button)
{
if (TagModel == null) {
return null;
@@ -66,10 +66,10 @@ ContextMenu CreateMenu(MenuButton button)
ContextMenu CreateMenu(bool importantOnly)
{
ContextMenu menu = new ContextMenu();
-
+
bool itemsAdded = false;
bool needsSeparator = false;
-
+
foreach (StringTagDescription[] tags in TagModel.GetTagsGrouped ()) {
itemsAdded = false;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/CommonAboutDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/CommonAboutDialog.cs
index bc76c140c9a..380df784ec2 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/CommonAboutDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/CommonAboutDialog.cs
@@ -46,6 +46,9 @@
using System.Collections.Generic;
using MonoDevelop.Components;
+// oe NOTICE the original dialog appears with a very small size, and cannot be resized.
+// oe REVERTED from MD-7.8.
+
namespace MonoDevelop.Ide.Gui.Dialogs
{
public static class AboutDialogImage
@@ -57,8 +60,16 @@ internal class CommonAboutDialog : IdeDialog
{
public CommonAboutDialog ()
{
+
+Console.WriteLine( "oeDEBUG :: CommonAboutDialog ctor" );
+
Name = "wizard_dialog";
- Title = string.Format (GettextCatalog.GetString ("About {0}"), BrandingService.ApplicationName);
+
+ //oe Title = string.Format (GettextCatalog.GetString ("About {0}"), BrandingService.ApplicationName);
+
+ Title = string.Format (GettextCatalog.GetString ("About {0}"), BrandingService.ApplicationLongName);
+ TransientFor = IdeApp.Workbench.RootWindow; // oe REVERTED from monodevelop-7.8
+
AllowGrow = false;
HasSeparator = false;
BorderWidth = 0;
@@ -70,7 +81,7 @@ public CommonAboutDialog ()
notebook.AppendPage (new AboutMonoDevelopTabPage (), new Label (Title));
notebook.AppendPage (new VersionInformationTabPage (), new Label (GettextCatalog.GetString ("Version Information")));
VBox.PackStart (notebook, true, true, 0);
-
+
var copyButton = new Button () { Label = GettextCatalog.GetString ("Copy Information") };
copyButton.Clicked += (sender, e) => CopyBufferToClipboard ();
ActionArea.PackEnd (copyButton, false, false, 0);
@@ -91,6 +102,8 @@ public CommonAboutDialog ()
}
};
backButton.HasDefault = backButton.CanDefault = true;
+
+ ShowAll (); // oe REVERTED from monodevelop-7.8
}
static void CopyBufferToClipboard ()
@@ -120,7 +133,9 @@ void ChangeColor (Gtk.Widget w)
public static void ShowAboutDialog ()
{
+Console.WriteLine( "oeDEBUG :: CommonAboutDialog.ShowAboutDialog()" );
if (Platform.IsMac) {
+Console.WriteLine( "oeDEBUG :: CommonAboutDialog.ShowAboutDialog() IsMac" );
if (instance == null) {
var parent = IdeServices.DesktopService.GetFocusedTopLevelWindow ();
instance = new CommonAboutDialog ();
@@ -141,4 +156,4 @@ public static void ShowAboutDialog ()
MessageService.ShowCustomDialog (dlg);
}
}
-}
\ No newline at end of file
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs
index 94717d200b2..8b6f5e0b7e8 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs
@@ -9,6 +9,9 @@
using MonoDevelop.Components;
using MonoDevelop.Components.AtkCocoaHelper;
using System.Threading.Tasks;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Gui.Dialogs
{
@@ -50,7 +53,7 @@ public DirtyFilesDialog (IReadOnlyList docs, bool closeWorkspace, bool
foreach (Document doc in docs) {
if (!doc.IsDirty)
continue;
-
+
if (groupByProject && doc.Owner != null) {
TreeIter projIter = TreeIter.Zero;
if (projectIters.ContainsKey (doc.Owner))
@@ -70,18 +73,18 @@ public DirtyFilesDialog (IReadOnlyList docs, bool closeWorkspace, bool
}
if (!topCombineIter.Equals (TreeIter.Zero)) {
if (!tsFiles.IterHasChild (topCombineIter))
- tsFiles.Remove (ref topCombineIter);
+ tsFiles.Remove (ref topCombineIter);
}
TreeViewColumn mainColumn = new TreeViewColumn ();
mainColumn.Title = "header";
-
+
togRender = new CellRendererToggle ();
togRender.Toggled += toggled;
mainColumn.PackStart (togRender, false);
mainColumn.AddAttribute (togRender, "active", 1);
mainColumn.AddAttribute (togRender, "inconsistent", 3);
-
+
textRender = new CellRendererText ();
mainColumn.PackStart (textRender, true);
mainColumn.AddAttribute (textRender, "text", 0);
@@ -153,7 +156,7 @@ protected override void OnDestroyed ()
}
base.OnDestroyed ();
}
-
+
async void SaveAndQuit (object o, EventArgs e)
{
Sensitive = false;
@@ -173,7 +176,7 @@ async void SaveAndQuit (object o, EventArgs e)
} finally {
Sensitive = true;
}
-
+
Respond (Gtk.ResponseType.Ok);
Hide ();
}
@@ -198,7 +201,7 @@ void toggled (object o, ToggledArgs e)
tsFiles.SetValue (iter, 1, newsetting);
if (tsFiles.IterHasChild (iter))
ToggleChildren (iter, newsetting);
-
+
TreeIter iterFirst;
tsFiles.GetIterFirst (out iterFirst);
if (tsFiles.IterHasChild (iterFirst))
@@ -226,7 +229,7 @@ void NewCheckStatus (TreeIter iter)
anytrue = true;
lastsetting = newsetting;
}
-
+
tsFiles.SetValue (iter, 3, inconsistant);
tsFiles.SetValue (iter, 1, anytrue);
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsSection.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsSection.cs
index a6785a7cd96..2bfbaa41704 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsSection.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/MimeTypePolicyOptionsSection.cs
@@ -1,21 +1,21 @@
-//
+//
// IMimeTypePolicyOptionsPanel.cs
-//
+//
// Author:
// Lluis Sanchez Gual
-//
+//
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -37,7 +37,10 @@
using MonoDevelop.Projects;
using MonoDevelop.Projects.Policies;
using MonoDevelop.Ide.Extensions;
-
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
+
namespace MonoDevelop.Ide.Gui.Dialogs
{
class MimeTypePolicyOptionsSection: OptionsPanel
@@ -63,22 +66,22 @@ public List Panels {
return panels;
}
}
-
+
public MimeTypePolicyOptionsSection ()
{
}
-
+
public override void Initialize (MonoDevelop.Ide.Gui.Dialogs.OptionsDialog dialog, object dataObject)
{
base.Initialize (dialog, dataObject);
panelData = (MimeTypePanelData) dataObject;
-
+
IPolicyProvider provider = panelData.DataObject as IPolicyProvider;
if (provider == null) {
provider = PolicyService.GetUserDefaultPolicySet ();
isGlobalPolicy = true;
}
-
+
bag = provider.Policies as PolicyBag;
polSet = provider.Policies as PolicySet;
mimeType = panelData.MimeType;
@@ -87,31 +90,31 @@ public override void Initialize (MonoDevelop.Ide.Gui.Dialogs.OptionsDialog dialo
if (IsCustomUserPolicy)
isRoot = false;
}
-
+
public override Control CreatePanelWidget ()
{
HBox hbox = new HBox (false, 6);
Label label = new Label ();
label.MarkupWithMnemonic = GettextCatalog.GetString ("_Policy:");
hbox.PackStart (label, false, false, 0);
-
+
store = new ListStore (typeof (string), typeof (PolicySet));
policyCombo = new ComboBox (store);
CellRenderer renderer = new CellRendererText ();
policyCombo.PackStart (renderer, true);
policyCombo.AddAttribute (renderer, "text", 0);
-
+
label.MnemonicWidget = policyCombo;
policyCombo.RowSeparatorFunc = (TreeModel model, TreeIter iter) =>
((string) model.GetValue (iter, 0)) == "--";
hbox.PackStart (policyCombo, false, false, 0);
-
+
VBox vbox = new VBox (false, 6);
vbox.PackStart (hbox, false, false, 0);
vbox.ShowAll ();
-
+
// Warning message to be shown when the user modifies the default policy
-
+
warningMessage = new HBox ();
warningMessage.Spacing = 6;
var img = new ImageView (Stock.Warning, IconSize.Menu);
@@ -128,20 +131,20 @@ public override Control CreatePanelWidget ()
warningMessage.ShowAll ();
warningMessage.Visible = false;
vbox.PackEnd (warningMessage, false, false, 0);
-
+
notebook = new Notebook ();
// Get the panels for all mime types
-
+
List types = new List ();
types.AddRange (IdeServices.DesktopService.GetMimeTypeInheritanceChain (mimeType));
-
+
panelData.SectionLoaded = true;
panels = panelData.Panels;
foreach (IMimeTypePolicyOptionsPanel panel in panelData.Panels) {
panel.SetParentSection (this);
Widget child = panel.CreateMimePanelWidget ();
-
+
Label tlabel = new Label (panel.Label);
label.Show ();
child.Show ();
@@ -149,7 +152,7 @@ public override Control CreatePanelWidget ()
align.BorderWidth = 6;
align.Add (child);
align.Show ();
-
+
notebook.AppendPage (align, tlabel);
panel.LoadCurrentPolicy ();
}
@@ -159,12 +162,12 @@ public override Control CreatePanelWidget ()
};
notebook.Show ();
vbox.PackEnd (notebook, true, true, 0);
-
+
FillPolicies ();
policyCombo.Active = 0;
-
+
loading = false;
-
+
if (!isRoot && panelData.UseParentPolicy) {
//in this case "parent" is always first in the list
policyCombo.Active = 0;
@@ -172,9 +175,9 @@ public override Control CreatePanelWidget ()
} else {
UpdateSelectedNamedPolicy ();
}
-
+
policyCombo.Changed += HandlePolicyComboChanged;
-
+
return vbox;
}
@@ -182,7 +185,7 @@ void HandlePolicyComboChanged (object sender, EventArgs e)
{
if (loading || synchingPoliciesCombo)
return;
-
+
selectingPolicy = true;
try {
if (policyCombo.Active == 0 && !isRoot) {
@@ -202,14 +205,14 @@ void HandlePolicyComboChanged (object sender, EventArgs e)
selectingPolicy = false;
}
}
-
+
public void FillPolicies ()
{
if (selectingPolicy)
return;
-
+
((ListStore)store).Clear ();
-
+
if (IsCustomUserPolicy) {
store.AppendValues (GettextCatalog.GetString ("System Default"), null);
store.AppendValues ("--", null);
@@ -217,7 +220,7 @@ public void FillPolicies ()
store.AppendValues (GettextCatalog.GetString ("Inherited Policy"), null);
store.AppendValues ("--", null);
}
-
+
setsInCombo.Clear ();
foreach (PolicySet set in panelData.GetSupportedPolicySets ()) {
if (polSet != null && polSet.Name == set.Name)
@@ -227,31 +230,31 @@ public void FillPolicies ()
store.AppendValues (set.Name, set);
setsInCombo.Add (set);
}
-
+
if (setsInCombo.Count > 0)
store.AppendValues ("--", null);
-
+
store.AppendValues (GettextCatalog.GetString ("Custom"), null);
}
-
+
public void UpdateSelectedNamedPolicy ()
{
if (selectingPolicy)
return;
-
+
synchingPoliciesCombo = true;
try {
// Find a policy set which is common to all policy types
-
+
if (!isRoot && panelData.UseParentPolicy) {
policyCombo.Active = 0;
return;
}
-
+
int active = -1;
-
+
PolicySet matchedSet = panelData.GetMatchingSet (setsInCombo);
-
+
TreeIter iter;
int i = 0;
if (matchedSet != null && store.GetIterFirst (out iter)) {
@@ -268,22 +271,22 @@ public void UpdateSelectedNamedPolicy ()
policyCombo.Active = active;
else
policyCombo.Active = store.IterNChildren () - 1;
-
+
warningMessage.Visible = isGlobalPolicy && panelData.Modified;
} finally {
synchingPoliciesCombo = false;
}
}
-
+
bool IsCustomUserPolicy {
get { return ParentDialog is MonoDevelop.Ide.Projects.DefaultPolicyOptionsDialog; }
}
-
+
public override bool IsVisible ()
{
return bag != null || polSet != null;
}
-
+
public override bool ValidateChanges ()
{
foreach (IMimeTypePolicyOptionsPanel panel in panels)
@@ -292,24 +295,24 @@ public override bool ValidateChanges ()
return true;
}
-
+
public override void ApplyChanges ()
{
panelData.ApplyChanges ();
}
}
-
+
class MimeTypePanelData
{
public string MimeType;
- public object DataObject;
- public string TypeDescription;
+ public object DataObject;
+ public string TypeDescription;
public OptionsDialogSection Section;
public MimeTypePolicyOptionsSection SectionPanel;
public List Panels;
public bool SectionLoaded;
public PolicyContainer PolicyContainer;
-
+
public void ApplyChanges ()
{
if (UseParentPolicy) {
@@ -321,13 +324,13 @@ public void ApplyChanges ()
panel.ApplyChanges ();
panel.StorePolicy ();
}
- }
+ }
}
-
+
public PolicySet GetMatchingSet (IEnumerable candidateSets)
{
// Find a policy set which is common to all policy types
-
+
PolicySet matchedSet = null;
bool firstMatch = true;
foreach (IMimeTypePolicyOptionsPanel panel in Panels) {
@@ -343,13 +346,13 @@ public PolicySet GetMatchingSet (IEnumerable candidateSets)
}
return matchedSet;
}
-
+
public bool Modified {
get {
return Panels.Any (p => p.Modified);
}
}
-
+
public IEnumerable GetSupportedPolicySets ()
{
HashSet commonSets = null;
@@ -367,9 +370,9 @@ public IEnumerable GetSupportedPolicySets ()
else
return new PolicySet[0];
}
-
+
bool useParentPolicy;
-
+
public bool UseParentPolicy {
get {
return useParentPolicy;
@@ -389,7 +392,7 @@ public bool UseParentPolicy {
public void SetUseParentPolicy (bool useParentPolicy, System.Type policyType, string scope)
{
- if (useParentPolicy == this.useParentPolicy)
+ if (useParentPolicy == this.useParentPolicy)
return;
this.useParentPolicy = useParentPolicy;
if (useParentPolicy) {
@@ -401,7 +404,7 @@ public void SetUseParentPolicy (bool useParentPolicy, System.Type policyType, st
if (SectionLoaded)
SectionPanel.UpdateSelectedNamedPolicy ();
}
-
+
public void AssignPolicies (PolicySet pset)
{
useParentPolicy = false;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/OptionsDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/OptionsDialog.cs
index 54068f97114..28b08cb045c 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/OptionsDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/OptionsDialog.cs
@@ -34,10 +34,13 @@
using MonoDevelop.Ide.Gui.Components;
using MonoDevelop.Components;
using MonoDevelop.Components.AtkCocoaHelper;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Gui.Dialogs
{
-
+
public partial class OptionsDialog : IdeDialog
{
Gtk.HBox mainHBox;
@@ -57,11 +60,11 @@ public partial class OptionsDialog : IdeDialog
ExtensionContext extensionContext;
HashSet modifiedObjects = new HashSet ();
bool removeEmptySections;
-
+
const string emptyCategoryIcon = "md-prefs-generic";
const Gtk.IconSize treeIconSize = IconSize.Menu;
const Gtk.IconSize headerIconSize = IconSize.Button;
-
+
public object DataObject {
get {
return mainDataObject;
@@ -73,7 +76,7 @@ public ExtensionContext ExtensionContext {
return extensionContext;
}
}
-
+
public HashSet ModifiedObjects {
get { return modifiedObjects; }
}
@@ -81,10 +84,10 @@ public HashSet ModifiedObjects {
public OptionsDialog (string extensionPath): this (null, null, extensionPath)
{
}
-
+
public OptionsDialog (MonoDevelop.Components.Window parentWindow, object dataObject, string extensionPath) : this (parentWindow, dataObject, extensionPath, true)
{}
-
+
public OptionsDialog (MonoDevelop.Components.Window parentWindow, object dataObject, string extensionPath, bool removeEmptySections)
{
buttonCancel = new Gtk.Button (Gtk.Stock.Cancel);
@@ -178,10 +181,10 @@ public OptionsDialog (MonoDevelop.Components.Window parentWindow, object dataObj
this.removeEmptySections = removeEmptySections;
extensionContext = AddinManager.CreateExtensionContext ();
-
+
this.mainDataObject = dataObject;
this.extensionPath = extensionPath;
-
+
ImageService.EnsureStockIconIsLoaded (emptyCategoryIcon);
store = new TreeStore (typeof(OptionsDialogSection));
@@ -203,13 +206,13 @@ public OptionsDialog (MonoDevelop.Components.Window parentWindow, object dataObj
tree.AppendColumn (col);
tree.ExpanderColumn = col;
-
+
tree.Selection.Changed += OnSelectionChanged;
-
+
Child.ShowAll ();
-
+
InitializeContext (extensionContext);
-
+
FillTree ();
ExpandCategories ();
RestoreLastPanel ();
@@ -226,16 +229,16 @@ static void PixbufCellDataFunc (TreeViewColumn col, CellRenderer cell, TreeModel
{
TreeIter parent;
bool toplevel = !model.IterParent (out parent, iter);
-
+
var crp = (CellRendererImage) cell;
crp.Visible = !toplevel;
-
+
if (toplevel) {
return;
}
-
+
var section = (OptionsDialogSection) model.GetValue (iter, 0);
-
+
//HACK: The mimetype panels can't register a single fake stock ID for all the possible image size.
// Instead, give this some awareness of the mime system.
var mimeSection = section as MonoDevelop.Ide.Projects.OptionPanels.MimetypeOptionsDialogSection;
@@ -251,26 +254,26 @@ static void PixbufCellDataFunc (TreeViewColumn col, CellRenderer cell, TreeModel
crp.Image = ImageService.GetIcon (icon, treeIconSize);
}
}
-
+
static void TextCellDataFunc (TreeViewColumn col, CellRenderer cell, TreeModel model, TreeIter iter)
{
TreeIter parent;
bool toplevel = !model.IterParent (out parent, iter);
-
+
var crt = (CellRendererText) cell;
var section = (OptionsDialogSection) model.GetValue (iter, 0);
-
+
if (toplevel) {
crt.Markup = "" + GLib.Markup.EscapeText (section.Label) + "";
} else {
crt.Text = section.Label;
}
}
-
+
protected Control MainBox {
get { return pageFrame; }
}
-
+
protected void ExpandCategories ()
{
TreeIter it;
@@ -281,7 +284,7 @@ protected void ExpandCategories ()
} while (store.IterNext (ref it));
}
}
-
+
public void FillTree ()
{
DetachWidgets ();
@@ -291,7 +294,7 @@ public void FillTree ()
AddSection (section, mainDataObject);
}
}
-
+
protected virtual void InitializeContext (ExtensionContext extensionContext)
{
}
@@ -375,14 +378,14 @@ internal void AddChildSection (IOptionsPanel parent, OptionsDialogSection sectio
}
throw new InvalidOperationException ("Parent options panel not found in the dialog.");
}
-
+
internal void RemoveSection (OptionsDialogSection section)
{
SectionPage page;
if (pages.TryGetValue (section, out page))
RemoveSection (page.Iter);
}
-
+
void RemoveSection (Gtk.TreeIter it)
{
Gtk.TreeIter ci;
@@ -391,7 +394,7 @@ void RemoveSection (Gtk.TreeIter it)
RemoveSection (ci);
} while (store.IterNext (ref ci));
}
-
+
// If the this panel is the selection, select the parent before removing
Gtk.TreeIter itsel;
if (tree.Selection.GetSelected (out itsel)) {
@@ -418,12 +421,12 @@ void RemoveSection (Gtk.TreeIter it)
}
store.Remove (ref it);
}
-
+
internal TreeIter AddSection (OptionsDialogSection section, object dataObject)
{
return AddSection (TreeIter.Zero, section, dataObject);
}
-
+
internal TreeIter AddSection (TreeIter parentIter, OptionsDialogSection section, object dataObject)
{
TreeIter it;
@@ -432,10 +435,10 @@ internal TreeIter AddSection (TreeIter parentIter, OptionsDialogSection section,
} else {
it = store.AppendValues (parentIter,section);
}
-
+
if (!section.CustomNode)
AddChildSections (it, section, dataObject);
-
+
// Remove the section if it doesn't have children nor panels
SectionPage page = CreatePage (it, section, dataObject);
TreeIter cit;
@@ -446,7 +449,7 @@ internal TreeIter AddSection (TreeIter parentIter, OptionsDialogSection section,
}
return it;
}
-
+
internal virtual void AddChildSections (TreeIter parentIter, OptionsDialogSection section, object dataObject)
{
foreach (ExtensionNode nod in section.ChildNodes) {
@@ -454,7 +457,7 @@ internal virtual void AddChildSections (TreeIter parentIter, OptionsDialogSectio
AddSection (parentIter, (OptionsDialogSection) nod, dataObject);
}
}
-
+
void DetachWidgets ()
{
foreach (Gtk.Widget w in pageFrame.Children)
@@ -471,13 +474,13 @@ void DetachWidgets ()
}
}
}
-
+
protected override void OnResponse (ResponseType resp)
{
base.OnResponse (resp);
DetachWidgets ();
}
-
+
protected virtual bool ValidateChanges ()
{
foreach (SectionPage sp in pages.Values) {
@@ -490,7 +493,7 @@ protected virtual bool ValidateChanges ()
}
return true;
}
-
+
protected virtual void ApplyChanges ()
{
foreach (SectionPage sp in pages.Values) {
@@ -500,8 +503,8 @@ protected virtual void ApplyChanges ()
pi.Panel.ApplyChanges ();
}
}
-
-
+
+
void OnSelectionChanged (object s, EventArgs a)
{
TreeIter it;
@@ -512,7 +515,7 @@ void OnSelectionChanged (object s, EventArgs a)
this.UseNativeContextMenus ();
}
}
-
+
bool HasVisiblePanel (OptionsDialogSection section)
{
SectionPage page;
@@ -528,7 +531,7 @@ bool HasVisiblePanel (OptionsDialogSection section)
}
return false;
}
-
+
internal void ShowPage (OptionsDialogSection section, bool forceExpand = false)
{
if (!IsRealized) {
@@ -544,7 +547,7 @@ internal void ShowPage (OptionsDialogSection section, bool forceExpand = false)
SectionPage page;
if (!pages.TryGetValue (section, out page))
return;
-
+
if (page.Panels.Count == 0) {
foreach (ExtensionNode node in section.ChildNodes) {
if (node is OptionsDialogSection) {
@@ -563,7 +566,7 @@ internal void ShowPage (OptionsDialogSection section, bool forceExpand = false)
}
pageFrame.Remove (w);
}
-
+
if (page.Widget == null)
CreatePageWidget (page);
@@ -583,7 +586,7 @@ internal void ShowPage (OptionsDialogSection section, bool forceExpand = false)
((Gtk.Container)page.Widget).Remove (page.Widget);
algn.Add (page.Widget);*/
pageFrame.PackStart (page.Widget, true, true, 0);
-
+
// Ensures that the Shown event is fired for each panel
Container c = page.Widget as Gtk.Container;
if (c != null) {
@@ -601,22 +604,22 @@ internal void ShowPage (OptionsDialogSection section, bool forceExpand = false)
}
tree.Selection.SelectIter (page.Iter);
}
-
+
SectionPage CreatePage (TreeIter it, OptionsDialogSection section, object dataObject)
{
SectionPage page;
if (pages.TryGetValue (section, out page))
return page;
-
+
page = new SectionPage ();
page.Iter = it;
page.Panels = new List ();
pages [section] = page;
-
+
List nodes = new List ();
if (!string.IsNullOrEmpty (section.TypeName) || section.CustomNode)
nodes.Add (section);
-
+
if (!section.CustomNode) {
foreach (ExtensionNode nod in section.ChildNodes) {
OptionsPanelNode node = nod as OptionsPanelNode;
@@ -683,12 +686,12 @@ SectionPage CreatePage (TreeIter it, OptionsDialogSection section, object dataOb
}
return page;
}
-
+
void CreatePageWidget (SectionPage page)
{
List boxPanels = new List ();
List tabPanels = new List ();
-
+
foreach (PanelInstance pi in page.Panels) {
if (pi.Widget == null) {
try {
@@ -706,16 +709,16 @@ void CreatePageWidget (SectionPage page)
}
else if (pi.Widget.Parent != null)
((Gtk.Container) pi.Widget.Parent).Remove (pi.Widget);
-
+
if (pi.Node.Grouping == PanelGrouping.Tab)
tabPanels.Add (pi);
else
boxPanels.Add (pi);
}
-
+
// Try to fit panels with grouping=box or auto in the main page.
// If they don't fit. Move auto panels to its own tab page.
-
+
int mainPageSize;
bool fits;
do {
@@ -741,7 +744,7 @@ void CreatePageWidget (SectionPage page)
}
}
} while (!fits);
-
+
Gtk.VBox box = new VBox (false, 12);
box.Show ();
for (int n=0; n 0) {
@@ -812,7 +815,7 @@ protected virtual void OnButtonOkClicked (object sender, System.EventArgs e)
if (DataObject != null)
modifiedObjects.Add (DataObject);
-
+
this.Respond (ResponseType.Ok);
}
@@ -846,7 +849,7 @@ class PanelInstance
public OptionsPanelNode Node;
public object DataObject;
}
-
+
class SectionPage
{
public List Panels;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/PolicyOptionsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/PolicyOptionsPanel.cs
index d29253f0ca1..dbd99d76304 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/PolicyOptionsPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/PolicyOptionsPanel.cs
@@ -1,11 +1,11 @@
-//
+//
// PolicyOptionsPanel.cs
-//
+//
// Author:
// Michael Hutchinson
-//
+//
// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -13,10 +13,10 @@
// 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
@@ -37,7 +37,10 @@
using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Projects;
using MonoDevelop.Projects.Policies;
-
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
+
namespace MonoDevelop.Ide.Gui.Dialogs
{
public abstract class PolicyOptionsPanel : ItemOptionsPanel, IOptionsPanel where T : class, IEquatable, new ()
@@ -54,11 +57,11 @@ namespace MonoDevelop.Ide.Gui.Dialogs
Widget policyPanel;
bool policyUndefined;
List setsInCombo = new List ();
-
+
public PolicyOptionsPanel ()
{
}
-
+
Control IOptionsPanel.CreatePanelWidget ()
{
HBox hbox = new HBox (false, 6);
@@ -66,7 +69,7 @@ Control IOptionsPanel.CreatePanelWidget ()
string displayName = polSet != null? GettextCatalog.GetString ("_Policy") : PolicyTitleWithMnemonic;
label.MarkupWithMnemonic = "" + displayName + ":";
hbox.PackStart (label, false, false, 0);
-
+
store = new ListStore (typeof (string), typeof (PolicySet));
policyCombo = new ComboBox (store);
CellRenderer renderer = new CellRendererText ();
@@ -78,16 +81,16 @@ Control IOptionsPanel.CreatePanelWidget ()
policyCombo.RowSeparatorFunc = (TreeModel model, TreeIter iter) =>
((string) model.GetValue (iter, 0)) == "--";
hbox.PackStart (policyCombo, false, false, 0);
-
+
VBox vbox = new VBox (false, 6);
vbox.PackStart (hbox, false, false, 0);
vbox.ShowAll ();
-
+
FillPolicies ();
policyCombo.Active = 0;
// Message to be shown when the user changes default policies
-
+
warningMessage = new HBox ();
warningMessage.Spacing = 6;
var img = new ImageView (Stock.Warning, IconSize.LargeToolbar);
@@ -104,30 +107,30 @@ Control IOptionsPanel.CreatePanelWidget ()
warningMessage.ShowAll ();
warningMessage.Visible = false;
vbox.PackEnd (warningMessage, false, false, 0);
-
+
policyPanel = CreatePanelWidget ();
//HACK: work around bug 469427 - broken themes match on widget names
if (policyPanel.Name.IndexOf ("Panel") > 0)
policyPanel.Name = policyPanel.Name.Replace ("Panel", "_");
vbox.PackEnd (policyPanel, true, true, 0);
-
+
InitializePolicy ();
loading = false;
-
+
if (!IsRoot && !policyContainer.DirectHas ()) {
//in this case "parent" is always first in the list
policyCombo.Active = 0;
} else {
UpdateSelectedNamedPolicy ();
}
-
+
policyCombo.Changed += HandlePolicyComboChanged;
var widget = new PolicyOptionsWidgetContainer (vbox);
return widget;
}
-
+
void LoadPolicy (T policy)
{
if (policy == null) {
@@ -161,18 +164,18 @@ T GetDefaultValue ()
else
return PolicyService.GetDefaultPolicy ();
}
-
+
T GetCurrentValue ()
{
if (policyUndefined)
return null;
return policyContainer.Get () ?? GetDefaultValue ();
}
-
+
void FillPolicies ()
{
((ListStore)store).Clear ();
-
+
if (IsCustomUserPolicy) {
store.AppendValues (GettextCatalog.GetString ("System Default"), null);
store.AppendValues ("--", null);
@@ -181,7 +184,7 @@ void FillPolicies ()
store.AppendValues (GettextCatalog.GetString ("Parent Policy"), null);
store.AppendValues ("--", null);
}
-
+
setsInCombo.Clear ();
foreach (PolicySet set in PolicyService.GetPolicySets ()) {
if (polSet != null && set.Name == polSet.Name)
@@ -191,22 +194,22 @@ void FillPolicies ()
store.AppendValues (set.Name, set);
setsInCombo.Add (set);
}
-
+
if (setsInCombo.Count > 0)
store.AppendValues ("--", null);
-
+
store.AppendValues (GettextCatalog.GetString ("Custom"), null);
}
-
+
T GetSelectedPolicy ()
{
int active = policyCombo.Active;
-
+
if (active == 0 && !IsRoot)
return bag.Owner.ParentFolder.Policies.Get ();
if (active == 0 && IsCustomUserPolicy)
return null;
-
+
TreeIter iter;
int i = 0;
if (store.GetIterFirst (out iter)) {
@@ -220,24 +223,24 @@ T GetSelectedPolicy ()
i++;
} while (store.IterNext (ref iter));
}
-
+
return null;
}
-
+
public void UpdateSelectedNamedPolicy ()
{
if (loading)
return;
-
+
if (policyUndefined) {
policyCombo.Active = 0;
return;
}
-
+
T pol = GetPolicy ();
-
+
PolicySet s = PolicyService.GetMatchingSet (pol, setsInCombo, false);
-
+
int active = -1;
TreeIter iter;
int i = 0;
@@ -251,38 +254,38 @@ public void UpdateSelectedNamedPolicy ()
i++;
} while (store.IterNext (ref iter));
}
-
+
if (active != -1)
policyCombo.Active = active;
else
policyCombo.Active = store.IterNChildren () - 1;
warningMessage.Visible = isGlobalPolicy && !((IEquatable)pol).Equals (GetCurrentValue ());
}
-
+
protected abstract string PolicyTitleWithMnemonic { get; }
-
+
public override bool IsVisible ()
{
return bag != null || polSet != null;
}
-
+
bool IsRoot {
get {
return policyContainer.IsRoot;
}
}
-
+
bool UseParentPolicy {
get { return !IsRoot && policyCombo.Active == 0; }
}
-
+
bool IsCustomUserPolicy {
get { return ParentDialog is MonoDevelop.Ide.Projects.DefaultPolicyOptionsDialog; }
}
-
+
protected abstract void LoadFrom (T policy);
protected abstract T GetPolicy ();
-
+
public override void Initialize (MonoDevelop.Ide.Gui.Dialogs.OptionsDialog dialog, object dataObject)
{
base.Initialize (dialog, dataObject);
@@ -296,10 +299,10 @@ public override void Initialize (MonoDevelop.Ide.Gui.Dialogs.OptionsDialog dialo
policyContainer = provider.Policies;
bag = policyContainer as PolicyBag;
polSet = policyContainer as PolicySet;
-
+
policyContainer.PolicyChanged += HandlePolicyContainerPolicyChanged;
}
-
+
public override void Dispose ()
{
base.Dispose ();
@@ -314,13 +317,13 @@ void HandlePolicyContainerPolicyChanged (object sender, PolicyChangedEventArgs e
UpdateSelectedNamedPolicy ();
}
}
-
+
void InitializePolicy ()
{
policyUndefined = IsCustomUserPolicy && !polSet.DirectHas ();
LoadPolicy (GetCurrentValue ());
}
-
+
public override void ApplyChanges ()
{
loading = true;
@@ -332,7 +335,7 @@ public override void ApplyChanges ()
polSet.Set (GetPolicy ());
return;
}
-
+
if (UseParentPolicy) {
bag.Remove ();
} else {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SelectEncodingsDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SelectEncodingsDialog.cs
index 49d05ac575b..16ab6938e76 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SelectEncodingsDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SelectEncodingsDialog.cs
@@ -13,10 +13,10 @@
// 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
@@ -33,6 +33,9 @@
using System.Text;
using System.Collections.Generic;
using MonoDevelop.Projects.Text;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide
{
@@ -40,7 +43,7 @@ internal partial class SelectEncodingsDialog: Gtk.Dialog
{
ListStore storeAvail;
ListStore storeSelected;
-
+
public SelectEncodingsDialog ()
{
Build ();
@@ -49,17 +52,17 @@ public SelectEncodingsDialog ()
listAvail.Model = storeAvail;
listAvail.AppendColumn ("Name", new Gtk.CellRendererText (), "text", 0);
listAvail.AppendColumn ("Encoding", new Gtk.CellRendererText (), "text", 1);
-
+
storeSelected = new ListStore (typeof(string), typeof(string), typeof(int));
listSelected.Model = storeSelected;
listSelected.AppendColumn ("Name", new Gtk.CellRendererText (), "text", 0);
listSelected.AppendColumn ("Encoding", new Gtk.CellRendererText (), "text", 1);
-
+
foreach (var e in Encoding.GetEncodings ()) {
var enc = e.GetEncoding ();
storeAvail.AppendValues (enc.EncodingName, enc.WebName, e.CodePage);
}
-
+
foreach (var e in TextEncoding.ConversionEncodings) {
var enc = e.Encoding;
storeSelected.AppendValues (enc.EncodingName, enc.WebName, enc.CodePage);
@@ -68,14 +71,14 @@ public SelectEncodingsDialog ()
LoggingService.LogError (ex.ToString ());
}
}
-
-
+
+
protected void OnRespond (object o, ResponseArgs args)
{
if (args.ResponseId != Gtk.ResponseType.Ok)
return;
-
+
TreeIter iter;
var list = new List ();
if (storeSelected.GetIterFirst (out iter)) {
@@ -86,12 +89,12 @@ protected void OnRespond (object o, ResponseArgs args)
}
TextEncoding.ConversionEncodings = list.Select (TextEncoding.GetEncoding).ToArray ();
}
-
+
protected void OnAddClicked (object ob, EventArgs args)
{
MoveItem (listAvail, storeAvail, listSelected, storeSelected);
}
-
+
protected void OnRemoveClicked (object ob, EventArgs args)
{
MoveItem (listSelected, storeSelected, listAvail, storeAvail);
@@ -113,55 +116,55 @@ void EnsureItemIsSelected ()
}
}
}
-
+
void MoveItem (TreeView sourceList, ListStore sourceStore, TreeView targetList, ListStore targetStore)
{
TreeModel model;
TreeIter iter;
-
+
if (sourceList.Selection.GetSelected (out model, out iter)) {
TreeIter newiter = targetStore.AppendValues (sourceStore.GetValue (iter, 0), sourceStore.GetValue (iter, 1), sourceStore.GetValue (iter, 2));
targetList.Selection.SelectIter (newiter);
-
+
TreeIter oldIter = iter;
if (sourceStore.IterNext (ref iter))
sourceList.Selection.SelectIter (iter);
sourceStore.Remove (ref oldIter);
}
}
-
+
protected void OnUpClicked (object ob, EventArgs args)
{
TreeModel model;
TreeIter iter;
-
- if (listSelected.Selection.GetSelected (out model, out iter)) {
+
+ if (listSelected.Selection.GetSelected (out model, out iter)) {
TreePath iterPath = storeSelected.GetPath (iter);
TreeIter oldIter;
- if (storeSelected.GetIterFirst (out oldIter)) {
+ if (storeSelected.GetIterFirst (out oldIter)) {
if (storeSelected.GetPath (oldIter).Equals (iterPath))
return;
-
+
TreeIter prevIter;
-
+
do {
prevIter = oldIter;
if (!storeSelected.IterNext (ref oldIter))
- return;
- }
+ return;
+ }
while (!storeSelected.GetPath (oldIter).Equals (iterPath));
storeSelected.Swap (prevIter, iter);
}
-
+
storeSelected.Swap (oldIter, iter);
}
}
-
+
protected void OnDownClicked (object ob, EventArgs args)
{
TreeModel model;
TreeIter iter;
-
+
if (listSelected.Selection.GetSelected (out model, out iter)) {
TreeIter oldIter = iter;
if (storeSelected.IterNext (ref iter))
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SetupApp.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SetupApp.cs
index 93d162f65f5..927ffb5482e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SetupApp.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SetupApp.cs
@@ -29,7 +29,11 @@
using System;
using Mono.Addins;
using Mono.Addins.Setup;
+#if GTK3
+using Mono.Addins.GuiGtk3;
+#else
using Mono.Addins.Gui;
+#endif
using MonoDevelop.Core;
using System.Threading.Tasks;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs
index 4a8ea031097..42324b608de 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs
@@ -13,7 +13,7 @@
// 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.
//
@@ -36,6 +36,9 @@
using Gtk;
using MonoDevelop.Components;
using MonoDevelop.Components.AtkCocoaHelper;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Gui.OptionPanels
{
@@ -49,7 +52,7 @@ public partial class KeyBindingsPanel : Gtk.Bin, IOptionsPanel
static readonly int iconCol = 5;
static readonly int iconVisibleCol = 6;
static readonly int visibleCol = 7;
-
+
bool accelIncomplete = false;
bool accelComplete = false;
TreeStore keyStore;
@@ -57,7 +60,7 @@ public partial class KeyBindingsPanel : Gtk.Bin, IOptionsPanel
KeyBindingSet currentBindings;
bool internalUpdate;
List schemes;
-
+
TreeModelFilter filterModel;
bool filterChanged;
string[] processedFilterTerms;
@@ -69,15 +72,15 @@ public partial class KeyBindingsPanel : Gtk.Bin, IOptionsPanel
Dictionary> conflicts;
CellRendererKeyButtons bindingRenderer;
-
+
public KeyBindingsPanel ()
{
this.Build ();
-
+
keyStore = new TreeStore (typeof (Command), typeof (string), typeof (string), typeof (string), typeof (int), typeof(string), typeof(bool), typeof (bool));
keyTreeView.Model = filterModel = new TreeModelFilter (keyStore, null);
filterModel.VisibleColumn = visibleCol;
-
+
TreeViewColumn col = new TreeViewColumn ();
col.Title = GettextCatalog.GetString ("Command");
col.Spacing = 4;
@@ -90,7 +93,7 @@ public KeyBindingsPanel ()
col.AddAttribute (crt, "text", labelCol);
col.AddAttribute (crt, "weight", boldCol);
keyTreeView.AppendColumn (col);
-
+
bindingTVCol = new TreeViewColumn ();
bindingTVCol.Title = GettextCatalog.GetString ("Key Binding");
bindingRenderer = new CellRendererKeyButtons (this);
@@ -99,11 +102,11 @@ public KeyBindingsPanel ()
bindingTVCol.AddAttribute (bindingRenderer, "text", bindingCol);
bindingTVCol.AddAttribute (bindingRenderer, "command", commandCol);
keyTreeView.AppendColumn (bindingTVCol);
-
+
keyTreeView.AppendColumn (GettextCatalog.GetString ("Description"), new CellRendererText (), "text", descCol);
-
+
keyTreeView.Selection.Changed += OnKeysTreeViewSelectionChange;
-
+
accelEntry.KeyPressEvent += OnAccelEntryKeyPress;
accelEntry.KeyReleaseEvent += OnAccelEntryKeyRelease;
accelEntry.Changed += delegate {
@@ -115,10 +118,10 @@ public KeyBindingsPanel ()
currentBindings = KeyBindingService.CurrentKeyBindingSet.Clone ();
schemes = new List (KeyBindingService.Schemes);
-
+
foreach (KeyBindingScheme s in schemes)
schemeCombo.AppendText (s.Name);
-
+
if (schemes.Count > 0) {
schemeCombo.RowSeparatorFunc = (TreeModel model, TreeIter iter) => {
if (model.GetValue (iter, 0) as string == "---")
@@ -191,11 +194,11 @@ void Refilter ()
keyTreeView.ExpandAll ();
keyTreeView.ColumnsAutosize ();
}
-
+
bool Refilter (TreeIter iter, bool allVisible)
{
int visibleCount = 0;
-
+
do {
TreeIter child;
if (keyStore.IterChildren (out child, iter)) {
@@ -214,15 +217,15 @@ bool Refilter (TreeIter iter, bool allVisible)
visibleCount++;
}
} while (keyStore.IterNext (ref iter));
-
+
return visibleCount > 0;
}
-
+
bool IsSearchMatch (string cmp)
{
if (cmp == null)
return false;
-
+
var lower = cmp.ToLower ();
foreach (var term in processedFilterTerms)
if (!lower.Contains (term))
@@ -246,7 +249,7 @@ void SelectCurrentScheme ()
internalUpdate = false;
}
}
-
+
public void ApplyChanges ()
{
KeyBindingService.ResetCurrent (currentBindings);
@@ -258,19 +261,19 @@ public Control CreatePanelWidget ()
{
SortedDictionary commands = new SortedDictionary ();
string translatedOther = GettextCatalog.GetString ("Other");
-
+
foreach (object c in IdeApp.CommandService.GetCommands ()) {
ActionCommand cmd = c as ActionCommand;
if (cmd == null || cmd.CommandArray || cmd.Category == GettextCatalog.GetString ("Hidden"))
continue;
-
+
string key;
-
+
if (cmd.Id is Enum)
key = cmd.Id.GetType () + "." + cmd.Id;
else
key = cmd.Id.ToString ();
-
+
if (commands.ContainsKey (key)) {
if (commands[key].AccelKey == null || commands[key].Text == String.Empty)
commands[key] = cmd;
@@ -278,7 +281,7 @@ public Control CreatePanelWidget ()
commands.Add (key, cmd);
}
}
-
+
List sortedCommands = new List (commands.Values);
sortedCommands.Sort (delegate (Command c1, Command c2) {
string cat1 = c1.Category.Length == 0? translatedOther : c1.Category;
@@ -290,7 +293,7 @@ public Control CreatePanelWidget ()
string t2 = c2.DisplayName;
return t1.CompareTo (t2);
});
-
+
string currentCat = null;
TreeIter icat = TreeIter.Zero;
foreach (Command cmd in sortedCommands) {
@@ -309,7 +312,7 @@ public Control CreatePanelWidget ()
Refilter ();
return this;
}
-
+
void OnKeyBindingSchemeChanged (object sender, EventArgs e)
{
if (internalUpdate)
@@ -317,18 +320,18 @@ void OnKeyBindingSchemeChanged (object sender, EventArgs e)
if (schemeCombo.Active == schemes.Count + 1)
return;
-
+
Command command;
string binding;
TreeIter iter;
-
+
if (!keyStore.GetIterFirst (out iter))
return;
-
+
// Load a key binding template
KeyBindingScheme scheme = KeyBindingService.GetSchemeByName (schemeCombo.ActiveText);
currentBindings = scheme.GetKeyBindingSet ().Clone ();
-
+
do {
TreeIter citer;
keyStore.IterChildren (out citer, iter);
@@ -395,15 +398,15 @@ static bool GetIsFocusSwitchKey (Gdk.EventKey e)
return (e.Key == Gdk.Key.Tab || e.Key == Gdk.Key.ISO_Left_Tab)
&& (e.State == Gdk.ModifierType.None || e.State == Gdk.ModifierType.ShiftMask);
}
-
+
[GLib.ConnectBefore]
void OnAccelEntryKeyPress (object sender, KeyPressEventArgs e)
{
Gdk.Key key = e.Event.Key;
string accel;
-
+
e.RetVal = true;
-
+
if (accelComplete) {
// allow Gtk to handle the TAB combo (a11y: keyboard only users need to be able to move the focus)
if (GetIsFocusSwitchKey (e.Event)) {
@@ -423,7 +426,7 @@ void OnAccelEntryKeyPress (object sender, KeyPressEventArgs e)
return;
}
}
-
+
accelComplete = false;
bool combinationComplete;
accel = KeyBindingManager.AccelLabelFromKey (e.Event, out combinationComplete);
@@ -467,7 +470,7 @@ KeyBindingSelectedEventArgs CurrentSelectedBinding {
CurrentKey = currentSelectedBinding.AllKeys.Count > 0 ? currentSelectedBinding.AllKeys [currentSelectedBinding.SelectedKey] : String.Empty;
}
}
-
+
void OnAccelEntryKeyRelease (object sender, KeyReleaseEventArgs e)
{
if (accelIncomplete)
@@ -495,7 +498,7 @@ void UpdateButtons ()
updateButton.Sensitive = addButton.Sensitive = false;
}
}
-
+
void OnUpdateButtonClick (object sender, EventArgs e)
{
if (CurrentSelectedBinding != null) {
@@ -597,7 +600,7 @@ void SelectCommand (Command cmd)
{
//item may not be visible if the list is filtered
searchEntry.Entry.Text = "";
-
+
TreeIter iter;
if (!keyStore.GetIterFirst (out iter))
return;
@@ -626,7 +629,7 @@ void UpdateWarningLabel ()
var bindings = FindBindings (CurrentKey);
bindings.Remove (CurrentSelectedBinding.Command);
-
+
if (bindings.Count > 0) {
HashSet cmdConflicts = null;
if (IdeApp.CommandService.Conflicts.TryGetValue (CurrentSelectedBinding.Command, out cmdConflicts)) {
@@ -667,7 +670,7 @@ List FindBindings (string accel)
} while (model.IterNext (ref iter));
return bindings;
}
-
+
bool Conflicts (string b1, string b2)
{
// Control+X conflicts with Control+X, Control+X|Y
@@ -685,17 +688,17 @@ bool Conflicts (string b1, string b2)
else
return b1.Substring (0, i) == b2;
}
-
+
public bool ValidateChanges ()
{
return true;
}
-
+
public bool IsVisible ()
{
return true;
}
-
+
public void Initialize (OptionsDialog dialog, object dataObject)
{
}
@@ -720,13 +723,13 @@ public KeyBindingSelectedEventArgs (IEnumerable keys, int selectedKey, C
}
}
- protected override void OnDestroyed()
+ protected override void OnDestroyed()
{
if (bindingRenderer != null) {
bindingRenderer.KeyBindingSelected -= BindingRenderer_KeyBindingSelected;
bindingRenderer = null;
- }
- base.OnDestroyed();
+ }
+ base.OnDestroyed();
}
struct KeyBindingHitTestResult
@@ -741,7 +744,7 @@ struct KeyBindingHitTestResult
class CellRendererKeyButtons : CellRendererText
{
static Pango.FontDescription KeySymbolFont = Styles.DefaultFont.Copy ();
-
+
const int KeyVPadding = 1;
const int KeyHPadding = 6;
const int KeyBgRadius = 3;
@@ -1021,18 +1024,18 @@ public override void GetSize (Widget widget, ref Gdk.Rectangle cell_area, out in
layout.GetPixelSize (out w, out h);
if (height == 0)
height = h + (KeyVPadding * 2) + 1;
-
+
buttonWidth = w + (2 * KeyHPadding);
width += buttonWidth + Spacing;
}
}
}
- protected override void OnDestroyed()
+ protected override void OnDestroyed()
{
- keyBindingsPanel = null;
+ keyBindingsPanel = null;
HideConflictTooltip ();
- base.OnDestroyed();
+ base.OnDestroyed();
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TasksOptionsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TasksOptionsPanel.cs
index 94fd621dd25..695e3d72182 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TasksOptionsPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/TasksOptionsPanel.cs
@@ -13,10 +13,10 @@
// 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
@@ -36,26 +36,29 @@
using MonoDevelop.Components.AtkCocoaHelper;
using MonoDevelop.Ide.Tasks;
using Gtk;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Gui.OptionPanels
{
-
+
partial class TasksPanelWidget : Gtk.Bin
- {
+ {
ListStore tokensStore;
ComboBox comboPriority;
public TasksPanelWidget ()
{
Build ();
-
+
comboPriority = ComboBox.NewText ();
foreach (TaskPriority priority in Enum.GetValues (typeof (TaskPriority)))
comboPriority.AppendText (Enum.GetName (typeof (TaskPriority), priority));
comboPriority.Changed += new EventHandler (Validate);
comboPriority.Show ();
vboxPriority.PackEnd (comboPriority, false, false, 0);
-
+
tokensStore = new ListStore (typeof (string), typeof (int));
tokensTreeView.AppendColumn (String.Empty, new CellRendererText (), "text", 0);
tokensTreeView.Selection.Changed += new EventHandler (OnTokenSelectionChanged);
@@ -63,7 +66,7 @@ public TasksPanelWidget ()
tokensTreeView.SearchColumn = -1; // disable the interactive search
OnTokenSelectionChanged (null, null);
-
+
buttonAdd.Clicked += new EventHandler (AddToken);
buttonChange.Clicked += new EventHandler (ChangeToken);
buttonRemove.Clicked += new EventHandler (RemoveToken);
@@ -100,7 +103,7 @@ void SetupAccessibility ()
colorbuttonNormalPrio.SetCommonAccessibilityAttributes ("TasksPanel.normalColor", label11,
GettextCatalog.GetString ("Select the foreground color for the normal priority tasks"));
}
-
+
void Validate (object sender, EventArgs args)
{
// validate input, if found not allowed chars replace them with '_'
@@ -115,8 +118,8 @@ void Validate (object sender, EventArgs args)
modified += ch;
}
if (entryToken.Text != modified) entryToken.Text = modified;
-
- // look if we allready have this token
+
+ // look if we allready have this token
bool found = false;
foreach (object[] row in tokensStore)
{
@@ -126,9 +129,9 @@ void Validate (object sender, EventArgs args)
break;
}
}
-
+
buttonAdd.Sensitive = (entryToken.Text.Length < 1) || found ? false : true;
-
+
string selectedToken = String.Empty;
int selectedPriority = (int)TaskPriority.Normal;
TreeIter iter;
@@ -138,7 +141,7 @@ void Validate (object sender, EventArgs args)
selectedToken = (string)tokensStore.GetValue (iter, 0);
selectedPriority = (int)tokensStore.GetValue (iter, 1);
}
-
+
if (selectedToken != String.Empty)
{
buttonRemove.Sensitive = true;
@@ -149,7 +152,7 @@ void Validate (object sender, EventArgs args)
buttonRemove.Sensitive = buttonChange.Sensitive = false;
}
}
-
+
void OnTokenSelectionChanged (object sender, EventArgs args)
{
TreeSelection selection = sender as TreeSelection;
@@ -167,14 +170,14 @@ void OnTokenSelectionChanged (object sender, EventArgs args)
}
}
}
-
+
void AddToken (object sender, EventArgs args)
{
TreeIter iter = tokensStore.AppendValues (entryToken.Text, comboPriority.Active);
tokensTreeView.Selection.SelectIter (iter);
Validate (null, null);
}
-
+
void ChangeToken (object sender, EventArgs args)
{
TreeIter iter;
@@ -185,7 +188,7 @@ void ChangeToken (object sender, EventArgs args)
}
Validate (null, null);
}
-
+
void RemoveToken (object sender, EventArgs args)
{
TreeIter iter;
@@ -195,7 +198,7 @@ void RemoveToken (object sender, EventArgs args)
}
Validate (null, null);
}
-
+
public void Load ()
{
foreach (var ctag in CommentTag.SpecialCommentTags)
@@ -215,7 +218,7 @@ public void LoadColors ()
colorbuttonNormalPrio.Color = StringToColor (IdeApp.Preferences.UserTasksNormalPrioColor);
colorbuttonLowPrio.Color = StringToColor (IdeApp.Preferences.UserTasksLowPrioColor);
}
-
+
public void Store ()
{
List tags = new List ();
@@ -223,17 +226,17 @@ public void Store ()
tags.Add (new CommentTag ((string)row[0], (int)row[1]));
CommentTag.SpecialCommentTags = tags;
-
+
IdeApp.Preferences.UserTasksHighPrioColor.Value = ColorToString (colorbuttonHighPrio.Color);
IdeApp.Preferences.UserTasksNormalPrioColor.Value = ColorToString (colorbuttonNormalPrio.Color);
IdeApp.Preferences.UserTasksLowPrioColor.Value = ColorToString (colorbuttonLowPrio.Color);
}
-
+
static string ColorToString (Gdk.Color color)
{
return color.ToString ();
}
-
+
static Gdk.Color StringToColor (string colorStr)
{
string[] rgb = colorStr.Substring (colorStr.IndexOf (':') + 1).Split ('/');
@@ -259,11 +262,11 @@ protected override void OnDestroyed ()
base.OnDestroyed ();
}
}
-
+
internal class TasksOptionsPanel : OptionsPanel
{
TasksPanelWidget widget;
-
+
public override Control CreatePanelWidget ()
{
widget = new TasksPanelWidget ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/ErrorListPad.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/ErrorListPad.cs
index aac3a29b8fe..eb74218e1d4 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/ErrorListPad.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/ErrorListPad.cs
@@ -1,24 +1,24 @@
// ErrorListPad.cs
-//
+//
// Author:
// Todd Berman
// David Makovský
// Lluis Sanchez Gual
-//
+//
// Copyright (c) 2004 Todd Berman
// Copyright (c) 2006 David Makovský
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -57,6 +57,9 @@
using System.Threading.Tasks;
using MonoDevelop.Core.ProgressMonitoring;
using MonoDevelop.Core.Instrumentation;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Gui.Pads
{
@@ -75,7 +78,7 @@ class ErrorListPad : PadContent
Button buildLogBtn;
ToggleButton logBtn;
Label errorBtnLbl, warnBtnLbl, msgBtnLbl, logBtnLbl;
- SearchEntry searchEntry;
+ MonoDevelop.Components.SearchEntry searchEntry;
string currentSearchPattern = null;
Hashtable tasks = new Hashtable ();
int errorCount;
@@ -142,9 +145,9 @@ ToggleButton MakeButton (string image, string name, bool active, out Label label
btn.Child = btnBox;
return btn;
- }
+ }
- Button MakeButton (string image, string name, out Label label)
+ Button MakeButton (string image, string name, out Label label)
{
var btnBox = MakeHBox (image, out label);
@@ -274,7 +277,7 @@ void CreateControl ()
TreeModelFilterVisibleFunc filterFunct = new TreeModelFilterVisibleFunc (FilterTasks);
filter = new TreeModelFilter (store, null);
filter.VisibleFunc = filterFunct;
-
+
sort = new TreeModelSort (filter);
sort.SetSortFunc (VisibleColumns.Type, SeverityIterSort);
sort.SetSortFunc (VisibleColumns.Project, ProjectIterSort);
@@ -332,7 +335,7 @@ void CreateControl ()
}
}
- public override void Dispose ()
+ public override void Dispose ()
{
errorBtn.Toggled -= FilterChanged;
warnBtn.Toggled -= FilterChanged;
@@ -369,8 +372,8 @@ public override void Dispose ()
if (sw != null) {
sw.SizeAllocated -= HandleSwSizeAllocated;
}
-
- base.Dispose ();
+
+ base.Dispose ();
}
void HandleSwSizeAllocated (object o, SizeAllocatedArgs args)
@@ -391,7 +394,7 @@ void HandleControlSizeAllocated (object o, SizeAllocatedArgs args)
}
public ProgressMonitor GetBuildProgressMonitor ()
- {
+ {
if (control == null)
CreateControl ();
@@ -676,11 +679,11 @@ void AddColumns ()
col = view.AppendColumn (GettextCatalog.GetString ("File"), view.TextRenderer);
col.SetCellDataFunc (view.TextRenderer, new Gtk.TreeCellDataFunc (FileDataFunc));
col.Resizable = true;
-
+
col = view.AppendColumn (GettextCatalog.GetString ("Project"), view.TextRenderer);
col.SetCellDataFunc (view.TextRenderer, new Gtk.TreeCellDataFunc (ProjectDataFunc));
col.Resizable = true;
-
+
col = view.AppendColumn (GettextCatalog.GetString ("Path"), view.TextRenderer);
col.SetCellDataFunc (view.TextRenderer, new Gtk.TreeCellDataFunc (PathDataFunc));
col.Resizable = true;
@@ -690,21 +693,21 @@ void AddColumns ()
col.Resizable = true;
}
- static void ToggleDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+ static void ToggleDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter)
{
Gtk.CellRendererToggle toggleRenderer = (Gtk.CellRendererToggle)cell;
- TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
+ TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
if (task == null) {
toggleRenderer.Visible = false;
return;
}
toggleRenderer.Active = task.Completed;
}
-
- static void LineDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+
+ static void LineDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter)
{
Gtk.CellRendererText textRenderer = (Gtk.CellRendererText)cell;
- TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
+ TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
if (task == null) {
textRenderer.Text = "";
return;
@@ -712,10 +715,10 @@ static void LineDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.
SetText (textRenderer, model, iter, task, task.Line != 0 ? task.Line.ToString () : "");
}
- static void DescriptionDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+ static void DescriptionDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter)
{
var textRenderer = (CellRendererText)cell;
- TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
+ TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
var text = model.GetValue (iter, DataColumns.Description) as string;
if (task == null) {
if (model.IterParent (out iter, iter)) {
@@ -732,10 +735,10 @@ static void DescriptionDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cel
SetText (textRenderer, model, iter, task, text);
}
- static void FileDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+ static void FileDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter)
{
Gtk.CellRendererText textRenderer = (Gtk.CellRendererText)cell;
- TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
+ TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
if (task == null) {
textRenderer.Text = "";
return;
@@ -743,22 +746,22 @@ static void FileDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.
SetText (textRenderer, model, iter, task, task.GetFile ());
}
-
- static void ProjectDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+
+ static void ProjectDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter)
{
Gtk.CellRendererText textRenderer = (Gtk.CellRendererText)cell;
- TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
+ TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
if (task == null) {
textRenderer.Text = "";
return;
}
SetText (textRenderer, model, iter, task, task.GetProject ());
}
-
- static void PathDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+
+ static void PathDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter)
{
Gtk.CellRendererText textRenderer = (Gtk.CellRendererText)cell;
- TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
+ TaskListEntry task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
if (task == null) {
textRenderer.Text = "";
return;
@@ -766,7 +769,7 @@ static void PathDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.
SetText (textRenderer, model, iter, task, task.GetPath ());
}
- static void CategoryDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+ static void CategoryDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter)
{
Gtk.CellRendererText textRenderer = (Gtk.CellRendererText)cell;
var task = model.GetValue (iter, DataColumns.Task) as TaskListEntry;
@@ -776,19 +779,19 @@ static void CategoryDataFunc (Gtk.TreeViewColumn column, Gtk.CellRenderer cell,
}
SetText (textRenderer, model, iter, task, task.Category ?? "");
}
-
+
static void SetText (CellRendererText textRenderer, TreeModel model, TreeIter iter, TaskListEntry task, string text)
{
textRenderer.Text = text;
textRenderer.Weight = (int)((bool)model.GetValue (iter, DataColumns.Read) ? Pango.Weight.Normal : Pango.Weight.Bold);
textRenderer.Strikethrough = task.Completed;
}
-
+
void OnCombineOpen(object sender, EventArgs e)
{
Clear();
}
-
+
void OnCombineClosed(object sender, EventArgs e)
{
Clear();
@@ -808,21 +811,21 @@ void OnBuildStarted (object sender, EventArgs e)
{
buildOutput.Clear ();
}
-
+
void OnRowActivated (object o, RowActivatedArgs args)
{
OnTaskJumpto (null, null);
}
-
+
public CompilerResults CompilerResults = null;
-
+
void FilterChanged (object sender, EventArgs e)
{
-
+
ShowErrors.Value = errorBtn.Active;
ShowWarnings.Value = warnBtn.Active;
ShowMessages.Value = msgBtn.Active;
-
+
filter.Refilter ();
}
@@ -857,7 +860,7 @@ bool FilterTasks (TreeModel model, TreeIter iter)
//Not yet fully added
return false;
}
-
+
return canShow;
}
@@ -880,17 +883,17 @@ private void Clear()
UpdateMessagesNum ();
UpdatePadIcon ();
}
-
+
void TaskChanged (object sender, TaskEventArgs e)
{
this.view.QueueDraw ();
}
-
+
void TaskAdded (object sender, TaskEventArgs e)
{
AddTasks (e.Tasks);
}
-
+
public void AddTasks (IEnumerable tasks)
{
int n = 1;
@@ -904,7 +907,7 @@ public void AddTasks (IEnumerable tasks)
}
filter.Refilter ();
}
-
+
public void AddTask (TaskListEntry t)
{
AddTaskInternal (t);
@@ -916,17 +919,17 @@ void AddTaskInternal (TaskListEntry t)
if (tasks.Contains (t)) return;
Xwt.Drawing.Image stock;
-
+
switch (t.Severity) {
case TaskSeverity.Error:
stock = iconError;
errorCount++;
UpdateErrorsNum ();
- break;
+ break;
case TaskSeverity.Warning:
stock = iconWarning;
warningCount++;
- UpdateWarningsNum ();
+ UpdateWarningsNum ();
break;
default:
stock = iconInfo;
@@ -934,7 +937,7 @@ void AddTaskInternal (TaskListEntry t)
UpdateMessagesNum ();
break;
}
-
+
tasks [t] = t;
var indexOfNewLine = t.Description.IndexOfAny (new [] { '\n', '\r' });
@@ -948,7 +951,7 @@ void AddTaskInternal (TaskListEntry t)
UpdatePadIcon ();
}
- void UpdateErrorsNum ()
+ void UpdateErrorsNum ()
{
errorBtnLbl.Text = " " + string.Format(GettextCatalog.GetPluralString("{0} Error", "{0} Errors", errorCount), errorCount);
errorBtn.Accessible.SetTitle (errorBtnLbl.Text);
@@ -975,7 +978,7 @@ void UpdatePadIcon ()
else
Window.Icon = "md-errors-list";
}
-
+
private void ItemToggled (object o, ToggledArgs args)
{
Gtk.TreeIter iter;
@@ -991,27 +994,27 @@ static int SeverityIterSort(TreeModel model, TreeIter a, TreeIter z)
{
TaskListEntry aTask = model.GetValue(a, DataColumns.Task) as TaskListEntry,
zTask = model.GetValue(z, DataColumns.Task) as TaskListEntry;
-
+
return (aTask != null && zTask != null) ?
aTask.Severity.CompareTo(zTask.Severity) :
0;
}
-
+
static int ProjectIterSort (TreeModel model, TreeIter a, TreeIter z)
{
TaskListEntry aTask = model.GetValue (a, DataColumns.Task) as TaskListEntry,
zTask = model.GetValue (z, DataColumns.Task) as TaskListEntry;
-
+
return (aTask != null && zTask != null) ?
string.Compare (aTask.GetProject (), zTask.GetProject (), StringComparison.Ordinal) :
0;
}
-
+
static int FileIterSort (TreeModel model, TreeIter a, TreeIter z)
{
TaskListEntry aTask = model.GetValue (a, DataColumns.Task) as TaskListEntry,
zTask = model.GetValue (z, DataColumns.Task) as TaskListEntry;
-
+
return (aTask != null && zTask != null) ?
aTask.FileName.CompareTo (zTask.FileName) :
0;
@@ -1019,11 +1022,11 @@ static int FileIterSort (TreeModel model, TreeIter a, TreeIter z)
static int CategoryIterSort (TreeModel model, TreeIter a, TreeIter z)
{
- TaskListEntry aTask = model.GetValue (a, DataColumns.Task) as TaskListEntry,
- zTask = model.GetValue (z, DataColumns.Task) as TaskListEntry;
-
- return (aTask?.Category != null && zTask?.Category != null) ?
- string.Compare (aTask.Category, zTask.Category, StringComparison.Ordinal) :
+ TaskListEntry aTask = model.GetValue (a, DataColumns.Task) as TaskListEntry,
+ zTask = model.GetValue (z, DataColumns.Task) as TaskListEntry;
+
+ return (aTask?.Category != null && zTask?.Category != null) ?
+ string.Compare (aTask.Category, zTask.Category, StringComparison.Ordinal) :
0;
}
@@ -1061,7 +1064,7 @@ void HandleBinLogClicked (object sender, EventArgs e)
}
}
- async Task OpenBuildOutputViewDocument ()
+ async Task OpenBuildOutputViewDocument ()
{
if (buildOutputViewContent == null) {
buildOutputViewContent = new BuildOutputViewContent (buildOutput);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/MonodocTreePad.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/MonodocTreePad.cs
index 1d1e920b597..95205b31cf6 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/MonodocTreePad.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads/MonodocTreePad.cs
@@ -36,6 +36,9 @@
using MonoDevelop.Ide.Gui;
using MonoDevelop.Projects;
using MonoDevelop.Components;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Gui.Pads
{
@@ -50,7 +53,7 @@ internal class HelpTree : PadContent
public override string Id {
get { return "MonoDevelop.Ide.Gui.Pads.HelpTree"; }
}
-
+
public HelpTree ()
{
tree_view = new MonoDevelop.Ide.Gui.Components.PadTreeView ();
@@ -58,15 +61,15 @@ public HelpTree ()
tree_view.AppendColumn ("name_col", tree_view.TextRenderer, "text", 0);
tree_view.RowExpanded += new Gtk.RowExpandedHandler (RowExpanded);
tree_view.RowActivated += RowActivated;
-
+
store = new TreeStore (typeof (string), typeof (Node));
tree_view.Model = store;
tree_view.HeadersVisible = false;
-
+
scroller = new MonoDevelop.Components.CompactScrolledWindow ();
scroller.ShadowType = Gtk.ShadowType.None;
scroller.Add (tree_view);
-
+
if (IdeServices.HelpService.HelpTree != null) {
root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), IdeServices.HelpService.HelpTree);
PopulateNode (root_iter);
@@ -110,10 +113,10 @@ void RowActivated (object o, EventArgs e)
{
Gtk.TreeIter iter;
Gtk.TreeModel model;
-
+
if (tree_view.Selection.GetSelected (out model, out iter)) {
var path = store.GetPath (iter);
-
+
if (path.Equals (store.GetPath (root_iter))) return;
if (store.IterHasChild (iter)) {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Shell/DefaultWorkbench.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Shell/DefaultWorkbench.cs
index 253d1f54839..a5ef9d63ac5 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Shell/DefaultWorkbench.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Shell/DefaultWorkbench.cs
@@ -8,17 +8,17 @@
//
// Copyright (C) 2001-2007 Mike Krüger
// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
-//
+//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
-//
+//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
-//
+//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -51,6 +51,7 @@
using MonoDevelop.Ide.Gui.Documents;
using MonoDevelop.Ide.Gui.Shell;
using System.Runtime.CompilerServices;
+using Task = System.Threading.Tasks.Task;
namespace MonoDevelop.Ide.Gui
{
@@ -64,22 +65,22 @@ internal partial class DefaultWorkbench : WorkbenchWindow, ICommandRouter, IInfo
readonly static string viewContentPath = "/MonoDevelop/Ide/Pads";
// readonly static string toolbarsPath = "/MonoDevelop/Ide/Toolbar";
readonly static string stockLayoutsPath = "/MonoDevelop/Ide/WorkbenchLayouts";
-
+
static string configFile = UserProfile.Current.ConfigDir.Combine ("EditingLayout.xml");
const string fullViewModeTag = "[FullViewMode]";
const int MAX_LASTACTIVEWINDOWS = 10;
const int MinimumWidth = 800;
const int MinimumHeight = 540;
-
+
// list of layout names for the current context, without the context prefix
List layouts = new List ();
-
+
List padContentCollection = new List ();
List viewContentCollection = new List ();
Dictionary padWindows = new Dictionary ();
Dictionary padCodons = new Dictionary ();
static readonly ConditionalWeakTable itemToWindow = new ConditionalWeakTable ();
-
+
IWorkbenchWindow lastActive;
bool initialized;
@@ -87,7 +88,7 @@ internal partial class DefaultWorkbench : WorkbenchWindow, ICommandRouter, IInfo
bool? fullScreenState = null;
Rectangle requestedBounds = Rectangle.Empty;
-
+
Gtk.Container rootWidget;
CommandFrame toolbarFrame;
Gtk.VBox infoBarFrame;
@@ -106,7 +107,7 @@ private void DoNotCompile ()
GettextCatalog.GetString ("Default");
}
#endif
-
+
public event EventHandler ActiveWorkbenchWindowChanged;
public event EventHandler WorkbenchTabsChanged;
public event EventHandler NotebookClosed;
@@ -140,7 +141,7 @@ internal SdiDragNotebook TabControl {
tabControl.NavigationButtonsVisible = true;
}
}
-
+
public IWorkbenchWindow ActiveWorkbenchWindow {
get {
if (DockNotebook.ActiveNotebook == null || DockNotebook.ActiveNotebook.CurrentTabIndex < 0 || DockNotebook.ActiveNotebook.CurrentTabIndex >= DockNotebook.ActiveNotebook.TabCount) {
@@ -149,7 +150,7 @@ public IWorkbenchWindow ActiveWorkbenchWindow {
return (IWorkbenchWindow) DockNotebook.ActiveNotebook.CurrentTab.Content;
}
}
-
+
public DockFrame DockFrame {
get { return dock; }
}
@@ -177,7 +178,7 @@ public IList Layouts {
return layouts;
}
}
-
+
public string CurrentLayout {
get {
if (dock != null && dock.CurrentLayout != null) {
@@ -192,21 +193,21 @@ public string CurrentLayout {
}
set {
var oldLayout = dock.CurrentLayout;
-
+
InitializeLayout (value);
dock.CurrentLayout = value;
-
+
DestroyFullViewLayouts (oldLayout);
}
}
-
+
public void DeleteLayout (string name)
{
string layout = name;
layouts.Remove (name);
dock.DeleteLayout (layout);
}
-
+
public List PadContentCollection {
get {
return padContentCollection;
@@ -272,7 +273,7 @@ void SetAppIcons ()
}
}
}
-
+
//built-ins
var appIcon = ImageService.GetIcon (MonoDevelop.Ide.Gui.Stock.MonoDevelop);
Gtk.Window.DefaultIconList = new Gdk.Pixbuf[] {
@@ -290,19 +291,19 @@ public void InitializeWorkspace()
if (!IdeServices.DesktopService.SetGlobalMenu (IdeApp.CommandService, MainMenuPath, AppMenuPath)) {
CreateMenuBar ();
}
-
+
AddinManager.ExtensionChanged += OnExtensionChanged;
// this is no longer used, clear any old values
PropertyService.Set ("MonoDevelop.Core.Gui.CurrentWorkbenchLayout", null);
}
-
+
void OnExtensionChanged (object s, ExtensionEventArgs args)
{
if (args.PathChanged (MainMenuPath) || args.PathChanged (AppMenuPath)) {
if (IdeServices.DesktopService.SetGlobalMenu (IdeApp.CommandService, MainMenuPath, AppMenuPath))
return;
-
+
UninstallMenuBar ();
CreateMenuBar ();
InstallMenuBar ();
@@ -362,7 +363,7 @@ public void AddInfoBar (InfoBarOptions options)
void OnDispose () => deduplicationMap.Remove (dedupId);
}
-
+
public Task ShowView (DocumentController controller, IShellNotebook notebook, object viewCommandHandler)
{
var mimeimage = controller.DocumentIcon?.WithSize (Gtk.IconSize.Menu);
@@ -407,7 +408,7 @@ void ShowPadNode (ExtensionNode node)
ShowPadNode (cn);
}
}
-
+
void RemovePadNode (ExtensionNode node)
{
if (node is PadCodon)
@@ -417,17 +418,17 @@ void RemovePadNode (ExtensionNode node)
RemovePadNode (cn);
}
}
-
+
public void ShowPad (PadCodon content)
{
AddPad (content, true);
}
-
+
public void AddPad (PadCodon content)
{
AddPad (content, false);
}
-
+
void RegisterPad (PadCodon content)
{
if (content.HasId) {
@@ -440,7 +441,7 @@ void RegisterPad (PadCodon content)
}
padContentCollection.Add (content);
}
-
+
void AddPad (PadCodon content, bool show)
{
DockItem item = GetDockItem (content);
@@ -457,7 +458,7 @@ void AddPad (PadCodon content, bool show)
AddPad (content, content.DefaultPlacement, content.DefaultStatus);
}
}
-
+
public void RemovePad (PadCodon codon)
{
if (codon.HasId) {
@@ -479,12 +480,12 @@ public void RemovePad (PadCodon codon)
}
padWindows.Remove (codon);
}
-
+
public void BringToFront (PadCodon content)
{
BringToFront (content, false);
}
-
+
public virtual void BringToFront (PadCodon content, bool giveFocus)
{
if (!IsVisible (content))
@@ -492,7 +493,7 @@ public virtual void BringToFront (PadCodon content, bool giveFocus)
ActivatePad (content, giveFocus);
}
-
+
internal static string GetTitle (SdiWorkspaceWindow window)
{
var controller = window.DocumentController;
@@ -551,7 +552,7 @@ void SetWorkbenchTitle ()
Accessible.SetFilename ("");
}
}
-
+
static string GetDefaultTitle ()
{
if (IdeApp.ProjectOperations.CurrentSelectedProject != null)
@@ -563,7 +564,7 @@ void ApplicationNameChanged (object sender, EventArgs e)
{
SetWorkbenchTitle ();
}
-
+
public ICustomXmlSerializer Memento {
get {
var memento = new WorkbenchMemento (new Properties ());
@@ -584,17 +585,17 @@ public ICustomXmlSerializer Memento {
set {
if (value != null) {
WorkbenchMemento memento = new WorkbenchMemento ((Properties)value);
-
+
requestedBounds = memento.Bounds;
if (requestedBounds.Width < MinimumWidth)
requestedBounds.Width = MinimumWidth;
if (requestedBounds.Height < MinimumHeight)
requestedBounds.Height = MinimumHeight;
IdeServices.DesktopService.PlaceWindow (this, requestedBounds.X, requestedBounds.Y, requestedBounds.Width, requestedBounds.Height);
-
- // HACK: don't restore Gdk.WindowState.Maximized on OS X, because there's a bug in
+
+ // HACK: don't restore Gdk.WindowState.Maximized on OS X, because there's a bug in
// GdkWindow.State that means it doesn't reflect the real state, it only reflects values set
- // internally by GTK e.g. by Maximize calls. Because MD restores state, if it ever becomes
+ // internally by GTK e.g. by Maximize calls. Because MD restores state, if it ever becomes
// Maximized it becomes "stuck" and it's difficult for the user to make it "normal".
if (memento.WindowState == Gdk.WindowState.Maximized && !Platform.IsMac) {
Maximize ();
@@ -640,7 +641,7 @@ void OnClosing (object o, Gtk.DeleteEventArgs e)
IdeApp.Exit ().Ignore ();
}
-
+
public void Close()
{
BrandingService.ApplicationNameChanged -= ApplicationNameChanged;
@@ -686,7 +687,7 @@ public void LockActiveWindowChangeEvent ()
{
activeWindowChangeLock++;
}
-
+
public void UnlockActiveWindowChangeEvent ()
{
activeWindowChangeLock--;
@@ -769,7 +770,7 @@ public PadCodon GetPad(Type type)
}
return null;
}
-
+
public PadCodon GetPad(string id)
{
foreach (PadCodon pad in PadContentCollection) {
@@ -779,13 +780,13 @@ public PadCodon GetPad(string id)
}
return null;
}
-
+
public void InitializeLayout ()
{
AddinManager.AddExtensionNodeHandler (stockLayoutsPath, OnLayoutsExtensionChanged);
-
+
CreateComponents ();
-
+
// Subscribe to changes in the extension
initializing = true;
AddinManager.AddExtensionNodeHandler (viewContentPath, OnExtensionChanged);
@@ -817,7 +818,7 @@ void CreateComponents ()
fullViewVBox.Accessible.SetShouldIgnore (true);
rootWidget = fullViewVBox;
-
+
InstallMenuBar ();
Realize ();
toolbar = IdeServices.DesktopService.CreateMainToolbar (this);
@@ -846,7 +847,7 @@ void CreateComponents ()
IdeApp.Preferences.WorkbenchCompactness.Changed += delegate {
dock.CompactGuiLevel = ((int)IdeApp.Preferences.WorkbenchCompactness.Value) + 1;
};
-
+
/* Side bar is experimental. Disabled for now
HBox hbox = new HBox ();
VBox sideBox = new VBox ();
@@ -862,7 +863,7 @@ void CreateComponents ()
*/
toolbarFrame.Add (dock);
-
+
// Create the notebook for the various documents.
tabControl = new SdiDragNotebook (this);
@@ -897,17 +898,17 @@ void CreateComponents ()
dit.DefaultLocation = "Documents/Left";
dit.Behavior = DockItemBehavior.Locked;
dit.DefaultVisible = false;
-
+
dit = dock.AddItem ("__right");
dit.DefaultLocation = "Documents/Right";
dit.Behavior = DockItemBehavior.Locked;
dit.DefaultVisible = false;
-
+
dit = dock.AddItem ("__top");
dit.DefaultLocation = "Documents/Top";
dit.Behavior = DockItemBehavior.Locked;
dit.DefaultVisible = false;
-
+
dit = dock.AddItem ("__bottom");
dit.DefaultLocation = "Documents/Bottom";
dit.Behavior = DockItemBehavior.Locked;
@@ -980,19 +981,19 @@ void LoadDockStyles ()
dock.UpdateStyles ();
}
-
+
void InitializeLayout (string name)
{
if (!layouts.Contains (name))
layouts.Add (name);
-
+
if (dock.Layouts.Contains (name))
return;
-
+
dock.CreateLayout (name, true);
dock.CurrentLayout = name;
documentDockItem.Visible = true;
-
+
LayoutExtensionNode stockLayout = null;
foreach (LayoutExtensionNode node in AddinManager.GetExtensionNodes (stockLayoutsPath)) {
if (node.Name == name) {
@@ -1000,12 +1001,12 @@ void InitializeLayout (string name)
break;
}
}
-
+
if (stockLayout == null)
return;
-
+
HashSet visible = new HashSet ();
-
+
foreach (LayoutPadExtensionNode pad in stockLayout.ChildNodes) {
DockItem it = dock.GetItem (pad.Id);
if (it != null) {
@@ -1018,7 +1019,7 @@ void InitializeLayout (string name)
visible.Add (pad.Id);
}
}
-
+
foreach (PadCodon node in padContentCollection) {
if (!visible.Contains (node.Id) && node.DefaultLayouts != null && (node.DefaultLayouts.Contains (stockLayout.Id) || node.DefaultLayouts.Contains ("*"))) {
DockItem it = dock.GetItem (node.Id);
@@ -1031,20 +1032,20 @@ void InitializeLayout (string name)
}
}
}
-
+
foreach (DockItem it in dock.GetItems ()) {
if (!visible.Contains (it.Id) && ((it.Behavior & DockItemBehavior.Sticky) == 0) && it != documentDockItem)
it.Visible = false;
}
}
-
+
internal void ShowPopup (DockNotebook notebook, int tabIndex, Gdk.EventButton evt)
{
notebook.CurrentTabIndex = tabIndex;
var entrySet = IdeApp.CommandService.CreateCommandEntrySet ("/MonoDevelop/Ide/ContextMenu/DocumentTab");
IdeApp.CommandService.ShowContextMenu (notebook, evt, entrySet, notebook.CurrentTab.Content);
}
-
+
internal void OnTabsReordered (DockNotebookTab widget, int oldPlacement, int newPlacement)
{
WindowReordered?.Invoke (this, new WindowReorderedEventArgs { OldPosition = oldPlacement, NewPosition = newPlacement });
@@ -1064,7 +1065,7 @@ protected override void OnStyleSet (Gtk.Style previous_style)
base.OnStyleSet (previous_style);
IdeTheme.UpdateStyles ();
}
-
+
protected override bool OnConfigureEvent (Gdk.EventConfigure evnt)
{
SetActiveWidget (Focus);
@@ -1135,7 +1136,7 @@ internal void SetActiveWidget (Widget child)
child = child.Parent;
}
}
-
+
//don't allow the "full view" layouts to persist - they are always derived from the "normal" layout
//else they will diverge
void DestroyFullViewLayouts (string oldLayout)
@@ -1144,7 +1145,7 @@ void DestroyFullViewLayouts (string oldLayout)
dock.DeleteLayout (oldLayout);
}
}
-
+
public void ToggleFullViewMode ()
{
if (IsInFullViewMode) {
@@ -1165,7 +1166,7 @@ public void ToggleFullViewMode ()
protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
{
- return FilterWindowKeypress (evnt) || base.OnKeyPressEvent (evnt);
+ return FilterWindowKeypress (evnt) || base.OnKeyPressEvent (evnt);
}
internal bool FilterWindowKeypress (Gdk.EventKey evnt)
@@ -1218,26 +1219,26 @@ internal bool FilterWindowKeypress (Gdk.EventKey evnt)
}
return false;
}
-
+
void SwitchToDocument (int number)
{
if (DockNotebook.ActiveNotebook == null)
return;
-
+
if (number >= DockNotebook.ActiveNotebook.TabCount || number < 0)
return;
var window = DockNotebook.ActiveNotebook.Tabs [number].Content as IWorkbenchWindow;
if (window != null)
window.SelectWindow ();
}
-
+
bool initializing;
-
+
void OnExtensionChanged (object s, ExtensionNodeEventArgs args)
{
if (initializing)
return;
-
+
if (args.Change == ExtensionChange.Add) {
ShowPadNode (args.ExtensionNode);
}
@@ -1245,7 +1246,7 @@ void OnExtensionChanged (object s, ExtensionNodeEventArgs args)
RemovePadNode (args.ExtensionNode);
}
}
-
+
void OnLayoutsExtensionChanged (object s, ExtensionNodeEventArgs args)
{
if (args.Change == ExtensionChange.Add)
@@ -1253,9 +1254,9 @@ void OnLayoutsExtensionChanged (object s, ExtensionNodeEventArgs args)
else
layouts.Remove (((LayoutExtensionNode)args.ExtensionNode).Name);
}
-
+
#region View management
-
+
internal void CloseClicked (object o, TabEventArgs e)
{
if (e.Tab.Content != null) {
@@ -1292,14 +1293,14 @@ internal void ReorderTab (int oldPlacement, int newPlacement)
#endregion
#region Dock Item management
-
+
public IPadWindow GetPadWindow (PadCodon content)
{
IPadWindow w;
padWindows.TryGetValue (content, out w);
return w;
}
-
+
public bool IsVisible (PadCodon padContent)
{
DockItem item = GetDockItem (padContent);
@@ -1307,7 +1308,7 @@ public bool IsVisible (PadCodon padContent)
return item.Visible;
return false;
}
-
+
public bool IsContentVisible (PadCodon padContent)
{
DockItem item = GetDockItem (padContent);
@@ -1315,14 +1316,14 @@ public bool IsContentVisible (PadCodon padContent)
return item.ContentVisible;
return false;
}
-
+
public void HidePad (PadCodon padContent)
{
DockItem item = GetDockItem (padContent);
- if (item != null)
+ if (item != null)
item.Visible = false;
}
-
+
public void ActivatePad (PadCodon padContent, bool giveFocus)
{
WelcomePage.WelcomePageService.HideWelcomePageOrWindow ();
@@ -1331,7 +1332,7 @@ public void ActivatePad (PadCodon padContent, bool giveFocus)
if (item != null)
item.Present (giveFocus);
}
-
+
public bool IsSticky (PadCodon padContent)
{
DockItem item = GetDockItem (padContent);
@@ -1348,7 +1349,7 @@ public void SetSticky (PadCodon padContent, bool sticky)
item.Behavior &= ~DockItemBehavior.Sticky;
}
}
-
+
internal DockItem GetDockItem (PadCodon content)
{
if (padContentCollection.Contains (content)) {
@@ -1357,7 +1358,7 @@ internal DockItem GetDockItem (PadCodon content)
}
return null;
}
-
+
void CreatePadContent (bool force, PadCodon padCodon, PadWindow window, DockItem item)
{
if (force || item.Content == null) {
@@ -1371,7 +1372,7 @@ void CreatePadContent (bool force, PadCodon padCodon, PadWindow window, DockItem
item.Content = router;
}
}
-
+
string ToDockLocation (string loc)
{
string location = "";
@@ -1387,7 +1388,7 @@ string ToDockLocation (string loc)
}
return location;
}
-
+
void AddPad (PadCodon padCodon, string placement, DockItemStatus defaultStatus)
{
RegisterPad (padCodon);
@@ -1396,11 +1397,11 @@ void AddPad (PadCodon padCodon, string placement, DockItemStatus defaultStatus)
window.Icon = padCodon.Icon;
padWindows [padCodon] = window;
padCodons [window] = padCodon;
-
+
window.StatusChanged += new EventHandler (UpdatePad);
-
+
string location = ToDockLocation (placement);
-
+
DockItem item = dock.AddItem (padCodon.PadId);
item.Label = padCodon.Label;
item.Icon = ImageService.GetIcon (padCodon.Icon).WithSize (IconSize.Menu);
@@ -1410,7 +1411,7 @@ void AddPad (PadCodon padCodon, string placement, DockItemStatus defaultStatus)
window.Item = item;
itemToWindow.Add (item, window);
-
+
if (padCodon.Initialized) {
CreatePadContent (true, padCodon, window, item);
} else {
@@ -1451,7 +1452,7 @@ static void OnItemContentVisibleChanged (object sender, EventArgs args)
}
}
}
-
+
static void UpdatePad (object source, EventArgs args)
{
var window = (PadWindow) source;
@@ -1461,7 +1462,7 @@ static void UpdatePad (object source, EventArgs args)
if (item != null) {
string windowTitle = window.Title;
var windowIcon = ImageService.GetIcon (window.Icon).WithSize (IconSize.Menu);
- if (String.IsNullOrEmpty (windowTitle))
+ if (String.IsNullOrEmpty (windowTitle))
windowTitle = codon.Label;
if (window.HasErrors && !window.ContentVisible) {
windowTitle = "" + windowTitle + "";
@@ -1472,7 +1473,7 @@ static void UpdatePad (object source, EventArgs args)
item.Icon = windowIcon;
}
}
-
+
#endregion
#region ICommandRouter implementation
@@ -1540,13 +1541,13 @@ class PadActivationHandler: CommandHandler
{
PadCodon pad;
DefaultWorkbench wb;
-
+
public PadActivationHandler (DefaultWorkbench wb, PadCodon pad)
{
this.pad = pad;
this.wb = wb;
}
-
+
protected override void Run ()
{
wb.BringToFront (pad, true);
@@ -1559,10 +1560,10 @@ public PadCommandRouterContainer (PadWindow window, Gtk.Widget child, object tar
{
}
}
-
+
// The SdiDragNotebook class allows redirecting the command route to the ViewCommandHandler
// object of the selected document, which implement some default commands.
-
+
class SdiDragNotebook: DockNotebook, ICommandDelegatorRouter, ICommandBar
{
public SdiDragNotebook (DefaultWorkbench window)
@@ -1580,18 +1581,18 @@ public SdiDragNotebook (DefaultWorkbench window)
window.ToggleFullViewMode ();
};
TabsReordered += window.OnTabsReordered;
-
+
DoPopupMenu = window.ShowPopup;
Events |= Gdk.EventMask.FocusChangeMask | Gdk.EventMask.KeyPressMask;
IdeApp.CommandService.RegisterCommandBar (this);
}
-
+
protected override void OnDestroyed ()
{
- IdeApp.CommandService.UnregisterCommandBar (this);
+ IdeApp.CommandService.UnregisterCommandBar (this);
base.OnDestroyed ();
}
-
+
public object GetNextCommandTarget ()
{
return Parent;
@@ -1602,7 +1603,7 @@ public object GetDelegatedCommandTarget ()
SdiWorkspaceWindow win = CurrentTab != null ? (SdiWorkspaceWindow) CurrentTab.Content : null;
return win != null ? win.ViewCommandHandler : null;
}
-
+
#region ICommandBar implementation
bool isEnabled = true;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
index c0e6db6bc6a..81930bf6de9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
@@ -13,10 +13,10 @@
// 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
@@ -49,18 +49,18 @@ public void Initialize (Document doc)
window = doc.Window;
this.doc = doc;
}
-
+
public T GetContent () where T : class
{
return doc.GetContent (true);
}
-
+
[CommandHandler (FileCommands.Save)]
protected void OnSaveFile ()
{
doc.Save ();
}
-
+
[CommandUpdateHandler (FileCommands.Save)]
protected void OnUpdateSaveFile (CommandInfo info)
{
@@ -72,13 +72,13 @@ protected void OnSaveFileAs ()
{
doc.SaveAs ();
}
-
+
[CommandUpdateHandler (FileCommands.SaveAs)]
protected void OnUpdateSaveFileAs (CommandInfo info)
{
info.Enabled = doc.IsFile && !doc.IsViewOnly;
}
-
+
[CommandHandler (FileCommands.ReloadFile)]
protected void OnReloadFile ()
{
@@ -87,7 +87,7 @@ protected void OnReloadFile ()
GettextCatalog.GetString ("All changes made to the document will be permanently lost."), 0, AlertButton.Cancel, AlertButton.Revert) == AlertButton.Revert)
doc.Reload ();
}
-
+
[CommandUpdateHandler (FileCommands.ReloadFile)]
protected void OnUpdateReloadFile (CommandInfo info)
{
@@ -101,7 +101,7 @@ protected void OnOpenFolder ()
FilePath path = Path.GetDirectoryName (doc.FileName);
IdeServices.DesktopService.OpenFolder (path, doc.FileName);
}
-
+
[CommandUpdateHandler (FileCommands.OpenContainingFolder)]
protected void OnUpdateOpenFolder (CommandInfo info)
{
@@ -109,9 +109,9 @@ protected void OnUpdateOpenFolder (CommandInfo info)
info.Enabled = info.Visible;
}
-
+
/*** Edit commands ***/
-
+
[CommandHandler (EditCommands.Undo)]
protected void OnUndo ()
{
@@ -119,14 +119,14 @@ protected void OnUndo ()
if (editable != null)
editable.Undo();
}
-
+
[CommandUpdateHandler (EditCommands.Undo)]
protected void OnUpdateUndo (CommandInfo info)
{
IUndoHandler textBuffer = GetContent ();
info.Enabled = textBuffer != null && textBuffer.EnableUndo;
}
-
+
[CommandHandler (EditCommands.Redo)]
protected void OnRedo ()
{
@@ -135,14 +135,14 @@ protected void OnRedo ()
editable.Redo();
}
}
-
+
[CommandUpdateHandler (EditCommands.Redo)]
protected void OnUpdateRedo (CommandInfo info)
{
IUndoHandler textBuffer = GetContent ();
info.Enabled = textBuffer != null && textBuffer.EnableRedo;
}
-
+
[CommandHandler (EditCommands.Cut)]
protected void OnCut ()
{
@@ -150,7 +150,7 @@ protected void OnCut ()
if (handler != null)
handler.Cut ();
}
-
+
[CommandUpdateHandler (EditCommands.Cut)]
protected void OnUpdateCut (CommandInfo info)
{
@@ -165,7 +165,7 @@ protected void OnUpdateCut (CommandInfo info)
else
info.Bypass = true;
}
-
+
[CommandHandler (EditCommands.Copy)]
protected void OnCopy ()
{
@@ -173,7 +173,7 @@ protected void OnCopy ()
if (handler != null)
handler.Copy ();
}
-
+
[CommandUpdateHandler (EditCommands.Copy)]
protected void OnUpdateCopy (CommandInfo info)
{
@@ -188,7 +188,7 @@ protected void OnUpdateCopy (CommandInfo info)
else
info.Bypass = true;
}
-
+
[CommandHandler (EditCommands.Paste)]
protected void OnPaste ()
{
@@ -196,7 +196,7 @@ protected void OnPaste ()
if (handler != null)
handler.Paste ();
}
-
+
[CommandUpdateHandler (EditCommands.Paste)]
protected void OnUpdatePaste (CommandInfo info)
{
@@ -211,7 +211,7 @@ protected void OnUpdatePaste (CommandInfo info)
else
info.Bypass = true;
}
-
+
[CommandHandler (EditCommands.Delete)]
protected void OnDelete ()
{
@@ -219,7 +219,7 @@ protected void OnDelete ()
if (handler != null)
handler.Delete ();
}
-
+
[CommandUpdateHandler (EditCommands.Delete)]
protected void OnUpdateDelete (CommandInfo info)
{
@@ -229,7 +229,7 @@ protected void OnUpdateDelete (CommandInfo info)
else
info.Bypass = true;
}
-
+
[CommandHandler (EditCommands.SelectAll)]
protected void OnSelectAll ()
{
@@ -237,11 +237,11 @@ protected void OnSelectAll ()
if (handler != null)
handler.SelectAll ();
}
-
+
[CommandUpdateHandler (EditCommands.SelectAll)]
protected void OnUpdateSelectAll (CommandInfo info)
{
- bool inWpf = false;
+ bool inWpf = false;
#if WIN32
if (System.Windows.Input.Keyboard.FocusedElement != null)
inWpf = true;
@@ -252,14 +252,14 @@ protected void OnUpdateSelectAll (CommandInfo info)
else
info.Bypass = true;
}
-
+
[CommandHandler (EditCommands.UppercaseSelection)]
public void OnUppercaseSelection ()
{
var buffer = GetContent ();
if (buffer == null)
return;
-
+
string selectedText = buffer.SelectedText;
if (string.IsNullOrEmpty (selectedText)) {
int pos = buffer.CaretOffset;
@@ -286,21 +286,21 @@ public void OnUppercaseSelection ()
}
}
}
-
+
[CommandUpdateHandler (EditCommands.UppercaseSelection)]
protected void OnUppercaseSelection (CommandInfo info)
{
var buffer = GetContent ();
info.Enabled = buffer != null;
}
-
+
[CommandHandler (EditCommands.LowercaseSelection)]
public void OnLowercaseSelection ()
{
var buffer = GetContent ();
if (buffer == null)
return;
-
+
string selectedText = buffer.SelectedText;
if (string.IsNullOrEmpty (selectedText)) {
int pos = buffer.CaretOffset;
@@ -327,17 +327,17 @@ public void OnLowercaseSelection ()
}
}
}
-
+
[CommandUpdateHandler (EditCommands.LowercaseSelection)]
protected void OnLowercaseSelection (CommandInfo info)
{
var buffer = GetContent ();
info.Enabled = buffer != null;
}
-
+
// Text editor commands
-
+
[CommandUpdateHandler (TextEditorCommands.CharLeft)]
[CommandUpdateHandler (TextEditorCommands.CharRight)]
[CommandUpdateHandler (TextEditorCommands.DeleteLeftChar)]
@@ -355,98 +355,98 @@ protected void OnUpdateLineEnd (CommandInfo info)
// editor commands.
info.Bypass = doc.Editor?.HasFocus == false;
}
-
+
[CommandHandler (TextEditorCommands.LineEnd)]
protected void OnLineEnd ()
{
doc.Editor.EditorOperations.MoveToEndOfLine (false);
}
-
+
[CommandHandler (TextEditorCommands.LineStart)]
protected void OnLineStart ()
{
doc.Editor.EditorOperations.MoveToStartOfLine (false);
}
-
+
[CommandHandler (TextEditorCommands.DeleteLeftChar)]
protected void OnDeleteLeftChar ()
{
doc.Editor.EditorOperations.Backspace ();
}
-
+
[CommandHandler (TextEditorCommands.DeleteRightChar)]
protected void OnDeleteRightChar ()
{
doc.Editor.EditorOperations.Delete ();
}
-
+
[CommandHandler (TextEditorCommands.CharLeft)]
protected void OnCharLeft ()
{
doc.Editor.EditorOperations.MoveToPreviousCharacter (false);
}
-
+
[CommandHandler (TextEditorCommands.CharRight)]
protected void OnCharRight ()
{
doc.Editor.EditorOperations.MoveToNextCharacter (false);
}
-
+
[CommandHandler (TextEditorCommands.LineUp)]
protected void OnLineUp ()
{
doc.Editor.EditorOperations.MoveLineUp (false);
}
-
+
[CommandHandler (TextEditorCommands.LineDown)]
protected void OnLineDown ()
{
doc.Editor.EditorOperations.MoveLineDown (false);
}
-
+
[CommandHandler (TextEditorCommands.DocumentStart)]
protected void OnDocumentStart ()
{
doc.Editor.EditorOperations.MoveToStartOfDocument (false);
}
-
+
[CommandHandler (TextEditorCommands.DocumentEnd)]
protected void OnDocumentEnd ()
{
doc.Editor.EditorOperations.MoveToEndOfDocument (false);
}
-
+
[CommandHandler (TextEditorCommands.DeleteLine)]
protected void OnDeleteLine ()
{
var line = doc.Editor.GetLine (doc.Editor.CaretLocation.Line);
doc.Editor.RemoveText (line.Offset, line.LengthIncludingDelimiter);
}
-
+
struct RemoveInfo
{
public int Position { get; set; }
public int Length { get; set; }
public static readonly RemoveInfo Empty = new RemoveInfo (-1, -1);
-
+
public bool IsEmpty {
get {
return Length <= 0;
}
}
-
+
RemoveInfo (int position, int length): this ()
{
Position = position;
Length = length;
}
- public static bool IsWhiteSpace (char ch)
+ public static bool IsWhiteSpace (char ch)
{
return ch == ' ' || ch == '\t' || ch == '\v';
}
-
+
public static RemoveInfo GetRemoveInfo (TextEditor document, ref int pos)
{
int len = 0;
@@ -466,20 +466,20 @@ public override string ToString ()
return string.Format ("[RemoveInfo: Position={0}, Length={1}]", Position, Length);
}
}
-
+
[CommandHandler (EditCommands.RemoveTrailingWhiteSpaces)]
public void OnRemoveTrailingWhiteSpaces ()
{
var data = doc.Editor;
if (data == null)
return;
-
+
System.Collections.Generic.List removeList = new System.Collections.Generic.List ();
int pos = data.Length - 1;
RemoveInfo removeInfo = RemoveInfo.GetRemoveInfo (data, ref pos);
if (!removeInfo.IsEmpty)
removeList.Add (removeInfo);
-
+
while (pos >= 0) {
char ch = data.GetCharAt (pos);
if (ch == '\n' || ch == '\r') {
@@ -498,13 +498,13 @@ public void OnRemoveTrailingWhiteSpaces ()
}
}
}
-
+
[CommandUpdateHandler (EditCommands.RemoveTrailingWhiteSpaces)]
protected void OnRemoveTrailingWhiteSpaces (CommandInfo info)
{
info.Enabled = GetContent () != null;
}
-
+
#region Folding
bool IsFoldMarkerMarginEnabled {
get {
@@ -525,11 +525,12 @@ protected void UpdateEnableDisableFolding (CommandInfo info)
info.Enabled = info.Visible = false;
#else
info.Text = IsFoldMarkerMarginEnabled ? GettextCatalog.GetString ("Disable _Folding") : GettextCatalog.GetString ("Enable _Folding");
- info.Enabled = GetContent () != null ||
- GetContent () != null;
- // As we need to support both the new and the legacy editor, we need to check if perhaps
- // we are running in the new one. The legacy editor already implements
- // so we can't simply look for that and we do not want to import anything related to Cocoa.
+ //oe info.Enabled = GetContent () != null ||
+ //oe GetContent () != null;
+ //oe // As we need to support both the new and the legacy editor, we need to check if perhaps
+ //oe // we are running in the new one. The legacy editor already implements
+ //oe // so we can't simply look for that and we do not want to import anything related to Cocoa.
+ info.Enabled = GetContent () != null;
#endif
}
@@ -540,13 +541,13 @@ protected void UpdateFoldCommands (CommandInfo info)
{
info.Enabled = GetContent () != null && IsFoldMarkerMarginEnabled;
}
-
+
[CommandHandler (EditCommands.ToggleAllFoldings)]
protected void ToggleAllFoldings ()
{
GetContent ().ToggleAllFoldings ();
}
-
+
[CommandHandler (EditCommands.FoldDefinitions)]
protected void FoldDefinitions ()
{
@@ -558,9 +559,9 @@ protected void ToggleFolding ()
{
GetContent ().ToggleFolding ();
}
-
+
#endregion
-
+
#region Bookmarks
[CommandUpdateHandler (SearchCommands.ToggleBookmark)]
[CommandUpdateHandler (SearchCommands.PrevBookmark)]
@@ -570,7 +571,7 @@ protected void UpdateBookmarkCommands (CommandInfo info)
{
info.Enabled = GetContent () != null;
}
-
+
[CommandHandler (SearchCommands.ToggleBookmark)]
public void ToggleBookmark ()
{
@@ -579,7 +580,7 @@ public void ToggleBookmark ()
int position = markBuffer.CursorPosition;
markBuffer.SetBookmarked (position, !markBuffer.IsBookmarked (position));
}
-
+
[CommandHandler (SearchCommands.PrevBookmark)]
public void PrevBookmark ()
{
@@ -587,7 +588,7 @@ public void PrevBookmark ()
Debug.Assert (markBuffer != null);
markBuffer.PrevBookmark ();
}
-
+
[CommandHandler (SearchCommands.NextBookmark)]
public void NextBookmark ()
{
@@ -595,7 +596,7 @@ public void NextBookmark ()
Debug.Assert (markBuffer != null);
markBuffer.NextBookmark ();
}
-
+
[CommandHandler (SearchCommands.ClearBookmarks)]
public void ClearBookmarks ()
{
@@ -604,6 +605,6 @@ public void ClearBookmarks ()
markBuffer.ClearBookmarks ();
}
#endregion
-
+
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CodeFormattingPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CodeFormattingPanel.cs
index fcbebb3c1d1..092903af2b4 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CodeFormattingPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CodeFormattingPanel.cs
@@ -1,21 +1,21 @@
-//
+//
// CodeFormattingPanelWidget.cs
-//
+//
// Author:
// Lluis Sanchez Gual
-//
+//
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -35,6 +35,9 @@
using MonoDevelop.Projects.Policies;
using MonoDevelop.Components;
using System.Linq;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Projects.OptionPanels
{
@@ -47,34 +50,34 @@ class CodeFormattingPanel: OptionsPanel
HashSet mimeTypesWithPolicies = new HashSet ();
bool internalPolicyUpdate;
CodeFormattingPanelWidget widget;
-
+
public override void Initialize (MonoDevelop.Ide.Gui.Dialogs.OptionsDialog dialog, object dataObject)
{
base.Initialize (dialog, dataObject);
-
+
foreach (MimeTypeOptionsPanelNode node in AddinManager.GetExtensionNodes ("/MonoDevelop/ProjectModel/Gui/MimeTypePolicyPanels"))
mimeTypesWithPolicies.Add (node.MimeType);
-
+
var provider = dataObject as IPolicyProvider;
if (provider == null) {
provider = PolicyService.GetUserDefaultPolicySet ();
// When editing the global user preferences, the default values for policies are the IDE default values.
defaultPolicyContainer = PolicyService.SystemDefaultPolicies;
}
-
+
policyContainer = provider.Policies;
if (!(dataObject is SolutionFolderItem) && !(dataObject is Solution)) {
globalMimeTypes = new List ();
string userTypes = PropertyService.Get ("MonoDevelop.Projects.GlobalPolicyMimeTypes", "");
globalMimeTypes.AddRange (userTypes.Split (new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
}
-
+
foreach (string mt in GetItemMimeTypes ())
AddPanel (mt);
-
+
policyContainer.PolicyChanged += HandlePolicyContainerPolicyChanged;
}
-
+
public override void Dispose ()
{
base.Dispose ();
@@ -85,9 +88,9 @@ void HandlePolicyContainerPolicyChanged (object sender, PolicyChangedEventArgs e
{
if (internalPolicyUpdate)
return;
-
+
// The policy container has changed externally. The panel data has to be reloaded
-
+
foreach (MimeTypePanelData pd in typeSections.Values) {
bool useParentPolicy = false;
bool modified = false;
@@ -110,7 +113,7 @@ void HandlePolicyContainerPolicyChanged (object sender, PolicyChangedEventArgs e
if (widget != null)
widget.Refresh ();
}
-
+
MimeTypePanelData AddPanel (string mt)
{
var chain = new List (IdeServices.DesktopService.GetMimeTypeInheritanceChain (mt).Where (mimeTypesWithPolicies.Contains));
@@ -132,14 +135,14 @@ MimeTypePanelData AddPanel (string mt)
ParentDialog.AddChildSection (this, sec, data);
return data;
}
-
+
void RemovePanel (string mt)
{
MimeTypePanelData data = typeSections [mt];
typeSections.Remove (mt);
ParentDialog.RemoveSection (data.Section);
}
-
+
internal MimeTypePanelData AddGlobalMimeType (string mt)
{
if (!globalMimeTypes.Contains (mt)) {
@@ -148,18 +151,18 @@ internal MimeTypePanelData AddGlobalMimeType (string mt)
}
return null;
}
-
+
internal void RemoveGlobalMimeType (string mt)
{
if (globalMimeTypes.Remove (mt))
RemovePanel (mt);
}
-
+
public IEnumerable GetMimeTypeData ()
{
return typeSections.Values;
}
-
+
public PolicyContainer PolicyContainer {
get { return policyContainer; }
}
@@ -167,34 +170,34 @@ public PolicyContainer PolicyContainer {
void LoadPolicyTypeData (MimeTypePanelData data, string mimeType, List types)
{
List panels = new List ();
-
+
bool useParentPolicy = false;
foreach (MimeTypeOptionsPanelNode node in AddinManager.GetExtensionNodes ("/MonoDevelop/ProjectModel/Gui/MimeTypePolicyPanels")) {
if (!types.Contains (node.MimeType))
continue;
-
+
IMimeTypePolicyOptionsPanel panel = (IMimeTypePolicyOptionsPanel) node.CreateInstance (typeof(IMimeTypePolicyOptionsPanel));
panel.Initialize (ParentDialog, DataObject);
panel.InitializePolicy (policyContainer, defaultPolicyContainer, mimeType, mimeType == node.MimeType);
panel.Label = node.Label;
if (!panel.IsVisible ())
continue;
-
+
if (!panel.HasCustomPolicy)
useParentPolicy = true;
-
+
panels.Add (panel);
}
data.Panels = panels;
if (!policyContainer.IsRoot || ParentDialog is DefaultPolicyOptionsDialog)
data.UseParentPolicy = useParentPolicy;
}
-
+
public override Control CreatePanelWidget ()
{
return widget = new CodeFormattingPanelWidget (this, ParentDialog);
}
-
+
public override void ApplyChanges ()
{
if (globalMimeTypes != null) {
@@ -212,7 +215,7 @@ public override void ApplyChanges ()
internalPolicyUpdate = false;
}
}
-
+
public IEnumerable GetItemMimeTypes ()
{
HashSet types = new HashSet ();
@@ -230,12 +233,12 @@ public IEnumerable GetItemMimeTypes ()
}
return types;
}
-
+
public bool IsUserMimeType (string type)
{
return globalMimeTypes != null && globalMimeTypes.Contains (type);
}
-
+
void GetItemMimeTypes (HashSet types, SolutionFolderItem item)
{
if (item is SolutionFolder) {
@@ -255,18 +258,18 @@ public bool IsCustomUserPolicy {
get { return ParentDialog is MonoDevelop.Ide.Projects.DefaultPolicyOptionsDialog; }
}
}
-
+
class MimetypeOptionsDialogSection : OptionsDialogSection
{
public MimetypeOptionsDialogSection (string mimetype): base (typeof(MimeTypePolicyOptionsSection))
{
this.MimeType = mimetype;
}
-
+
//this is used by the options dialog to look up the icon as needed, at required scales
public string MimeType { get; private set; }
}
-
+
[System.ComponentModel.ToolboxItem(true)]
partial class CodeFormattingPanelWidget : Gtk.Bin
{
@@ -274,13 +277,13 @@ partial class CodeFormattingPanelWidget : Gtk.Bin
Gtk.ListStore store;
OptionsDialog dialog;
CellRendererComboBox comboCell = new CellRendererComboBox();
-
+
public CodeFormattingPanelWidget (CodeFormattingPanel panel, OptionsDialog dialog)
{
this.Build();
this.panel = panel;
this.dialog = dialog;
-
+
store = new Gtk.ListStore (typeof(MimeTypePanelData), typeof(Xwt.Drawing.Image), typeof(string));
tree.Model = store;
tree.SearchColumn = -1; // disable the interactive search
@@ -288,7 +291,7 @@ public CodeFormattingPanelWidget (CodeFormattingPanel panel, OptionsDialog dialo
boxButtons.Visible = panel.DataObject is PolicySet;
Gtk.CellRendererText crt = new Gtk.CellRendererText ();
CellRendererImage crp = new CellRendererImage ();
-
+
Gtk.TreeViewColumn col = new Gtk.TreeViewColumn ();
col.Title = GettextCatalog.GetString ("File Type");
col.PackStart (crp, false);
@@ -300,7 +303,7 @@ public CodeFormattingPanelWidget (CodeFormattingPanel panel, OptionsDialog dialo
comboCell.Changed += OnPolicySelectionChanged;
Gtk.TreeViewColumn polCol = tree.AppendColumn (GettextCatalog.GetString ("Policy"), comboCell, new Gtk.TreeCellDataFunc (OnSetPolicyData));
-
+
tree.Selection.Changed += delegate {
Gtk.TreeIter it;
tree.Selection.GetSelected (out it);
@@ -313,7 +316,7 @@ public CodeFormattingPanelWidget (CodeFormattingPanel panel, OptionsDialog dialo
Fill ();
UpdateButtons ();
-
+
tree.Selection.Changed += delegate {
UpdateButtons ();
};
@@ -328,7 +331,7 @@ public CodeFormattingPanelWidget (CodeFormattingPanel panel, OptionsDialog dialo
static readonly string parentPolicyText = GettextCatalog.GetString ("(Inherited Policy)");
static readonly string customPolicyText = GettextCatalog.GetString ("(Custom)");
-
+
void OnSetPolicyData (Gtk.TreeViewColumn treeColumn, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
MimeTypePanelData mt = (MimeTypePanelData) store.GetValue (iter, 0);
@@ -343,12 +346,12 @@ void OnSetPolicyData (Gtk.TreeViewColumn treeColumn, Gtk.CellRenderer cell, Gtk.
else
selection = customPolicyText;
}
-
+
CellRendererComboBox comboCell = (CellRendererComboBox) cell;
comboCell.Values = GetComboOptions (mt);
comboCell.Text = selection;
}
-
+
string[] GetComboOptions (MimeTypePanelData mt)
{
List values = new List ();
@@ -361,7 +364,7 @@ string[] GetComboOptions (MimeTypePanelData mt)
values.Add (customPolicyText);
return values.ToArray ();
}
-
+
IEnumerable GetCandidateSets (MimeTypePanelData mt)
{
var pset = mt.PolicyContainer as PolicySet;
@@ -394,14 +397,14 @@ void OnPolicySelectionChanged (object s, ComboSelectionChangedArgs args)
}
}
}
-
+
void Fill ()
{
foreach (MimeTypePanelData mt in panel.GetMimeTypeData ()) {
store.AppendValues (mt, IdeServices.DesktopService.GetIconForType (mt.MimeType, Gtk.IconSize.Menu), mt.TypeDescription);
}
}
-
+
public void Refresh ()
{
tree.QueueDraw ();
@@ -441,7 +444,7 @@ protected virtual void OnButtonRemoveClicked (object sender, System.EventArgs e)
}
}
}
-
+
void UpdateButtons ()
{
Gtk.TreeIter iter;
@@ -455,12 +458,12 @@ void UpdateButtons ()
buttonRemove.Sensitive = buttonEdit.Sensitive = false;
}
- protected override void OnDestroyed()
+ protected override void OnDestroyed()
{
store.Clear();
comboCell.Changed -= OnPolicySelectionChanged;
-
- base.OnDestroyed();
+
+ base.OnDestroyed();
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs
index d49a759fa2e..97b1bb2147f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs
@@ -34,13 +34,16 @@
using MonoDevelop.Ide.Gui.Dialogs;
using MonoDevelop.Components;
using Gtk;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Projects.OptionPanels
{
internal class CombineConfigurationPanel : MultiConfigItemOptionsPanel
{
CombineConfigurationPanelWidget widget;
-
+
public override Control CreatePanelWidget()
{
return widget = new CombineConfigurationPanelWidget ((MultiConfigItemOptionsDialog) ParentDialog, ConfiguredSolution);
@@ -50,7 +53,7 @@ public override void LoadConfigData ()
{
widget.Load ((SolutionConfiguration) CurrentConfiguration);
}
-
+
public override void ApplyChanges ()
{
widget.Store ();
@@ -67,11 +70,11 @@ partial class CombineConfigurationPanelWidget : Gtk.Bin
const int ProjectNameCol = 0;
const int BuildFlagCol = 1;
const int ProjectCol = 2;
-
+
public CombineConfigurationPanelWidget (MultiConfigItemOptionsDialog parentDialog, Solution solution)
{
Build ();
-
+
this.parentDialog = parentDialog;
this.solution = solution;
@@ -79,7 +82,7 @@ public CombineConfigurationPanelWidget (MultiConfigItemOptionsDialog parentDialo
configsList.Model = store;
configsList.SearchColumn = -1; // disable the interactive search
configsList.HeadersVisible = true;
-
+
TreeViewColumn col = new TreeViewColumn ();
CellRendererText sr = new CellRendererText ();
col.PackStart (sr, true);
@@ -88,18 +91,18 @@ public CombineConfigurationPanelWidget (MultiConfigItemOptionsDialog parentDialo
col.Title = GettextCatalog.GetString ("Solution Item");
configsList.AppendColumn (col);
col.SortColumnId = ProjectNameCol;
-
+
CellRendererToggle tt = new CellRendererToggle ();
tt.Activatable = true;
tt.Toggled += new ToggledHandler (OnBuildToggled);
configsList.AppendColumn (GettextCatalog.GetString ("Build"), tt, "active", BuildFlagCol);
-
+
CellRendererComboBox comboCell = new CellRendererComboBox ();
comboCell.Changed += new ComboSelectionChangedHandler (OnConfigSelectionChanged);
configsList.AppendColumn (GettextCatalog.GetString ("Configuration"), comboCell, new TreeCellDataFunc (OnSetConfigurationsData));
store.SetSortColumnId (ProjectNameCol, SortType.Ascending);
}
-
+
public void Load (SolutionConfiguration config)
{
configuration = config;
@@ -110,12 +113,12 @@ public void Load (SolutionConfiguration config)
store.AppendValues (it.Name, ce != null && ce.Build, it);
}
}
-
- void OnSetConfigurationsData (Gtk.TreeViewColumn treeColumn, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
+
+ void OnSetConfigurationsData (Gtk.TreeViewColumn treeColumn, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter)
{
var item = (SolutionItem) store.GetValue (iter, ProjectCol);
ConfigurationData data = parentDialog.ConfigurationData.FindConfigurationData (item);
-
+
CellRendererComboBox comboCell = (CellRendererComboBox) cell;
comboCell.Values = data.Configurations.Select (c => c.Id).ToArray ();
@@ -132,7 +135,7 @@ string GetSelectedConfiguration (SolutionItem item)
var entry = configuration.GetEntryForItem (item);
return entry != null ? entry.ItemConfiguration : (item.DefaultConfiguration != null ? item.DefaultConfiguration.Id : "");
}
-
+
void OnBuildToggled (object sender, ToggledArgs args)
{
TreeIter iter;
@@ -155,7 +158,7 @@ SolutionConfigurationEntry CreateDefaultMapping (SolutionItem item)
entry.ItemConfiguration = conf;
return entry;
}
-
+
void OnConfigSelectionChanged (object s, ComboSelectionChangedArgs args)
{
TreeIter iter;
@@ -175,7 +178,7 @@ void OnConfigSelectionChanged (object s, ComboSelectionChangedArgs args)
entry.ItemConfiguration = null;
}
}
-
+
public void Store ()
{
// Data stored at dialog level
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/SolutionItemConfigurationsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/SolutionItemConfigurationsPanel.cs
index 32b1eba38bf..15e706deeeb 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/SolutionItemConfigurationsPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/SolutionItemConfigurationsPanel.cs
@@ -13,10 +13,10 @@
// 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
@@ -36,13 +36,16 @@
using MonoDevelop.Components;
using MonoDevelop.Ide.Gui.Dialogs;
using Gtk;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Projects.OptionPanels
{
internal class SolutionItemConfigurationsPanel : ItemOptionsPanel
{
CombineEntryConfigurationsPanelWidget widget;
-
+
public override Control CreatePanelWidget ()
{
MultiConfigItemOptionsDialog dlg = (MultiConfigItemOptionsDialog) ParentDialog;
@@ -55,23 +58,23 @@ public override void ApplyChanges()
}
}
- partial class CombineEntryConfigurationsPanelWidget : Gtk.Bin
+ partial class CombineEntryConfigurationsPanelWidget : Gtk.Bin
{
TreeStore store;
ConfigurationData configData;
-
+
public CombineEntryConfigurationsPanelWidget (MultiConfigItemOptionsDialog dlg)
{
Build ();
-
+
configData = dlg.ConfigurationData;
-
+
store = new TreeStore (typeof(object), typeof(string));
configsList.Model = store;
configsList.SearchColumn = -1; // disable the interactive search
configsList.HeadersVisible = true;
store.SetSortColumnId (1, SortType.Ascending);
-
+
TreeViewColumn col = new TreeViewColumn ();
CellRendererText sr = new CellRendererText ();
col.PackStart (sr, true);
@@ -88,7 +91,7 @@ public CombineEntryConfigurationsPanelWidget (MultiConfigItemOptionsDialog dlg)
renameButton.Clicked += new EventHandler (OnRenameConfiguration);
copyButton.Clicked += new EventHandler (OnCopyConfiguration);
}
-
+
void OnAddConfiguration (object sender, EventArgs args)
{
AddConfiguration (null);
@@ -100,7 +103,7 @@ void OnCopyConfiguration (object sender, EventArgs args)
Gtk.TreeIter iter;
if (!configsList.Selection.GetSelected (out foo, out iter))
return;
-
+
ItemConfiguration cc = (ItemConfiguration) store.GetValue (iter, 0);
AddConfiguration (cc.Id);
}
@@ -130,15 +133,15 @@ void OnRemoveConfiguration (object sender, EventArgs args)
Gtk.TreeIter iter;
if (!configsList.Selection.GetSelected (out foo, out iter))
return;
-
+
if (configData.Configurations.Count == 1) {
MessageService.ShowWarning (GettextCatalog.GetString ("There must be at least one configuration."));
return;
}
-
+
var cc = (ItemConfiguration) store.GetValue (iter, 0);
var dlg = new DeleteConfigDialog ();
-
+
try {
if (MessageService.RunCustomDialog (dlg, Toplevel as Gtk.Window)== (int) Gtk.ResponseType.Yes) {
configData.RemoveConfiguration (cc.Id, dlg.DeleteChildren);
@@ -149,18 +152,18 @@ void OnRemoveConfiguration (object sender, EventArgs args)
dlg.Dispose ();
}
}
-
+
void OnRenameConfiguration (object sender, EventArgs args)
{
Gtk.TreeModel foo;
Gtk.TreeIter iter;
if (!configsList.Selection.GetSelected (out foo, out iter))
return;
-
+
ItemConfiguration cc = (ItemConfiguration) store.GetValue (iter, 0);
RenameConfigDialog dlg = new RenameConfigDialog (configData.Configurations);
dlg.ConfigName = cc.Id;
-
+
try {
bool done = false;
do {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/AddFileDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/AddFileDialog.cs
index 0adbed59b7f..23c5e1d7fe2 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/AddFileDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/AddFileDialog.cs
@@ -1,21 +1,21 @@
-//
+//
// AddFileDialog.cs
-//
+//
// Author:
// Lluis Sanchez Gual
-//
+//
// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -23,29 +23,31 @@
// 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 MonoDevelop.Components.Extensions;
using MonoDevelop.Ide.Extensions;
using MonoDevelop.Components;
using Gtk;
-using MonoDevelop.Core;
-
-
-namespace MonoDevelop.Ide.Projects
+using MonoDevelop.Core;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
+
+namespace MonoDevelop.Ide.Projects
{
///
/// Dialog which allows selecting files to be added to a project
- ///
- public class AddFileDialog: SelectFileDialog
- {
- public AddFileDialog (string title)
+ ///
+ public class AddFileDialog: SelectFileDialog
+ {
+ public AddFileDialog (string title)
{
Title = title;
Action = MonoDevelop.Components.FileChooserAction.Open;
- data.SelectMultiple = true;
+ data.SelectMultiple = true;
}
-
+
///
/// Build actions from which the user can select the one to apply to the new file.
///
@@ -53,20 +55,20 @@ public string[] BuildActions {
get { return data.BuildActions; }
set { data.BuildActions = value; }
}
-
+
///
/// Selected build action.
///
public string OverrideAction {
get { return data.OverrideAction; }
}
-
+
protected override bool RunDefault ()
{
FileSelector fdiag = new FileSelector (data.Title);
fdiag.ShowHidden = data.ShowHidden;
-
+
//add a combo that can be used to override the default build action
ComboBox combo = new ComboBox (data.BuildActions ?? new string[0]);
combo.Sensitive = false;
@@ -74,20 +76,20 @@ protected override bool RunDefault ()
combo.RowSeparatorFunc = delegate (TreeModel model, TreeIter iter) {
return "--" == ((string) model.GetValue (iter, 0));
};
-
+
CheckButton check = new CheckButton (GettextCatalog.GetString ("Override default build action"));
check.Toggled += delegate { combo.Sensitive = check.Active; };
-
+
HBox box = new HBox ();
fdiag.ExtraWidget = box;
box.PackStart (check, false, false, 4);
box.PackStart (combo, false, false, 4);
box.ShowAll ();
-
+
SetDefaultProperties (fdiag);
-
+
int result;
-
+
try {
result = MessageService.RunCustomDialog (fdiag, data.TransientFor ?? MessageService.RootWindow);
GetDefaultProperties (fdiag);
@@ -101,5 +103,5 @@ protected override bool RunDefault ()
fdiag.Dispose ();
}
}
- }
-}
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/AssemblyReferencePanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/AssemblyReferencePanel.cs
index a1b91bf4ca0..f4304780527 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/AssemblyReferencePanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/AssemblyReferencePanel.cs
@@ -1,22 +1,22 @@
// AssemblyReferencePanel.cs
-//
+//
// Author:
// Todd Berman
// Lluis Sanchez Gual
-//
+//
// Copyright (c) 2004 Todd Berman
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -41,6 +41,9 @@
using MonoDevelop.Components.Extensions;
using System.Collections.Generic;
using System.Reflection;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Projects
{
@@ -64,7 +67,7 @@ public AssemblyInfo (FilePath file)
Version = "";
}
}
-
+
public FilePath File;
public string Version;
public bool Selected;
@@ -192,7 +195,7 @@ void HandleClicked (object sender, EventArgs e)
FilePath nugetDir;
DotNetProject project;
-
+
public void SetProject (DotNetProject configureProject)
{
this.project = configureProject;
@@ -219,7 +222,7 @@ public void SetProject (DotNetProject configureProject)
basePath = configureProject.BaseDirectory;
Reset ();
}
-
+
bool IsNuGetAssembly (FilePath p)
{
return p.IsChildPathOf (nugetDir);
@@ -242,7 +245,7 @@ public void SignalRefChange (ProjectReference refInfo, bool newState)
Reset ();
}
}
-
+
public void SetFilter (string filter)
{
if (!string.IsNullOrEmpty (filter))
@@ -251,7 +254,7 @@ public void SetFilter (string filter)
stringMatcher = null;
Reset ();
}
-
+
public void Reset ()
{
store.Clear ();
@@ -273,11 +276,11 @@ public void Reset ()
version = GLib.Markup.EscapeText (asm.Version);
}
- store.AppendValues (name,
- version,
- asm,
- asm.Selected,
- asm.File.ToString (),
+ store.AppendValues (name,
+ version,
+ asm,
+ asm.Selected,
+ asm.File.ToString (),
MonoDevelop.Ide.Gui.Stock.OpenFolder,
matchRank);
}
@@ -287,7 +290,7 @@ internal static string GetMatchMarkup (Gtk.Widget widget, string text, int[] mat
{
StringBuilder result = StringBuilderCache.Allocate ();
int lastPos = 0;
- var color = HslColor.GenerateHighlightColors (widget.Style.Base (StateType.Normal),
+ var color = HslColor.GenerateHighlightColors (widget.Style.Base (StateType.Normal),
widget.Style.Text (StateType.Normal), 3)[2];
for (int n=0; n < matches.Length; n++) {
int pos = matches[n] - startIndex;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
index 1ac3ee7c816..758bad21164 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
@@ -1,11 +1,11 @@
-//
+//
// DefaultPolicyOptionsDialog.cs
-//
+//
// Author:
// Michael Hutchinson
-//
+//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -13,10 +13,10 @@
// 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
@@ -43,33 +43,33 @@ namespace MonoDevelop.Ide.Projects
public class DefaultPolicyOptionsDialog : OptionsDialog
{
ComboBox policiesCombo;
- MenuButton newButton;
+ MonoDevelop.Components.MenuButton newButton;
Button deleteButton;
- MenuButton exportButton;
+ MonoDevelop.Components.MenuButton exportButton;
List sets = new List ();
Dictionary originalSets = new Dictionary ();
-
+
PolicySet editingSet;
PolicySet currentSet;
bool loading;
-
+
public DefaultPolicyOptionsDialog (MonoDevelop.Components.Window parentWindow)
: base (parentWindow, new PolicySet (),
"/MonoDevelop/ProjectModel/Gui/DefaultPolicyPanels")
{
this.Title = GettextCatalog.GetString ("Policies");
editingSet = (PolicySet) DataObject;
-
+
HBox topBar = new HBox ();
topBar.Spacing = 3;
topBar.PackStart (new Label (GettextCatalog.GetString ("Editing Policy:")), false, false, 0);
-
+
policiesCombo = ComboBox.NewText ();
topBar.PackStart (policiesCombo, false, false, 0);
-
+
deleteButton = new Button (GettextCatalog.GetString ("Delete Policy"));
topBar.PackEnd (deleteButton, false, false, 0);
-
+
exportButton = new MenuButton ();
exportButton.Label = GettextCatalog.GetString ("Export");
exportButton.ContextMenuRequested = delegate {
@@ -89,8 +89,8 @@ public DefaultPolicyOptionsDialog (MonoDevelop.Components.Window parentWindow)
return menu;
};
topBar.PackEnd (exportButton, false, false, 0);
-
- newButton = new MenuButton ();
+
+ newButton = new MonoDevelop.Components.MenuButton ();
newButton.Label = GettextCatalog.GetString ("Add Policy");
newButton.ContextMenuRequested = delegate {
ContextMenu menu = new ContextMenu ();
@@ -113,42 +113,42 @@ public DefaultPolicyOptionsDialog (MonoDevelop.Components.Window parentWindow)
return menu;
};
topBar.PackEnd (newButton, false, false, 0);
-
+
Alignment align = new Alignment (0f, 0f, 1f, 1f);
align.LeftPadding = 9;
align.TopPadding = 9;
align.RightPadding = 9;
align.BottomPadding = 9;
align.Add (topBar);
-
+
HeaderBox ebox = new HeaderBox ();
ebox.GradientBackground = true;
ebox.SetMargins (0, 1, 0, 0);
ebox.Add (align);
-
+
ebox.ShowAll ();
-
+
VBox.PackStart (ebox, false, false, 0);
VBox.BorderWidth = 0;
Box.BoxChild c = (Box.BoxChild) VBox [ebox];
c.Position = 0;
-
+
foreach (PolicySet ps in PolicyService.GetUserPolicySets ()) {
PolicySet copy = ps.Clone ();
originalSets [copy] = ps;
sets.Add (copy);
}
FillPolicySets ();
-
+
policiesCombo.Changed += HandlePoliciesComboChanged;
deleteButton.Clicked += HandleDeleteButtonClicked;
}
-
+
protected override void ApplyChanges ()
{
base.ApplyChanges ();
ApplyPolicyChanges ();
-
+
HashSet usets = new HashSet (PolicyService.GetUserPolicySets ());
foreach (PolicySet ps in sets) {
PolicySet orig;
@@ -163,7 +163,7 @@ protected override void ApplyChanges ()
}
foreach (PolicySet ps in usets)
PolicyService.RemoveUserPolicySet (ps);
-
+
PolicyService.SavePolicies ();
}
@@ -171,7 +171,7 @@ void HandleDeleteButtonClicked (object sender, EventArgs e)
{
if (!MessageService.Confirm (GettextCatalog.GetString ("Are you sure you want to delete the policy '{0}'?", currentSet.Name), AlertButton.Delete))
return;
-
+
sets.Remove (currentSet);
currentSet = null;
FillPolicySets ();
@@ -183,7 +183,7 @@ void HandleNewButtonClicked (object sender, EventArgs e)
esets.ExceptWith (PolicyService.GetUserPolicySets ());
esets.UnionWith (sets);
esets.RemoveWhere (p => !p.Visible);
-
+
NewPolicySetDialog dlg = new NewPolicySetDialog (new List (esets));
try {
if (MessageService.RunCustomDialog (dlg, this) == (int) ResponseType.Ok) {
@@ -242,7 +242,7 @@ void HandleFromFile (object sender, EventArgs e)
}
}
}
-
+
string GetUnusedName (string name)
{
string finalName = name;
@@ -293,17 +293,17 @@ void HandleToFile (object sender, EventArgs e)
}
}
}
-
+
void FillPolicySets ()
{
loading = true;
int current = policiesCombo.Active;
-
+
((ListStore)policiesCombo.Model).Clear ();
policiesCombo.WidthRequest = -1;
-
+
sets.Sort ((p1, p2) => string.Compare (p1.Name, p2.Name, StringComparison.CurrentCulture));
-
+
foreach (PolicySet pset in sets) {
policiesCombo.AppendText (pset.Name ?? "");
}
@@ -313,12 +313,12 @@ void FillPolicySets ()
policiesCombo.Active = sets.Count - 1;
else
policiesCombo.Active = current;
-
+
if (policiesCombo.SizeRequest ().Width < 200)
policiesCombo.WidthRequest = 200;
-
+
loading = false;
-
+
if (policiesCombo.Active != -1 && sets [policiesCombo.Active] != currentSet) {
currentSet = sets [policiesCombo.Active];
editingSet.Name = currentSet.Name;
@@ -326,7 +326,7 @@ void FillPolicySets ()
}
UpdateStatus ();
}
-
+
void UpdateStatus ()
{
Gtk.Widget mainBox = MainBox;
@@ -364,7 +364,7 @@ void HandlePoliciesComboChanged (object sender, EventArgs e)
return;
}
}
-
+
if (policiesCombo.Active != -1 && policiesCombo.Active < sets.Count) {
// Load the new values
currentSet = sets [policiesCombo.Active];
@@ -373,7 +373,7 @@ void HandlePoliciesComboChanged (object sender, EventArgs e)
}
}
}
-
+
void ApplyPolicyChanges ()
{
if (policiesCombo.Active != -1 && sets.Count > 0)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/GtkNewProjectDialogBackend.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/GtkNewProjectDialogBackend.cs
index 87f4e7586be..f63b4132f11 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/GtkNewProjectDialogBackend.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/GtkNewProjectDialogBackend.cs
@@ -34,11 +34,14 @@
using MonoDevelop.Components.Commands;
using MonoDevelop.Ide.Templates;
using MonoDevelop.Ide.Gui;
-using MonoDevelop.Core;
+using MonoDevelop.Core;
using System.Threading.Tasks;
-using MonoDevelop.Ide.Projects;
-using System.Collections.Generic;
-
+using MonoDevelop.Ide.Projects;
+using System.Collections.Generic;
+#if GTK3
+ using TreeModel = Gtk.ITreeModel;
+#endif
+
namespace MonoDevelop.Ide.Projects
{
partial class GtkNewProjectDialogBackend : INewProjectDialogBackend
@@ -58,7 +61,7 @@ public GtkNewProjectDialogBackend ()
TypeDescriptor.AddAttributes (templatesTreeStore, modelAttr);
templateCategoriesTreeView.Selection.Changed += TemplateCategoriesTreeViewSelectionChanged;
- templateCategoriesTreeView.Selection.SelectFunction = TemplateCategoriesTreeViewSelection;
+ templateCategoriesTreeView.Selection.SelectFunction = TemplateCategoriesTreeViewSelection;
templatesTreeView.Selection.Changed += TemplatesTreeViewSelectionChanged;
templatesTreeView.ButtonPressEvent += TemplatesTreeViewButtonPressed;
@@ -76,10 +79,10 @@ public GtkNewProjectDialogBackend ()
// Setup the treeview to be able to have a context menu
var actionHandler = new ActionDelegate (templatesTreeView);
actionHandler.PerformShowMenu += PerformShowMenu;
- }
-
+ }
+
async void NextButtonClicked (object sender, EventArgs e) => await MoveToNextPage ();
-
+
public void ShowDialog ()
{
MessageService.ShowCustomDialog (this, IdeServices.DesktopService.GetFocusedTopLevelWindow ());
@@ -138,10 +141,10 @@ void HandlePopup (SolutionTemplate template, uint eventTime)
var xwtParent = Xwt.Toolkit.CurrentEngine.WrapWidget (templatesTreeView);
engine.Invoke (() => {
if (popupMenu == null) {
- popupMenu = new Xwt.Menu ();
+ popupMenu = new Xwt.Menu ();
}
ClearPopupMenuItems ();
- AddLanguageMenuItems (popupMenu, template);
+ AddLanguageMenuItems (popupMenu, template);
Gdk.Rectangle rect = languageCellRenderer.GetLanguageRect ();
try {
@@ -161,35 +164,35 @@ void TemplatesTreeViewButtonPressed (object o, ButtonPressEventArgs args)
SolutionTemplate template = GetSelectedTemplate ();
if ((template == null) || (template.AvailableLanguages.Count <= 1)) {
return;
- }
-
- // Only display the popup menu on a single press, ignore anything else
- // Fixes a crash when triple clicking. VSTS #849556
+ }
+
+ // Only display the popup menu on a single press, ignore anything else
+ // Fixes a crash when triple clicking. VSTS #849556
if (args.Event.Type == Gdk.EventType.ButtonPress && languageCellRenderer.IsLanguageButtonPressed (args.Event)) {
HandlePopup (template, args.Event.Time);
}
- }
-
- [GLib.ConnectBefore]
- private void TemplatesTreeViewKeyPressed (object o, KeyPressEventArgs args)
- {
- isLastPressedKeySpace = args.Event.Key == Gdk.Key.space;
-
- if (isLastPressedKeySpace) {
- isLastPressedKeySpace = true;
- var template = GetSelectedTemplate ();
-
- if (template == null)
- return;
- if (template.AvailableLanguages.Count > 1)
- HandlePopup (template, 0);
- else
- System.Media.SystemSounds.Beep.Play ();
- }
+ }
+
+ [GLib.ConnectBefore]
+ private void TemplatesTreeViewKeyPressed (object o, KeyPressEventArgs args)
+ {
+ isLastPressedKeySpace = args.Event.Key == Gdk.Key.space;
+
+ if (isLastPressedKeySpace) {
+ isLastPressedKeySpace = true;
+ var template = GetSelectedTemplate ();
+
+ if (template == null)
+ return;
+ if (template.AvailableLanguages.Count > 1)
+ HandlePopup (template, 0);
+ else
+ System.Media.SystemSounds.Beep.Play ();
+ }
}
void ClearPopupMenuItems ()
- {
+ {
popupMenu.Items.Clear ();
}
@@ -316,7 +319,7 @@ void AddTopLevelTemplateCategory (TemplateCategory category)
foreach (TemplateCategory subCategory in category.Categories) {
AddSubTemplateCategory (iter, subCategory);
- }
+ }
templateCategoriesTreeView.ExpandAll ();
}
@@ -370,45 +373,45 @@ TemplateCategory GetSelectedTemplateCategory ()
void ShowTemplatesForCategory (TemplateCategory category)
{
templateTextRenderer.RenderRecentTemplate = false;
- languageCellRenderer.RenderRecentTemplate = false;
- foreach (TemplateCategory subCategory in category.Categories) {
- var iter = templatesTreeStore.AppendValues (
- subCategory.Name,
- null,
- null,
- subCategory.Name,
- null);
-
+ languageCellRenderer.RenderRecentTemplate = false;
+ foreach (TemplateCategory subCategory in category.Categories) {
+ var iter = templatesTreeStore.AppendValues (
+ subCategory.Name,
+ null,
+ null,
+ subCategory.Name,
+ null);
+
foreach (SolutionTemplate template in subCategory.Templates) {
- if (template.HasProjects || controller.IsNewSolution) {
- string language = GetLanguageForTemplate (template);
+ if (template.HasProjects || controller.IsNewSolution) {
+ string language = GetLanguageForTemplate (template);
templatesTreeStore.AppendValues (
- iter,
- template.Name,
- GetIcon (template.IconId, IconSize.Dnd),
- template,
- subCategory.Name,
- language);
- }
+ iter,
+ template.Name,
+ GetIcon (template.IconId, IconSize.Dnd),
+ template,
+ subCategory.Name,
+ language);
+ }
}
}
templatesTreeView.ExpandAll ();
- }
-
- string GetLanguageForTemplate (SolutionTemplate template)
- {
- string language = controller.SelectedLanguage;
- if (template.AvailableLanguages.Contains (language)) {
- return language;
- }
-
- return template.AvailableLanguages.OrderBy (item => item).FirstOrDefault ();
- }
-
+ }
+
+ string GetLanguageForTemplate (SolutionTemplate template)
+ {
+ string language = controller.SelectedLanguage;
+ if (template.AvailableLanguages.Contains (language)) {
+ return language;
+ }
+
+ return template.AvailableLanguages.OrderBy (item => item).FirstOrDefault ();
+ }
+
void ShowRecentTemplates ()
{
templateTextRenderer.RenderRecentTemplate = true;
- languageCellRenderer.RenderRecentTemplate = true;
+ languageCellRenderer.RenderRecentTemplate = true;
var subCategoryName = Core.GettextCatalog.GetString ("Recently used templates");
var iter = templatesTreeStore.AppendValues (
subCategoryName,
@@ -463,10 +466,10 @@ SolutionTemplate GetSelectedTemplate ()
void ShowTemplate (SolutionTemplate template)
{
- string language = GetLanguageForTemplate (controller.SelectedTemplate);
-
+ string language = GetLanguageForTemplate (controller.SelectedTemplate);
+
TreeIter item;
- if (templatesTreeView.Selection.GetSelected (out item)) {
+ if (templatesTreeView.Selection.GetSelected (out item)) {
templatesTreeStore.SetValue (item, TemplateA11yLanguageNameColumn, language);
}
@@ -483,7 +486,7 @@ void SelectTemplateDefinedbyController ()
if (selectedTemplate != null && controller.RecentTemplates.Count > 0) {
if (controller.RecentTemplates.Contains (selectedTemplate)) {
- SelectRecentTemplatesCategory ();
+ SelectRecentTemplatesCategory ();
SelectTemplate (selectedTemplate);
return;
}
@@ -506,8 +509,8 @@ void SelectRecentTemplatesCategory ()
TreeIter iter = TreeIter.Zero;
// recent templates entry is always the first one and has no category assigned to it
if (templateCategoriesTreeStore.GetIterFirst (out iter) && templateCategoriesTreeStore.GetValue (iter, TemplateCategoryColumn) == null) {
- templateCategoriesTreeView.Selection.SelectIter (iter);
- TreePath path = templateCategoriesTreeStore.GetPath (iter);
+ templateCategoriesTreeView.Selection.SelectIter (iter);
+ TreePath path = templateCategoriesTreeStore.GetPath (iter);
templateCategoriesTreeView.ScrollToCell (path, null, true, 1, 0);
}
}
@@ -518,7 +521,7 @@ void SelectFirstSubTemplateCategory ()
foreach (var iter in iters) {
var currentCategory = templateCategoriesTreeStore.GetValue (iter, TemplateCategoryColumn) as TemplateCategory;
- if (currentCategory?.IsTopLevel == false) {
+ if (currentCategory?.IsTopLevel == false) {
templateCategoriesTreeView.Selection.SelectIter (iter);
TreePath path = templateCategoriesTreeStore.GetPath (iter);
templateCategoriesTreeView.ScrollToCell (path, null, true, 1, 0);
@@ -540,48 +543,48 @@ void SelectTemplateCategory (TemplateCategory category)
break;
}
}
- }
+ }
- IEnumerable WalkTree (TreeStore model, TreeIter iter)
+ IEnumerable WalkTree (TreeStore model, TreeIter iter)
{
if (iter.Equals(TreeIter.Zero)) {
- if (!model.GetIterFirst (out TreeIter first)) {
- yield break;
+ if (!model.GetIterFirst (out TreeIter first)) {
+ yield break;
}
iter = first;
}
- do {
+ do {
yield return iter;
if (model.IterHasChild (iter)) {
if (model.IterChildren (out TreeIter childIter, iter))
foreach (var node in WalkTree (model, childIter))
- yield return node;
- }
-
- } while (model.IterNext (ref iter));
+ yield return node;
+ }
+
+ } while (model.IterNext (ref iter));
}
void SelectTemplate (SolutionTemplate template)
{
- var iters = WalkTree (templatesTreeStore, TreeIter.Zero);
-
- foreach (var iter in iters) {
+ var iters = WalkTree (templatesTreeStore, TreeIter.Zero);
+
+ foreach (var iter in iters) {
var currentTemplate = templatesTreeStore.GetValue (iter, TemplateColumn) as SolutionTemplate;
- if (currentTemplate == template) {
- templatesTreeView.Selection.SelectIter (iter);
- TreePath path = templatesTreeStore.GetPath (iter);
+ if (currentTemplate == template) {
+ templatesTreeView.Selection.SelectIter (iter);
+ TreePath path = templatesTreeStore.GetPath (iter);
templatesTreeView.ScrollToCell (path, null, true, 1, 0);
break;
}
- }
+ }
}
void SelectFirstTemplate ()
{
// first child of first iter
- if (templatesTreeStore.GetIterFromString (out TreeIter iter, "0:0")) {
- templatesTreeView.Selection.SelectIter (iter);
+ if (templatesTreeStore.GetIterFromString (out TreeIter iter, "0:0")) {
+ templatesTreeView.Selection.SelectIter (iter);
}
}
@@ -591,7 +594,7 @@ public async Task MoveToNextPage ()
try {
CanMoveToNextPage = false;
// disable all controls on this dialog to prevent users actions
- VBox.Sensitive = false;
+ VBox.Sensitive = false;
await controller.Create ();
} catch {
// if something goes wrong, we need to enable dialog contols
@@ -656,7 +659,7 @@ Widget GetWidgetToDisplay ()
void FocusWidget (Widget widget)
{
- var widgetToFocus = widget;
+ var widgetToFocus = widget;
var commandRouter = widget as CommandRouterContainer;
if ((commandRouter != null) && commandRouter.Children.Any ()) {
widgetToFocus = commandRouter.Children [0];
@@ -667,8 +670,8 @@ void FocusWidget (Widget widget)
void TreeViewRowActivated (object o, RowActivatedArgs args)
{
- if (CanMoveToNextPage && !isLastPressedKeySpace &&
- IsSolutionTemplateOnActivatedRow ((Gtk.TreeView)o, args))
+ if (CanMoveToNextPage && !isLastPressedKeySpace &&
+ IsSolutionTemplateOnActivatedRow ((Gtk.TreeView)o, args))
MoveToNextPage ().Ignore();
isLastPressedKeySpace = false;
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/GtkProjectFolderPreviewWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/GtkProjectFolderPreviewWidget.cs
index a3df74f7789..a6012468d75 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/GtkProjectFolderPreviewWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/GtkProjectFolderPreviewWidget.cs
@@ -33,6 +33,9 @@
using MonoDevelop.Components.AutoTest;
using MonoDevelop.Ide.Gui;
using System.ComponentModel;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Projects
{
@@ -85,8 +88,8 @@ public GtkProjectFolderPreviewWidget ()
Styles.ColorGetHex (Styles.NewProjectDialog.ProjectConfigurationPreviewLabelColor),
global::Mono.Unix.Catalog.GetString ("PREVIEW"));
- CreateFolderTreeViewColumns ();
-
+ CreateFolderTreeViewColumns ();
+
// Accessibility
previewLabel.Accessible.Name = "projectFolderPreviewLabel";
previewLabel.Accessible.SetTitleFor (folderTreeView.Accessible);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs
index d60e6866f50..6a22095cf1a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs
@@ -41,6 +41,9 @@
using MonoDevelop.Components;
using MonoDevelop.Components.AutoTest;
using System.ComponentModel;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Projects
{
@@ -301,12 +304,12 @@ void InitializeTemplates ()
if (!boxProject.Visible || projectAddCheckbox.Active)
project = parentProject;
-
+
var templates = FileTemplate.GetFileTemplates (project, basePath);
// stable sort, to ensure the template ordering is maintained among templates with the same name
templates = templates.OrderBy(t => t.Name).ToList();
-
+
foreach (var template in templates) {
List langs = template.GetCompatibleLanguages (project, basePath);
if (langs != null) {
@@ -393,7 +396,7 @@ void FillCategoryTemplates (TreeIter iter)
var list = (List)(catStore.GetValue (iter, 2));
var itemNames = new HashSet();
foreach (TemplateItem item in list) {
- if (itemNames.Add(item.Name)) {
+ if (itemNames.Add(item.Name)) {
iconView.Add(item);
}
}
@@ -403,18 +406,18 @@ void FillCategoryTemplates (TreeIter iter)
if (templateItem != null)
iconView.CurrentlySelected = templateItem;
}
-
+
void SelectedTemplateChanged (object sender, EventArgs e)
{
FileTemplate template = iconView.CurrentlySelected != null ? iconView.CurrentlySelected.Template : null;
-
+
if (template != null) {
labelTemplateTitle.Markup = "" + template.Name + "";
infoLabel.Text = template.Description;
-
+
string filename = GetFileNameFromEntry ();
string name = null;
-
+
// Desensitize the text entry if the name is fixed.
// Be careful to store user-entered text so we can replace it if they change their selection
if (template.IsFixedFilename) {
@@ -429,13 +432,13 @@ void SelectedTemplateChanged (object sender, EventArgs e)
}
nameEntry.Sensitive = true;
}
-
+
// Fill in a default name if text entry is empty or contains a default name
if (string.IsNullOrEmpty (filename) || previousDefaultEntryText == filename) {
previousDefaultEntryText = template.DefaultFilename;
name = template.DefaultFilename;
}
-
+
if (name != null) {
// Note: this will cause UpdateOkStatus() to be invoked via the Gtk.Entry.Changed event.
nameEntry.Text = name;
@@ -458,23 +461,23 @@ string GetFileNameFromEntry ()
{
return nameEntry.Text.Trim ();
}
-
+
void UpdateOkStatus ()
{
try {
FileTemplate template = iconView.CurrentlySelected != null ? iconView.CurrentlySelected.Template : null;
-
+
if (template != null) {
string language = iconView.CurrentlySelected.Language;
string filename = GetFileNameFromEntry ();
Project project = null;
string path = null;
-
+
if (!boxProject.Visible || projectAddCheckbox.Active) {
project = parentProject;
path = basePath;
}
-
+
if (projectAddCheckbox.Active) {
okButton.Sensitive = template.IsValidName (filename, language);
} else {
@@ -593,7 +596,7 @@ void AddToProjectToggled (object o, EventArgs e)
projectFolderEntry.Sensitive = projectAddCheckbox.Active;
TemplateItem titem = (TemplateItem)iconView.CurrentlySelected;
-
+
if (projectAddCheckbox.Active) {
AddToProjectComboChanged (null, null);
} else {
@@ -611,7 +614,7 @@ void AddToProjectComboChanged (object o, EventArgs e)
{
int which = projectAddCombo.Active;
Project project = null;
-
+
try {
project = projectRefs[which];
} catch (IndexOutOfRangeException) { }
@@ -638,7 +641,7 @@ void InitializeComponents ()
iconView = new TemplateView ();
iconView.ShowAll ();
boxTemplates.PackStart (iconView, true, true, 0);
-
+
catStore = new TreeStore (typeof(string), typeof(List), typeof(List));
TreeViewColumn treeViewColumn = new TreeViewColumn ();
@@ -660,7 +663,7 @@ void InitializeComponents ()
infoLabel.Text = string.Empty;
labelTemplateTitle.Text = string.Empty;
-
+
Project[] projects = null;
if (parentProject == null && parentSolutionFolder == null)
projects = IdeApp.Workspace.GetAllProjects ().ToArray ();
@@ -725,8 +728,8 @@ protected virtual void OnScrolledInfoSizeAllocated (object o, Gtk.SizeAllocatedA
labelTemplateTitle.WidthRequest = scrolledInfo.Allocation.Width;
}
}
-
-
+
+
class Category
{
List categories = new List ();
@@ -760,11 +763,11 @@ public bool HasSelectedTemplate {
set { hasSelectedTemplate = value; }
}
}
-
+
class TemplateView: ScrolledWindow
{
TemplateTreeView tree;
-
+
public TemplateView ()
{
tree = new TemplateTreeView ();
@@ -782,30 +785,30 @@ public TemplateView ()
ShadowType = ShadowType.In;
ShowAll ();
}
-
+
public TemplateItem CurrentlySelected {
get { return tree.CurrentlySelected; }
set { tree.CurrentlySelected = value; }
}
-
+
public void Add (TemplateItem templateItem)
{
tree.Add (templateItem);
}
-
+
public void Clear ()
{
tree.Clear ();
}
-
+
public event EventHandler SelectionChanged;
public event EventHandler DoubleClicked;
}
-
+
class TemplateTreeView: TreeView
{
Gtk.ListStore templateStore;
-
+
public TemplateTreeView ()
{
HeadersVisible = false;
@@ -815,22 +818,22 @@ public TemplateTreeView ()
SemanticModelAttribute modelAttr = new SemanticModelAttribute ("templateStore__Icon", "templateStore__Name", "templateStore__Template");
TypeDescriptor.AddAttributes (templateStore, modelAttr);
-
+
TreeViewColumn col = new TreeViewColumn ();
CellRendererImage crp = new CellRendererImage ();
crp.StockSize = Gtk.IconSize.Dnd;
crp.Ypad = 2;
col.PackStart (crp, false);
col.AddAttribute (crp, "stock-id", 0);
-
+
CellRendererText crt = new CellRendererText ();
col.PackStart (crt, false);
col.AddAttribute (crt, "markup", 1);
-
+
AppendColumn (col);
ShowAll ();
}
-
+
public TemplateItem CurrentlySelected {
get {
Gtk.TreeIter iter;
@@ -851,7 +854,7 @@ public TemplateItem CurrentlySelected {
}
}
}
-
+
public void Add (TemplateItem templateItem)
{
string name = GLib.Markup.EscapeText (templateItem.Name);
@@ -860,7 +863,7 @@ public void Add (TemplateItem templateItem)
string icon = templateItem.Template.Icon;
templateStore.AppendValues (string.IsNullOrEmpty (icon) ? "md-file-source" : icon, name, templateItem);
}
-
+
public void Clear ()
{
templateStore.Clear ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/PackageReferencePanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/PackageReferencePanel.cs
index c172f9320b5..a5cf9dcd913 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/PackageReferencePanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/PackageReferencePanel.cs
@@ -38,10 +38,13 @@
using MonoDevelop.Ide.Gui.Components;
using MonoDevelop.Core.Text;
using MonoDevelop.Components;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Projects
{
- internal class PackageReferencePanel : VBox, IReferencePanel
+ internal class PackageReferencePanel : VBox, IReferencePanel
{
ListStore store = null;
private TreeView treeView = null;
@@ -53,7 +56,7 @@ internal class PackageReferencePanel : VBox, IReferencePanel
private IAssemblyContext targetContext;
private TargetFramework targetVersion;
private SelectReferenceDialog selectDialog = null;
-
+
const int ColName = 0;
const int ColVersion = 1;
const int ColAssembly = 2;
@@ -64,12 +67,12 @@ internal class PackageReferencePanel : VBox, IReferencePanel
const int ColMatchRank = 7;
const int ColProjectName = 8;
const int ColType = 9;
-
+
public PackageReferencePanel (SelectReferenceDialog selectDialog, bool showAll)
{
this.selectDialog = selectDialog;
this.showAll = showAll;
-
+
store = new ListStore (typeof (string), typeof (string), typeof (SystemAssembly), typeof (bool), typeof (string), typeof (string), typeof(IconId), typeof(int), typeof (string), typeof(ReferenceType));
treeView = new TreeView (store);
@@ -108,7 +111,7 @@ public PackageReferencePanel (SelectReferenceDialog selectDialog, bool showAll)
ShowAll ();
BorderWidth = 6;
}
-
+
public void SetProject (DotNetProject netProject)
{
selection.Clear ();
@@ -122,7 +125,7 @@ public void SetProject (DotNetProject netProject)
store.Clear ();
}
}
-
+
public void SetFilter (string filter)
{
if (!string.IsNullOrEmpty (filter))
@@ -141,33 +144,33 @@ public void SetTargetFramework (IAssemblyContext targetContext, TargetFramework
public void Reset ()
{
try {
- treeView.FreezeChildNotify ();
- store.Clear ();
-
- bool isPcl = configureProject.IsPortableLibrary;
-
- foreach (SystemAssembly systemAssembly in targetContext.GetAssemblies (targetVersion)) {
- if (systemAssembly.Package.IsFrameworkPackage && (isPcl || systemAssembly.Name == "mscorlib"))
- continue;
-
- bool selected = IsSelected (ReferenceType.Package, systemAssembly.FullName, systemAssembly.Package.Name);
- int matchRank = 0;
- string name, version;
-
- if (stringMatcher != null) {
- string txt = systemAssembly.Name + " " + systemAssembly.Version;
- if (!stringMatcher.CalcMatchRank (txt, out matchRank))
- continue;
- int [] match = stringMatcher.GetMatch (txt);
- name = GetMatchMarkup (treeView, systemAssembly.Name, match, 0);
- version = GetMatchMarkup (treeView, systemAssembly.Version, match, systemAssembly.Name.Length + 1);
- } else {
- name = GLib.Markup.EscapeText (systemAssembly.Name);
- version = GLib.Markup.EscapeText (systemAssembly.Version);
- }
- string pkg = systemAssembly.Package.GetDisplayName ();
- if (systemAssembly.Package.IsInternalPackage)
- pkg += " " + GettextCatalog.GetString ("(Provided by {0})", BrandingService.ApplicationName);
+ treeView.FreezeChildNotify ();
+ store.Clear ();
+
+ bool isPcl = configureProject.IsPortableLibrary;
+
+ foreach (SystemAssembly systemAssembly in targetContext.GetAssemblies (targetVersion)) {
+ if (systemAssembly.Package.IsFrameworkPackage && (isPcl || systemAssembly.Name == "mscorlib"))
+ continue;
+
+ bool selected = IsSelected (ReferenceType.Package, systemAssembly.FullName, systemAssembly.Package.Name);
+ int matchRank = 0;
+ string name, version;
+
+ if (stringMatcher != null) {
+ string txt = systemAssembly.Name + " " + systemAssembly.Version;
+ if (!stringMatcher.CalcMatchRank (txt, out matchRank))
+ continue;
+ int [] match = stringMatcher.GetMatch (txt);
+ name = GetMatchMarkup (treeView, systemAssembly.Name, match, 0);
+ version = GetMatchMarkup (treeView, systemAssembly.Version, match, systemAssembly.Name.Length + 1);
+ } else {
+ name = GLib.Markup.EscapeText (systemAssembly.Name);
+ version = GLib.Markup.EscapeText (systemAssembly.Version);
+ }
+ string pkg = systemAssembly.Package.GetDisplayName ();
+ if (systemAssembly.Package.IsInternalPackage)
+ pkg += " " + GettextCatalog.GetString ("(Provided by {0})", BrandingService.ApplicationName);
store.InsertWithValues (-1,
name,
@@ -178,83 +181,83 @@ public void Reset ()
pkg,
MonoDevelop.Ide.Gui.Stock.Package,
matchRank,
- null,
+ null,
ReferenceType.Package);
- }
-
- if (showAll) {
- Solution openSolution = configureProject.ParentSolution;
- if (openSolution == null)
- return;
-
- Dictionary references = new Dictionary ();
-
- foreach (Project projectEntry in openSolution.GetAllItems ()) {
-
- if (projectEntry == configureProject)
- continue;
-
- bool selected = IsSelected (ReferenceType.Project, projectEntry.Name, "");
- int matchRank = 0;
- string name;
-
- if (stringMatcher != null) {
- if (!stringMatcher.CalcMatchRank (projectEntry.Name, out matchRank))
- continue;
- int [] match = stringMatcher.GetMatch (projectEntry.Name);
- name = GetMatchMarkup (treeView, projectEntry.Name, match, 0);
- } else {
- name = GLib.Markup.EscapeText (projectEntry.Name);
- }
-
- DotNetProject netProject = projectEntry as DotNetProject;
- if (netProject != null) {
- if (ProjectReferencePanel.ProjectReferencesProject (references, null, netProject, configureProject.Name))
- continue;
-
- string reason;
- if (!configureProject.CanReferenceProject (netProject, out reason))
- continue;
+ }
+
+ if (showAll) {
+ Solution openSolution = configureProject.ParentSolution;
+ if (openSolution == null)
+ return;
+
+ Dictionary references = new Dictionary ();
+
+ foreach (Project projectEntry in openSolution.GetAllItems ()) {
+
+ if (projectEntry == configureProject)
+ continue;
+
+ bool selected = IsSelected (ReferenceType.Project, projectEntry.Name, "");
+ int matchRank = 0;
+ string name;
+
+ if (stringMatcher != null) {
+ if (!stringMatcher.CalcMatchRank (projectEntry.Name, out matchRank))
+ continue;
+ int [] match = stringMatcher.GetMatch (projectEntry.Name);
+ name = GetMatchMarkup (treeView, projectEntry.Name, match, 0);
+ } else {
+ name = GLib.Markup.EscapeText (projectEntry.Name);
}
- store.InsertWithValues (-1, name, "", null, selected, projectEntry.FileName.ToString (), "", projectEntry.StockIcon, matchRank, projectEntry.Name, ReferenceType.Project);
- }
-
- foreach (FilePath file in selectDialog.GetRecentFileReferences ()) {
- bool selected = IsSelected (ReferenceType.Assembly, file, "");
- int matchRank = 0;
- string fname = file.FileName;
- string name;
-
- string version = string.Empty;
- try {
- string sname = SystemAssemblyService.GetAssemblyName (file);
- var aname = SystemAssemblyService.ParseAssemblyName (sname);
- version = aname.Version.ToString ();
- } catch {
- continue;
- }
-
- if (stringMatcher != null) {
- if (!stringMatcher.CalcMatchRank (fname, out matchRank))
- continue;
- int [] match = stringMatcher.GetMatch (fname);
- name = GetMatchMarkup (treeView, fname, match, 0);
- } else {
- name = GLib.Markup.EscapeText (fname);
- }
- store.InsertWithValues (-1, name, version, null, selected, (string)file, GLib.Markup.EscapeText (file), MonoDevelop.Ide.Gui.Stock.OpenFolder, matchRank, null, ReferenceType.Assembly);
- }
+
+ DotNetProject netProject = projectEntry as DotNetProject;
+ if (netProject != null) {
+ if (ProjectReferencePanel.ProjectReferencesProject (references, null, netProject, configureProject.Name))
+ continue;
+
+ string reason;
+ if (!configureProject.CanReferenceProject (netProject, out reason))
+ continue;
+ }
+ store.InsertWithValues (-1, name, "", null, selected, projectEntry.FileName.ToString (), "", projectEntry.StockIcon, matchRank, projectEntry.Name, ReferenceType.Project);
+ }
+
+ foreach (FilePath file in selectDialog.GetRecentFileReferences ()) {
+ bool selected = IsSelected (ReferenceType.Assembly, file, "");
+ int matchRank = 0;
+ string fname = file.FileName;
+ string name;
+
+ string version = string.Empty;
+ try {
+ string sname = SystemAssemblyService.GetAssemblyName (file);
+ var aname = SystemAssemblyService.ParseAssemblyName (sname);
+ version = aname.Version.ToString ();
+ } catch {
+ continue;
+ }
+
+ if (stringMatcher != null) {
+ if (!stringMatcher.CalcMatchRank (fname, out matchRank))
+ continue;
+ int [] match = stringMatcher.GetMatch (fname);
+ name = GetMatchMarkup (treeView, fname, match, 0);
+ } else {
+ name = GLib.Markup.EscapeText (fname);
+ }
+ store.InsertWithValues (-1, name, version, null, selected, (string)file, GLib.Markup.EscapeText (file), MonoDevelop.Ide.Gui.Stock.OpenFolder, matchRank, null, ReferenceType.Assembly);
+ }
}
} finally {
treeView.ThawChildNotify ();
}
}
-
+
internal static string GetMatchMarkup (Gtk.Widget widget, string text, int[] matches, int startIndex)
{
StringBuilder result = new StringBuilder ();
int lastPos = 0;
- var color = HslColor.GenerateHighlightColors (widget.Style.Base (StateType.Normal),
+ var color = HslColor.GenerateHighlightColors (widget.Style.Base (StateType.Normal),
widget.Style.Text (StateType.Normal), 3)[2];
for (int n=0; n < matches.Length; n++) {
int pos = matches[n] - startIndex;
@@ -278,10 +281,10 @@ public void SignalRefChange (ProjectReference refInfo, bool newState)
{
if (!showAll && refInfo.ReferenceType != ReferenceType.Package)
return;
-
+
TreeIter iter;
bool found = false;
-
+
if (store.GetIterFirst (out iter)) {
do {
if (refInfo.ReferenceType == (ReferenceType) store.GetValue(iter, ColType)) {
@@ -310,7 +313,7 @@ public void SignalRefChange (ProjectReference refInfo, bool newState)
store.SetValue(iter, ColSelected, newState);
SetSelection (refInfo.ReferenceType, refInfo.Reference, refInfo.Package != null ? refInfo.Package.Name : "", newState);
}
-
+
void SetSelection (ReferenceType type, string name, string pkg, bool selected)
{
if (selected)
@@ -318,7 +321,7 @@ void SetSelection (ReferenceType type, string name, string pkg, bool selected)
else
selection.Remove (type + " " + name + " " + pkg);
}
-
+
bool IsSelected (ReferenceType type, string name, string pkg)
{
return selection.Contains (type + " " + name + " " + pkg);
@@ -327,13 +330,13 @@ bool IsSelected (ReferenceType type, string name, string pkg)
private int Sort (TreeModel model, TreeIter left, TreeIter right)
{
int result = 0;
-
+
if (stringMatcher != null) {
result = ((int)model.GetValue (right, ColMatchRank)).CompareTo ((int)model.GetValue (left, ColMatchRank));
if (result != 0)
return result;
}
-
+
result = String.Compare ((string)model.GetValue (left, 0), (string)model.GetValue (right, 0), StringComparison.InvariantCultureIgnoreCase);
if (result != 0)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectFileSelectorDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectFileSelectorDialog.cs
index 0a394c3ba86..bc90de55101 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectFileSelectorDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectFileSelectorDialog.cs
@@ -1,21 +1,21 @@
-//
+//
// ProjectFileSelectorDialog.cs
-//
+//
// Author:
// Michael Hutchinson
-//
+//
// Copyright (c) 2009 Novell, Inc. (http://www.novell.com)
-//
+//
// 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
@@ -33,6 +33,9 @@
using MonoDevelop.Projects;
using MonoDevelop.Components.Extensions;
using MonoDevelop.Components;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Projects
{
@@ -44,11 +47,11 @@ public partial class ProjectFileSelectorDialog : Gtk.Dialog
Project project;
TreeStore dirStore = new TreeStore (typeof (string), typeof (FilePath));
ListStore fileStore = new ListStore (typeof (ProjectFile), typeof (Xwt.Drawing.Image));
-
+
// NOTE: these should not be disposed, since they come from the icon scheme, and must instead be unref'd
// and the only way to unref is to let the finalizer handle it.
Xwt.Drawing.Image projBuf, dirOpenBuf, dirClosedBuf;
-
+
public ProjectFileSelectorDialog (Project project)
: this (project, GettextCatalog.GetString ("All files"), "*")
{
@@ -64,13 +67,13 @@ public ProjectFileSelectorDialog (Project project, string defaultFilterName, str
this.project = project;
this.defaultFilter = new SelectFileDialogFilter (defaultFilterName, defaultFilterPattern ?? "*");
this.buildActions = buildActions;
-
+
this.Build();
-
+
projBuf = ImageService.GetIcon (project.StockIcon, IconSize.Menu);
dirClosedBuf = ImageService.GetIcon (MonoDevelop.Ide.Gui.Stock.ClosedFolder, IconSize.Menu);
dirOpenBuf = ImageService.GetIcon (MonoDevelop.Ide.Gui.Stock.OpenFolder, IconSize.Menu);
-
+
TreeViewColumn projectCol = new TreeViewColumn ();
projectCol.Title = GettextCatalog.GetString ("Project Folders");
var pixRenderer = new CellRendererImage ();
@@ -88,7 +91,7 @@ public ProjectFileSelectorDialog (Project project, string defaultFilterName, str
fileList.GrabFocus ();
};
projectTree.KeyPressEvent += ProjectListKeyPressEvent;
-
+
TreeViewColumn fileCol = new TreeViewColumn ();
var filePixRenderer = new CellRendererImage ();
fileCol.Title = GettextCatalog.GetString ("Files");
@@ -105,17 +108,17 @@ public ProjectFileSelectorDialog (Project project, string defaultFilterName, str
};
fileList.KeyPressEvent += FileListKeyPressEvent;
fileList.KeyReleaseEvent += FileListKeyReleaseEvent;
-
+
TreeIter root;
if (dirStore.GetIterFirst (out root))
projectTree.Selection.SelectIter (root);
-
+
UpdateFileList (null, null);
-
+
projectTree.Selection.Changed += UpdateFileList;
fileList.Selection.Changed += UpdateSensitivity;
-
-
+
+
this.DefaultResponse = ResponseType.Cancel;
this.Modal = true;
}
@@ -127,9 +130,9 @@ void FileListKeyReleaseEvent (object o, KeyReleaseEventArgs args)
args.RetVal = true;
}
}
-
+
const Gdk.ModifierType modifiers =
- Gdk.ModifierType.ControlMask |
+ Gdk.ModifierType.ControlMask |
Gdk.ModifierType.ShiftMask |
Gdk.ModifierType.Mod1Mask |
Gdk.ModifierType.SuperMask |
@@ -145,7 +148,7 @@ void FileListKeyPressEvent (object o, KeyPressEventArgs args)
projectTree.GrabFocus ();
}
}
-
+
[GLib.ConnectBefore]
void ProjectListKeyPressEvent (object o, KeyPressEventArgs args)
{
@@ -154,7 +157,7 @@ void ProjectListKeyPressEvent (object o, KeyPressEventArgs args)
fileList.GrabFocus ();
}
}
-
+
void InitDirs (TreeIter root)
{
//iters in TreeStore should remain valid as long as we only add nodes
@@ -168,28 +171,28 @@ void InitDirs (TreeIter root)
InitDir (root, iters, dirname);
}
}
-
+
TreeIter InitDir (TreeIter root, Dictionary iters, FilePath dir)
{
if (dir.IsNullOrEmpty)
return root;
-
+
TreeIter value;
if (iters.TryGetValue (dir, out value))
return value;
-
+
TreeIter parent = InitDir (root, iters, dir.ParentDirectory);
value = dirStore.AppendValues (parent, dir.FileName, dir);
iters.Add (dir, value);
-
+
return value;
}
-
+
void PixDataFunc (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
{
var pixRenderer = (CellRendererImage) cell;
string dirname = (string) tree_model.GetValue (iter, 0);
-
+
if (dirname.Length == 0) {
pixRenderer.ImageExpanderOpen = projBuf;
pixRenderer.ImageExpanderClosed = projBuf;
@@ -200,7 +203,7 @@ void PixDataFunc (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_
pixRenderer.ImageExpanderClosed = dirClosedBuf;
pixRenderer.Image = dirClosedBuf;
}
-
+
void TxtDataFunc (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
{
CellRendererText txtRenderer = (CellRendererText) cell;
@@ -209,18 +212,18 @@ void TxtDataFunc (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_
txtRenderer.Text = project.Name;
return;
}
-
+
int lastSlash = dirname.LastIndexOf (System.IO.Path.DirectorySeparatorChar);
- txtRenderer.Text = lastSlash < 0? dirname : dirname.Substring (lastSlash + 1);
+ txtRenderer.Text = lastSlash < 0? dirname : dirname.Substring (lastSlash + 1);
}
-
+
void TxtFileDataFunc (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
{
CellRendererText txtRenderer = (CellRendererText) cell;
ProjectFile pf = (ProjectFile)tree_model.GetValue (iter, 0);
txtRenderer.Text = System.IO.Path.GetFileName (pf.FilePath);
}
-
+
public void AddFileFilter (string name, string pattern)
{
if (filters == null) {
@@ -236,12 +239,12 @@ public void AddFileFilter (string name, string pattern)
filters.Add (new SelectFileDialogFilter (name, pattern));
fileTypeCombo.AppendText (pattern);
}
-
+
///
/// Remains valid after the dialog has been destroyed
///
public ProjectFile SelectedFile { get; private set; }
-
+
FilePath GetSelectedDirectory ( )
{
TreeIter iter;
@@ -250,11 +253,11 @@ FilePath GetSelectedDirectory ( )
var dir = (FilePath)dirStore.GetValue (iter, 1);
return project.BaseDirectory.Combine (dir);
}
-
+
void UpdateFileList (object sender, EventArgs args)
{
fileStore.Clear ();
-
+
string pattern = defaultFilter.Patterns [0];
if (filters != null) {
pattern = filters[fileTypeCombo.Active].Patterns [0];
@@ -265,28 +268,28 @@ void UpdateFileList (object sender, EventArgs args)
pattern = pattern.Replace ("\\|","$|^");
pattern = "^" + pattern + "$";
var regex = new Regex (pattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);
-
+
string dir = GetSelectedDirectory ().ToString ();
foreach (ProjectFile pf in project.Files) {
string pathStr = pf.FilePath.ToString ();
if (pf.Subtype == Subtype.Directory || !pathStr.StartsWith (dir))
continue;
-
+
int split = pathStr.LastIndexOf (System.IO.Path.DirectorySeparatorChar);
if (split != dir.Length)
continue;
-
+
if (regex.IsMatch (pf.FilePath.FileName))
fileStore.AppendValues (pf, IdeServices.DesktopService.GetIconForFile (pf.FilePath, Gtk.IconSize.Menu));
}
-
+
TreeIter root;
if (fileStore.GetIterFirst (out root))
fileList.Selection.SelectIter (root);
-
+
UpdateSensitivity (null, null);
}
-
+
void UpdateSensitivity (object sender, EventArgs args)
{
TreeIter iter;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectReferencePanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectReferencePanel.cs
index e1dc9b1feff..15e5a3dd873 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectReferencePanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ProjectReferencePanel.cs
@@ -1,23 +1,23 @@
-//
+//
// ProjectReferencePanel.cs
-//
+//
// Author:
// Todd Berman
// Lluis Sanchez Gual
-//
+//
// Copyright (c) 2004 Todd Berman
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -36,9 +36,12 @@
using Gtk;
using MonoDevelop.Core.Text;
using MonoDevelop.Components;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Projects {
-
+
internal class ProjectReferencePanel : VBox, IReferencePanel
{
SelectReferenceDialog selectDialog;
@@ -48,7 +51,7 @@ internal class ProjectReferencePanel : VBox, IReferencePanel
StringMatcher stringMatcher;
DotNetProject configureProject;
HashSet selection = new HashSet ();
-
+
const int ColName = 0;
const int ColPath = 1;
const int ColProject = 2;
@@ -56,19 +59,19 @@ internal class ProjectReferencePanel : VBox, IReferencePanel
const int ColPixbuf = 4;
const int ColVisible = 5;
const int ColColor = 6;
-
-
+
+
public ProjectReferencePanel (SelectReferenceDialog selectDialog) : base (false, 6)
{
this.selectDialog = selectDialog;
-
+
store = new ListStore (typeof (string), typeof (string), typeof(Project), typeof(bool), typeof(Xwt.Drawing.Image), typeof(bool), typeof(string));
store.SetSortFunc (0, CompareNodes);
treeView = new TreeView (store);
-
+
TreeViewColumn firstColumn = new TreeViewColumn ();
TreeViewColumn secondColumn = new TreeViewColumn ();
-
+
CellRendererToggle tog_render = new CellRendererToggle ();
tog_render.Xalign = 0;
tog_render.Toggled += new Gtk.ToggledHandler (AddReference);
@@ -80,24 +83,24 @@ public ProjectReferencePanel (SelectReferenceDialog selectDialog) : base (false,
CellRendererImage pix_render = new CellRendererImage ();
secondColumn.PackStart (pix_render, false);
secondColumn.AddAttribute (pix_render, "image", ColPixbuf);
-
+
CellRendererText text_render = new CellRendererText ();
secondColumn.PackStart (text_render, true);
secondColumn.AddAttribute (text_render, "markup", ColName);
secondColumn.AddAttribute (text_render, "foreground", ColColor);
-
+
treeView.AppendColumn (firstColumn);
treeView.AppendColumn (secondColumn);
treeView.AppendColumn (GettextCatalog.GetString ("Directory"), new CellRendererText (), "markup", ColPath);
-
+
ScrolledWindow sc = new ScrolledWindow ();
sc.ShadowType = Gtk.ShadowType.In;
sc.Add (treeView);
PackStart (sc, true, true, 0);
-
+
store.SetSortColumnId (0, SortType.Ascending);
ShowAll ();
-
+
BorderWidth = 6;
}
@@ -112,7 +115,7 @@ public void SetProject (DotNetProject configureProject)
Show ();
}
}
-
+
public void SetFilter (string filter)
{
if (!string.IsNullOrEmpty (filter))
@@ -121,33 +124,33 @@ public void SetFilter (string filter)
stringMatcher = null;
PopulateListView ();
}
-
+
public void AddReference(object sender, Gtk.ToggledArgs e)
{
Gtk.TreeIter iter;
store.GetIterFromString (out iter, e.Path);
Project project = (Project) store.GetValue (iter, 2);
-
+
if ((bool)store.GetValue (iter, ColSelected) == false) {
store.SetValue (iter, ColSelected, true);
selectDialog.AddReference (ProjectReference.CreateProjectReference (project));
-
+
} else {
store.SetValue (iter, ColSelected, false);
selectDialog.RemoveReference(ReferenceType.Project, project.Name);
}
}
-
+
public void SignalRefChange (ProjectReference pref, bool newstate)
{
if (pref.ReferenceType != ReferenceType.Project)
return;
-
+
if (newstate)
selection.Add (pref.Reference);
else
selection.Remove (pref.Reference);
-
+
string refLoc = pref.Reference;
Gtk.TreeIter looping_iter;
if (!store.GetIterFirst (out looping_iter))
@@ -163,8 +166,8 @@ public void SignalRefChange (ProjectReference pref, bool newstate)
}
} while (store.IterNext (ref looping_iter));
}
-
- int CompareNodes (Gtk.TreeModel model, Gtk.TreeIter a, Gtk.TreeIter b)
+
+ int CompareNodes (TreeModel model, Gtk.TreeIter a, Gtk.TreeIter b)
{
string s1 = (string) store.GetValue (a, 0);
string s2 = (string) store.GetValue (b, 0);
@@ -172,17 +175,17 @@ int CompareNodes (Gtk.TreeModel model, Gtk.TreeIter a, Gtk.TreeIter b)
if (s2 == string.Empty) return -1;
return String.Compare (s1, s2, true);
}
-
+
void PopulateListView ()
{
store.Clear ();
-
+
Solution openSolution = configureProject.ParentSolution;
if (openSolution == null)
return;
-
+
Dictionary references = new Dictionary ();
-
+
foreach (Project projectEntry in openSolution.GetAllItems()) {
if (projectEntry == configureProject)
@@ -193,7 +196,7 @@ void PopulateListView ()
string txt;
int matchRank = 0;
-
+
if (stringMatcher != null) {
if (!stringMatcher.CalcMatchRank (projectEntry.Name, out matchRank))
continue;
@@ -202,7 +205,7 @@ void PopulateListView ()
} else {
txt = GLib.Markup.EscapeText (projectEntry.Name);
}
-
+
bool selected = selection.Contains (projectEntry.Name);
bool allowSelecting = true;
DotNetProject netProject = projectEntry as DotNetProject;
@@ -217,7 +220,7 @@ void PopulateListView ()
allowSelecting = false;
}
}
-
+
var icon = ImageService.GetIcon (projectEntry.StockIcon, IconSize.Menu);
if (!allowSelecting) {
// Don't show unselectable projects if there is a filter
@@ -230,7 +233,7 @@ void PopulateListView ()
store.SetValue (it, ColColor, "dimgrey");
}
}
-
+
internal static bool ProjectReferencesProject (Dictionary references, HashSet parentDeps,
DotNetProject project, string targetProject)
{
@@ -258,7 +261,7 @@ internal static bool ProjectReferencesProject (Dictionary re
parentDeps.Add (pref.Name);
bool referencesTarget = ProjectReferencesProject (references, parentDeps, pref, targetProject);
parentDeps.Remove (pref.Name);
-
+
if (referencesTarget) {
references [project] = true;
return true;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/SelectReferenceDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/SelectReferenceDialog.cs
index 1ca8ffb6191..d38d1f9b799 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/SelectReferenceDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/SelectReferenceDialog.cs
@@ -1,22 +1,22 @@
// SelectReferenceDialog.cs
-//
+//
// Author:
// Todd Berman
// Lluis Sanchez Gual
-//
+//
// Copyright (c) 2004 Todd Berman
// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+//
// 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
@@ -37,6 +37,9 @@
using MonoDevelop.Components.Commands;
using System.IO;
using System.Runtime.InteropServices;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Projects
{
@@ -46,11 +49,11 @@ internal interface IReferencePanel
void SignalRefChange (ProjectReference refInfo, bool newState);
void SetFilter (string filter);
}
-
+
internal partial class SelectReferenceDialog: Gtk.Dialog
{
ListStore refTreeStore;
-
+
PackageReferencePanel packageRefPanel;
PackageReferencePanel allRefPanel;
ProjectReferencePanel projectRefPanel;
@@ -59,21 +62,21 @@ internal partial class SelectReferenceDialog: Gtk.Dialog
List panels = new List ();
Notebook mainBook;
CombinedBox combinedBox;
- SearchEntry filterEntry;
+ MonoDevelop.Components.SearchEntry filterEntry;
Dictionary> recentFiles;
bool recentFilesModified = false;
static FilePath RecentAssembliesFile = UserProfile.Current.CacheDir.Combine ("RecentAssemblies2.txt");
const int RecentFileListSize = 75;
-
+
const int NameColumn = 0;
const int SecondaryNameColumn = 1;
const int TypeNameColumn = 2;
const int LocationColumn = 3;
const int ProjectReferenceColumn = 4;
const int IconColumn = 5;
-
+
public ProjectReferenceCollection ReferenceInformations {
get {
ProjectReferenceCollection referenceInformations = new ProjectReferenceCollection();
@@ -92,7 +95,7 @@ protected void OnMainBookSwitchPage (object o, Gtk.SwitchPageArgs args)
{
filterEntry.Sensitive = args.PageNum != 3;
}
-
+
public void SetProject (DotNetProject configureProject)
{
this.configureProject = configureProject;
@@ -109,12 +112,12 @@ public void SetProject (DotNetProject configureProject)
OnChanged (null, null);
}
-
+
TreeIter AppendReference (ProjectReference refInfo)
{
foreach (var p in panels)
p.SignalRefChange (refInfo, true);
-
+
switch (refInfo.ReferenceType) {
case ReferenceType.Assembly:
return AddAssemplyReference (refInfo);
@@ -178,7 +181,7 @@ public SelectReferenceDialog ()
filterEntry = combinedBox.FilterEntry;
boxRefs.WidthRequest = 200;
-
+
refTreeStore = new ListStore (typeof (string), typeof(string), typeof(string), typeof(string), typeof(ProjectReference), typeof(Xwt.Drawing.Image));
ReferencesTreeView.Model = refTreeStore;
@@ -193,11 +196,11 @@ public SelectReferenceDialog ()
col.AddAttribute (text_render, "text-markup", NameColumn);
col.AddAttribute (text_render, "secondary-text-markup", SecondaryNameColumn);
text_render.Ellipsize = Pango.EllipsizeMode.End;
-
+
ReferencesTreeView.AppendColumn (col);
// ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Type"), new CellRendererText (), "text", TypeNameColumn);
// ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Location"), new CellRendererText (), "text", LocationColumn);
-
+
projectRefPanel = new ProjectReferencePanel (this);
packageRefPanel = new PackageReferencePanel (this, false);
allRefPanel = new PackageReferencePanel (this, true);
@@ -206,39 +209,39 @@ public SelectReferenceDialog ()
panels.Add (packageRefPanel);
panels.Add (projectRefPanel);
panels.Add (assemblyRefPanel);
-
+
//mainBook.RemovePage (mainBook.CurrentPage);
-
+
HBox tab = new HBox (false, 3);
// tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Reference, IconSize.Menu)), false, false, 0);
tab.PackStart (new Label (GettextCatalog.GetString ("_All")), true, true, 0);
tab.BorderWidth = 3;
tab.ShowAll ();
mainBook.AppendPage (allRefPanel, tab);
-
+
tab = new HBox (false, 3);
// tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Package, IconSize.Menu)), false, false, 0);
tab.PackStart (new Label (GettextCatalog.GetString ("_Packages")), true, true, 0);
tab.BorderWidth = 3;
tab.ShowAll ();
mainBook.AppendPage (packageRefPanel, tab);
-
+
tab = new HBox (false, 3);
// tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Project, IconSize.Menu)), false, false, 0);
tab.PackStart (new Label (GettextCatalog.GetString ("Pro_jects")), true, true, 0);
tab.BorderWidth = 3;
tab.ShowAll ();
mainBook.AppendPage (projectRefPanel, tab);
-
+
tab = new HBox (false, 3);
// tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.OpenFolder, IconSize.Menu)), false, false, 0);
tab.PackStart (new Label (GettextCatalog.GetString (".Net A_ssembly")), true, true, 0);
tab.BorderWidth = 3;
tab.ShowAll ();
mainBook.AppendPage (assemblyRefPanel, tab);
-
+
mainBook.Page = 0;
-
+
var w = selectedHeader.Child;
selectedHeader.Remove (w);
HeaderBox header = new HeaderBox (1, 0, 1, 1);
@@ -246,14 +249,14 @@ public SelectReferenceDialog ()
header.GradientBackground = true;
header.Add (w);
selectedHeader.Add (header);
-
+
RemoveReferenceButton.CanFocus = true;
ReferencesTreeView.Selection.Changed += new EventHandler (OnChanged);
Child.ShowAll ();
OnChanged (null, null);
InsertFilterEntry ();
}
-
+
void InsertFilterEntry ()
{
filterEntry.Activated += HandleFilterEntryActivated;
@@ -273,7 +276,7 @@ protected override void OnShown ()
{
base.OnShown ();
}
-
+
protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
{
bool complete;
@@ -293,7 +296,7 @@ void OnChanged (object o, EventArgs e)
else
RemoveReferenceButton.Sensitive = false;
}
-
+
string GetTypeText (ProjectReference pref)
{
switch (pref.ReferenceType) {
@@ -311,18 +314,18 @@ public void RemoveReference (ReferenceType referenceType, string reference)
return;
refTreeStore.Remove (ref iter);
}
-
+
public void AddReference (ProjectReference pref)
{
TreeIter iter = FindReference (pref.ReferenceType, pref.Reference);
if (!iter.Equals (TreeIter.Zero))
return;
-
+
TreeIter ni = AppendReference (pref);
if (!ni.Equals (TreeIter.Zero))
ReferencesTreeView.ScrollToCell (refTreeStore.GetPath (ni), null, false, 0, 0);
}
-
+
TreeIter FindReference (ReferenceType referenceType, string reference)
{
TreeIter looping_iter;
@@ -336,7 +339,7 @@ TreeIter FindReference (ReferenceType referenceType, string reference)
}
return TreeIter.Zero;
}
-
+
protected void RemoveReference (object sender, EventArgs e)
{
TreeIter iter;
@@ -371,7 +374,7 @@ protected void OnReferencesTreeViewRowActivated (object o, Gtk.RowActivatedArgs
{
Respond (ResponseType.Ok);
}
-
+
public void RegisterFileReference (FilePath file, FilePath solutionFile = default (FilePath))
{
LoadRecentFiles ();
@@ -391,7 +394,7 @@ protected void OnReferencesTreeViewRowActivated (object o, Gtk.RowActivatedArgs
if (files.Count > RecentFileListSize)
files.RemoveAt (0);
}
-
+
public IEnumerable GetRecentFileReferences (FilePath solutionFile = default(FilePath))
{
LoadRecentFiles ();
@@ -403,12 +406,12 @@ protected void OnReferencesTreeViewRowActivated (object o, Gtk.RowActivatedArgs
result = result != null ? result.Concat (list) : list;
return result ?? new FilePath[0];
}
-
+
void LoadRecentFiles ()
{
if (recentFiles != null)
return;
-
+
recentFilesModified = false;
recentFiles = new Dictionary> ();
@@ -432,7 +435,7 @@ void LoadRecentFiles ()
}
}
}
-
+
void SaveRecentFiles ()
{
if (!recentFilesModified)
@@ -465,14 +468,14 @@ void SaveRecentFiles (StreamWriter sw, FilePath solPath, List files)
foreach (var f in existing)
sw.WriteLine (f);
}
-
+
protected override void OnHidden ()
{
base.OnHidden ();
SaveRecentFiles ();
recentFiles = null;
}
-
+
protected override void OnDestroyed ()
{
base.OnDestroyed ();
@@ -483,10 +486,10 @@ protected override void OnDestroyed ()
class CombinedBox: Gtk.EventBox
{
- SearchEntry filterEntry;
+ MonoDevelop.Components.SearchEntry filterEntry;
KeyboardShortcut searchShortcut;
- public SearchEntry FilterEntry {
+ public MonoDevelop.Components.SearchEntry FilterEntry {
get { return filterEntry; }
}
@@ -545,7 +548,7 @@ protected override void OnSizeRequested (ref Requisition requisition)
requisition.Width += entryRequest.Width;
requisition.Height = Math.Max (requisition.Height, entryRequest.Height);
}
-
+
void RepositionFilter ()
{
var req = filterEntry.SizeRequest ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/TemplatePickerWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/TemplatePickerWidget.cs
index 8661c1239c0..dc8810cc4e6 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/TemplatePickerWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/TemplatePickerWidget.cs
@@ -1,21 +1,21 @@
-//
+//
// TemplatePickerWidget.cs
-//
+//
// Author:
// Michael Hutchinson
-//
+//
// Copyright (c) 2011 Novell, Inc.
-//
+//
// 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
@@ -33,6 +33,9 @@
using MonoDevelop.Ide.Templates;
using System.Linq;
using MonoDevelop.Ide.Gui.Components;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Projects
{
@@ -40,33 +43,33 @@ class TemplatePickerWidget : Bin
{
SectionList sectionList = new SectionList ();
SectionList.Section recentSection, installedSection, onlineSection;
-
+
CategoryTreeView recentTemplateCatView = new CategoryTreeView ();
CategoryTreeView installedTemplateCatView = new CategoryTreeView ();
CategoryTreeView onlineTemplateCatView = new CategoryTreeView ();
-
+
List recentTemplates = new List ();
List installedTemplates = new List ();
List onlineTemplates = new List ();
-
+
HPaned hsplit = new HPaned ();
VPaned vsplit = new VPaned ();
VBox rightVbox = new VBox ();
HBox searchHbox = new HBox ();
-
+
CompactScrolledWindow infoScrolledWindow = new CompactScrolledWindow ();
VBox infoBox = new VBox ();
Label infoHeaderLabel = new Label ();
Label infoDecriptionLabel = new Label ();
-
- SearchEntry searchEntry = new SearchEntry ();
-
+
+ MonoDevelop.Components.SearchEntry searchEntry = new MonoDevelop.Components.SearchEntry ();
+
TemplateView templateView = new TemplateView ();
-
+
public TemplatePickerWidget ()
{
BinContainer.Attach (this);
-
+
infoBox.BorderWidth = 4;
infoBox.Spacing = 4;
infoHeaderLabel.Wrap = true;
@@ -74,7 +77,7 @@ public TemplatePickerWidget ()
infoDecriptionLabel.Wrap = true;
infoDecriptionLabel.Xalign = 0;
infoDecriptionLabel.Yalign = 0;
-
+
infoBox.SizeAllocated += delegate {
var w = infoBox.Allocation.Width - 10;
if (infoHeaderLabel.WidthRequest != w) {
@@ -82,41 +85,41 @@ public TemplatePickerWidget ()
infoDecriptionLabel.WidthRequest = w;
}
};
-
+
recentSection = sectionList.AddSection (GettextCatalog.GetString ("Recent Templates"), recentTemplateCatView);
installedSection = sectionList.AddSection (GettextCatalog.GetString ("Installed Templates"), installedTemplateCatView);
onlineSection = sectionList.AddSection (GettextCatalog.GetString ("Online Templates"), onlineTemplateCatView);
-
+
recentSection.Activated += delegate {
LoadTemplatesIntoView (recentTemplates);
templateView.SetCategoryFilter (recentTemplateCatView.GetSelection ());
};
-
+
installedSection.Activated += delegate {
LoadTemplatesIntoView (installedTemplates);
templateView.SetCategoryFilter (installedTemplateCatView.GetSelection ());
};
-
+
onlineSection.Activated += delegate {
LoadTemplatesIntoView (onlineTemplates);
templateView.SetCategoryFilter (onlineTemplateCatView.GetSelection ());
};
-
+
recentTemplateCatView.SelectionChanged += delegate {
if (recentSection.IsActive)
templateView.SetCategoryFilter (recentTemplateCatView.GetSelection ());
};
-
+
installedTemplateCatView.SelectionChanged += delegate {
if (installedSection.IsActive)
templateView.SetCategoryFilter (installedTemplateCatView.GetSelection ());
};
-
+
onlineTemplateCatView.SelectionChanged += delegate {
if (onlineSection.IsActive)
templateView.SetCategoryFilter (onlineTemplateCatView.GetSelection ());
};
-
+
searchEntry.WidthRequest = 150;
searchEntry.EmptyMessage = GettextCatalog.GetString ("Search…");
searchEntry.Changed += delegate {
@@ -127,17 +130,17 @@ public TemplatePickerWidget ()
};
searchEntry.Ready = true;
searchEntry.Show ();
-
+
installedTemplateCatView.SelectionChanged += delegate (object sender, EventArgs e) {
var selection = installedTemplateCatView.GetSelection ();
templateView.SetCategoryFilter (selection);
};
-
+
templateView.SelectionChanged += TemplateSelectionChanged;
templateView.DoubleClicked += delegate {
OnActivated ();
};
-
+
Add (hsplit);
hsplit.Pack1 (sectionList, true, false);
hsplit.Pack2 (rightVbox, true, false);
@@ -156,13 +159,13 @@ public TemplatePickerWidget ()
infoBox.PackStart (infoHeaderLabel, false, false, 0);
infoBox.PackStart (infoDecriptionLabel, true, true, 0);
hsplit.ShowAll ();
-
+
//sane proportions for the splitter children
templateView.HeightRequest = 200;
infoScrolledWindow.HeightRequest = 75;
sectionList.WidthRequest = 150;
rightVbox.WidthRequest = 300;
-
+
sectionList.ActiveIndex = 1;
}
@@ -178,21 +181,21 @@ void TemplateSelectionChanged (object sender, EventArgs e)
}
OnSelectionChanged ();
}
-
+
void OnSelectionChanged ()
{
var evt = SelectionChanged;
if (evt != null)
evt (this, null);
}
-
+
void OnActivated ()
{
var evt = Activated;
if (evt != null)
evt (this, null);
}
-
+
public ProjectTemplate Selection {
get {
var sel = templateView.CurrentlySelected;
@@ -201,15 +204,15 @@ public ProjectTemplate Selection {
return sel.Template;
}
}
-
+
public void SelectTemplate (string id)
{
templateView.SelectTemplate (id);
}
-
+
public event EventHandler SelectionChanged;
public event EventHandler Activated;
-
+
void LoadTemplatesIntoView (List templates)
{
templateView.Clear ();
@@ -217,7 +220,7 @@ void LoadTemplatesIntoView (List templates)
templateView.AddItem (t);
}
}
-
+
public void LoadInstalledTemplates (IEnumerable templates)
{
foreach (var template in templates) {
@@ -227,15 +230,15 @@ public void LoadInstalledTemplates (IEnumerable templates)
}
installedTemplates.Sort ((a,b) => String.Compare (a.Name, b.Name));
installedTemplateCatView.Load (installedTemplates);
-
-
+
+
if (installedTemplateCatView.GetSelection () == null)
installedTemplateCatView.SetSelection (new string[0]);
-
+
if (installedSection.IsActive)
LoadTemplatesIntoView (installedTemplates);
}
-
+
public void LoadRecentTemplates (IEnumerable templates)
{
foreach (var template in templates) {
@@ -245,14 +248,14 @@ public void LoadRecentTemplates (IEnumerable templates)
}
//don't sort recent templates, they should already be in most->least recent
recentTemplateCatView.Load (recentTemplates);
-
+
if (recentTemplateCatView.GetSelection () == null)
recentTemplateCatView.SetSelection (new string[0]);
-
+
if (recentSection.IsActive)
LoadTemplatesIntoView (installedTemplates);
}
-
+
public string InstalledTemplateSelectedCategory {
get {
return string.Join ("/", installedTemplateCatView.GetSelection ());
@@ -262,7 +265,7 @@ public string InstalledTemplateSelectedCategory {
installedTemplateCatView.SetSelection (cat);
}
}
-
+
public string RecentTemplateSelectedCategory {
get {
return string.Join ("/", recentTemplateCatView.GetSelection ());
@@ -272,12 +275,12 @@ public string RecentTemplateSelectedCategory {
recentTemplateCatView.SetSelection (cat);
}
}
-
+
class CategoryTreeView : CompactScrolledWindow
{
TreeView view = new TreeView ();
TreeStore store = new TreeStore (typeof (string));
-
+
public CategoryTreeView ()
{
view.Model = store;
@@ -293,26 +296,26 @@ public CategoryTreeView ()
};
this.Add (view);
}
-
+
public void Load (List templates)
{
store.Clear ();
-
+
string general = GettextCatalog.GetString ("General");
string all = GettextCatalog.GetString ("All");
var categories = new Dictionary ();
-
+
foreach (var tp in templates) {
string[] catPath;
if (tp.Category == null || tp.Category.Length == 0)
catPath = new string[] { general };
else
catPath = tp.Category;
-
+
Dictionary searchCats = categories;
for (int i = 0; i < catPath.Length; i++) {
string s = catPath[i];
- KeyValuePair? found = null;
+ KeyValuePair? found = null;
foreach (var searchCat in searchCats)
if (searchCat.Key == s)
found = searchCat;
@@ -326,15 +329,15 @@ public void Load (List templates)
}
} else if (!found.HasValue) {
searchCats.Add (s, null);
- }
+ }
}
}
-
+
var iter = store.AppendValues (all);
BuildTree (iter, categories);
view.ExpandAll ();
}
-
+
void BuildTree (TreeIter parent, Dictionary cats)
{
foreach (var cat in cats.OrderBy (kv => kv.Key)) {
@@ -343,22 +346,22 @@ void BuildTree (TreeIter parent, Dictionary cats)
BuildTree (iter, (Dictionary) cat.Value);
}
}
-
+
public IList GetSelection ()
{
TreeIter selectedIter;
if (!view.Selection.GetSelected (out selectedIter))
return null;
-
+
string[] selection = new string[store.IterDepth (selectedIter)];
TreeIter iter;
-
+
//root is the "all" category
store.GetIterFirst (out iter);
if (iter.Equals (selectedIter))
return selection;
store.IterChildren (out iter, iter);
-
+
for (int i = 0; i < selection.Length; i++) {
do {
if (iter.Equals (selectedIter)) {
@@ -373,22 +376,22 @@ public IList GetSelection ()
}
return selection;
}
-
+
public void SetSelection (IList value)
{
TreeIter parent;
if (!store.GetIterFirst (out parent))
return;
-
+
//root is the "all" node, matched by zero-length selection array
if (value.Count == 0) {
view.Selection.SelectIter (parent);
return;
}
-
+
TreeIter iter;
store.IterChildren (out iter, parent);
-
+
int i = 0;
while (store.IterNext (ref iter)) {
var s = (string) store.GetValue (iter, 0);
@@ -405,16 +408,16 @@ public void SetSelection (IList value)
}
view.Selection.SelectIter (parent);
}
-
+
public event EventHandler SelectionChanged;
}
-
+
class TemplateView: CompactScrolledWindow
{
TemplateTreeView tree;
IList categoryFilter;
string searchFilter;
-
+
public TemplateView ()
{
ShowBorderLine = true;
@@ -427,45 +430,45 @@ public TemplateView ()
if (DoubleClicked != null)
DoubleClicked (this, EventArgs.Empty);
};
-
+
Add (tree);
HscrollbarPolicy = PolicyType.Automatic;
VscrollbarPolicy = PolicyType.Automatic;
ShadowType = ShadowType.None;
ShowAll ();
}
-
+
public TemplateItem CurrentlySelected {
get { return tree.CurrentlySelected; }
}
-
+
public void SelectTemplate (string id)
{
tree.SelectItem (id);
}
-
+
public void AddItem (TemplateItem templateItem)
{
tree.AddItem (templateItem);
}
-
+
public void Clear ()
{
tree.Clear ();
}
-
+
public void SetCategoryFilter (IList categoryFilter)
{
this.categoryFilter = categoryFilter;
Refilter ();
}
-
+
public void SetSearchFilter (string search)
{
this.searchFilter = search;
Refilter ();
}
-
+
bool MatchesCategory (TemplateItem item)
{
if (categoryFilter == null)
@@ -477,36 +480,36 @@ bool MatchesCategory (TemplateItem item)
return false;
return true;
}
-
+
bool MatchesSearch (TemplateItem item)
{
return string.IsNullOrWhiteSpace (searchFilter)
|| item.Name.IndexOf (searchFilter, StringComparison.CurrentCultureIgnoreCase) >= 0
|| item.Template.Description.IndexOf (searchFilter, StringComparison.CurrentCultureIgnoreCase) >= 0;
}
-
+
void Refilter ()
{
tree.Filter (item => MatchesSearch (item) && MatchesCategory (item));
}
-
+
public event EventHandler SelectionChanged;
public event EventHandler DoubleClicked;
}
-
+
class TemplateTreeView: TreeView
{
Gtk.ListStore templateStore;
TreeModelFilter filterModel;
Func filterFunc;
-
+
public TemplateTreeView ()
{
HeadersVisible = false;
templateStore = new ListStore (typeof(TemplateItem));
Model = filterModel = new TreeModelFilter (templateStore, null);
filterModel.VisibleFunc = FilterFuncWrapper;
-
+
var col = new TreeViewColumn ();
var crp = new CellRendererImage () {
StockSize = Gtk.IconSize.Dnd,
@@ -514,11 +517,11 @@ public TemplateTreeView ()
};
col.PackStart (crp, false);
col.SetCellDataFunc (crp, CellDataFuncIcon);
-
+
var crt = new CellRendererText ();
col.PackStart (crt, false);
col.SetCellDataFunc (crt, CellDataFuncText);
-
+
AppendColumn (col);
ShowAll ();
}
@@ -528,11 +531,11 @@ bool FilterFuncWrapper (TreeModel model, TreeIter iter)
if (filterFunc == null)
return true;
var item = (TemplateItem) model.GetValue (iter, 0);
-
+
//gets called while the rows are being inserted and don't yet have data
if (item == null)
return false;
-
+
return filterFunc (item);
}
@@ -542,23 +545,23 @@ static void CellDataFuncText (TreeViewColumn col, CellRenderer cell, TreeModel m
string name = GLib.Markup.EscapeText (item.Name);
if (!string.IsNullOrEmpty (item.Template.LanguageName))
name += "\n" + item.Template.LanguageName + "";
-
+
((CellRendererText)cell).Markup = name;
}
-
+
static void CellDataFuncIcon (TreeViewColumn col, CellRenderer cell, TreeModel model, TreeIter iter)
{
var item = (TemplateItem) model.GetValue (iter, 0);
var id = item.Template.Icon.IsNull ? "md-project" : item.Template.Icon.ToString ();
((CellRendererImage)cell).StockId = id;
}
-
+
public void Filter (Func filter)
{
this.filterFunc = filter;
this.filterModel.Refilter ();
}
-
+
public TemplateItem CurrentlySelected {
get {
Gtk.TreeIter iter;
@@ -567,7 +570,7 @@ public TemplateItem CurrentlySelected {
return (TemplateItem) filterModel.GetValue (iter, 0);
}
}
-
+
public void SelectItem (string id)
{
Gtk.TreeIter iter;
@@ -581,18 +584,18 @@ public void SelectItem (string id)
} while (filterModel.IterNext (ref iter));
}
}
-
+
public void AddItem (TemplateItem templateItem)
{
templateStore.AppendValues (templateItem);
}
-
+
public void Clear ()
{
templateStore.Clear ();
}
}
-
+
class TemplateItem
{
public TemplateItem (ProjectTemplate template)
@@ -604,7 +607,7 @@ public TemplateItem (ProjectTemplate template)
else
this.Category = new string[0];
}
-
+
public string Name { get; private set; }
public string[] Category { get; private set; }
public ProjectTemplate Template { get; private set; }
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs
index 949d16129e8..055e3d8179c 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs
@@ -13,10 +13,10 @@
// 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
@@ -43,6 +43,9 @@
using MonoDevelop.Ide.Editor;
using System.Threading;
using System.Threading.Tasks;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Tasks
{
@@ -79,14 +82,14 @@ enum Columns
public CommentTasksView ()
{
}
-
+
void CreateView ()
{
if (view != null)
return;
-
+
ReloadPriorities ();
-
+
IdeServices.TaskService.CommentTasksChanged += OnCommentTasksChanged;
CommentTag.SpecialCommentTagsChanged += OnCommentTagsChanged;
@@ -141,7 +144,7 @@ void CreateView ()
IdeApp.Preferences.UserTasksHighPrioColor.Changed += OnPropertyUpdated;
IdeApp.Preferences.UserTasksNormalPrioColor.Changed += OnPropertyUpdated;
IdeApp.Preferences.UserTasksLowPrioColor.Changed += OnPropertyUpdated;
-
+
// Initialize with existing tags.
foreach (TaskListEntry t in comments)
AddGeneratedTask (t);
@@ -176,7 +179,7 @@ void LoadColumnsVisibility ()
}
}
}
-
+
void OnWorkspaceItemLoaded (object sender, EventArgs e)
{
comments.BeginTaskUpdates ();
@@ -200,7 +203,7 @@ void OnWorkspaceItemUnloaded (object sender, WorkspaceItemEventArgs e)
loadedSlns.Remove (solution);
}
}
-
+
void LastWorkspaceItemClosed (object sender, EventArgs e)
{
loadedSlns.Clear ();
@@ -211,7 +214,7 @@ void OnCommentTasksChanged (object sender, CommentTasksChangedEventArgs args)
Application.Invoke ((o, a) => {
foreach (var e in args.Changes) {
//because of parse queueing, it's possible for this event to come in after the solution is closed
- //so we track which solutions are currently open so that we don't leak memory by holding
+ //so we track which solutions are currently open so that we don't leak memory by holding
// on to references to closed projects
if (e.Project != null && e.Project.ParentSolution != null && loadedSlns.Contains (e.Project.ParentSolution)) {
UpdateCommentTags (e.Project.ParentSolution, e.FileName, e.TagComments);
@@ -219,21 +222,21 @@ void OnCommentTasksChanged (object sender, CommentTasksChangedEventArgs args)
}
});
}
-
+
void OnCommentTagsChanged (object sender, EventArgs e)
{
ReloadPriorities ();
}
-
+
void UpdateCommentTags (Solution wob, FilePath fileName, IEnumerable tagComments)
{
if (fileName == FilePath.Null)
return;
-
+
fileName = fileName.FullPath;
-
+
List newTasks = new List ();
- if (tagComments != null) {
+ if (tagComments != null) {
foreach (Tag tag in tagComments) {
TaskPriority priority;
string desc = tag.Text.Trim ();
@@ -252,13 +255,13 @@ void UpdateCommentTags (Solution wob, FilePath fileName, IEnumerable tagCom
desc = tag.Key + ": " + desc;
}
}
-
+
TaskListEntry t = new TaskListEntry (fileName, desc, tag.Region.BeginColumn, tag.Region.BeginLine,
TaskSeverity.Information, priority, wob);
newTasks.Add (t);
}
}
-
+
List oldTasks = new List (comments.GetFileTasks (fileName));
for (int i = 0; i < newTasks.Count; ++i) {
@@ -276,7 +279,7 @@ void UpdateCommentTags (Solution wob, FilePath fileName, IEnumerable tagCom
}
}
}
-
+
comments.BeginTaskUpdates ();
try {
comments.AddRange (newTasks);
@@ -285,14 +288,14 @@ void UpdateCommentTags (Solution wob, FilePath fileName, IEnumerable tagCom
comments.EndTaskUpdates ();
}
}
-
+
void ReloadPriorities ()
{
priorities.Clear ();
foreach (var tag in CommentTag.SpecialCommentTags)
priorities.Add (tag.Tag, (TaskPriority) tag.Priority);
- }
-
+ }
+
void GeneratedTaskAdded (object sender, TaskEventArgs e)
{
foreach (TaskListEntry t in e.Tasks)
@@ -326,14 +329,14 @@ static TreeIter FindTask (ListStore store, TaskListEntry task)
TreeIter iter;
if (!store.GetIterFirst (out iter))
return TreeIter.Zero;
-
+
do {
TaskListEntry t = store.GetValue (iter, (int)Columns.Task) as TaskListEntry;
if (t == task)
return iter;
}
while (store.IterNext (ref iter));
-
+
return TreeIter.Zero;
}
@@ -363,7 +366,7 @@ void ShowPopupMenu (Gdk.EventButton evnt)
view.Selection != null &&
view.Selection.CountSelectedRows () > 0 &&
view.IsAColumnVisible ();
-
+
menu.Show (view, evnt);
}
@@ -423,7 +426,7 @@ async void OnGenTaskDelete (object o, EventArgs args)
doc.Editor.ReplaceText (ls.Offset, ls.Length, line);
comments.Remove (task);
}
- });
+ });
}
}
}
@@ -441,7 +444,7 @@ Gdk.Color GetColorByPriority (TaskPriority prio)
return lowPrioColor;
}
}
-
+
static Gdk.Color StringToColor (string colorStr)
{
string[] rgb = colorStr.Substring (colorStr.IndexOf (':') + 1).Split ('/');
@@ -460,7 +463,7 @@ static Gdk.Color StringToColor (string colorStr)
}
return color;
}
-
+
void OnPropertyUpdated (object sender, EventArgs e)
{
highPrioColor = StringToColor (IdeApp.Preferences.UserTasksHighPrioColor);
@@ -477,17 +480,17 @@ void OnPropertyUpdated (object sender, EventArgs e)
} while (store.IterNext (ref iter));
}
}
-
+
#region ITaskListView members
Control ITaskListView.Content {
get {
CreateView ();
- return view;
- }
+ return view;
+ }
}
-
+
Control[] ITaskListView.ToolBarItems {
- get { return null; }
+ get { return null; }
}
#endregion
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/UserTasksView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/UserTasksView.cs
index 05da57ee339..1dc6cd7c9c1 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/UserTasksView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/UserTasksView.cs
@@ -13,10 +13,10 @@
// 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
@@ -33,10 +33,13 @@
using MonoDevelop.Ide;
using MonoDevelop.Components;
using System.Runtime.CompilerServices;
+#if GTK3
+using TreeModel = Gtk.ITreeModel;
+#endif
namespace MonoDevelop.Ide.Tasks
-{
- internal class UserTasksView : ITaskListView
+{
+ internal class UserTasksView : ITaskListView
{
enum Columns
{
@@ -48,7 +51,7 @@ enum Columns
Bold,
Count
}
-
+
Button newButton;
Button copyButton;
Button delButton;
@@ -57,9 +60,9 @@ enum Columns
ListStore store;
TreeModelSort sortModel;
CellRendererText cellRendDesc;
-
+
Gdk.Color highPrioColor, normalPrioColor, lowPrioColor;
-
+
Clipboard clipboard;
bool solutionLoaded = false;
bool updating;
@@ -84,10 +87,10 @@ public UserTasksView ()
highPrioColor = StringToColor (IdeApp.Preferences.UserTasksHighPrioColor);
normalPrioColor = StringToColor (IdeApp.Preferences.UserTasksNormalPrioColor);
lowPrioColor = StringToColor (IdeApp.Preferences.UserTasksLowPrioColor);
-
+
store = new ListStore (
typeof (string), // priority
- typeof (bool), // completed
+ typeof (bool), // completed
typeof (string), // desc
typeof (TaskListEntry), // user task
typeof (Gdk.Color), // foreground color
@@ -100,7 +103,7 @@ public UserTasksView ()
view.SearchColumn = (int)Columns.Description;
view.Selection.Changed += new EventHandler (SelectionChanged);
TreeViewColumn col;
-
+
CellRendererComboBox cellRendPriority = new CellRendererComboBox ();
cellRendPriority.Values = priorities;
cellRendPriority.Editable = true;
@@ -108,7 +111,7 @@ public UserTasksView ()
col = view.AppendColumn (GettextCatalog.GetString ("Priority"), cellRendPriority, "text", Columns.Priority, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
col.Resizable = true;
col.SortColumnId = (int)Columns.Priority;
-
+
CellRendererToggle cellRendCompleted = new CellRendererToggle ();
cellRendCompleted.Toggled += new ToggledHandler (UserTaskCompletedToggled);
cellRendCompleted.Activatable = true;
@@ -121,12 +124,12 @@ public UserTasksView ()
col = view.AppendColumn (GettextCatalog.GetString ("Description"), cellRendDesc, "text", Columns.Description, "strikethrough", Columns.Completed, "foreground-gdk", Columns.Foreground, "weight", Columns.Bold);
col.Resizable = true;
col.SortColumnId = (int)Columns.Description;
-
+
newButton = new Button ();
newButton.Label = GettextCatalog.GetString ("New Task");
newButton.Image = new ImageView (Gtk.Stock.New, IconSize.Menu);
newButton.Image.Show ();
- newButton.Clicked += new EventHandler (NewUserTaskClicked);
+ newButton.Clicked += new EventHandler (NewUserTaskClicked);
newButton.TooltipText = GettextCatalog.GetString ("Create New Task");
copyButton = new Button ();
@@ -135,21 +138,21 @@ public UserTasksView ()
copyButton.Image.Show ();
copyButton.Clicked += CopyUserTaskClicked;
copyButton.TooltipText = GettextCatalog.GetString ("Copy Task Description");
-
+
delButton = new Button ();
delButton.Label = GettextCatalog.GetString ("Delete Task");
delButton.Image = new ImageView (Gtk.Stock.Delete, IconSize.Menu);
delButton.Image.Show ();
- delButton.Clicked += new EventHandler (DeleteUserTaskClicked);
+ delButton.Clicked += new EventHandler (DeleteUserTaskClicked);
delButton.TooltipText = GettextCatalog.GetString ("Delete Task");
IdeServices.TaskService.UserTasks.TasksChanged += UserTasksChanged;
IdeServices.TaskService.UserTasks.TasksAdded += UserTasksChanged;
IdeServices.TaskService.UserTasks.TasksRemoved += UserTasksChanged;
-
+
if (IdeApp.Workspace.IsOpen)
solutionLoaded = true;
-
+
IdeApp.Workspace.FirstWorkspaceItemOpened += CombineOpened;
IdeApp.Workspace.LastWorkspaceItemClosed += CombineClosed;
@@ -157,23 +160,23 @@ public UserTasksView ()
IdeApp.Preferences.UserTasksNormalPrioColor.Changed += OnPropertyUpdated;
IdeApp.Preferences.UserTasksHighPrioColor.Changed += OnPropertyUpdated;
ValidateButtons ();
-
+
// Initialize with existing tags.
UserTasksChanged (this, null);
}
-
+
void CombineOpened (object sender, EventArgs e)
{
solutionLoaded = true;
ValidateButtons ();
}
-
+
void CombineClosed (object sender, EventArgs e)
{
solutionLoaded = true;
ValidateButtons ();
}
-
+
void UserTasksChanged (object sender, TaskEventArgs e)
{
if (updating)
@@ -189,7 +192,7 @@ void UserTasksChanged (object sender, TaskEventArgs e)
}
ValidateButtons ();
}
-
+
void OnPropertyUpdated (object sender, EventArgs e)
{
highPrioColor = StringToColor (IdeApp.Preferences.UserTasksHighPrioColor);
@@ -206,18 +209,18 @@ void OnPropertyUpdated (object sender, EventArgs e)
} while (store.IterNext (ref iter));
}
}
-
+
void SelectionChanged (object sender, EventArgs e)
{
ValidateButtons ();
}
-
+
void ValidateButtons ()
{
newButton.Sensitive = solutionLoaded;
delButton.Sensitive = copyButton.Sensitive = solutionLoaded && view.Selection.CountSelectedRows () > 0;
}
-
+
void NewUserTaskClicked (object obj, EventArgs e)
{
TaskListEntry task = new TaskListEntry ();
@@ -252,7 +255,7 @@ void CopyUserTaskClicked (object o, EventArgs args)
clipboard.Text = task.Description;
}
-
+
void DeleteUserTaskClicked (object obj, EventArgs e)
{
if (view.Selection.CountSelectedRows () > 0)
@@ -293,7 +296,7 @@ void UserTaskPriorityEdited (object o, ComboSelectionChangedArgs args)
IdeServices.TaskService.SaveUserTasks (task.WorkspaceObject);
}
}
-
+
void UserTaskCompletedToggled (object o, ToggledArgs args)
{
Gtk.TreeIter iter, sortedIter;
@@ -308,7 +311,7 @@ void UserTaskCompletedToggled (object o, ToggledArgs args)
IdeServices.TaskService.SaveUserTasks (task.WorkspaceObject);
}
}
-
+
void UserTaskDescEdited (object o, EditedArgs args)
{
Gtk.TreeIter iter, sortedIter;
@@ -321,7 +324,7 @@ void UserTaskDescEdited (object o, EditedArgs args)
IdeServices.TaskService.SaveUserTasks (task.WorkspaceObject);
}
}
-
+
Gdk.Color GetColorByPriority (TaskPriority prio)
{
switch (prio)
@@ -347,7 +350,7 @@ static SortType ReverseSortOrder (TreeViewColumn col)
return SortType.Ascending;
}
}
-
+
static Gdk.Color StringToColor (string colorStr)
{
string[] rgb = colorStr.Substring (colorStr.IndexOf (':') + 1).Split ('/');
@@ -366,7 +369,7 @@ static Gdk.Color StringToColor (string colorStr)
}
return color;
}
-
+
#region ITaskListView members
Control ITaskListView.Content { get { return view; } }
Control[] ITaskListView.ToolBarItems { get { return new Control[] { newButton, delButton, copyButton }; } }
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/AddinsUpdateHandler.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/AddinsUpdateHandler.cs
index 7955d219a7d..61ef6b1c9d4 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/AddinsUpdateHandler.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/AddinsUpdateHandler.cs
@@ -28,7 +28,11 @@
using Mono.Addins.Setup;
using Gtk;
using MonoDevelop.Core.ProgressMonitoring;
+#if GTK3
+using Mono.Addins.GuiGtk3;
+#else
using Mono.Addins.Gui;
+#endif
using MonoDevelop.Ide.ProgressMonitoring;
using Mono.Addins;
using MonoDevelop.Core.Setup;
@@ -78,7 +82,7 @@ void WarnAvailableUpdates ()
{
if (!UpdateService.NotifyAddinUpdates)
return;
-
+
updateIcon = IdeApp.Workbench.StatusBar.ShowStatusIcon (ImageService.GetIcon (Gui.Stock.Updates, IconSize.Menu));
string s = GettextCatalog.GetString ("New extension updates are available:");
for (int n=0; n {
- dlg.Shown -= shownEvent;
- try {
- var nativeWindow = Components.Mac.GtkMacInterop.GetNSWindow (dlg);
- MessageService.CenterWindow (nativeWindow, parentNsWindow);
- parentNsWindow.AddChildWindow (nativeWindow, AppKit.NSWindowOrderingMode.Above);
- } catch (Exception ex) {
- LoggingService.LogInternalError (ex);
- }
- };
-
- dlg.Shown += shownEvent;
- try {
- dlg.Run ();
- } finally {
- dlg.Destroy ();
- }
- } else {
- AddinManagerWindow.Run (IdeApp.Workbench.RootWindow);
- }
- }
+ //oe static void OpenAddinManagerWindow ()
+ //oe {
+ //oe if (!IdeApp.Workbench.RootWindow.Visible && WelcomePage.WelcomePageService.WelcomeWindow.nativeWidget is AppKit.NSWindow parentNsWindow) {
+ //oe var dlg = AddinManagerWindow.Create ();
+ //oe
+ //oe EventHandler shownEvent = null;
+ //oe shownEvent = (s, e) => {
+ //oe dlg.Shown -= shownEvent;
+ //oe try {
+ //oe var nativeWindow = Components.Mac.GtkMacInterop.GetNSWindow (dlg);
+ //oe MessageService.CenterWindow (nativeWindow, parentNsWindow);
+ //oe parentNsWindow.AddChildWindow (nativeWindow, AppKit.NSWindowOrderingMode.Above);
+ //oe } catch (Exception ex) {
+ //oe LoggingService.LogInternalError (ex);
+ //oe }
+ //oe };
+ //oe
+ //oe dlg.Shown += shownEvent;
+ //oe try {
+ //oe dlg.Run ();
+ //oe } finally {
+ //oe dlg.Destroy ();
+ //oe }
+ //oe } else {
+ //oe AddinManagerWindow.Run (IdeApp.Workbench.RootWindow);
+ //oe }
+ //oe }
public async static void ShowManager ()
{
@@ -140,7 +145,8 @@ public async static void ShowManager ()
await t;
}
HideAlert ();
- OpenAddinManagerWindow ();
+ //oe OpenAddinManagerWindow ();
+ AddinManagerWindow.Run (IdeApp.Workbench.RootWindow.Visible ? IdeApp.Workbench.RootWindow : null);
}
public static void HideAlert ()
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
index adbb3dfa072..9329838e2c6 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
@@ -10,20 +10,14 @@
..\..\..\build\bin
true
-
- LINUX
-
-
- LINUX
-
+
+
-
-
@@ -35,16 +29,12 @@
-
-
-
-
- ..\..\..\external\Xamarin.Mac.dll
-
+
+
- v4.6.1
+ v4.7.2
v4.7.2
$(MSBuildToolsPath)\
diff --git a/main/tests/MonoDevelop.Core.Tests/MonoDevelop.Core.Tests.csproj b/main/tests/MonoDevelop.Core.Tests/MonoDevelop.Core.Tests.csproj
index 55a13d5855c..ca66997c358 100644
--- a/main/tests/MonoDevelop.Core.Tests/MonoDevelop.Core.Tests.csproj
+++ b/main/tests/MonoDevelop.Core.Tests/MonoDevelop.Core.Tests.csproj
@@ -126,8 +126,9 @@
-
+
+
{7525BB88-6142-4A26-93B9-A30C6983390A}
@@ -170,6 +171,10 @@
$(MSBuildToolsPath)\Microsoft.Build.Utilities.Core.dll
False
+
+ {27096E7F-C91C-4AC6-B289-6897A701DF21}
+ MonoDevelop.Ide
+
diff --git a/main/tests/MonoDevelop.Core.Tests/MonoDevelop.Projects/IntrinsicFunctionsTests.cs b/main/tests/MonoDevelop.Core.Tests/MonoDevelop.Projects/IntrinsicFunctionsTests.cs
deleted file mode 100644
index d2fb49edfec..00000000000
--- a/main/tests/MonoDevelop.Core.Tests/MonoDevelop.Projects/IntrinsicFunctionsTests.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-// IntrinsicFunctionsTests.cs
-//
-// Author:
-// Marius Ungureanu
-//
-// Copyright (c) 2019 Microsoft Inc.
-//
-// 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.Reflection;
-using System.Runtime.CompilerServices;
-using Microsoft.Build.Evaluation;
-using NUnit.Framework;
-
-namespace MonoDevelop.Projects
-{
- [TestFixture]
- public class IntrinsicFunctionsTests
- {
- [Test]
- public void TypeContainsOnlyMethods()
- {
- // MSBuildEvaluationContext.cachedIntrinsicFunctions only caches methods and code path only takes that into account
- foreach (var member in typeof(IntrinsicFunctions).GetMembers(BindingFlags.NonPublic | BindingFlags.Static)) {
- // Skip compiler generated code, such as lambda classes
- if (member.IsDefined (typeof (CompilerGeneratedAttribute)))
- continue;
-
- Assert.AreEqual (MemberTypes.Method, member.MemberType);
- }
- }
- }
-}
diff --git a/main/tests/MonoDevelop.Core.Tests/MonoDevelop.Utilities/TEST.LibraryTools.cs b/main/tests/MonoDevelop.Core.Tests/MonoDevelop.Utilities/TEST.LibraryTools.cs
new file mode 100644
index 00000000000..117368efb1c
--- /dev/null
+++ b/main/tests/MonoDevelop.Core.Tests/MonoDevelop.Utilities/TEST.LibraryTools.cs
@@ -0,0 +1,55 @@
+//
+// TEST.LibraryTools.cs
+//
+// Author:
+// glenn <>
+//
+// Copyright (c) 2022
+//
+// 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 MonoDevelop.Components;
+using NUnit.Framework;
+
+namespace MonoDevelop.Utilities
+{
+ [TestFixture]
+ public class TEST_LibraryTools
+ {
+ [Test]
+ public void LoadLibraryAndMethod_ValidMethods_DoesNotThrow ()
+ {
+ //Arrange
+ var lib = LibraryTools.LoadLibrary (CairoLibraryDefinition.Library);
+ //Act
+ var pushgroup = LibraryTools.GetProcAddress (lib, CairoLibraryDefinition.API.PushGroup);
+ var popgroup = LibraryTools.GetProcAddress (lib, CairoLibraryDefinition.API.PopGroup);
+ var popgrouptosource = LibraryTools.GetProcAddress (lib, CairoLibraryDefinition.API.PopGroupToSource);
+ var getsource = LibraryTools.GetProcAddress (lib, CairoLibraryDefinition.API.GetSource);
+ var patternsetextend = LibraryTools.GetProcAddress (lib, CairoLibraryDefinition.API.PatternSetExtend);
+ //Assert
+ Assert.AreNotEqual (IntPtr.Zero, lib, "library is not found");
+ Assert.AreNotEqual (IntPtr.Zero, pushgroup, "proc address pushgroup is not found");
+ Assert.AreNotEqual (IntPtr.Zero, popgroup, "proc address popgroup is not found");
+ Assert.AreNotEqual (IntPtr.Zero, popgrouptosource, "proc address popgrouptosource is not found");
+ Assert.AreNotEqual (IntPtr.Zero, getsource, "proc address getsource is not found");
+ Assert.AreNotEqual (IntPtr.Zero, patternsetextend, "proc address patternsetextend is not found");
+ }
+ }
+}
\ No newline at end of file