summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.mak10
-rw-r--r--README4
-rwxr-xr-xcpp/demo/Freeze/backup/Freeze.backup.client.vcproj8
-rwxr-xr-xcpp/demo/Freeze/bench/Freeze.bench.client.vcproj8
-rwxr-xr-xcpp/demo/Freeze/customEvictor/Freeze.customEvictor.server.vcproj8
-rwxr-xr-xcpp/demo/Freeze/library/Freeze.library.collocated.vcproj8
-rwxr-xr-xcpp/demo/Freeze/library/Freeze.library.server.vcproj8
-rwxr-xr-xcpp/demo/Freeze/phonebook/Freeze.phonebook.collocated.vcproj8
-rwxr-xr-xcpp/demo/Freeze/phonebook/Freeze.phonebook.server.vcproj8
-rwxr-xr-xcpp/demo/Freeze/transform/Freeze.transform.create.vcproj8
-rwxr-xr-xcpp/demo/Freeze/transform/Freeze.transform.read.vcproj8
-rwxr-xr-xcpp/demo/Freeze/transform/Freeze.transform.readnew.vcproj8
-rwxr-xr-xcpp/demo/Freeze/transform/Freeze.transform.recreate.vcproj8
-rwxr-xr-xcpp/demo/book/map_filesystem/book.map_filesystem.server.vcproj8
-rw-r--r--cs/INSTALL.VISUAL_C#6
-rwxr-xr-xdistribution/makedist.py6
-rw-r--r--distribution/src/common/README.DEMOS.txt4
-rwxr-xr-xdistribution/src/windows/IceVisualStudioAddin.aip (renamed from distribution/src/windows/IceVisualStudioExtension.aip)30
-rw-r--r--distribution/src/windows/LICENSE.rtf2
-rw-r--r--distribution/src/windows/docs/main/README.txt122
-rw-r--r--vb/INSTALL6
-rw-r--r--vsaddin/INSTALL.txt (renamed from vsplugin/INSTALL.txt)28
-rw-r--r--vsaddin/Makefile.mak (renamed from vsplugin/Makefile.mak)2
-rw-r--r--vsaddin/README.txt174
-rwxr-xr-x[-rw-r--r--]vsaddin/addin-vs2008.sln (renamed from vsplugin/vsextension-vs2008.sln)6
-rwxr-xr-xvsaddin/addin-vs2010.sln26
-rw-r--r--vsaddin/bin/.gitignore (renamed from vsplugin/bin/.gitignore)0
-rw-r--r--[-rwxr-xr-x]vsaddin/config/Ice-VS2008.AddIn (renamed from vsplugin/config/Ice-VS2008.AddIn)8
-rw-r--r--[-rwxr-xr-x]vsaddin/config/Ice-VS2010.AddIn (renamed from vsplugin/config/Ice-VS2010.AddIn)8
-rw-r--r--vsaddin/config/IceDevKey.snk (renamed from vsplugin/config/IceDevKey.snk)bin596 -> 596 bytes
-rw-r--r--[-rwxr-xr-x]vsaddin/config/Make.rules.mak (renamed from vsplugin/config/Make.rules.mak)39
-rw-r--r--vsaddin/icon/newslice.ico (renamed from vsplugin/icon/newslice.ico)bin10134 -> 10134 bytes
-rw-r--r--vsaddin/icon/vsplugin.ico (renamed from vsplugin/icon/vsplugin.ico)bin10134 -> 10134 bytes
-rw-r--r--vsaddin/src/AssemblyInfo.cs (renamed from vsplugin/src/AssemblyInfo.cs)48
-rw-r--r--vsaddin/src/Builder.cs (renamed from vsplugin/src/Builder.cs)2089
-rw-r--r--vsaddin/src/Connect.cs246
-rw-r--r--vsaddin/src/ExtraCompilerOptionsView.Designer.cs87
-rw-r--r--vsaddin/src/ExtraCompilerOptionsView.cs146
-rw-r--r--vsaddin/src/ExtraCompilerOptionsView.resx123
-rw-r--r--vsaddin/src/FileTracker.cs (renamed from vsplugin/src/FileTracker.cs)19
-rw-r--r--vsaddin/src/IceCppConfigurationDialog.Designer.cs (renamed from vsplugin/src/IceCppConfigurationDialog.Designer.cs)830
-rw-r--r--vsaddin/src/IceCppConfigurationDialog.cs743
-rw-r--r--vsaddin/src/IceCppConfigurationDialog.resx (renamed from vsplugin/src/IceCppConfigurationDialog.resx)6
-rw-r--r--vsaddin/src/IceCsharpConfigurationDialog.Designer.cs (renamed from vsplugin/src/IceCsharpConfigurationDialog.Designer.cs)749
-rw-r--r--vsaddin/src/IceCsharpConfigurationDialog.cs653
-rw-r--r--vsaddin/src/IceCsharpConfigurationDialog.resx (renamed from vsplugin/src/IceCsharpConfigurationDialog.resx)6
-rw-r--r--vsaddin/src/IceDialog.cs25
-rw-r--r--vsaddin/src/IceHomeView.Designer.cs101
-rw-r--r--vsaddin/src/IceHomeView.cs149
-rw-r--r--vsaddin/src/IceHomeView.resx123
-rw-r--r--vsaddin/src/IceSilverlightConfigurationDialog.Designer.cs247
-rw-r--r--vsaddin/src/IceSilverlightConfigurationDialog.cs498
-rw-r--r--vsaddin/src/IceSilverlightConfigurationDialog.resx (renamed from vsplugin/src/IceSilverlightConfigurationDialog.resx)6
-rw-r--r--[-rwxr-xr-x]vsaddin/src/IceVBConfigurationDialog.Designer.cs (renamed from vsplugin/src/IceVBConfigurationDialog.Designer.cs)128
-rw-r--r--vsaddin/src/IceVBConfigurationDialog.cs513
-rw-r--r--[-rwxr-xr-x]vsaddin/src/IceVBConfigurationDialog.resx (renamed from vsplugin/src/IceVBConfigurationDialog.resx)2
-rw-r--r--vsaddin/src/IncludePathView.Designer.cs160
-rw-r--r--vsaddin/src/IncludePathView.cs443
-rw-r--r--vsaddin/src/IncludePathView.resx120
-rw-r--r--vsaddin/src/Makefile.mak (renamed from vsplugin/src/Makefile.mak)20
-rw-r--r--vsaddin/src/Options.cs836
-rw-r--r--vsaddin/src/OutputDirView.Designer.cs100
-rw-r--r--vsaddin/src/OutputDirView.cs142
-rw-r--r--vsaddin/src/OutputDirView.resx123
-rw-r--r--vsaddin/src/Util.cs2873
-rw-r--r--vsaddin/src/addin-vs2008.csproj (renamed from vsplugin/src/addin-vs2008.csproj)49
-rw-r--r--[-rwxr-xr-x]vsaddin/src/addin-vs2010.csproj (renamed from vsplugin/src/addin-vs2010.csproj)39
-rw-r--r--vsaddin/templates/Slice.zip (renamed from vsplugin/templates/Slice.zip)bin4724 -> 4724 bytes
-rw-r--r--vsaddin/templates/vs/Slice/slice.vsdir (renamed from vsplugin/templates/vs/Slice/slice.vsdir)0
-rw-r--r--vsaddin/templates/vs/newslice.ice (renamed from vsplugin/templates/vs/newslice.ice)0
-rw-r--r--vsaddin/templates/vs/newslice.ico (renamed from vsplugin/templates/vs/newslice.ico)bin10134 -> 10134 bytes
-rw-r--r--vsaddin/templates/vs/slice.vsdir (renamed from vsplugin/templates/vs/slice.vsdir)0
-rw-r--r--vsplugin/README.txt120
-rw-r--r--vsplugin/src/Connect.cs216
-rw-r--r--vsplugin/src/IceCppConfigurationDialog.cs773
-rw-r--r--vsplugin/src/IceCsharpConfigurationDialog.cs740
-rw-r--r--vsplugin/src/IceSilverlightConfigurationDialog.Designer.cs356
-rw-r--r--vsplugin/src/IceSilverlightConfigurationDialog.cs625
-rwxr-xr-xvsplugin/src/IceVBConfigurationDialog.cs258
-rwxr-xr-xvsplugin/src/Util.cs1760
80 files changed, 11284 insertions, 6583 deletions
diff --git a/Makefile.mak b/Makefile.mak
index 79988f9c13b..f434539f202 100644
--- a/Makefile.mak
+++ b/Makefile.mak
@@ -21,8 +21,8 @@ CLEAN_SUBDIRS = rb $(CLEAN_SUBDIRS)
DEPEND_SUBDIRS = $(DEPEND_SUBDIRS) rb
INSTALL_SUBDIRS = $(INSTALL_SUBDIRS) rb
!else
-SUBDIRS = $(SUBDIRS) cs vb vsplugin
-CLEAN_SUBDIRS = cs vb vsplugin $(CLEAN_SUBDIRS)
+SUBDIRS = $(SUBDIRS) cs vb vsaddin
+CLEAN_SUBDIRS = cs vb vsaddin $(CLEAN_SUBDIRS)
DEPEND_SUBDIRS = $(DEPEND_SUBDIRS) cs vb
INSTALL_SUBDIRS = $(INSTALL_SUBDIRS) cs
!endif
@@ -75,6 +75,6 @@ php::
@echo "making all in php" && \
cmd /c "cd php && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) all" || exit 1
-vsplugin::
- @echo "making all in vsplugin" && \
- cmd /c "cd vsplugin && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) all" || exit 1
+vsaddin::
+ @echo "making all in vsaddin" && \
+ cmd /c "cd vsaddin && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) all" || exit 1
diff --git a/README b/README
index cc3f228d297..68651cca190 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
This archive contains the Ice source code for the C++, Java, .NET,
-Python, Ruby and PHP language mappings. The vsplugin subdirectory
-contains the source code for Ice Visual Studio Extension.
+Python, Ruby and PHP language mappings. The vsaddin subdirectory
+contains the source code for the Ice Visual Studio Add-In.
Please refer to the README and INSTALL files in the appropriate
subdirectory for specific information on each language mapping.
diff --git a/cpp/demo/Freeze/backup/Freeze.backup.client.vcproj b/cpp/demo/Freeze/backup/Freeze.backup.client.vcproj
index 400933bb6e5..b8945958fd9 100755
--- a/cpp/demo/Freeze/backup/Freeze.backup.client.vcproj
+++ b/cpp/demo/Freeze/backup/Freeze.backup.client.vcproj
@@ -502,7 +502,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict IntLongMap,int,long IntLongMap&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict IntLongMap,int,long IntLongMap&#x0D;&#x0A;"
Outputs="IntLongMap.h;IntLongMap.cpp"
/>
</FileConfiguration>
@@ -511,7 +511,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict IntLongMap,int,long IntLongMap&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict IntLongMap,int,long IntLongMap&#x0D;&#x0A;"
Outputs="IntLongMap.h;IntLongMap.cpp"
/>
</FileConfiguration>
@@ -520,7 +520,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict IntLongMap,int,long IntLongMap&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict IntLongMap,int,long IntLongMap&#x0D;&#x0A;"
Outputs="IntLongMap.h;IntLongMap.cpp"
/>
</FileConfiguration>
@@ -529,7 +529,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict IntLongMap,int,long IntLongMap&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict IntLongMap,int,long IntLongMap&#x0D;&#x0A;"
Outputs="IntLongMap.h;IntLongMap.cpp"
/>
</FileConfiguration>
diff --git a/cpp/demo/Freeze/bench/Freeze.bench.client.vcproj b/cpp/demo/Freeze/bench/Freeze.bench.client.vcproj
index bc6c266e40a..6e12de004ce 100755
--- a/cpp/demo/Freeze/bench/Freeze.bench.client.vcproj
+++ b/cpp/demo/Freeze/bench/Freeze.bench.client.vcproj
@@ -502,7 +502,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::IntIntMap,int,int --dict Demo::Struct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict Demo::Struct1Class1Map,Demo::Struct1,Demo::Class1 --dict Demo::Struct1ObjectMap,Demo::Struct1,Object --dict Demo::IndexedIntIntMap,int,int --dict-index Demo::IndexedIntIntMap --dict Demo::IndexedStruct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict-index Demo::IndexedStruct1Struct2Map,s,case-insensitive --dict-index Demo::IndexedStruct1Struct2Map,s1 --dict Demo::IndexedStruct1Class1Map,Demo::Struct1,Demo::Class1 --dict-index Demo::IndexedStruct1Class1Map,s,case-sensitive BenchTypes Test.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::IntIntMap,int,int --dict Demo::Struct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict Demo::Struct1Class1Map,Demo::Struct1,Demo::Class1 --dict Demo::Struct1ObjectMap,Demo::Struct1,Object --dict Demo::IndexedIntIntMap,int,int --dict-index Demo::IndexedIntIntMap --dict Demo::IndexedStruct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict-index Demo::IndexedStruct1Struct2Map,s,case-insensitive --dict-index Demo::IndexedStruct1Struct2Map,s1 --dict Demo::IndexedStruct1Class1Map,Demo::Struct1,Demo::Class1 --dict-index Demo::IndexedStruct1Class1Map,s,case-sensitive BenchTypes Test.ice&#x0D;&#x0A;"
Outputs="BenchTypes.cpp;BenchTypes.h"
/>
</FileConfiguration>
@@ -511,7 +511,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::IntIntMap,int,int --dict Demo::Struct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict Demo::Struct1Class1Map,Demo::Struct1,Demo::Class1 --dict Demo::Struct1ObjectMap,Demo::Struct1,Object --dict Demo::IndexedIntIntMap,int,int --dict-index Demo::IndexedIntIntMap --dict Demo::IndexedStruct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict-index Demo::IndexedStruct1Struct2Map,s,case-insensitive --dict-index Demo::IndexedStruct1Struct2Map,s1 --dict Demo::IndexedStruct1Class1Map,Demo::Struct1,Demo::Class1 --dict-index Demo::IndexedStruct1Class1Map,s,case-sensitive BenchTypes Test.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::IntIntMap,int,int --dict Demo::Struct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict Demo::Struct1Class1Map,Demo::Struct1,Demo::Class1 --dict Demo::Struct1ObjectMap,Demo::Struct1,Object --dict Demo::IndexedIntIntMap,int,int --dict-index Demo::IndexedIntIntMap --dict Demo::IndexedStruct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict-index Demo::IndexedStruct1Struct2Map,s,case-insensitive --dict-index Demo::IndexedStruct1Struct2Map,s1 --dict Demo::IndexedStruct1Class1Map,Demo::Struct1,Demo::Class1 --dict-index Demo::IndexedStruct1Class1Map,s,case-sensitive BenchTypes Test.ice&#x0D;&#x0A;"
Outputs="BenchTypes.cpp;BenchTypes.h"
/>
</FileConfiguration>
@@ -520,7 +520,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::IntIntMap,int,int --dict Demo::Struct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict Demo::Struct1Class1Map,Demo::Struct1,Demo::Class1 --dict Demo::Struct1ObjectMap,Demo::Struct1,Object --dict Demo::IndexedIntIntMap,int,int --dict-index Demo::IndexedIntIntMap --dict Demo::IndexedStruct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict-index Demo::IndexedStruct1Struct2Map,s,case-insensitive --dict-index Demo::IndexedStruct1Struct2Map,s1 --dict Demo::IndexedStruct1Class1Map,Demo::Struct1,Demo::Class1 --dict-index Demo::IndexedStruct1Class1Map,s,case-sensitive BenchTypes Test.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::IntIntMap,int,int --dict Demo::Struct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict Demo::Struct1Class1Map,Demo::Struct1,Demo::Class1 --dict Demo::Struct1ObjectMap,Demo::Struct1,Object --dict Demo::IndexedIntIntMap,int,int --dict-index Demo::IndexedIntIntMap --dict Demo::IndexedStruct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict-index Demo::IndexedStruct1Struct2Map,s,case-insensitive --dict-index Demo::IndexedStruct1Struct2Map,s1 --dict Demo::IndexedStruct1Class1Map,Demo::Struct1,Demo::Class1 --dict-index Demo::IndexedStruct1Class1Map,s,case-sensitive BenchTypes Test.ice&#x0D;&#x0A;"
Outputs="BenchTypes.cpp;BenchTypes.h"
/>
</FileConfiguration>
@@ -529,7 +529,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::IntIntMap,int,int --dict Demo::Struct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict Demo::Struct1Class1Map,Demo::Struct1,Demo::Class1 --dict Demo::Struct1ObjectMap,Demo::Struct1,Object --dict Demo::IndexedIntIntMap,int,int --dict-index Demo::IndexedIntIntMap --dict Demo::IndexedStruct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict-index Demo::IndexedStruct1Struct2Map,s,case-insensitive --dict-index Demo::IndexedStruct1Struct2Map,s1 --dict Demo::IndexedStruct1Class1Map,Demo::Struct1,Demo::Class1 --dict-index Demo::IndexedStruct1Class1Map,s,case-sensitive BenchTypes Test.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::IntIntMap,int,int --dict Demo::Struct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict Demo::Struct1Class1Map,Demo::Struct1,Demo::Class1 --dict Demo::Struct1ObjectMap,Demo::Struct1,Object --dict Demo::IndexedIntIntMap,int,int --dict-index Demo::IndexedIntIntMap --dict Demo::IndexedStruct1Struct2Map,Demo::Struct1,Demo::Struct2 --dict-index Demo::IndexedStruct1Struct2Map,s,case-insensitive --dict-index Demo::IndexedStruct1Struct2Map,s1 --dict Demo::IndexedStruct1Class1Map,Demo::Struct1,Demo::Class1 --dict-index Demo::IndexedStruct1Class1Map,s,case-sensitive BenchTypes Test.ice&#x0D;&#x0A;"
Outputs="BenchTypes.cpp;BenchTypes.h"
/>
</FileConfiguration>
diff --git a/cpp/demo/Freeze/customEvictor/Freeze.customEvictor.server.vcproj b/cpp/demo/Freeze/customEvictor/Freeze.customEvictor.server.vcproj
index 08d44389d2c..12d6a83b730 100755
--- a/cpp/demo/Freeze/customEvictor/Freeze.customEvictor.server.vcproj
+++ b/cpp/demo/Freeze/customEvictor/Freeze.customEvictor.server.vcproj
@@ -710,7 +710,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Database,string,Warehouse::ItemInfo Database ItemInfo.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Database,string,Warehouse::ItemInfo Database ItemInfo.ice&#x0D;&#x0A;"
Outputs="Database.cpp;Database.h"
/>
</FileConfiguration>
@@ -719,7 +719,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Database,string,Warehouse::ItemInfo Database ItemInfo.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Database,string,Warehouse::ItemInfo Database ItemInfo.ice&#x0D;&#x0A;"
Outputs="Database.cpp;Database.h"
/>
</FileConfiguration>
@@ -728,7 +728,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Database,string,Warehouse::ItemInfo Database ItemInfo.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Database,string,Warehouse::ItemInfo Database ItemInfo.ice&#x0D;&#x0A;"
Outputs="Database.cpp;Database.h"
/>
</FileConfiguration>
@@ -737,7 +737,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Database,string,Warehouse::ItemInfo Database ItemInfo.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Database,string,Warehouse::ItemInfo Database ItemInfo.ice&#x0D;&#x0A;"
Outputs="Database.cpp;Database.h"
/>
</FileConfiguration>
diff --git a/cpp/demo/Freeze/library/Freeze.library.collocated.vcproj b/cpp/demo/Freeze/library/Freeze.library.collocated.vcproj
index 6ba33397a84..3fbe5056159 100755
--- a/cpp/demo/Freeze/library/Freeze.library.collocated.vcproj
+++ b/cpp/demo/Freeze/library/Freeze.library.collocated.vcproj
@@ -766,7 +766,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --ice -I&quot;$(IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --ice -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(ZeroC_VS_IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
Outputs="LibraryTypes.cpp;LibraryTypes.h"
/>
</FileConfiguration>
@@ -775,7 +775,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --ice -I&quot;$(IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --ice -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(ZeroC_VS_IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
Outputs="LibraryTypes.cpp;LibraryTypes.h"
/>
</FileConfiguration>
@@ -784,7 +784,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --ice -I&quot;$(IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --ice -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(ZeroC_VS_IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
Outputs="LibraryTypes.cpp;LibraryTypes.h"
/>
</FileConfiguration>
@@ -793,7 +793,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --ice -I&quot;$(IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --ice -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(ZeroC_VS_IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
Outputs="LibraryTypes.cpp;LibraryTypes.h"
/>
</FileConfiguration>
diff --git a/cpp/demo/Freeze/library/Freeze.library.server.vcproj b/cpp/demo/Freeze/library/Freeze.library.server.vcproj
index cd731e0e33b..d594d8443fc 100755
--- a/cpp/demo/Freeze/library/Freeze.library.server.vcproj
+++ b/cpp/demo/Freeze/library/Freeze.library.server.vcproj
@@ -582,7 +582,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --ice -I&quot;$(IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --ice -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(ZeroC_VS_IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
Outputs="LibraryTypes.cpp;LibraryTypes.h"
/>
</FileConfiguration>
@@ -591,7 +591,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --ice -I&quot;$(IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --ice -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(ZeroC_VS_IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
Outputs="LibraryTypes.cpp;LibraryTypes.h"
/>
</FileConfiguration>
@@ -600,7 +600,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --ice -I&quot;$(IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --ice -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(ZeroC_VS_IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
Outputs="LibraryTypes.cpp;LibraryTypes.h"
/>
</FileConfiguration>
@@ -609,7 +609,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --ice -I&quot;$(IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --ice -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --dict StringIsbnSeqDict,string,Ice::StringSeq LibraryTypes &quot;$(ZeroC_VS_IceHome)&quot;\slice/Ice/BuiltinSequences.ice Library.ice&#x0D;&#x0A;"
Outputs="LibraryTypes.cpp;LibraryTypes.h"
/>
</FileConfiguration>
diff --git a/cpp/demo/Freeze/phonebook/Freeze.phonebook.collocated.vcproj b/cpp/demo/Freeze/phonebook/Freeze.phonebook.collocated.vcproj
index 58324907134..82161d8287e 100755
--- a/cpp/demo/Freeze/phonebook/Freeze.phonebook.collocated.vcproj
+++ b/cpp/demo/Freeze/phonebook/Freeze.phonebook.collocated.vcproj
@@ -766,7 +766,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
Outputs="NameIndex.cpp;NameIndex.h"
/>
</FileConfiguration>
@@ -775,7 +775,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
Outputs="NameIndex.cpp;NameIndex.h"
/>
</FileConfiguration>
@@ -784,7 +784,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
Outputs="NameIndex.cpp;NameIndex.h"
/>
</FileConfiguration>
@@ -793,7 +793,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
Outputs="NameIndex.cpp;NameIndex.h"
/>
</FileConfiguration>
diff --git a/cpp/demo/Freeze/phonebook/Freeze.phonebook.server.vcproj b/cpp/demo/Freeze/phonebook/Freeze.phonebook.server.vcproj
index af76536632e..973202ffc8a 100755
--- a/cpp/demo/Freeze/phonebook/Freeze.phonebook.server.vcproj
+++ b/cpp/demo/Freeze/phonebook/Freeze.phonebook.server.vcproj
@@ -582,7 +582,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
Outputs="NameIndex.cpp;NameIndex.h"
/>
</FileConfiguration>
@@ -591,7 +591,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
Outputs="NameIndex.cpp;NameIndex.h"
/>
</FileConfiguration>
@@ -600,7 +600,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
Outputs="NameIndex.cpp;NameIndex.h"
/>
</FileConfiguration>
@@ -609,7 +609,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice --index NameIndex,Demo::Contact,name,case-insensitive NameIndex PhoneBook.ice&#x0D;&#x0A;"
Outputs="NameIndex.cpp;NameIndex.h"
/>
</FileConfiguration>
diff --git a/cpp/demo/Freeze/transform/Freeze.transform.create.vcproj b/cpp/demo/Freeze/transform/Freeze.transform.create.vcproj
index 17a55186771..3c794d79067 100755
--- a/cpp/demo/Freeze/transform/Freeze.transform.create.vcproj
+++ b/cpp/demo/Freeze/transform/Freeze.transform.create.vcproj
@@ -502,7 +502,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
Outputs="Contacts.cpp;Contacts.h"
/>
</FileConfiguration>
@@ -511,7 +511,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
Outputs="Contacts.cpp;Contacts.h"
/>
</FileConfiguration>
@@ -520,7 +520,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
Outputs="Contacts.cpp;Contacts.h"
/>
</FileConfiguration>
@@ -529,7 +529,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
Outputs="Contacts.cpp;Contacts.h"
/>
</FileConfiguration>
diff --git a/cpp/demo/Freeze/transform/Freeze.transform.read.vcproj b/cpp/demo/Freeze/transform/Freeze.transform.read.vcproj
index da9d91412bf..f678334e933 100755
--- a/cpp/demo/Freeze/transform/Freeze.transform.read.vcproj
+++ b/cpp/demo/Freeze/transform/Freeze.transform.read.vcproj
@@ -502,7 +502,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
Outputs="Contacts.cpp;Contacts.h"
/>
</FileConfiguration>
@@ -511,7 +511,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
Outputs="Contacts.cpp;Contacts.h"
/>
</FileConfiguration>
@@ -520,7 +520,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
Outputs="Contacts.cpp;Contacts.h"
/>
</FileConfiguration>
@@ -529,7 +529,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::Contacts,string,Demo::ContactData,sort --dict-index Demo::Contacts,phoneNumber,sort Contacts ContactData.ice&#x0D;&#x0A;"
Outputs="Contacts.cpp;Contacts.h"
/>
</FileConfiguration>
diff --git a/cpp/demo/Freeze/transform/Freeze.transform.readnew.vcproj b/cpp/demo/Freeze/transform/Freeze.transform.readnew.vcproj
index 08a440da749..ad6d2710573 100755
--- a/cpp/demo/Freeze/transform/Freeze.transform.readnew.vcproj
+++ b/cpp/demo/Freeze/transform/Freeze.transform.readnew.vcproj
@@ -502,7 +502,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
Outputs="NewContacts.cpp;NewContacts.h"
/>
</FileConfiguration>
@@ -511,7 +511,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
Outputs="NewContacts.cpp;NewContacts.h"
/>
</FileConfiguration>
@@ -520,7 +520,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
Outputs="NewContacts.cpp;NewContacts.h"
/>
</FileConfiguration>
@@ -529,7 +529,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
Outputs="NewContacts.cpp;NewContacts.h"
/>
</FileConfiguration>
diff --git a/cpp/demo/Freeze/transform/Freeze.transform.recreate.vcproj b/cpp/demo/Freeze/transform/Freeze.transform.recreate.vcproj
index bb9a2bc9986..2a2b0e08114 100755
--- a/cpp/demo/Freeze/transform/Freeze.transform.recreate.vcproj
+++ b/cpp/demo/Freeze/transform/Freeze.transform.recreate.vcproj
@@ -502,7 +502,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
Outputs="NewContacts.cpp;NewContacts.h"
/>
</FileConfiguration>
@@ -511,7 +511,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
Outputs="NewContacts.cpp;NewContacts.h"
/>
</FileConfiguration>
@@ -520,7 +520,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
Outputs="NewContacts.cpp;NewContacts.h"
/>
</FileConfiguration>
@@ -529,7 +529,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; --dict Demo::NewContacts,string,Demo::ContactData,sort --dict-index Demo::NewContacts,phoneNumber,sort NewContacts NewContactData.ice&#x0D;&#x0A;"
Outputs="NewContacts.cpp;NewContacts.h"
/>
</FileConfiguration>
diff --git a/cpp/demo/book/map_filesystem/book.map_filesystem.server.vcproj b/cpp/demo/book/map_filesystem/book.map_filesystem.server.vcproj
index 27dfb229141..9e2ee331dda 100755
--- a/cpp/demo/book/map_filesystem/book.map_filesystem.server.vcproj
+++ b/cpp/demo/book/map_filesystem/book.map_filesystem.server.vcproj
@@ -500,7 +500,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityFileEntryMap,Ice::Identity,FilesystemDB::FileEntry IdentityFileEntryMap FilesystemDB.ice &quot;$(IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityDirectoryEntryMap,Ice::Identity,FilesystemDB::DirectoryEntry IdentityDirectoryEntryMap FilesystemDB.ice &quot;$(IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityFileEntryMap,Ice::Identity,FilesystemDB::FileEntry IdentityFileEntryMap FilesystemDB.ice &quot;$(ZeroC_VS_IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityDirectoryEntryMap,Ice::Identity,FilesystemDB::DirectoryEntry IdentityDirectoryEntryMap FilesystemDB.ice &quot;$(ZeroC_VS_IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;"
Outputs="IdentityFileEntryMap.cpp;IdentityFileEntryMap.h;IdentityDirectoryEntryMap.cpp;IdentityDirectoryEntryMap.h"
/>
</FileConfiguration>
@@ -509,7 +509,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityFileEntryMap,Ice::Identity,FilesystemDB::FileEntry IdentityFileEntryMap FilesystemDB.ice &quot;$(IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityDirectoryEntryMap,Ice::Identity,FilesystemDB::DirectoryEntry IdentityDirectoryEntryMap FilesystemDB.ice &quot;$(IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityFileEntryMap,Ice::Identity,FilesystemDB::FileEntry IdentityFileEntryMap FilesystemDB.ice &quot;$(ZeroC_VS_IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityDirectoryEntryMap,Ice::Identity,FilesystemDB::DirectoryEntry IdentityDirectoryEntryMap FilesystemDB.ice &quot;$(ZeroC_VS_IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;"
Outputs="IdentityFileEntryMap.cpp;IdentityFileEntryMap.h;IdentityDirectoryEntryMap.cpp;IdentityDirectoryEntryMap.h"
/>
</FileConfiguration>
@@ -518,7 +518,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityFileEntryMap,Ice::Identity,FilesystemDB::FileEntry IdentityFileEntryMap FilesystemDB.ice &quot;$(IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityDirectoryEntryMap,Ice::Identity,FilesystemDB::DirectoryEntry IdentityDirectoryEntryMap FilesystemDB.ice &quot;$(IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityFileEntryMap,Ice::Identity,FilesystemDB::FileEntry IdentityFileEntryMap FilesystemDB.ice &quot;$(ZeroC_VS_IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityDirectoryEntryMap,Ice::Identity,FilesystemDB::DirectoryEntry IdentityDirectoryEntryMap FilesystemDB.ice &quot;$(ZeroC_VS_IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;"
Outputs="IdentityFileEntryMap.cpp;IdentityFileEntryMap.h;IdentityDirectoryEntryMap.cpp;IdentityDirectoryEntryMap.h"
/>
</FileConfiguration>
@@ -527,7 +527,7 @@
>
<Tool
Name="VCCustomBuildTool"
- CommandLine="..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityFileEntryMap,Ice::Identity,FilesystemDB::FileEntry IdentityFileEntryMap FilesystemDB.ice &quot;$(IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;..\..\..\bin\slice2freeze.exe -I&quot;$(IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityDirectoryEntryMap,Ice::Identity,FilesystemDB::DirectoryEntry IdentityDirectoryEntryMap FilesystemDB.ice &quot;$(IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;"
+ CommandLine="&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityFileEntryMap,Ice::Identity,FilesystemDB::FileEntry IdentityFileEntryMap FilesystemDB.ice &quot;$(ZeroC_VS_IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;&quot;$(ZeroC_VS_CppBinDir)\slice2freeze.exe&quot; -I&quot;$(ZeroC_VS_IceHome)&quot;\slice -I. --ice --dict FilesystemDB::IdentityDirectoryEntryMap,Ice::Identity,FilesystemDB::DirectoryEntry IdentityDirectoryEntryMap FilesystemDB.ice &quot;$(ZeroC_VS_IceHome)&quot;\slice\Ice\Identity.ice&#x0D;&#x0A;"
Outputs="IdentityFileEntryMap.cpp;IdentityFileEntryMap.h;IdentityDirectoryEntryMap.cpp;IdentityDirectoryEntryMap.h"
/>
</FileConfiguration>
diff --git a/cs/INSTALL.VISUAL_C# b/cs/INSTALL.VISUAL_C#
index 0e45f7aae21..2daa63ef499 100644
--- a/cs/INSTALL.VISUAL_C#
+++ b/cs/INSTALL.VISUAL_C#
@@ -44,9 +44,9 @@ the source code of a sample program, you can rebuild it using nmake.
You can also build the demos using the Visual Studio solution located
in demo\demo.sln. Note that the demo projects require the Ice Visual
-Studio Extension. The extension is installed automatically when you
-use the Ice installer, or you can install the extension manually by
-following the instructions in ..\vsplugin\INSTALL.txt.
+Studio Add-In. The add-in is installed automatically when you
+use the Ice installer, or you can install the add-in manually by
+following the instructions in ..\vsaddin\INSTALL.txt.
Managed Code
diff --git a/distribution/makedist.py b/distribution/makedist.py
index 1cbd5cd0828..5f92c431871 100755
--- a/distribution/makedist.py
+++ b/distribution/makedist.py
@@ -24,7 +24,7 @@ includeSubDirs = [ \
"py", \
"vb", \
"rb", \
- "vsplugin", \
+ "vsaddin", \
"config", \
"scripts", \
"certs", \
@@ -171,8 +171,8 @@ fixVersion(os.path.join("cpp", "config", "icegridregistry.cfg"), *versions)
fixVersion(os.path.join("distribution", "src", "rpm", "glacier2router.conf"), *versions)
fixVersion(os.path.join("distribution", "src", "rpm", "icegridregistry.conf"), *versions)
fixVersion(os.path.join("distribution", "src", "rpm", "RPM_README"), *versions)
-fixVersion(os.path.join("vsplugin", "config", "Ice-VS2008.AddIn"), *versions)
-fixVersion(os.path.join("vsplugin", "config", "Ice-VS2010.AddIn"), *versions)
+fixVersion(os.path.join("vsaddin", "config", "Ice-VS2008.AddIn"), *versions)
+fixVersion(os.path.join("vsaddin", "config", "Ice-VS2010.AddIn"), *versions)
bisonFiles = []
flexFiles = []
diff --git a/distribution/src/common/README.DEMOS.txt b/distribution/src/common/README.DEMOS.txt
index bc8dfb99466..fe0e10c13b1 100644
--- a/distribution/src/common/README.DEMOS.txt
+++ b/distribution/src/common/README.DEMOS.txt
@@ -50,7 +50,7 @@ section of this page:
The C++ demos are in the demo directory.
Note that the Visual Studio project files require the Ice Visual
-Studio Extension.
+Studio Add-In.
If you are using Visual Studio 2010 and you intend to build any of the
demos that use Freeze, you must first define the IceHome environment
@@ -148,7 +148,7 @@ another command window, type 'client' to start the client.
======================================================================
Note that the Visual Studio project files require the Ice Visual
-Studio Extension.
+Studio Add-In.
Building the C# demos
diff --git a/distribution/src/windows/IceVisualStudioExtension.aip b/distribution/src/windows/IceVisualStudioAddin.aip
index 35532e92714..2af146be1ca 100755
--- a/distribution/src/windows/IceVisualStudioExtension.aip
+++ b/distribution/src/windows/IceVisualStudioAddin.aip
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<DOCUMENT Type="Advanced Installer" CreateVersion="7.3" version="7.7" Modules="enterprise" RootPath="." Language="en">
+<DOCUMENT Type="Advanced Installer" CreateVersion="7.3" version="8.0.2" Modules="enterprise" RootPath="." Language="en">
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
<ROW Property="AI_UPGRADE" Value="No"/>
<ROW Property="ALLUSERS" Value="2"/>
<ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/>
<ROW Property="ARPCONTACT" Value="info@zeroc.com"/>
<ROW Property="ARPURLINFOABOUT" Value="http://www.zeroc.com"/>
- <ROW Property="BannerBitmap" MultiBuildValue="DefaultBuild:installer_header.bmp_1" Type="1"/>
- <ROW Property="DialogBitmap" MultiBuildValue="DefaultBuild:installer_main.bmp_1" Type="1"/>
+ <ROW Property="BannerBitmap" MultiBuildValue="DefaultBuild:installer_header.bmp" Type="1"/>
+ <ROW Property="DialogBitmap" MultiBuildValue="DefaultBuild:installer_main.bmp" Type="1"/>
<ROW Property="Manufacturer" Value="Zeroc, Inc" ValueLocId="*"/>
<ROW Property="ProductCode" Value="1033:{091125B5-4F5C-44C7-92DE-FD64FC862F0C} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
- <ROW Property="ProductName" Value="Ice Visual Studio Extension" ValueLocId="*"/>
- <ROW Property="ProductVersion" Value="3.4.1.1"/>
+ <ROW Property="ProductName" Value="Ice Visual Studio Addin" ValueLocId="*"/>
+ <ROW Property="ProductVersion" Value="3.4.1.2"/>
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
<ROW Property="UpgradeCode" Value="{933BADDE-6A31-4CDC-AB46-FBDFC214EBDB}"/>
@@ -32,8 +32,8 @@
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
- <ROW File="IceVisualStudioAddin_VS2008.dll" Component_="IceVisualStudioAddin_VS2008.dll" FileName="IceVis~1.dll|IceVisualStudioAddin-VS2008.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="&lt;ICE_BUILD_HOME&gt;VC9\Release\vsplugin\bin\IceVisualStudioAddin-VS2008.dll" SelfReg="false" Sequence="1" DigSign="true"/>
- <ROW File="IceVisualStudioAddin_VS2010.dll" Component_="IceVisualStudioAddin_VS2010.dll" FileName="IceVis~2.dll|IceVisualStudioAddin-VS2010.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="&lt;ICE_BUILD_HOME&gt;VC10\Release\vsplugin\bin\IceVisualStudioAddin-VS2010.dll" SelfReg="false" Sequence="2" DigSign="true"/>
+ <ROW File="IceVisualStudioAddin_VS2008.dll" Component_="IceVisualStudioAddin_VS2008.dll" FileName="IceVis~1.dll|IceVisualStudioAddin-VS2008.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="&lt;ICE_BUILD_HOME&gt;VC9\Release\vsaddin\bin\IceVisualStudioAddin-VS2008.dll" SelfReg="false" Sequence="1" DigSign="true"/>
+ <ROW File="IceVisualStudioAddin_VS2010.dll" Component_="IceVisualStudioAddin_VS2010.dll" FileName="IceVis~2.dll|IceVisualStudioAddin-VS2010.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="&lt;ICE_BUILD_HOME&gt;VC10\Release\vsaddin\bin\IceVisualStudioAddin-VS2010.dll" SelfReg="false" Sequence="2" DigSign="true"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
<ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="1" PackageFolder="." Languages="en" InstallationType="4"/>
@@ -44,7 +44,7 @@
<ROW Path="&lt;AI_DICTS&gt;ui_en.ail"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
- <ROW DigitalCertificate="verisign-code-signing.pfx" TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="[|ProductName]" SignOptions="7" SignTool="0"/>
+ <ROW DigitalCertificate="..\..\..\verisign-code-signing.pfx" TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="[|ProductName]" SignOptions="7" SignTool="0"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
<ROW Fragment="CommonUI.aip" Path="&lt;AI_FRAGS&gt;CommonUI.aip"/>
@@ -60,12 +60,12 @@
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
<ROW Name="aicustact.dll" SourcePath="&lt;AI_CUSTACTS&gt;aicustact.dll"/>
- <ROW Name="installer_header.bmp_1" SourcePath="&lt;ICE_BUILD_HOME&gt;distfiles\distfiles-3.4.1\src\windows\installer-header.bmp"/>
- <ROW Name="installer_main.bmp_1" SourcePath="&lt;ICE_BUILD_HOME&gt;distfiles\distfiles-3.4.1\src\windows\installer-main.bmp"/>
+ <ROW Name="installer_header.bmp" SourcePath="&lt;ICE_BUILD_HOME&gt;dist\distfiles-3.4.1\src\windows\installer-header.bmp"/>
+ <ROW Name="installer_main.bmp" SourcePath="&lt;ICE_BUILD_HOME&gt;dist\distfiles-3.4.1\src\windows\installer-main.bmp"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiControlComponent">
<ROW Dialog_="LicenseAgreementDlg" Control="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Attributes="1048577" Text="[BannerBitmap]" Control_Next="AgreementText" MsiKey="LicenseAgreementDlg#BannerBitmap"/>
- <ROW Dialog_="LicenseAgreementDlg" Control="AgreementText" Type="FileScrollableText" X="20" Y="60" Width="330" Height="120" Attributes="7" Text="LICENSE.rtf" Control_Next="Buttons" TextLocId="Control.Text.LicenseAgreementDlg#AgreementText"/>
+ <ROW Dialog_="LicenseAgreementDlg" Control="AgreementText" Type="FileScrollableText" X="20" Y="60" Width="330" Height="120" Attributes="7" Text="&lt;ICE_BUILD_HOME&gt;dist\distfiles-3.4.1\src\windows\LICENSE.rtf" Control_Next="Buttons" TextLocId="Control.Text.LicenseAgreementDlg#AgreementText"/>
<ROW Dialog_="VerifyReadyDlg" Control="Text" Type="Text" X="25" Y="100" Width="320" Height="40" Attributes="3" Text="Click &quot;Install&quot; to begin the installation. If you want to review or change any of your installation settings, click &quot;Back&quot;. Click &quot;Cancel&quot; to exit the wizard." Control_Next="Description" TextLocId="Control.Text.VerifyReadyDlg#Text" MsiKey="VerifyReadyDlg#Text"/>
<ROW Dialog_="VerifyReadyDlg" Control="Title" Type="Text" X="15" Y="6" Width="304" Height="15" Attributes="196611" Text="Ready to Install" TextStyle="[DlgTitleFont]" Control_Next="Text_1" TextLocId="Control.Text.VerifyReadyDlg#Title" MsiKey="VerifyReadyDlg#Title"/>
<ROW Dialog_="VerifyReadyDlg" Control="Text_1" Type="Text" X="25" Y="70" Width="304" Height="25" Attributes="65539" Property="TEXT_1_PROP" Text="Patching Ice installation in [ICE_INSTALL_DIR]" Control_Next="Install"/>
@@ -81,6 +81,14 @@
<ROW Dialog_="PatchWelcomeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_PATCH" Ordering="3"/>
<ROW Dialog_="LicenseAgreementDlg" Control_="Back" Event="NewDialog" Argument="WelcomeDlg" Condition="AI_INSTALL" Ordering="1"/>
<ROW Dialog_="LicenseAgreementDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_INSTALL AND IAgree = &quot;Yes&quot;" Ordering="1"/>
+ <ROW Dialog_="CustomizeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="1"/>
+ <ROW Dialog_="CustomizeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_MAINT" Ordering="1"/>
+ <ROW Dialog_="MaintenanceTypeDlg" Control_="ChangeButton" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="301"/>
+ <ROW Dialog_="ResumeDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_RESUME" Ordering="299"/>
+ <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_MAINT" Ordering="197"/>
+ <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="198"/>
+ <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_INSTALL" Ordering="199"/>
+ <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="201"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
<ROW Action="AI_PREPARE_UPGRADE" Type="65" Source="aicustact.dll" Target="PrepareUpgrade"/>
diff --git a/distribution/src/windows/LICENSE.rtf b/distribution/src/windows/LICENSE.rtf
index 7e8961c09d6..051f71a9d7e 100644
--- a/distribution/src/windows/LICENSE.rtf
+++ b/distribution/src/windows/LICENSE.rtf
@@ -1,5 +1,5 @@
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss\fprq2\fcharset0 Lucida Sans Unicode;}}
-{\*\generator Msftedit 5.41.21.2508;}\viewkind4\uc1\pard\lang1033\f0\fs14 Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.\par
+{\*\generator Msftedit 5.41.21.2508;}\viewkind4\uc1\pard\lang1033\f0\fs14 Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.\par
\par
This copy of Ice is free software; you can redistribute it and/or modify\par
it under the terms of the GNU General Public License version 2 as\par
diff --git a/distribution/src/windows/docs/main/README.txt b/distribution/src/windows/docs/main/README.txt
index c4bb30c6654..7725480bab5 100644
--- a/distribution/src/windows/docs/main/README.txt
+++ b/distribution/src/windows/docs/main/README.txt
@@ -34,13 +34,15 @@ Table of Contents
2. Supported Windows versions
3. Third party packages
- Qt SQL driver
- 4. Ice Visual Studio Extension
- - Activating the plug-in for a project
+ 4. Ice Visual Studio Add-In
+ - Activating the add-in for a project
- Project properties
- Environment variables
- Adding Slice files to a project
- Generating code
- VC++ Pre-compiled headers
+ - .NET DEVPATH support
+ - Command-line builds
5. Setting up your environment to use Ice
- C++
- .NET
@@ -123,37 +125,44 @@ built-in.
======================================================================
-4. Ice Visual Studio Extension
+4. Ice Visual Studio Add-In
======================================================================
-The Ice Visual Studio Extension integrates Ice projects into the
-Visual Studio 2008 and Visual Studio 2010 IDEs. The extension supports
-C++, .NET, VB, and Silverlight projects.
+The Ice Visual Studio Add-In integrates Ice projects into the
+Visual Studio IDE. The add-in supports C++, .NET, VB and
+Silverlight projects.
-The extension for Visual Studio 2008 is only installed if Visual
+The add-in for Visual Studio 2008 is only installed if Visual
Studio 2008 is present on the target machine. Likewise for the Visual
-Studio 2010 extension. If you install Visual Studio 2008 or Visual
+Studio 2010 add-in. If you install Visual Studio 2008 or Visual
Studio 2010 after installing Ice, you will have to re-run the Ice
-installer and choose "Repair" to install the extension.
+installer and choose "Repair" to install the add-in.
-Note that the extension is not supported for Visual Studio Express
-editions as Microsoft does not permit extensions to be written for
+Note that the add-in is not supported for Visual Studio Express
+editions as Microsoft does not permit add-ins to be written for
Express editions of Visual Studio.
-Activating the plug-in for a project
+Activating the add-in for a project
------------------------------------
-After creating or loading a project, right-click on the project in
-Solution Explorer and choose "Ice Configuration..." or go to "Ice
+After installing the add-in, right-click on the project in Solution
+Explorer and choose "Ice Configuration..." or go to "Ice
Configuration..." in the "Tools" menu. This opens a dialog where you
can configure Ice build properties.
+To enable the add-in for your project, click "Enable Ice Builder" and
+then click "Apply" or "Ok" to commit the changes.
+
Note that after adding new configurations or platforms to your
-project, it may be necessary to disable and then re-enable the plug-in
-in order for the new configuration/platform to have the correct Ice
-settings.
+project, it may be necessary to disable and then re-enable the Ice
+add-in for that project, in order for the new configuration/platform
+to have the correct Ice settings.
+
+To do that, open the "Ice Configuration..." dialog, uncheck "Enable
+Ice Builder", click "Apply", then check "Enable Ice Builder" and click
+"Apply" or "Ok".
Project properties
@@ -163,13 +172,18 @@ Project properties
Set the directory where Ice is installed.
+* Output Dir
+
+ Set the base directory where generated files will be placed.
+
* Slice Compiler Options
Tick the corresponding check boxes to pass options such as --ice,
--stream, --checksum, or --tie (.NET only) to the Slice compiler.
- Tick "Console Output" if you want compiler output to appear in the
- Output window.
+ You can change the verbosity of messages printed to the output
+ window by selecting a different Trace Level, where Error is less
+ verbose and Debug is more verbose.
* Extra Compiler Options
@@ -189,8 +203,8 @@ Project properties
The checkbox for each directory indicates whether it should be
stored as an absolute path or converted to a path that is relative
- to the project directory. The extension stores an absolute path if
- the box is checked, otherwise the extension attempts to convert the
+ to the project directory. The add-in stores an absolute path if
+ the box is checked, otherwise the add-in attempts to convert the
directory into a relative path. If the directory cannot be converted
into a relative path, the directory is stored as an absolute path.
Directories that use environment variables (see below) are not
@@ -205,14 +219,21 @@ Project properties
Set the list of Ice libraries to link with.
-Environment variables
+Environment Variables
---------------------
-The "Ice Home", "Extra Compiler Options", and "Slice Include Path"
-settings support the use of environment variables. Use the $(VAR)
-syntax to refer to an environment variable named VAR. For example,
-if you have defined the ICE_HOME environment variable, you can
-use $(ICE_HOME) in the "Ice Home" field.
+The "Ice Home", "Output Dir", "Extra Compiler Options", and "Slice
+Include Path" settings support the use of environment variables. Use
+the $(VAR) syntax to refer to an environment variable named VAR. For
+example,if you have defined the ICE_HOME environment variable, you
+could use $(ICE_HOME) in the "Ice Home" field.
+
+You cannot use environment variables in the "--header-ext" and
+"--source-ext" options in "Extra Compiler Options".
+
+If you change environment variable values outside of Visual Studio,
+you will need to restart Visual Studio to use the new environment
+values.
Adding Slice files to a project
@@ -226,13 +247,19 @@ Slice file, use "Add -> Existing Item...".
Generating code
---------------
-The extension compiles a Slice file whenever you save the file. The
-extension also tracks dependencies among Slice files in the project
-and recompiles only those files that require it after a change.
+The add-in compiles a Slice file whenever you save the file. The
+add-in tracks dependencies among Slice files in the project and
+recompiles only those files that require it after a change.
Generated files are automatically added to the project. For example,
-for Demo.ice, the extension adds Demo.cpp and Demo.h to a C++
-project, whereas the extension adds Demo.cs to a C# project.
+for Demo.ice, the add-in adds Demo.cpp and Demo.h to a C++ project,
+whereas the add-in adds Demo.cs to a C# project.
+
+The default is to place the generated files in the same directory
+as the corresponding Slice file. You can change the directory where
+the generated files are placed using the "Output Dir" option in the
+configuration dialog; the path set here will be used as the base
+directory for storing the generated files.
Errors that occur during Slice compilation are displayed in the Visual
Studio "Output" and "Error List" panels.
@@ -242,13 +269,42 @@ VC++ Pre-compiled headers
-------------------------
For C++ projects, pre-compiled headers are detected automatically.
-(The extension automatically passes the required --add-header option
+(The add-in automatically passes the required --add-header option
to slice2cpp.)
If you change the pre-compiled header setting of a project, you must
rebuild the project.
+.NET DEVPATH support
+--------------------
+
+The add-in detects if a .NET project is configured for development
+mode by inspecting the <application-name>.config.exe file. If a
+project is in development mode, the Ice bin directory is automatically
+added to the DEVPATH environment variable when the demo is run;
+references to Ice components are also set with Copy Local to false to
+avoid copying Ice references to the project's output directory. Note
+that the Copy Local setting is not changed for references that are
+already added to the project.
+
+For more information about .NET DEVPATH see:
+
+ http://msdn.microsoft.com/en-us/library/cskzh7h6.aspx
+
+
+Command-line builds
+-------------------
+
+The add-in supports command-line builds using devenv. For example:
+
+devenv MyProject.sln /build
+
+Note that for this to work, command-line builds must be enabled for
+the add-in in the IDE; see "Tools -> Add-in Manager" and check
+"Command Line" for Ice.
+
+
======================================================================
5. Setting up your environment to use Ice
======================================================================
diff --git a/vb/INSTALL b/vb/INSTALL
index 2ec5944a365..28a3cab0628 100644
--- a/vb/INSTALL
+++ b/vb/INSTALL
@@ -49,9 +49,9 @@ a DLL. That DLL is then referenced from the Visual Basic project.
You can also build the demos using the Visual Studio solution located
in demo\demo.sln. Note that the demo projects require the Ice Visual
-Studio Extension. The extension is installed automatically when you
-use the Ice installer, or you can install the extension manually by
-following the instructions in ..\vsplugin\INSTALL.txt.
+Studio Add-In. The add-in is installed automatically when you
+use the Ice installer, or you can install the add-in manually by
+following the instructions in ..\vsaddin\INSTALL.txt.
Running the demos
diff --git a/vsplugin/INSTALL.txt b/vsaddin/INSTALL.txt
index db3d2e13b41..ef5c2c80740 100644
--- a/vsplugin/INSTALL.txt
+++ b/vsaddin/INSTALL.txt
@@ -6,7 +6,7 @@ Requirements
Visual Studio & Windows Version
-------------------------------
-The Ice Visual Studio Extension is supported in the following
+The Ice Visual Studio Add-In is supported in the following
environments:
- Windows XP SP3 (x86) with Visual Studio 2008 SP1
@@ -30,7 +30,7 @@ environments:
Compilers
---------
-Building the Ice Visual Studio Extension requires:
+Building the Ice Visual Studio Add-In requires:
- Microsoft Visual Studio 2008 SP1 and Visual Studio 2008 SDK
@@ -44,12 +44,12 @@ Compilation
======================================================================
Unpack the archive. The sources are contained in the
-Ice-@ver@\vsplugin subdirectory.
+Ice-@ver@\vsaddin subdirectory.
1) In a Visual Studio command prompt, change to the distribution
directory:
- > cd Ice-@ver@\vsplugin
+ > cd Ice-@ver@\vsaddin
2) Open config\Make.rules.mak and review the comments that describe
the settings you can modify.
@@ -58,7 +58,7 @@ Ice-@ver@\vsplugin subdirectory.
> nmake /f Makefile.mak
-The add-in DLL is placed into the Ice-@ver@\vsplugin\bin directory.
+The add-in DLL is placed into the Ice-@ver@\vsaddin\bin directory.
The library name is
IceVisualStudioAddin-VS2008.dll or IceVisualStudioAddin-VS2010.dll
@@ -68,7 +68,7 @@ The library name is
Installation
======================================================================
-Simply run "nmake install". This installs IceVisualStudioExtension
+Simply run "nmake install". This installs the Ice Visual Studio Add-In
in the directory specified by the "prefix" variable in
config\Make.rules.mak:
@@ -83,7 +83,7 @@ Configuration
Use "Run as administrator" on Windows Vista or Windows 7.
-2) Install Add-in file
+2) Install the add-in
Add-ins are added to Visual Studio by placing a .Addin file into
one of the directories that Visual Studio searches for Add-ins. The
@@ -112,7 +112,7 @@ Configuration
.Addin file to that directory. For example (with Visual Studio 2008):
> cd C:\Users\username\Documents\Visual Studio 2008\Addins
- > copy C:\Ice-@ver@\vsplugin\config\Ice-VS2008.AddIn
+ > copy C:\Ice-@ver@\vsaddin\config\Ice-VS2008.AddIn
If you have not installed the add-in in the default location, you
must edit the .Addin file and update the value of the "Assembly"
@@ -130,7 +130,7 @@ Configuration
Copy the Slice template and configuration files:
- > cd C:\Ice-@ver@\vsplugin\templates\vs
+ > cd C:\Ice-@ver@\vsaddin\templates\vs
> xcopy /e * "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcprojectitems"
For C#, item templates are installed in:
@@ -141,7 +141,7 @@ Configuration
Copy the Slice template and configuration files:
- > cd C:\Ice-@ver@\vsplugin\templates\vs
+ > cd C:\Ice-@ver@\vsaddin\templates\vs
> xcopy /e * "C:\Program Files\Microsoft Visual Studio 9.0\VC#\CSharpProjectItems"
If you are using Windows 64-bit, these directories are:
@@ -152,7 +152,7 @@ Configuration
C:\Program Files\...
- For C# you should also install a user template to make the Slice
+ For C#, you should also install a user template to make the Slice
file template available for all C# project subtypes.
For a Windows Vista (or later) default installation, C# user
@@ -164,13 +164,13 @@ Configuration
C:\Document and Settings\username\My Documents\Visual Studio 20xx\Templates\ItemTemplates\Visual C#
- Copy C:\Ice-@ver@\vsplugin\templates\Slice.zip to the C# template
+ Copy C:\Ice-@ver@\vsaddin\templates\Slice.zip to the C# template
directory. For example:
> cd C:\Users\username\Documents\Visual Studio 2008\Templates\ItemTemplates\Visual C#
- > copy C:\Ice-@ver@\vsplugin\templates\Slice.zip .
+ > copy C:\Ice-@ver@\vsaddin\templates\Slice.zip .
-4) This completes the configuration. The plug-in is available once you
+4) This completes the configuration. The add-in is available once you
restart Visual Studio.
diff --git a/vsplugin/Makefile.mak b/vsaddin/Makefile.mak
index 84b5a1aff09..c417a432982 100644
--- a/vsplugin/Makefile.mak
+++ b/vsaddin/Makefile.mak
@@ -1,6 +1,6 @@
# **********************************************************************
#
-# Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
diff --git a/vsaddin/README.txt b/vsaddin/README.txt
new file mode 100644
index 00000000000..f11041bf059
--- /dev/null
+++ b/vsaddin/README.txt
@@ -0,0 +1,174 @@
+For installation instructions, please refer to the INSTALL.txt file.
+
+If you would like to install the Ice Visual Studio Add-In without
+compiling any source code, you can use the binary distribution
+available at ZeroC's web site (http://www.zeroc.com).
+
+
+Description
+-----------
+
+The Ice Visual Studio Add-In integrates Ice projects into the
+Visual Studio IDE. The add-in supports C++, .NET, VB and
+Silverlight projects.
+
+
+Activating the add-in for a project
+------------------------------------
+
+After installing the add-in, right-click on the project in Solution
+Explorer and choose "Ice Configuration..." or go to "Ice
+Configuration..." in the "Tools" menu. This opens a dialog where you
+can configure Ice build properties.
+
+To enable the add-in for your project, click "Enable Ice Builder" and
+then click "Apply" or "Ok" to commit the changes.
+
+Note that after adding new configurations or platforms to your
+project, it may be necessary to disable and then re-enable the Ice
+add-in for that project, in order for the new configuration/platform
+to have the correct Ice settings.
+
+To do that, open the "Ice Configuration..." dialog, uncheck "Enable
+Ice Builder", click "Apply", then check "Enable Ice Builder" and click
+"Apply" or "Ok".
+
+
+Project properties
+------------------
+
+* Ice Home
+
+ Set the directory where Ice is installed.
+
+* Output Dir
+
+ Set the base directory where generated files will be placed.
+
+* Slice Compiler Options
+
+ Tick the corresponding check boxes to pass options such as --ice,
+ --stream, --checksum, or --tie (.NET only) to the Slice compiler.
+
+ You can change the verbosity of messages printed to the output
+ window by selecting a different Trace Level, where Error is less
+ verbose and Debug is more verbose.
+
+* Extra Compiler Options
+
+ Add extra Slice compiler options that are not explicitly supported
+ above.
+
+ These options must be entered the same as they would be on the
+ command line to the Slice compiler. For example, preprocessor
+ macros can be defined by entering the following:
+
+ -DFOO -DBAR
+
+* Slice Include Path
+
+ Set the list of directories to search for included Slice files
+ (-I option).
+
+ The checkbox for each directory indicates whether it should be
+ stored as an absolute path or converted to a path that is relative
+ to the project directory. The add-in stores an absolute path if
+ the box is checked, otherwise the add-in attempts to convert the
+ directory into a relative path. If the directory cannot be converted
+ into a relative path, the directory is stored as an absolute path.
+ Directories that use environment variables (see below) are not
+ affected by this feature.
+
+* DLL Export Symbol (C++ only)
+
+ Set the symbol to use for DLL exports (--dll-export option).
+
+* Ice Components
+
+ Set the list of Ice libraries to link with.
+
+
+Environment Variables
+---------------------
+
+The "Ice Home", "Output Dir", "Extra Compiler Options", and "Slice
+Include Path" settings support the use of environment variables. Use
+the $(VAR) syntax to refer to an environment variable named VAR. For
+example,if you have defined the ICE_HOME environment variable, you
+could use $(ICE_HOME) in the "Ice Home" field.
+
+You cannot use environment variables in the "--header-ext" and
+"--source-ext" options in "Extra Compiler Options".
+
+If you change environment variable values outside of Visual Studio,
+you will need to restart Visual Studio to use the new environment
+values.
+
+
+Adding Slice files to a project
+-------------------------------
+
+Use "Add -> New Item..." to create a Slice file and add it to a
+project. Use "Slice File (.ice)" as the file type. To add an existing
+Slice file, use "Add -> Existing Item...".
+
+
+Generating code
+---------------
+
+The add-in compiles a Slice file whenever you save the file. The
+add-in tracks dependencies among Slice files in the project and
+recompiles only those files that require it after a change.
+
+Generated files are automatically added to the project. For example,
+for Demo.ice, the add-in adds Demo.cpp and Demo.h to a C++ project,
+whereas the add-in adds Demo.cs to a C# project.
+
+The default is to place the generated files in the same directory
+as the corresponding Slice file. You can change the directory where
+the generated files are placed using the "Output Dir" option in the
+configuration dialog; the path set here will be used as the base
+directory for storing the generated files.
+
+Errors that occur during Slice compilation are displayed in the Visual
+Studio "Output" and "Error List" panels.
+
+
+VC++ Pre-compiled headers
+-------------------------
+
+For C++ projects, pre-compiled headers are detected automatically.
+(The add-in automatically passes the required --add-header option
+to slice2cpp.)
+
+If you change the pre-compiled header setting of a project, you must
+rebuild the project.
+
+
+.NET DEVPATH support
+--------------------
+
+The add-in detects if a .NET project is configured for development
+mode by inspecting the <application-name>.config.exe file. If a
+project is in development mode, the Ice bin directory is automatically
+added to the DEVPATH environment variable when the demo is run;
+references to Ice components are also set with Copy Local to false to
+avoid copying Ice references to the project's output directory. Note
+that the Copy Local setting is not changed for references that are
+already added to the project.
+
+For more information about .NET DEVPATH see:
+
+ http://msdn.microsoft.com/en-us/library/cskzh7h6.aspx
+
+
+Command-line builds
+-------------------
+
+The add-in supports command-line builds using devenv. For example:
+
+devenv MyProject.sln /build
+
+Note that for this to work, command-line builds must be enabled for
+the add-in in the IDE; see "Tools -> Add-in Manager" and check
+"Command Line" for Ice.
diff --git a/vsplugin/vsextension-vs2008.sln b/vsaddin/addin-vs2008.sln
index eb12d6bca18..e816c146d4a 100644..100755
--- a/vsplugin/vsextension-vs2008.sln
+++ b/vsaddin/addin-vs2008.sln
@@ -23,10 +23,4 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SliceBuilder = True
- IceHomeProperty = c:\Ice-3.3.1-VC90
- IceMacrosProperty =
- SliceIncludePathProperty =
- EndGlobalSection
EndGlobal
diff --git a/vsaddin/addin-vs2010.sln b/vsaddin/addin-vs2010.sln
new file mode 100755
index 00000000000..d743aaec728
--- /dev/null
+++ b/vsaddin/addin-vs2010.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "addin-vs2010", "src\addin-vs2010.csproj", "{DB79C06D-CC17-4B29-B4BE-EAE5C8FED3E5}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DB79C06D-CC17-4B29-B4BE-EAE5C8FED3E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DB79C06D-CC17-4B29-B4BE-EAE5C8FED3E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DB79C06D-CC17-4B29-B4BE-EAE5C8FED3E5}.Debug|x86.ActiveCfg = Debug|x86
+ {DB79C06D-CC17-4B29-B4BE-EAE5C8FED3E5}.Debug|x86.Build.0 = Debug|x86
+ {DB79C06D-CC17-4B29-B4BE-EAE5C8FED3E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DB79C06D-CC17-4B29-B4BE-EAE5C8FED3E5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DB79C06D-CC17-4B29-B4BE-EAE5C8FED3E5}.Release|x86.ActiveCfg = Release|x86
+ {DB79C06D-CC17-4B29-B4BE-EAE5C8FED3E5}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/vsplugin/bin/.gitignore b/vsaddin/bin/.gitignore
index 39af5887579..39af5887579 100644
--- a/vsplugin/bin/.gitignore
+++ b/vsaddin/bin/.gitignore
diff --git a/vsplugin/config/Ice-VS2008.AddIn b/vsaddin/config/Ice-VS2008.AddIn
index 8bf00555783..d79b35dd04d 100755..100644
--- a/vsplugin/config/Ice-VS2008.AddIn
+++ b/vsaddin/config/Ice-VS2008.AddIn
@@ -5,10 +5,10 @@
<Version>9.0</Version>
</HostApplication>
<Addin>
- <FriendlyName>Ice-@ver@ Visual Studio Extension</FriendlyName>
- <Description>Ice-@ver@ Visual Studio Extension for Visual Studio 2008</Description>
- <AboutBoxDetails>The Ice Visual Studio Extension integrates Ice projects into the Visual Studio IDE.
-The extension supports C++, .NET, and Silverlight projects.
+ <FriendlyName>Ice-@ver@ Visual Studio Add-In</FriendlyName>
+ <Description>Ice-@ver@ Visual Studio Add-In for Visual Studio 2008</Description>
+ <AboutBoxDetails>The Ice Visual Studio Add-In integrates Ice projects into the Visual Studio IDE.
+The add-in supports C++, .NET, and Silverlight projects.
To know more about Ice visit ZeroC website at http://www.zeroc.com</AboutBoxDetails>
<AboutIconData>0000010006002020100000000000E8020000660000001010100000000000280100004E0300002020000001000800A8080000760400001010000001000800680500001E0D00002020000001002000A8100000861200001010000001002000680400002E2300002800000020000000400000000100040000000000000000000000000000000000000000000000000000000000000000000080000000808000800000008000800080800000C0C0C000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF001111111111111111111111111111111111111111111111111111111000001111111111111111111111111110ABA01111111111111111111111111110BAB01111111111111111111111111110ABA01111111111110000000000F00000BAB00000111111118888888888F0ABABABABABA0111111118F77777777F0BABABABABAB0111111118F77777777F0ABABABABABA0111111118F77777777F00000BAB00000110001118F77777777FFFFF0ABA01111108880118F777777777777F0BAB01111887788008F777777777777F0ABA011118FF770778F777777777777F0000011118FFF78088F777777777777FFFFFF111118FF70118F7777777777777777801111118881118F7777777777777777801111111111118F7777777777777777801111111111118F7777777777777777801111111111118F7777777777777777801111111111118FFFFFFFFFFFFFFFFF801111111111118888888888888888888011111111111111111870111118701111111111111111111118F0111118F011111111111111111111108011111080111111111111111111110808011108080111111111111111111877788018777880111111111111111118FF778018FF7780111111111111111118FFF78018FFF7801111111111111111118FF701118FF7011111111111111111111777111117771111111111111111111111111111111111111111FFFFFFFFFFFFFE0FFFFFFE0FFFFFFE0FFFFFFE0FFF000000FF000000FF000000FF000000FF000000C700000F8300000F0000000F0000000F0000000F8300000FC700000FFF00000FFF00000FFF00000FFF00000FFF00000FFFF8F8FFFFF8F8FFFFF8F8FFFFF0707FFFE0203FFFE0203FFFE0203FFFF0707FFFF8F8FFFFFFFFFF2800000010000000200000000100040000000000000000000000000000000000000000000000000000000000000000000080000000808000800000008000800080800000C0C0C000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0011111111111111111111111111100011111111111110A011111111111000B00011110000F0ABABA011118F88F000B00011118F77FFF0A01170718F7777F000110F008F7777FFFF1170718F777777801111118FFFFFFF801111118888888880111111111101111111111111170711111111111110F01111111111111707111111FFFF1111FFE37777FFE3ABABFF80ABA0F0001111F0007777F0030000100300000003011110037777F003FFF0F0031111FF7F8011FE3F7777FE3F77F0FE3F1111280000002000000040000000010008000000000000000000000000000000000000000000000000000000000000008000008000000080800080000000800080008080000080808000C0DCC000F0CAA600AA3F2A00FF3F2A00005F2A00555F2A00AA5F2A00FF5F2A00007F2A00557F2A00AA7F2A00FF7F2A00009F2A00559F2A00AA9F2A00FF9F2A0000BF2A0055BF2A00AABF2A00FFBF2A0000DF2A0055DF2A00AADF2A00FFDF2A0000FF2A0055FF2A00AAFF2A00FFFF2A000000550055005500AA005500FF005500001F5500551F5500AA1F5500FF1F5500003F5500553F5500AA3F5500FF3F5500005F5500555F5500AA5F5500FF5F5500007F5500557F5500AA7F5500FF7F5500009F5500559F5500AA9F5500FF9F550000BF550055BF5500AABF5500FFBF550000DF550055DF5500AADF5500FFDF550000FF550055FF5500AAFF5500FFFF550000007F0055007F00AA007F00FF007F00001F7F00551F7F00AA1F7F00FF1F7F00003F7F00553F7F00AA3F7F00FF3F7F00005F7F00555F7F00AA5F7F00FF5F7F00007F7F00557F7F00AA7F7F00FF7F7F00009F7F00559F7F00AA9F7F00FF9F7F0000BF7F0055BF7F00AABF7F00FFBF7F0000DF7F0055DF7F00AADF7F00FFDF7F0000FF7F0055FF7F00AAFF7F00FFFF7F000000AA005500AA00AA00AA00FF00AA00001FAA00551FAA00AA1FAA00FF1FAA00003FAA00553FAA00AA3FAA00FF3FAA00005FAA00555FAA00AA5FAA00FF5FAA00007FAA00557FAA00AA7FAA00FF7FAA00009FAA00559FAA00AA9FAA00FF9FAA0000BFAA0055BFAA00AABFAA00FFBFAA0000DFAA0055DFAA00AADFAA00FFDFAA0000FFAA0055FFAA00AAFFAA00FFFFAA000000D4005500D400AA00D400FF00D400001FD400551FD400AA1FD400FF1FD400003FD400553FD400AA3FD400FF3FD400005FD400555FD400AA5FD400FF5FD400007FD400557FD400AA7FD400FF7FD400009FD400559FD400AA9FD400FF9FD40000BFD40055BFD400AABFD400FFBFD40000DFD40055DFD400AADFD400FFDFD40000FFD40055FFD400AAFFD400FFFFD4005500FF00AA00FF00001FFF00551FFF00AA1FFF00FF1FFF00003FFF00553FFF00AA3FFF00FF3FFF00005FFF00555FFF00AA5FFF00FF5FFF00007FFF00557FFF00AA7FFF00FF7FFF00009FFF00559FFF00AA9FFF00FF9FFF0000BFFF0055BFFF00AABFFF00FFBFFF0000DFFF0055DFFF00AADFFF00FFDFFF0055FFFF00AAFFFF00FFCCCC00FFCCFF00FFFF3300FFFF6600FFFF9900FFFFCC00007F0000557F0000AA7F0000FF7F0000009F0000559F0000AA9F0000FF9F000000BF000055BF0000AABF0000FFBF000000DF000055DF0000AADF0000FFDF000055FF0000AAFF000000002A0055002A00AA002A00FF002A00001F2A00551F2A00AA1F2A00FF1F2A00003F2A00553F2A00F0FBFF00A4A0A000808080000000FF0000FF000000FFFF00FF00000000000000FFFF0000FFFFFF00FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD0C0CF50CF5FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD0D3938350CFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD303939380DFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD11395D390CFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD35353535356139393110310D30FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD39666162616161613939393811FDFDFDFDFDFDFDFDFDFD3231073231323132083D858A61666261616161393935FDFDFDFDFDFDFDFDFD5E080909820982838608398A8A8A856165626161613D35FDFDFDFDFDFDFDFD82B3AF08080808080808AB39393939398A86613935353535FDFDFDFDFDFDFDFD86D1F6AFAFAFAFAF08AF0808D408D4398A6586390886FDFDFD5A073632FDFDFD86B3F6F6F6AFF6AFAFAFAF08AB0808398A8A8A39D432FDFD8286D4825A35FDFD82FFF6AFF6F6AFF6AF08D1AF08AFD43D8A8A8A610831FDFD5EFFAF088232363286FFFFF6F6AFF6AFF6AFAF08AF08085D61613D5DD4F5FDFD82F6F6AF085A825E82FFFFFFFFF6D1F6AFF6AFF6AFAFAF080808D408D431FDFD86D4FFFF095EFDFD09FFFFFFFFFFF6B3F6F6AFAFD108AFAFAF08AB09860DFDFDFD08825E86FDFDFD82FFFFFFFFFFFFF6F6AFF6F6AFF6AF08D1AF08088232FDFDFDFDFDFDFDFDFDFD86FFFFFFFFFFFFFFFFFFF6AFF6AFF6AFAF08AF088331FDFDFDFDFDFDFDFDFDFDFD86FFFFFFFFFFFFFFFFFFFFF6F6AFF6AFAFAF0807FDFDFDFDFDFDFDFDFDFDFDFDFD86828682825EF75E5E5E5A5E5A5A07360736FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD5E31FDFDFDFDFDFD5E31FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD8232FDFDFDFDFDFD8232FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD5A360732FDFDFDFD5A360732FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD8286D4823607FDFD8286D4823607FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD5EFFAF088232FDFD5EFFAF088232FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDF7D1FFAF0807FDFDF7D1FFAF0807FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD0808FFFF095EFDFD0808FFFF095EFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD0982F786FDFDFDFD0982F786FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0FFFFFFE0FFFFFFE0FFFFFFE0FFFFFE000FFFFE000FFC00000FF800000FF000000FF000003870000030300000300000003000000030300000387000003FF000003FF800007FFC0000FFFFCFCFFFFFCFCFFFFF8787FFFF0303FFFF0303FFFF0303FFFF0303FFFF8787FFFFFFFFFFFFFFFFF280000001000000020000000010008000000000000000000000000000000000000000000000000000000000000008000008000000080800080000000800080008080000080808000C0DCC000F0CAA600AA3F2A00FF3F2A00005F2A00555F2A00AA5F2A00FF5F2A00007F2A00557F2A00AA7F2A00FF7F2A00009F2A00559F2A00AA9F2A00FF9F2A0000BF2A0055BF2A00AABF2A00FFBF2A0000DF2A0055DF2A00AADF2A00FFDF2A0000FF2A0055FF2A00AAFF2A00FFFF2A000000550055005500AA005500FF005500001F5500551F5500AA1F5500FF1F5500003F5500553F5500AA3F5500FF3F5500005F5500555F5500AA5F5500FF5F5500007F5500557F5500AA7F5500FF7F5500009F5500559F5500AA9F5500FF9F550000BF550055BF5500AABF5500FFBF550000DF550055DF5500AADF5500FFDF550000FF550055FF5500AAFF5500FFFF550000007F0055007F00AA007F00FF007F00001F7F00551F7F00AA1F7F00FF1F7F00003F7F00553F7F00AA3F7F00FF3F7F00005F7F00555F7F00AA5F7F00FF5F7F00007F7F00557F7F00AA7F7F00FF7F7F00009F7F00559F7F00AA9F7F00FF9F7F0000BF7F0055BF7F00AABF7F00FFBF7F0000DF7F0055DF7F00AADF7F00FFDF7F0000FF7F0055FF7F00AAFF7F00FFFF7F000000AA005500AA00AA00AA00FF00AA00001FAA00551FAA00AA1FAA00FF1FAA00003FAA00553FAA00AA3FAA00FF3FAA00005FAA00555FAA00AA5FAA00FF5FAA00007FAA00557FAA00AA7FAA00FF7FAA00009FAA00559FAA00AA9FAA00FF9FAA0000BFAA0055BFAA00AABFAA00FFBFAA0000DFAA0055DFAA00AADFAA00FFDFAA0000FFAA0055FFAA00AAFFAA00FFFFAA000000D4005500D400AA00D400FF00D400001FD400551FD400AA1FD400FF1FD400003FD400553FD400AA3FD400FF3FD400005FD400555FD400AA5FD400FF5FD400007FD400557FD400AA7FD400FF7FD400009FD400559FD400AA9FD400FF9FD40000BFD40055BFD400AABFD400FFBFD40000DFD40055DFD400AADFD400FFDFD40000FFD40055FFD400AAFFD400FFFFD4005500FF00AA00FF00001FFF00551FFF00AA1FFF00FF1FFF00003FFF00553FFF00AA3FFF00FF3FFF00005FFF00555FFF00AA5FFF00FF5FFF00007FFF00557FFF00AA7FFF00FF7FFF00009FFF00559FFF00AA9FFF00FF9FFF0000BFFF0055BFFF00AABFFF00FFBFFF0000DFFF0055DFFF00AADFFF00FFDFFF0055FFFF00AAFFFF00FFCCCC00FFCCFF00FFFF3300FFFF6600FFFF9900FFFFCC00007F0000557F0000AA7F0000FF7F0000009F0000559F0000AA9F0000FF9F000000BF000055BF0000AABF0000FFBF000000DF000055DF0000AADF0000FFDF000055FF0000AAFF000000002A0055002A00AA002A00FF002A00001F2A00551F2A00AA1F2A00FF1F2A00003F2A00553F2A00F0FBFF00A4A0A000808080000000FF0000FF000000FFFF00FF00000000000000FFFF0000FFFFFF00FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD353535FDFDFDFDFDFDFDFDFDFDFDFDFD356535FDFDFDFDFDFDFDFDFDFDFD39393985351111FDFDFDFDFDFDFDFDFD398A8A8A8A8935FDFDFDFDFDFD3131823D39398A393535FDFDFDFDFD32AF820808AB3DB239FDFDFDFDF5FDFD5AF6AFAFAF08393939FDFDFD5EFFF5F55EFFF6F6AFF6AF0886FDFDFDFD5EFDFD5EFFFFF6F6AFAFD4F5FDFDFDFDFDFDFDFDF75E5E5A5A0731FDFDFDFDFDFDFDFDFDFDFDFDF5FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDF5FDFDFDFDFDFDFDFDFDFDFDFDFDFD5EFFF5FDFDFDFDFDFDFDFDFDFDFDFDFDFD5EFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFFFFFDFDFFC7FDFDFFC7FDFDFF01FDFDFF01FD39F8016261F0076139B00738110007FDFDB007FDFDF80F3231FF7F3132FF7F083DFE3F6166FF7F6161FFFF39352800000020000000400000000100200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002E5B35FC295231FF274F2FFF264D2EFF27502FFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000306138FE329A4FFF2C9649FF259244FF2A5432FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000356A3DFC3FA259FF389D54FF319A4EFF2E5D36FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000397341FE4DAB66FF45A65FFF3DA158FF316439FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045874CFF43854BFF42824AFF407E47FF3F7C46FF5BB471FF53AF6AFF4BAA64FF356B3DFF34683CFF33673BFF326439FF306038FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000519F58FF85CF94FF7FCA8FFF77C689FF70C183FF69BD7DFF61B876FF59B370FF51AE6AFF49A963FF42A55CFF3B9F56FF387040FF00000000000000000000000000000000000000000000000000000000000000000000000089715F4689715FFF866E5BFF846B59FF816855FF7E6552FF7B624FFF79604CFF846E5CFFCAC1B9FF55A85DFF8FD59CFF8AD198FF84CD93FF7DCA8EFF76C688FF6EC082FF67BB7CFF5FB775FF58B26EFF50AD67FF48A861FF3E7A46FF000000000000000000000000000000000000000000000000000000000000000089715F46AE998AFFD2C0B6FFD0BDB3FFCEBBB1FFCCB9AEFFCBB6ABFFCAB4A9FFC7B2A6FFCCB8ADFFD4C4BCFF5AB061FF97DAA3FF93D8A0FF8ED49CFF88D097FF83CC92FF7BC98CFF75C487FF6DC081FF65BB7AFF5EB673FF56B16DFF43854AFF0000000000000000000000000000000000000000000000000000000000000000C3AFA2FFF3EFECFFE6DEDAFFE0D4CEFFDFD2CAFFDDCEC7FFDACCC3FFD8C9C1FFD6C6BDFFD8C8C1FFE1D6CFFF59AB60FF58AA5EFF56A75DFF55A65DFF57AA5EFF8DD39BFF87CF97FF81CC91FF4F9B57FF4B9352FF498D50FF478C4FFC46894DFC0000000000000000000000000000000000000000000000000000000000000000C4B0A3FFF7F3F1FFF5F0EEFFF2EDEBFFEFEAE7FFEEE6E3FFEBE3DFFFE8DFDBFFE6DCD6FFE4D8D2FFE1D4CEFFDED0CAFFDCCDC6FFD9C9C2FFD6C6BDFF57AB5EFF95D9A2FF91D69EFF8CD29AFF519E58FFDED2CBFFC4BAB2FF0000000000000000BEAFA531A69183C08D7664F8856C5AF8866B59C0826855310000000000000000C5B1A4FFF9F7F5FFF7F4F3FFF5F2EFFFF3EEECFFF0EBE8FFEFE8E4FFEDE4E1FFEAE1DDFFE7DDD8FFE4DAD4FFE2D7D0FFDFD3CCFFDCCEC8FFDACBC3FF5AAE62FF99DBA5FF99DAA4FF94D8A2FF54A45BFFDFD4CEFF846E5EFF0000000000000000BCADA2C0C7BAB0FFD7C7C1FFC3ADA1FF9D8373FF876D5AC00000000000000000C5B2A4FFFBFAF9FFF9F8F6FFF8F5F3FFF6F3F0FFF4EFEEFFF2ECEAFFF0EAE6FFEEE6E2FFEBE3DEFFE8DFDAFFE5DBD6FFE3D8D2FFE0D4CDFFDDD0C9FF5DB564FF99DBA5FF99DBA5FF99DBA5FF69B570FFDDD1CAFF69503BFF0000000000000000B19E90F8F9F7F6FFF0EAE8FFDCCEC6FFC2AEA1FF88705DF8866E5BFF846B59FFC6B2A5FFFDFDFDFFFCFAFAFFFBF9F8FFF9F6F5FFF7F3F2FFF5F0EEFFF2EEECFFF0EBE8FFEEE7E4FFECE4E0FFE9E1DCFFE6DDD7FFE4D9D4FFE2D6D0FF5DB263FF62BF69FF62BF69FF61BE68FF6AB671FFDED2CBFF6C523EFF0000000000000000B8A699F8F9F8F7FFFFFFFFFFF0EBE8FFD6C9C0FF937B6AF8C7B1A6FFB39A8AFFC6B3A5FFFFFFFFFFFFFDFEFFFDFBFBFFFBFAF9FFF9F8F6FFF7F5F3FFF5F2F0FFF3EFEDFFF1ECE9FFEFE9E5FFEDE6E2FFEBE3DEFFE8DFDAFFE6DBD5FFE2D8D2FFE0D4CDFFDDCFC9FFDFD1CBFFDED2CBFFDDCFC7FF6F5541FF0000000000000000CDC0B6C0DBD2CBFFFAF8F7FFF9F8F7FFCABDB4FFAB9789C00000000000000000C7B3A6FFFFFFFFFFFFFFFFFFFFFFFEFFFDFCFDFFFCFBFAFFFAF9F8FFF8F6F5FFF7F3F2FFF5F0EFFFF2EDEAFFF0EAE7FFEEE7E3FFEBE4DFFFE9E0DCFFE6DDD7FFE4D9D3FFE1D5CFFFDFD1CBFFD0BDB4FFC5B0A4FF725945FF0000000000000000DCD1CA31CFC1B7C0BBA99CF8B6A396F8C2B3A8C0C4B5AB310000000000000000C7B5A7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFDFFFCFCFBFFFBFAF8FFFAF7F6FFF7F5F2FFF6F2EFFFF3EFEDFFF2ECE9FFEFE9E5FFECE5E1FFEAE2DDFFE7DED9FFE5DBD5FFE2D7D1FFD3C2BAFFC8B3A8FF755C49FF00000000000000000000000000000000000000000000000000000000000000000000000000000000C8B5A8CAFFFFFFDAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFDFCFCFFFCFBFAFFFAF8F8FFF8F6F4FFF6F3F1FFF5F0EEFFF2EDEAFFF0EAE6FFEDE6E3FFEBE4DFFFE9E0DBFFE6DCD7FFDCCFC8FFCBB7ABFF795F4CFF0000000000000000000000000000000000000000000000000000000000000000000000000000000089715F31C5B1A4B2FFFFFFCDFFFFFFEAFFFFFFF4FFFFFFFFFFFFFFFFFFFFFFFFFEFDFDFFFDFCFBFFFBFAF9FFFAF6F5FFF7F4F3FFF5F2EFFFF3EEECFFF1EBE8FFEFE8E5FFECE5E1FFEAE1DDFFE4DAD5FF866E5CFF866E5C46000000000000000000000000000000000000000000000000000000000000000000000000000000000000000089715F31C5B1A4B2C3AFA2D3C0AD9EE8BDA99CFFBBA698FFB7A495FFB5A091FFB19C8DFFAE9989FFAB9585FFA79281FFA48E7DFFA08A7AFF9C8675FF988271FF957E6DFF917A68FF8A7260FF866E5C460000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B39A8AFF846B59FF000000000000000000000000000000000000000000000000B39A8AFF846B59FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C7B1A6FF866E5BFF000000000000000000000000000000000000000000000000C7B1A6FF866E5BFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000BEAFA531A69183C08D7664F8856C5AF8866B59C0826855310000000000000000BEAFA531A69183C08D7664F8856C5AF8866B59C082685531000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000BCADA2C0C7BAB0FFD7C7C1FFC3ADA1FF9D8373FF876D5AC00000000000000000BCADA2C0C7BAB0FFD7C7C1FFC3ADA1FF9D8373FF876D5AC0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B19E90F8F9F7F6FFF0EAE8FFDCCEC6FFC2AEA1FF88705DF80000000000000000B19E90F8F9F7F6FFF0EAE8FFDCCEC6FFC2AEA1FF88705DF8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B8A699F8F9F8F7FFFFFFFFFFF0EBE8FFD6C9C0FF937B6AF80000000000000000B8A699F8F9F8F7FFFFFFFFFFF0EBE8FFD6C9C0FF937B6AF8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000CDC0B6C0DBD2CBFFFAF8F7FFF9F8F7FFCABDB4FFAB9789C00000000000000000CDC0B6C0DBD2CBFFFAF8F7FFF9F8F7FFCABDB4FFAB9789C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000DCD1CA31CFC1B7C0BBA99CF8B6A396F8C2B3A8C0C4B5AB310000000000000000DCD1CA31CFC1B7C0BBA99CF8B6A396F8C2B3A8C0C4B5AB3100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0FFFFFFE0FFFFFFE0FFFFFFE0FFFFFE000FFFFE000FF800000FF000000FF000000FF000003030000030300000300000003000000030300000303000003FF000003FF000003FF800007FFFCFCFFFFFCFCFFFFF0303FFFF0303FFFF0303FFFF0303FFFF0303FFFF0303FFFFFFFFFFFFFFFFF2800000010000000200000000100200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFF4643854BFF407D47FF3B7643FFFFFFFF46000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000488E50FF7BC88DFF3F7D47FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055A65CFF519E58FF4D9554FF8AD29AFF43854BFF407E47FF3C7643FF00000000000000000000000000000000000000000000000000000000000000000000000059AE60FFA4E3B2FF9FE0ADFF9ADCA8FF94D9A3FF8ED59FFF407E47FF000000000000000000000000000000000000000000000000755B46FF6E5541FFC0B5ACFF5CB463FF59AE60FF55A65CFFAAE7B7FF4C9653FF478D4FFF44854BFF00000000000000000000000000000000FFFFFF31856D5AFFEDE6E3FFBFA79AFFD5C6BDFFD7C8C0FFD3C5BCFF59AE60FFB9F0C3FF509E58FF0000000000000000000000006348333B634833FF6348333BFFFFFF6A97806FFFF6F2F1FFF2EDEAFFEDE6E3FFE8E0DCFFE4D9D3FF5DB464FF59AE60FF55A75CFF000000000000000000000000AE9A8BFFFFFFFFFF634833FF634833FFA99484FFFDFBFCFFF9F7F7FFF6F3F0FFF2EDEAFFEDE7E3FFEBE3E0FFD9CEC7FFC4BAB2FF0000000000000000000000006348333BAE9A8BFF6348333BFFFFFF79B29D8EFFFFFFFFFFFCFCFBFFFAF8F7FFF6F2F1FFF2EDEAFFE9E0DBFFDFD2CBFF694E3AFF000000000000000000000000000000000000000000000000FFFFFF4600000000B6A193FFAE9A8BFFA79181FF9F8979FF97806FFF876F5DFF785F4CFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000634833FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006348333F634833FF6348333F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000AE9A8BFFFFFFFFFF634833FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006348333FAE9A8BFF6348333F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFF0000FF830000FFC70000FF010000FF010000F8010000E0070000000700000007000000070000E80F0000FF7F0000FE3F0000FE3F0000FE3F0000FFFF0000</AboutIconData>
<Assembly>C:\Ice-@ver@\bin\IceVisualStudioAddin-VS2008.dll</Assembly>
diff --git a/vsplugin/config/Ice-VS2010.AddIn b/vsaddin/config/Ice-VS2010.AddIn
index ed104629ded..7fa6e4ecd10 100755..100644
--- a/vsplugin/config/Ice-VS2010.AddIn
+++ b/vsaddin/config/Ice-VS2010.AddIn
@@ -5,10 +5,10 @@
<Version>10.0</Version>
</HostApplication>
<Addin>
- <FriendlyName>Ice-@ver@ Visual Studio Extension</FriendlyName>
- <Description>Ice-@ver@ Visual Studio Extension for Visual Studio 2010</Description>
- <AboutBoxDetails>The Ice Visual Studio Extension integrates Ice projects into the Visual Studio IDE.
-The extension supports C++, .NET, and Silverlight projects.
+ <FriendlyName>Ice-@ver@ Visual Studio Add-In</FriendlyName>
+ <Description>Ice-@ver@ Visual Studio Add-In for Visual Studio 2010</Description>
+ <AboutBoxDetails>The Ice Visual Studio Add-In integrates Ice projects into the Visual Studio IDE.
+The add-in supports C++, .NET, and Silverlight projects.
To know more about Ice visit ZeroC website at http://www.zeroc.com</AboutBoxDetails>
<AboutIconData>0000010006002020100000000000E8020000660000001010100000000000280100004E0300002020000001000800A8080000760400001010000001000800680500001E0D00002020000001002000A8100000861200001010000001002000680400002E2300002800000020000000400000000100040000000000000000000000000000000000000000000000000000000000000000000080000000808000800000008000800080800000C0C0C000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF001111111111111111111111111111111111111111111111111111111000001111111111111111111111111110ABA01111111111111111111111111110BAB01111111111111111111111111110ABA01111111111110000000000F00000BAB00000111111118888888888F0ABABABABABA0111111118F77777777F0BABABABABAB0111111118F77777777F0ABABABABABA0111111118F77777777F00000BAB00000110001118F77777777FFFFF0ABA01111108880118F777777777777F0BAB01111887788008F777777777777F0ABA011118FF770778F777777777777F0000011118FFF78088F777777777777FFFFFF111118FF70118F7777777777777777801111118881118F7777777777777777801111111111118F7777777777777777801111111111118F7777777777777777801111111111118F7777777777777777801111111111118FFFFFFFFFFFFFFFFF801111111111118888888888888888888011111111111111111870111118701111111111111111111118F0111118F011111111111111111111108011111080111111111111111111110808011108080111111111111111111877788018777880111111111111111118FF778018FF7780111111111111111118FFF78018FFF7801111111111111111118FF701118FF7011111111111111111111777111117771111111111111111111111111111111111111111FFFFFFFFFFFFFE0FFFFFFE0FFFFFFE0FFFFFFE0FFF000000FF000000FF000000FF000000FF000000C700000F8300000F0000000F0000000F0000000F8300000FC700000FFF00000FFF00000FFF00000FFF00000FFF00000FFFF8F8FFFFF8F8FFFFF8F8FFFFF0707FFFE0203FFFE0203FFFE0203FFFF0707FFFF8F8FFFFFFFFFF2800000010000000200000000100040000000000000000000000000000000000000000000000000000000000000000000080000000808000800000008000800080800000C0C0C000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0011111111111111111111111111100011111111111110A011111111111000B00011110000F0ABABA011118F88F000B00011118F77FFF0A01170718F7777F000110F008F7777FFFF1170718F777777801111118FFFFFFF801111118888888880111111111101111111111111170711111111111110F01111111111111707111111FFFF1111FFE37777FFE3ABABFF80ABA0F0001111F0007777F0030000100300000003011110037777F003FFF0F0031111FF7F8011FE3F7777FE3F77F0FE3F1111280000002000000040000000010008000000000000000000000000000000000000000000000000000000000000008000008000000080800080000000800080008080000080808000C0DCC000F0CAA600AA3F2A00FF3F2A00005F2A00555F2A00AA5F2A00FF5F2A00007F2A00557F2A00AA7F2A00FF7F2A00009F2A00559F2A00AA9F2A00FF9F2A0000BF2A0055BF2A00AABF2A00FFBF2A0000DF2A0055DF2A00AADF2A00FFDF2A0000FF2A0055FF2A00AAFF2A00FFFF2A000000550055005500AA005500FF005500001F5500551F5500AA1F5500FF1F5500003F5500553F5500AA3F5500FF3F5500005F5500555F5500AA5F5500FF5F5500007F5500557F5500AA7F5500FF7F5500009F5500559F5500AA9F5500FF9F550000BF550055BF5500AABF5500FFBF550000DF550055DF5500AADF5500FFDF550000FF550055FF5500AAFF5500FFFF550000007F0055007F00AA007F00FF007F00001F7F00551F7F00AA1F7F00FF1F7F00003F7F00553F7F00AA3F7F00FF3F7F00005F7F00555F7F00AA5F7F00FF5F7F00007F7F00557F7F00AA7F7F00FF7F7F00009F7F00559F7F00AA9F7F00FF9F7F0000BF7F0055BF7F00AABF7F00FFBF7F0000DF7F0055DF7F00AADF7F00FFDF7F0000FF7F0055FF7F00AAFF7F00FFFF7F000000AA005500AA00AA00AA00FF00AA00001FAA00551FAA00AA1FAA00FF1FAA00003FAA00553FAA00AA3FAA00FF3FAA00005FAA00555FAA00AA5FAA00FF5FAA00007FAA00557FAA00AA7FAA00FF7FAA00009FAA00559FAA00AA9FAA00FF9FAA0000BFAA0055BFAA00AABFAA00FFBFAA0000DFAA0055DFAA00AADFAA00FFDFAA0000FFAA0055FFAA00AAFFAA00FFFFAA000000D4005500D400AA00D400FF00D400001FD400551FD400AA1FD400FF1FD400003FD400553FD400AA3FD400FF3FD400005FD400555FD400AA5FD400FF5FD400007FD400557FD400AA7FD400FF7FD400009FD400559FD400AA9FD400FF9FD40000BFD40055BFD400AABFD400FFBFD40000DFD40055DFD400AADFD400FFDFD40000FFD40055FFD400AAFFD400FFFFD4005500FF00AA00FF00001FFF00551FFF00AA1FFF00FF1FFF00003FFF00553FFF00AA3FFF00FF3FFF00005FFF00555FFF00AA5FFF00FF5FFF00007FFF00557FFF00AA7FFF00FF7FFF00009FFF00559FFF00AA9FFF00FF9FFF0000BFFF0055BFFF00AABFFF00FFBFFF0000DFFF0055DFFF00AADFFF00FFDFFF0055FFFF00AAFFFF00FFCCCC00FFCCFF00FFFF3300FFFF6600FFFF9900FFFFCC00007F0000557F0000AA7F0000FF7F0000009F0000559F0000AA9F0000FF9F000000BF000055BF0000AABF0000FFBF000000DF000055DF0000AADF0000FFDF000055FF0000AAFF000000002A0055002A00AA002A00FF002A00001F2A00551F2A00AA1F2A00FF1F2A00003F2A00553F2A00F0FBFF00A4A0A000808080000000FF0000FF000000FFFF00FF00000000000000FFFF0000FFFFFF00FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD0C0CF50CF5FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD0D3938350CFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD303939380DFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD11395D390CFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD35353535356139393110310D30FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD39666162616161613939393811FDFDFDFDFDFDFDFDFDFD3231073231323132083D858A61666261616161393935FDFDFDFDFDFDFDFDFD5E080909820982838608398A8A8A856165626161613D35FDFDFDFDFDFDFDFD82B3AF08080808080808AB39393939398A86613935353535FDFDFDFDFDFDFDFD86D1F6AFAFAFAFAF08AF0808D408D4398A6586390886FDFDFD5A073632FDFDFD86B3F6F6F6AFF6AFAFAFAF08AB0808398A8A8A39D432FDFD8286D4825A35FDFD82FFF6AFF6F6AFF6AF08D1AF08AFD43D8A8A8A610831FDFD5EFFAF088232363286FFFFF6F6AFF6AFF6AFAF08AF08085D61613D5DD4F5FDFD82F6F6AF085A825E82FFFFFFFFF6D1F6AFF6AFF6AFAFAF080808D408D431FDFD86D4FFFF095EFDFD09FFFFFFFFFFF6B3F6F6AFAFD108AFAFAF08AB09860DFDFDFD08825E86FDFDFD82FFFFFFFFFFFFF6F6AFF6F6AFF6AF08D1AF08088232FDFDFDFDFDFDFDFDFDFD86FFFFFFFFFFFFFFFFFFF6AFF6AFF6AFAF08AF088331FDFDFDFDFDFDFDFDFDFDFD86FFFFFFFFFFFFFFFFFFFFF6F6AFF6AFAFAF0807FDFDFDFDFDFDFDFDFDFDFDFDFD86828682825EF75E5E5E5A5E5A5A07360736FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD5E31FDFDFDFDFDFD5E31FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD8232FDFDFDFDFDFD8232FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD5A360732FDFDFDFD5A360732FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD8286D4823607FDFD8286D4823607FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD5EFFAF088232FDFD5EFFAF088232FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDF7D1FFAF0807FDFDF7D1FFAF0807FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD0808FFFF095EFDFD0808FFFF095EFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD0982F786FDFDFDFD0982F786FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0FFFFFFE0FFFFFFE0FFFFFFE0FFFFFE000FFFFE000FFC00000FF800000FF000000FF000003870000030300000300000003000000030300000387000003FF000003FF800007FFC0000FFFFCFCFFFFFCFCFFFFF8787FFFF0303FFFF0303FFFF0303FFFF0303FFFF8787FFFFFFFFFFFFFFFFF280000001000000020000000010008000000000000000000000000000000000000000000000000000000000000008000008000000080800080000000800080008080000080808000C0DCC000F0CAA600AA3F2A00FF3F2A00005F2A00555F2A00AA5F2A00FF5F2A00007F2A00557F2A00AA7F2A00FF7F2A00009F2A00559F2A00AA9F2A00FF9F2A0000BF2A0055BF2A00AABF2A00FFBF2A0000DF2A0055DF2A00AADF2A00FFDF2A0000FF2A0055FF2A00AAFF2A00FFFF2A000000550055005500AA005500FF005500001F5500551F5500AA1F5500FF1F5500003F5500553F5500AA3F5500FF3F5500005F5500555F5500AA5F5500FF5F5500007F5500557F5500AA7F5500FF7F5500009F5500559F5500AA9F5500FF9F550000BF550055BF5500AABF5500FFBF550000DF550055DF5500AADF5500FFDF550000FF550055FF5500AAFF5500FFFF550000007F0055007F00AA007F00FF007F00001F7F00551F7F00AA1F7F00FF1F7F00003F7F00553F7F00AA3F7F00FF3F7F00005F7F00555F7F00AA5F7F00FF5F7F00007F7F00557F7F00AA7F7F00FF7F7F00009F7F00559F7F00AA9F7F00FF9F7F0000BF7F0055BF7F00AABF7F00FFBF7F0000DF7F0055DF7F00AADF7F00FFDF7F0000FF7F0055FF7F00AAFF7F00FFFF7F000000AA005500AA00AA00AA00FF00AA00001FAA00551FAA00AA1FAA00FF1FAA00003FAA00553FAA00AA3FAA00FF3FAA00005FAA00555FAA00AA5FAA00FF5FAA00007FAA00557FAA00AA7FAA00FF7FAA00009FAA00559FAA00AA9FAA00FF9FAA0000BFAA0055BFAA00AABFAA00FFBFAA0000DFAA0055DFAA00AADFAA00FFDFAA0000FFAA0055FFAA00AAFFAA00FFFFAA000000D4005500D400AA00D400FF00D400001FD400551FD400AA1FD400FF1FD400003FD400553FD400AA3FD400FF3FD400005FD400555FD400AA5FD400FF5FD400007FD400557FD400AA7FD400FF7FD400009FD400559FD400AA9FD400FF9FD40000BFD40055BFD400AABFD400FFBFD40000DFD40055DFD400AADFD400FFDFD40000FFD40055FFD400AAFFD400FFFFD4005500FF00AA00FF00001FFF00551FFF00AA1FFF00FF1FFF00003FFF00553FFF00AA3FFF00FF3FFF00005FFF00555FFF00AA5FFF00FF5FFF00007FFF00557FFF00AA7FFF00FF7FFF00009FFF00559FFF00AA9FFF00FF9FFF0000BFFF0055BFFF00AABFFF00FFBFFF0000DFFF0055DFFF00AADFFF00FFDFFF0055FFFF00AAFFFF00FFCCCC00FFCCFF00FFFF3300FFFF6600FFFF9900FFFFCC00007F0000557F0000AA7F0000FF7F0000009F0000559F0000AA9F0000FF9F000000BF000055BF0000AABF0000FFBF000000DF000055DF0000AADF0000FFDF000055FF0000AAFF000000002A0055002A00AA002A00FF002A00001F2A00551F2A00AA1F2A00FF1F2A00003F2A00553F2A00F0FBFF00A4A0A000808080000000FF0000FF000000FFFF00FF00000000000000FFFF0000FFFFFF00FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD353535FDFDFDFDFDFDFDFDFDFDFDFDFD356535FDFDFDFDFDFDFDFDFDFDFD39393985351111FDFDFDFDFDFDFDFDFD398A8A8A8A8935FDFDFDFDFDFD3131823D39398A393535FDFDFDFDFD32AF820808AB3DB239FDFDFDFDF5FDFD5AF6AFAFAF08393939FDFDFD5EFFF5F55EFFF6F6AFF6AF0886FDFDFDFD5EFDFD5EFFFFF6F6AFAFD4F5FDFDFDFDFDFDFDFDF75E5E5A5A0731FDFDFDFDFDFDFDFDFDFDFDFDF5FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDF5FDFDFDFDFDFDFDFDFDFDFDFDFDFD5EFFF5FDFDFDFDFDFDFDFDFDFDFDFDFDFD5EFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFFFFFDFDFFC7FDFDFFC7FDFDFF01FDFDFF01FD39F8016261F0076139B00738110007FDFDB007FDFDF80F3231FF7F3132FF7F083DFE3F6166FF7F6161FFFF39352800000020000000400000000100200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002E5B35FC295231FF274F2FFF264D2EFF27502FFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000306138FE329A4FFF2C9649FF259244FF2A5432FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000356A3DFC3FA259FF389D54FF319A4EFF2E5D36FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000397341FE4DAB66FF45A65FFF3DA158FF316439FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045874CFF43854BFF42824AFF407E47FF3F7C46FF5BB471FF53AF6AFF4BAA64FF356B3DFF34683CFF33673BFF326439FF306038FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000519F58FF85CF94FF7FCA8FFF77C689FF70C183FF69BD7DFF61B876FF59B370FF51AE6AFF49A963FF42A55CFF3B9F56FF387040FF00000000000000000000000000000000000000000000000000000000000000000000000089715F4689715FFF866E5BFF846B59FF816855FF7E6552FF7B624FFF79604CFF846E5CFFCAC1B9FF55A85DFF8FD59CFF8AD198FF84CD93FF7DCA8EFF76C688FF6EC082FF67BB7CFF5FB775FF58B26EFF50AD67FF48A861FF3E7A46FF000000000000000000000000000000000000000000000000000000000000000089715F46AE998AFFD2C0B6FFD0BDB3FFCEBBB1FFCCB9AEFFCBB6ABFFCAB4A9FFC7B2A6FFCCB8ADFFD4C4BCFF5AB061FF97DAA3FF93D8A0FF8ED49CFF88D097FF83CC92FF7BC98CFF75C487FF6DC081FF65BB7AFF5EB673FF56B16DFF43854AFF0000000000000000000000000000000000000000000000000000000000000000C3AFA2FFF3EFECFFE6DEDAFFE0D4CEFFDFD2CAFFDDCEC7FFDACCC3FFD8C9C1FFD6C6BDFFD8C8C1FFE1D6CFFF59AB60FF58AA5EFF56A75DFF55A65DFF57AA5EFF8DD39BFF87CF97FF81CC91FF4F9B57FF4B9352FF498D50FF478C4FFC46894DFC0000000000000000000000000000000000000000000000000000000000000000C4B0A3FFF7F3F1FFF5F0EEFFF2EDEBFFEFEAE7FFEEE6E3FFEBE3DFFFE8DFDBFFE6DCD6FFE4D8D2FFE1D4CEFFDED0CAFFDCCDC6FFD9C9C2FFD6C6BDFF57AB5EFF95D9A2FF91D69EFF8CD29AFF519E58FFDED2CBFFC4BAB2FF0000000000000000BEAFA531A69183C08D7664F8856C5AF8866B59C0826855310000000000000000C5B1A4FFF9F7F5FFF7F4F3FFF5F2EFFFF3EEECFFF0EBE8FFEFE8E4FFEDE4E1FFEAE1DDFFE7DDD8FFE4DAD4FFE2D7D0FFDFD3CCFFDCCEC8FFDACBC3FF5AAE62FF99DBA5FF99DAA4FF94D8A2FF54A45BFFDFD4CEFF846E5EFF0000000000000000BCADA2C0C7BAB0FFD7C7C1FFC3ADA1FF9D8373FF876D5AC00000000000000000C5B2A4FFFBFAF9FFF9F8F6FFF8F5F3FFF6F3F0FFF4EFEEFFF2ECEAFFF0EAE6FFEEE6E2FFEBE3DEFFE8DFDAFFE5DBD6FFE3D8D2FFE0D4CDFFDDD0C9FF5DB564FF99DBA5FF99DBA5FF99DBA5FF69B570FFDDD1CAFF69503BFF0000000000000000B19E90F8F9F7F6FFF0EAE8FFDCCEC6FFC2AEA1FF88705DF8866E5BFF846B59FFC6B2A5FFFDFDFDFFFCFAFAFFFBF9F8FFF9F6F5FFF7F3F2FFF5F0EEFFF2EEECFFF0EBE8FFEEE7E4FFECE4E0FFE9E1DCFFE6DDD7FFE4D9D4FFE2D6D0FF5DB263FF62BF69FF62BF69FF61BE68FF6AB671FFDED2CBFF6C523EFF0000000000000000B8A699F8F9F8F7FFFFFFFFFFF0EBE8FFD6C9C0FF937B6AF8C7B1A6FFB39A8AFFC6B3A5FFFFFFFFFFFFFDFEFFFDFBFBFFFBFAF9FFF9F8F6FFF7F5F3FFF5F2F0FFF3EFEDFFF1ECE9FFEFE9E5FFEDE6E2FFEBE3DEFFE8DFDAFFE6DBD5FFE2D8D2FFE0D4CDFFDDCFC9FFDFD1CBFFDED2CBFFDDCFC7FF6F5541FF0000000000000000CDC0B6C0DBD2CBFFFAF8F7FFF9F8F7FFCABDB4FFAB9789C00000000000000000C7B3A6FFFFFFFFFFFFFFFFFFFFFFFEFFFDFCFDFFFCFBFAFFFAF9F8FFF8F6F5FFF7F3F2FFF5F0EFFFF2EDEAFFF0EAE7FFEEE7E3FFEBE4DFFFE9E0DCFFE6DDD7FFE4D9D3FFE1D5CFFFDFD1CBFFD0BDB4FFC5B0A4FF725945FF0000000000000000DCD1CA31CFC1B7C0BBA99CF8B6A396F8C2B3A8C0C4B5AB310000000000000000C7B5A7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFDFFFCFCFBFFFBFAF8FFFAF7F6FFF7F5F2FFF6F2EFFFF3EFEDFFF2ECE9FFEFE9E5FFECE5E1FFEAE2DDFFE7DED9FFE5DBD5FFE2D7D1FFD3C2BAFFC8B3A8FF755C49FF00000000000000000000000000000000000000000000000000000000000000000000000000000000C8B5A8CAFFFFFFDAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFDFCFCFFFCFBFAFFFAF8F8FFF8F6F4FFF6F3F1FFF5F0EEFFF2EDEAFFF0EAE6FFEDE6E3FFEBE4DFFFE9E0DBFFE6DCD7FFDCCFC8FFCBB7ABFF795F4CFF0000000000000000000000000000000000000000000000000000000000000000000000000000000089715F31C5B1A4B2FFFFFFCDFFFFFFEAFFFFFFF4FFFFFFFFFFFFFFFFFFFFFFFFFEFDFDFFFDFCFBFFFBFAF9FFFAF6F5FFF7F4F3FFF5F2EFFFF3EEECFFF1EBE8FFEFE8E5FFECE5E1FFEAE1DDFFE4DAD5FF866E5CFF866E5C46000000000000000000000000000000000000000000000000000000000000000000000000000000000000000089715F31C5B1A4B2C3AFA2D3C0AD9EE8BDA99CFFBBA698FFB7A495FFB5A091FFB19C8DFFAE9989FFAB9585FFA79281FFA48E7DFFA08A7AFF9C8675FF988271FF957E6DFF917A68FF8A7260FF866E5C460000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B39A8AFF846B59FF000000000000000000000000000000000000000000000000B39A8AFF846B59FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C7B1A6FF866E5BFF000000000000000000000000000000000000000000000000C7B1A6FF866E5BFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000BEAFA531A69183C08D7664F8856C5AF8866B59C0826855310000000000000000BEAFA531A69183C08D7664F8856C5AF8866B59C082685531000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000BCADA2C0C7BAB0FFD7C7C1FFC3ADA1FF9D8373FF876D5AC00000000000000000BCADA2C0C7BAB0FFD7C7C1FFC3ADA1FF9D8373FF876D5AC0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B19E90F8F9F7F6FFF0EAE8FFDCCEC6FFC2AEA1FF88705DF80000000000000000B19E90F8F9F7F6FFF0EAE8FFDCCEC6FFC2AEA1FF88705DF8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B8A699F8F9F8F7FFFFFFFFFFF0EBE8FFD6C9C0FF937B6AF80000000000000000B8A699F8F9F8F7FFFFFFFFFFF0EBE8FFD6C9C0FF937B6AF8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000CDC0B6C0DBD2CBFFFAF8F7FFF9F8F7FFCABDB4FFAB9789C00000000000000000CDC0B6C0DBD2CBFFFAF8F7FFF9F8F7FFCABDB4FFAB9789C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000DCD1CA31CFC1B7C0BBA99CF8B6A396F8C2B3A8C0C4B5AB310000000000000000DCD1CA31CFC1B7C0BBA99CF8B6A396F8C2B3A8C0C4B5AB3100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0FFFFFFE0FFFFFFE0FFFFFFE0FFFFFE000FFFFE000FF800000FF000000FF000000FF000003030000030300000300000003000000030300000303000003FF000003FF000003FF800007FFFCFCFFFFFCFCFFFFF0303FFFF0303FFFF0303FFFF0303FFFF0303FFFF0303FFFFFFFFFFFFFFFFF2800000010000000200000000100200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFF4643854BFF407D47FF3B7643FFFFFFFF46000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000488E50FF7BC88DFF3F7D47FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055A65CFF519E58FF4D9554FF8AD29AFF43854BFF407E47FF3C7643FF00000000000000000000000000000000000000000000000000000000000000000000000059AE60FFA4E3B2FF9FE0ADFF9ADCA8FF94D9A3FF8ED59FFF407E47FF000000000000000000000000000000000000000000000000755B46FF6E5541FFC0B5ACFF5CB463FF59AE60FF55A65CFFAAE7B7FF4C9653FF478D4FFF44854BFF00000000000000000000000000000000FFFFFF31856D5AFFEDE6E3FFBFA79AFFD5C6BDFFD7C8C0FFD3C5BCFF59AE60FFB9F0C3FF509E58FF0000000000000000000000006348333B634833FF6348333BFFFFFF6A97806FFFF6F2F1FFF2EDEAFFEDE6E3FFE8E0DCFFE4D9D3FF5DB464FF59AE60FF55A75CFF000000000000000000000000AE9A8BFFFFFFFFFF634833FF634833FFA99484FFFDFBFCFFF9F7F7FFF6F3F0FFF2EDEAFFEDE7E3FFEBE3E0FFD9CEC7FFC4BAB2FF0000000000000000000000006348333BAE9A8BFF6348333BFFFFFF79B29D8EFFFFFFFFFFFCFCFBFFFAF8F7FFF6F2F1FFF2EDEAFFE9E0DBFFDFD2CBFF694E3AFF000000000000000000000000000000000000000000000000FFFFFF4600000000B6A193FFAE9A8BFFA79181FF9F8979FF97806FFF876F5DFF785F4CFF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000634833FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006348333F634833FF6348333F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000AE9A8BFFFFFFFFFF634833FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006348333FAE9A8BFF6348333F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFF0000FF830000FFC70000FF010000FF010000F8010000E0070000000700000007000000070000E80F0000FF7F0000FE3F0000FE3F0000FE3F0000FFFF0000</AboutIconData>
<Assembly>C:\Ice-@ver@\bin\IceVisualStudioAddin-VS2010.dll</Assembly>
diff --git a/vsplugin/config/IceDevKey.snk b/vsaddin/config/IceDevKey.snk
index e53a14716cf..e53a14716cf 100644
--- a/vsplugin/config/IceDevKey.snk
+++ b/vsaddin/config/IceDevKey.snk
Binary files differ
diff --git a/vsplugin/config/Make.rules.mak b/vsaddin/config/Make.rules.mak
index 902fdaece71..31c1aa97c9e 100755..100644
--- a/vsplugin/config/Make.rules.mak
+++ b/vsaddin/config/Make.rules.mak
@@ -1,6 +1,6 @@
# **********************************************************************
#
-# Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# LICENSE file included in this distribution.
@@ -28,6 +28,12 @@ DEBUG = yes
OPTIMIZE = yes
#
+# Define VS to VS2010 or VS2008 to build with that Visual Studio Version.
+#
+#
+#VS = VS2008
+
+#
# Set the key file used to sign assemblies.
#
@@ -43,13 +49,6 @@ KEYFILE = $(top_srcdir)\config\IceDevKey.snk
#
# Common definitions
#
-ice_language = cs
-
-!if exist ($(top_srcdir)\..\config\Make.common.rules.mak)
-!include $(top_srcdir)\..\config\Make.common.rules.mak
-!else
-!include $(top_srcdir)\config\Make.common.rules.mak
-!endif
EVERYTHING = all install clean
@@ -57,16 +56,25 @@ EVERYTHING = all install clean
# Visual Studio version
#
-!if "$(VSSDK100INSTALL)" != ""
-VSTARGET = VS2010
+!if "$(VS)" == "" && "$(VSSDK100INSTALL)" != ""
+VS = VS2010
+!message VS2010 will be used!
+!elseif "$(VS)" == "" && "$(VSSDK90INSTALL)" != ""
+VS = VS2008
+!message VS was not set VS2008 will be used!
+!endif
+
+!if "$(VS)" == "VS2010"
VSSDK_HOME = $(VSSDK100INSTALL)
-!elseif "$(VSSDK90INSTALL)" != ""
-VSTARGET = VS2008
+!elseif "$(VS)" == "VS2008"
VSSDK_HOME = $(VSSDK90INSTALL)
-!else
-!error Neither VSSDK100INSTALL not VSSDK90INSTALL is set
!endif
+!if "$(VSSDK_HOME)" == ""
+!error Neither VSSDK100INSTALL not VSSDK90INSTALL is set, seems that Visual Studio SDK isn't properly installed
+!endif
+
+VSTARGET = $(VS)
VS_HOME = $(VSINSTALLDIR)
PKG_PREFIX = $(VSTARGET)
@@ -115,6 +123,7 @@ MCSFLAGS = $(MCSFLAGS) /reference:"$(VS_HOME)\Common7\IDE\PublicAssemblies\Micro
!if "$(VSTARGET)" == "VS2008"
+MCSFLAGS = $(MCSFLAGS) /reference:"Microsoft.Build.Engine.dll"
MCSFLAGS = $(MCSFLAGS) /reference:"$(VSINSTALLDIR)\Visual Studio Tools for Office\PIA\Office11\Extensibility.dll"
MCSFLAGS = $(MCSFLAGS) /reference:"$(VSSDK_HOME)\VisualStudioIntegration\Common\Assemblies\Microsoft.VisualStudio.OLE.Interop.dll"
@@ -126,6 +135,8 @@ MCSFLAGS = $(MCSFLAGS) /reference:"$(VSSDK_HOME)\VisualStudioIntegration\Common\
!if "$(VSTARGET)" == "VS2010"
+MCSFLAGS = $(MCSFLAGS) /reference:"Microsoft.Build.dll"
+
MCSFLAGS = $(MCSFLAGS) /reference:"$(VSINSTALLDIR)\Visual Studio Tools for Office\PIA\Common\Extensibility.dll"
MCSFLAGS = $(MCSFLAGS) /reference:"$(VSSDK_HOME)\VisualStudioIntegration\Common\Assemblies\v2.0\Microsoft.VisualStudio.OLE.Interop.dll"
diff --git a/vsplugin/icon/newslice.ico b/vsaddin/icon/newslice.ico
index a25255ce3fe..a25255ce3fe 100644
--- a/vsplugin/icon/newslice.ico
+++ b/vsaddin/icon/newslice.ico
Binary files differ
diff --git a/vsplugin/icon/vsplugin.ico b/vsaddin/icon/vsplugin.ico
index a25255ce3fe..a25255ce3fe 100644
--- a/vsplugin/icon/vsplugin.ico
+++ b/vsaddin/icon/vsplugin.ico
Binary files differ
diff --git a/vsplugin/src/AssemblyInfo.cs b/vsaddin/src/AssemblyInfo.cs
index 6a9ee0d957f..b2ccac39aa6 100644
--- a/vsplugin/src/AssemblyInfo.cs
+++ b/vsaddin/src/AssemblyInfo.cs
@@ -1,23 +1,27 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: AssemblyTitle("IceVisualStudioExtension")]
-[assembly: AssemblyDescription("Ice Extension for Visual Studio")]
-[assembly: AssemblyCompany("ZeroC, Inc.")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyProduct("Ice Extension for Visual Studio")]
-[assembly: AssemblyCopyright("Copyright (c) 2003-2010 ZeroC, Inc.")]
-[assembly: AssemblyTrademark("Ice")]
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Resources;
+
+[assembly: AssemblyTitle("IceVisualStudioAddIn")]
+[assembly: AssemblyDescription("Ice Add-In for Visual Studio")]
+[assembly: AssemblyCompany("ZeroC, Inc.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyProduct("Ice Add-In for Visual Studio")]
+[assembly: AssemblyCopyright("Copyright (c) 2003-2011 ZeroC, Inc.")]
+[assembly: AssemblyTrademark("Ice")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("3.4.1.1")]
-[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyVersion("3.4.1.2")]
+[assembly: AssemblyDelaySign(false)]
+[assembly: ComVisible(false)]
+[assembly: NeutralResourcesLanguageAttribute("en-US")]
diff --git a/vsplugin/src/Builder.cs b/vsaddin/src/Builder.cs
index 83299538f16..55a51efd26e 100644
--- a/vsplugin/src/Builder.cs
+++ b/vsaddin/src/Builder.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
@@ -26,18 +26,53 @@ using VSLangProj;
using System.Globalization;
using Microsoft.VisualStudio.OLE.Interop;
using System.Runtime.InteropServices;
+using System.Windows.Forms;
+
+using DependenciesMap = System.Collections.Generic.Dictionary<string,
+ System.Collections.Generic.Dictionary<string,
+ System.Collections.Generic.List<string>>>;
namespace Ice.VisualStudio
{
- public class Builder : IDisposable
+
+ //
+ // This class is used to asynchronously read the output of a Slice compiler
+ // process.
+ //
+ public class StreamReader
+ {
+ public void appendData(object sendingProcess, DataReceivedEventArgs outLine)
+ {
+ if(outLine.Data != null)
+ {
+ _data += outLine.Data + "\n";
+ }
+ }
+
+ public string data()
+ {
+ return _data;
+ }
+
+ private string _data = "";
+ }
+
+ public class Builder : IDisposable, IVsTrackProjectDocumentsEvents2
{
protected virtual void Dispose(bool disposing)
{
if(disposing)
{
- _serviceProvider.Dispose();
- _errorListProvider.Dispose();
+ if(_serviceProvider != null)
+ {
+ _serviceProvider.Dispose();
+ }
+
+ if(_errorListProvider != null)
+ {
+ _errorListProvider.Dispose();
+ }
}
}
@@ -55,77 +90,216 @@ namespace Ice.VisualStudio
public void init(DTE2 application, ext_ConnectMode connectMode, AddIn addInInstance)
{
_applicationObject = application;
- _addInInstance = addInInstance;
+ _addInInstance = addInInstance;
_connectMode = connectMode;
//
// Subscribe to solution events.
//
- _solutionEvents = application.Events.SolutionEvents;
- _solutionEvents.Opened += new _dispSolutionEvents_OpenedEventHandler(solutionOpened);
- _solutionEvents.AfterClosing += new _dispSolutionEvents_AfterClosingEventHandler(afterClosing);
- _solutionEvents.ProjectAdded += new _dispSolutionEvents_ProjectAddedEventHandler(projectAdded);
- _solutionEvents.ProjectRemoved += new _dispSolutionEvents_ProjectRemovedEventHandler(projectRemoved);
- _solutionEvents.ProjectRenamed += new _dispSolutionEvents_ProjectRenamedEventHandler(projectRenamed);
+ if(_connectMode != ext_ConnectMode.ext_cm_CommandLine)
+ {
+ _solutionEvents = application.Events.SolutionEvents;
+ _solutionEvents.Opened += new _dispSolutionEvents_OpenedEventHandler(solutionOpened);
+ _solutionEvents.AfterClosing += new _dispSolutionEvents_AfterClosingEventHandler(afterClosing);
+ _solutionEvents.ProjectAdded += new _dispSolutionEvents_ProjectAddedEventHandler(projectAdded);
+ _solutionEvents.ProjectRemoved += new _dispSolutionEvents_ProjectRemovedEventHandler(projectRemoved);
+ _solutionEvents.ProjectRenamed += new _dispSolutionEvents_ProjectRenamedEventHandler(projectRenamed);
+ }
_buildEvents = _applicationObject.Events.BuildEvents;
_buildEvents.OnBuildBegin += new _dispBuildEvents_OnBuildBeginEventHandler(buildBegin);
- _buildEvents.OnBuildDone += new _dispBuildEvents_OnBuildDoneEventHandler(buildDone);
- if (_connectMode != ext_ConnectMode.ext_cm_CommandLine)
- {
- foreach (Command c in _applicationObject.Commands)
- {
- if (c.Name.Equals("Project.AddNewItem"))
- {
- _addNewItemEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
- _addNewItemEvent.AfterExecute +=
- new _dispCommandEvents_AfterExecuteEventHandler(afterAddNewItem);
- }
- else if (c.Name.Equals("Edit.Remove"))
- {
- _editRemoveEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
- _editRemoveEvent.AfterExecute +=
- new _dispCommandEvents_AfterExecuteEventHandler(editDeleteEvent);
- }
- else if (c.Name.Equals("Edit.Delete"))
- {
- _editDeleteEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
- _editDeleteEvent.AfterExecute +=
- new _dispCommandEvents_AfterExecuteEventHandler(editDeleteEvent);
- }
- else if (c.Name.Equals("Project.AddExistingItem"))
- {
- _addExistingItemEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
- _addExistingItemEvent.AfterExecute +=
- new _dispCommandEvents_AfterExecuteEventHandler(afterAddExistingItem);
- }
- }
- }
+ _buildEvents.OnBuildDone += new _dispBuildEvents_OnBuildDoneEventHandler(buildDone);
- //
- // Subscribe to active configuration changed.
- //
+ if(_connectMode != ext_ConnectMode.ext_cm_CommandLine)
+ {
+ beginTrackDocumentEvents();
+ //
+ // Ensure DEVPATH isn't empty, if there is a project in development mode and DEVPATH is
+ // empty vshosting process will crash.
+ //
+ string devPath = Environment.GetEnvironmentVariable("DEVPATH");
+ if(String.IsNullOrEmpty(devPath))
+ {
+ setDotNetDevPath(Util.getCsBinDirDefault());
+ }
+
+ //
+ // Subscribe to command events.
+ //
+ foreach(Command c in _applicationObject.Commands)
+ {
+ if(c.Name.Equals("Project.AddNewItem"))
+ {
+ _addNewItemEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
+ _addNewItemEvent.AfterExecute +=
+ new _dispCommandEvents_AfterExecuteEventHandler(afterAddNewItem);
+ }
+ else if(c.Name.Equals("Edit.Remove"))
+ {
+ _editRemoveEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
+ _editRemoveEvent.AfterExecute +=
+ new _dispCommandEvents_AfterExecuteEventHandler(editDeleteEvent);
+ }
+ else if(c.Name.Equals("Edit.Delete"))
+ {
+ _editDeleteEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
+ _editDeleteEvent.AfterExecute +=
+ new _dispCommandEvents_AfterExecuteEventHandler(editDeleteEvent);
+ }
+ else if(c.Name.Equals("Project.ExcludeFromProject"))
+ {
+ _excludeFromProjectEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
+ _excludeFromProjectEvent.BeforeExecute +=
+ new _dispCommandEvents_BeforeExecuteEventHandler(beforeExcludeFromProjectEvent);
+ _excludeFromProjectEvent.AfterExecute +=
+ new _dispCommandEvents_AfterExecuteEventHandler(afterExcludeFromProjectEvent);
+ }
+ else if(c.Name.Equals("Project.AddExistingItem"))
+ {
+ _addExistingItemEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
+ _addExistingItemEvent.AfterExecute +=
+ new _dispCommandEvents_AfterExecuteEventHandler(afterAddExistingItem);
+ }
+ else if(c.Name.Equals("Build.Cancel"))
+ {
+ _buildCancelEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
+ _buildCancelEvent.AfterExecute +=
+ new _dispCommandEvents_AfterExecuteEventHandler(afterBuildCancel);
+ }
+ else if(c.Name.Equals("Build.Compile")) // Custom build step compile
+ {
+ _buildCompileEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
+ _buildCompileEvent.BeforeExecute +=
+ new _dispCommandEvents_BeforeExecuteEventHandler(beforeBuildCompile);
+ }
+ else if(c.Name.Equals("Debug.Start"))
+ {
+ _debugStartEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
+ _debugStartEvent.BeforeExecute +=
+ new _dispCommandEvents_BeforeExecuteEventHandler(setDotNetDebugEnvironment);
+ }
+ else if(c.Name.Equals("Debug.StartWithoutDebugging"))
+ {
+ _debugStartWithoutDebuggingEvent = application.Events.get_CommandEvents(c.Guid, c.ID);
+ _debugStartWithoutDebuggingEvent.BeforeExecute +=
+ new _dispCommandEvents_BeforeExecuteEventHandler(setDotNetDebugEnvironment);
+ }
+ else if(c.Name.Equals("ClassViewContextMenus.ClassViewProject.Debug.Startnewinstance"))
+ {
+ _debugStartNewInstance = application.Events.get_CommandEvents(c.Guid, c.ID);
+ _debugStartNewInstance.BeforeExecute +=
+ new _dispCommandEvents_BeforeExecuteEventHandler(setDotNetDebugEnvironment);
+ }
+ }
+ }
+
_serviceProvider =
- new ServiceProvider((Microsoft.VisualStudio.OLE.Interop.IServiceProvider)_applicationObject.DTE);
- initErrorListProvider();
- if (_connectMode != ext_ConnectMode.ext_cm_CommandLine)
- {
- setupCommandBars();
+ new ServiceProvider((Microsoft.VisualStudio.OLE.Interop.IServiceProvider)_applicationObject.DTE);
+ initErrorListProvider();
+
+ if(connectMode != ext_ConnectMode.ext_cm_CommandLine)
+ {
+ setupCommandBars();
}
}
void editDeleteEvent(string Guid, int ID, object CustomIn, object CustomOut)
{
- if(_deletedFile != null)
+ try
{
+ if(_deletedFile == null)
+ {
+ return;
+ }
+
Project project = getActiveProject();
- if(project != null)
+ if(project == null)
+ {
+ return;
+ }
+
+ removeDependency(project, _deletedFile);
+ _deletedFile = null;
+ clearErrors(project);
+ buildProject(project, false, vsBuildScope.vsBuildScopeProject);
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ //
+ // In C# project type the delete event isn't triggered by exclude item command.
+ // We use the before and after events of the command to remove generated items
+ // when a slice file is excluded. C++ projects handle that as part of delete item
+ // event.
+ //
+ void afterExcludeFromProjectEvent(string Guid, int ID, object CustomIn, object CustomOut)
+ {
+ try
+ {
+ if(String.IsNullOrEmpty(_excludedItem))
+ {
+ return;
+ }
+
+ Project p = getActiveProject();
+ if(!Util.isCSharpProject(p) || !Util.isSliceBuilderEnabled(p))
+ {
+ return;
+ }
+ ProjectItem item = Util.findItem(_excludedItem, p.ProjectItems);
+ if(item != null)
+ {
+ item.Delete();
+ }
+ updateDependencies(p);
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ //
+ // In C# project type the delete event isn't triggered by exclude item command.
+ // We use the before and after events of the command to remove generated items
+ // when a slice file is excluded. C++ projects handle that as part of delete item
+ // event.
+ //
+ public void beforeExcludeFromProjectEvent(string Guid, int ID, object obj, object CustomOut, ref bool done)
+ {
+ try
+ {
+ Project p = getActiveProject();
+ if(!Util.isCSharpProject(p) || !Util.isSliceBuilderEnabled(p))
+ {
+ return;
+ }
+ ProjectItem item = Util.getSelectedProjectItem(p.DTE);
+ if(item == null)
{
- removeDependency(project, _deletedFile);
- _deletedFile = null;
- clearErrors(project);
- buildProject(project, false, vsBuildScope.vsBuildScopeProject);
+ return;
+ }
+
+ if(!Util.isSliceFilename(item.Name))
+ {
+ return;
}
+
+ _excludedItem = getCSharpGeneratedFileName(p, item, "cs");
+ return;
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
}
@@ -136,34 +310,263 @@ namespace Ice.VisualStudio
public void buildDone(vsBuildScope Scope, vsBuildAction Action)
{
- _building = false;
+ try
+ {
+ _sliceBuild = false;
+ //
+ // If a Slice file has changed during the build, we rebuild that project's
+ // Slice files now that the build is done.
+ //
+ List<Project> rebuildProjects = getRebuildProjects();
+ foreach(Project p in rebuildProjects)
+ {
+ buildProject(p, false, vsBuildScope.vsBuildScopeProject);
+ }
+ rebuildProjects.Clear();
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ finally
+ {
+ _buildProject = null;
+ _building = false;
+ }
+ }
+
+ //
+ // Return true if the project build is in process.
+ //
+ public bool isBuilding(Project project)
+ {
+ if(!isBuilding())
+ {
+ return false;
+ }
+ if(_buildScope == vsBuildScope.vsBuildScopeSolution)
+ {
+ return true;
+ }
+ if(_buildScope == vsBuildScope.vsBuildScopeProject &&
+ _buildProject == project)
+ {
+ return true;
+ }
+ return false;
}
+ //
+ // Is our project building?
+ //
public bool isBuilding()
{
return _building;
}
+ //
+ // If a Slice file created with "Add New Item" command cannot be added
+ // to the project because the generated items will override an existing item,
+ // the Slice file must be deleted from disk, here, after the command has
+ // been executed.
+ //
public void afterAddNewItem(string Guid, int ID, object obj, object CustomOut)
{
- foreach(String path in _deleted)
+ try
{
- if(path == null)
+ foreach(String path in _deleted)
{
- continue;
+ if(String.IsNullOrEmpty(path))
+ {
+ continue;
+ }
+ if(File.Exists(path))
+ {
+ File.Delete(path);
+ }
}
- if(File.Exists(path))
+ _deleted.Clear();
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ //
+ // If a Slice file added with "Add Existing Item" command cannot be added
+ // to the project because the generated items will override an existing item,
+ // the item must not be deleted here, we must empty the _deleted list so the
+ // file isn't later removed.
+ //
+ public void afterAddExistingItem(string Guid, int ID, object obj, object CustomOut)
+ {
+ try
+ {
+ _deleted.Clear();
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ public void afterBuildCancel(string Guid, int ID, object obj, object CustomOut)
+ {
+ try
+ {
+ _sliceBuild = false;
+
+ //
+ // If a Slice file has changed during the build, we rebuild that project's
+ // Slice files now that the build has been canceled.
+ //
+ List<Project> rebuildProjects = getRebuildProjects();
+ foreach(Project p in rebuildProjects)
{
- File.Delete(path);
+ buildProject(p, false, vsBuildScope.vsBuildScopeProject);
}
+ rebuildProjects.Clear();
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ finally
+ {
+ _buildProject = null;
+ _building = false;
}
- _deleted.Clear();
}
- public void afterAddExistingItem(string Guid, int ID, object obj, object CustomOut)
+ public void beforeBuildCompile(string Guid, int ID, object obj, object CustomOut, ref bool done)
{
- _deleted.Clear();
+ try
+ {
+ Project p = getActiveProject();
+ setCustomBuildStepEnv(p);
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ public static void setCustomBuildStepEnv(Project p)
+ {
+ //
+ // Before a custom build step is compiled, we need to ensure that the environment
+ // is updated so slice2freeze is run from the correct IceHome value.
+ //
+ if(Util.isCppProject(p) && Util.isSliceBuilderEnabled(p))
+ {
+ string iceHome = Util.getIceHome(p);
+ string cppBinDir = Util.cppBinDir(p, Util.getIceHomeRaw(p, false), false);
+#if VS2008
+ Environment.SetEnvironmentVariable(Util.EnvIceHome, iceHome);
+ Environment.SetEnvironmentVariable(Util.EnvCppBinDir, cppBinDir);
+#endif
+#if VS2010
+ //
+ // For VS2010 we create two macros instead of setting environment variables,
+ // because setting environment variables from here doesn't work with
+ // VS2010 custom build steps.
+ //
+ Util.updateIceHomePropertySheet(p, iceHome, Util.expandEnvironmentVars(cppBinDir));
+#endif
+ }
+ }
+
+ public void setDotNetDebugEnvironment(string Guid, int ID, object obj, object CustomOut, ref bool done)
+ {
+ try
+ {
+ setDotNetDebugEnvironment();
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ //
+ // Set DEVPATH if .NET development mode is enabled and project type is C# or VB,
+ // otherwise do nothing.
+ //
+ // NOTE: for Silverlight projects we don't need to set DEVPATH.
+ //
+ private void setDotNetDebugEnvironment()
+ {
+ Project p = getActiveProject();
+ if((!Util.isCSharpProject(p) && !Util.isVBProject(p)) || Util.isSilverlightProject(p))
+ {
+ return;
+ }
+
+ //
+ // If development mode isn't enabled then don't set DEVPATH.
+ //
+ if(!Util.developmentMode(p))
+ {
+ return;
+ }
+
+ //
+ // Check if vshosting process is enabled, if so disable it before updating
+ // environment variables. If it is running it will be stopped.
+ //
+ bool vsHosting = false;
+ if(Util.useVSHostingProcess(p))
+ {
+ Util.setVsHostingProcess(p, false);
+ vsHosting = true;
+ }
+
+ setDotNetDevPath(Util.getCsBinDir(p));
+
+ //
+ // Re-enable the vshosting process if it was previously enabled,
+ // so it reads the new environment when it is started by Visual Studio.
+ //
+ if(vsHosting)
+ {
+ Util.setVsHostingProcess(p, true);
+ }
+ }
+
+ private static void setDotNetDevPath(string csBinPath)
+ {
+ string devPath = Environment.GetEnvironmentVariable("DEVPATH");
+
+ if(String.IsNullOrEmpty(devPath))
+ {
+ Environment.SetEnvironmentVariable("DEVPATH", csBinPath);
+ return;
+ }
+
+ if(devPath.Contains(csBinPath))
+ {
+ ComponentList list = new ComponentList(csBinPath.Split(Path.PathSeparator));
+ list.Remove(csBinPath);
+ devPath = list.ToString(Path.PathSeparator);
+ }
+
+ devPath = csBinPath + Path.PathSeparator + devPath;
+ devPath = devPath.Trim(Path.PathSeparator);
+ Environment.SetEnvironmentVariable("DEVPATH", devPath);
}
public void disconnect()
@@ -173,21 +576,36 @@ namespace Ice.VisualStudio
_iceConfigurationCmd.Delete();
}
- _solutionEvents.Opened -= new _dispSolutionEvents_OpenedEventHandler(solutionOpened);
- _solutionEvents.AfterClosing -= new _dispSolutionEvents_AfterClosingEventHandler(afterClosing);
- _solutionEvents.ProjectAdded -= new _dispSolutionEvents_ProjectAddedEventHandler(projectAdded);
- _solutionEvents.ProjectRemoved -= new _dispSolutionEvents_ProjectRemovedEventHandler(projectRemoved);
- _solutionEvents.ProjectRenamed -= new _dispSolutionEvents_ProjectRenamedEventHandler(projectRenamed);
- _solutionEvents = null;
+ if(_connectMode != ext_ConnectMode.ext_cm_CommandLine)
+ {
+ _solutionEvents.Opened -= new _dispSolutionEvents_OpenedEventHandler(solutionOpened);
+ _solutionEvents.AfterClosing -= new _dispSolutionEvents_AfterClosingEventHandler(afterClosing);
+ _solutionEvents.ProjectAdded -= new _dispSolutionEvents_ProjectAddedEventHandler(projectAdded);
+ _solutionEvents.ProjectRemoved -= new _dispSolutionEvents_ProjectRemovedEventHandler(projectRemoved);
+ _solutionEvents.ProjectRenamed -= new _dispSolutionEvents_ProjectRenamedEventHandler(projectRenamed);
+ _solutionEvents = null;
+ }
_buildEvents.OnBuildBegin -= new _dispBuildEvents_OnBuildBeginEventHandler(buildBegin);
+ _buildEvents.OnBuildDone -= new _dispBuildEvents_OnBuildDoneEventHandler(buildDone);
+
_buildEvents = null;
-
+
+ if(_connectMode != ext_ConnectMode.ext_cm_CommandLine)
+ {
+ endTrackDocumentEvents();
+ }
if(_dependenciesMap != null)
{
_dependenciesMap.Clear();
_dependenciesMap = null;
}
+
+ if(_rebuildProjects != null)
+ {
+ _rebuildProjects.Clear();
+ _rebuildProjects = null;
+ }
_errorCount = 0;
if(_errors != null)
@@ -201,6 +619,14 @@ namespace Ice.VisualStudio
_fileTracker.clear();
_fileTracker = null;
}
+
+#if VS2008
+ //
+ // Remove Environment variables that we created.
+ //
+ Environment.SetEnvironmentVariable(Util.EnvIceHome, "");
+ Environment.SetEnvironmentVariable(Util.EnvCppBinDir , "");
+#endif
}
private void setupCommandBars()
@@ -228,13 +654,13 @@ namespace Ice.VisualStudio
if(_iceConfigurationCmd == null)
{
- System.Windows.Forms.MessageBox.Show("Error initializing Ice Visual Studio Extension.\n" +
- "Cannot create required commands",
- "Ice Visual Studio Extension",
- System.Windows.Forms.MessageBoxButtons.OK,
- System.Windows.Forms.MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
+ MessageBox.Show("Error initializing Ice Visual Studio Add-In.\n" +
+ "Cannot create required commands",
+ "Ice Visual Studio Add-In",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0);
return;
}
@@ -247,12 +673,27 @@ namespace Ice.VisualStudio
public void afterClosing()
{
- clearErrors();
- removeDocumentEvents();
- if(_dependenciesMap != null)
+ try
{
- _dependenciesMap.Clear();
- _dependenciesMap = null;
+ clearErrors();
+ removeDocumentEvents();
+ if(_dependenciesMap != null)
+ {
+ _dependenciesMap.Clear();
+ _dependenciesMap = null;
+ }
+
+ if(_rebuildProjects != null)
+ {
+ _rebuildProjects.Clear();
+ _rebuildProjects = null;
+ }
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
}
@@ -260,23 +701,20 @@ namespace Ice.VisualStudio
{
try
{
- _dependenciesMap = new Dictionary<string, Dictionary<string, List<string>>>();
- _fileTracker = new FileTracker();
+ DependenciesMap dependenciesMap = getDependenciesMap();
+
initDocumentEvents();
foreach(Project p in _applicationObject.Solution.Projects)
- {
+ {
Util.fix(p);
if((Util.isCSharpProject(p) || Util.isVBProject(p) || Util.isCppProject(p)) &&
- Util.isSliceBuilderEnabled(p))
- {
- // Call for side-effect of setting environment variable.
- Util.getIceHome(p);
-
+ Util.isSliceBuilderEnabled(p))
+ {
Util.verifyProjectSettings(p);
-
- if (!Util.isVBProject(p))
+
+ if(!Util.isVBProject(p))
{
- _dependenciesMap[p.Name] = new Dictionary<string, List<string>>();
+ dependenciesMap[p.Name] = new Dictionary<string, List<string>>();
buildProject(p, true, vsBuildScope.vsBuildScopeSolution);
}
}
@@ -288,63 +726,101 @@ namespace Ice.VisualStudio
}
catch(Exception ex)
{
- write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
}
-
+
+ //
+ // Enable slice builder for the project with default components.
+ //
public void addBuilderToProject(Project project)
- {
- string iceHomeRaw = Util.getIceHomeRaw(project, true);
- // TODO: needed?
+ {
+ addBuilderToProject(project, new ComponentList());
+ }
+
+ //
+ // Enable Slice builder for the project, and enable the components that are
+ // in components. If components list is empty, the default set of components
+ // are added to the project.
+ //
+ // Note: Components in this context is the list of Ice libraries or assemblies
+ // that will be added to the project.
+ //
+ public void addBuilderToProject(Project project, ComponentList components)
+ {
+ //
+ // For C++ project configurations we use getIceHomeRaw,
+ // which doesn't expand environment variables.
+ //
+ string iceHomeRaw = Util.getIceHomeRaw(project, true);
+
+ //
+ // For other project types we use getIceHome, which expands
+ // environment variables.
+ //
string iceHomeRel = Util.getIceHome(project);
if(Util.isCppProject(project))
{
Util.addIceCppConfigurations(project, iceHomeRaw);
- ComponentList components =
- new ComponentList(Util.getProjectProperty(project, Util.PropertyIceComponents));
+
+ if(components.Count == 0)
+ {
+ components =
+ new ComponentList(Util.getProjectProperty(project, Util.PropertyIceComponents));
+ }
+
if(components.Count == 0)
{
components.Add("Ice");
components.Add("IceUtil");
}
+
Util.addIceCppLibs(project, components);
Util.setProjectProperty(project, Util.PropertyIce, true.ToString());
- buildCppProject(project, true);
}
else if(Util.isCSharpProject(project))
{
+ bool development = Util.developmentMode(project);
if(Util.isSilverlightProject(project))
{
- Util.addDotNetReference(project, "IceSL", iceHomeRel);
+ Util.addDotNetReference(project, "IceSL", iceHomeRel, development);
}
else
{
- ComponentList components =
- new ComponentList(Util.getProjectProperty(project, Util.PropertyIceComponents));
+ if(components.Count == 0)
+ {
+ components =
+ new ComponentList(Util.getProjectProperty(project, Util.PropertyIceComponents));
+ }
if(components.Count == 0)
{
components.Add("Ice");
}
foreach(string component in components)
{
- Util.addDotNetReference(project, component, iceHomeRel);
+ Util.addDotNetReference(project, component, iceHomeRel, development);
}
}
Util.setProjectProperty(project, Util.PropertyIce, true.ToString());
- buildCSharpProject(project, true);
}
else if(Util.isVBProject(project))
{
- ComponentList components =
- new ComponentList(Util.getProjectProperty(project, Util.PropertyIceComponents));
+ bool development = Util.developmentMode(project);
+ if(components.Count == 0)
+ {
+ components =
+ new ComponentList(Util.getProjectProperty(project, Util.PropertyIceComponents));
+ }
if(components.Count == 0)
{
components.Add("Ice");
}
foreach(string component in components)
{
- Util.addDotNetReference(project, component, iceHomeRel);
+ Util.addDotNetReference(project, component, iceHomeRel, development);
}
Util.setProjectProperty(project, Util.PropertyIce, true.ToString());
}
@@ -356,7 +832,7 @@ namespace Ice.VisualStudio
public void removeBuilderFromProject(Project project)
{
- cleanProject(project);
+ cleanProject(project, true);
if(Util.isCppProject(project))
{
Util.removeIceCppConfigurations(project, Util.getIceHomeRaw(project, true));
@@ -399,9 +875,12 @@ namespace Ice.VisualStudio
}
}
+ //
+ // Ensure that generated items are opened in read only mode.
+ //
private void documentOpened(Document document)
{
- if(_fileTracker.hasGeneratedFile(document.ProjectItem.ContainingProject, document.FullName))
+ if(fileTracker().hasGeneratedFile(document.ProjectItem.ContainingProject, document.FullName))
{
if(!document.ReadOnly)
{
@@ -419,49 +898,108 @@ namespace Ice.VisualStudio
}
catch(COMException)
{
- // Expected when documents are create during project initialization
+ //
+ // Expected when documents are created during project initialization
// and the ProjectItem is not yet available.
+ //
return;
}
+
if(!Util.isSliceBuilderEnabled(project))
{
return;
}
- if (!Util.isSliceFilename(document.Name))
+ if(!Util.isSliceFilename(document.Name))
{
return;
}
+ //
+ // If build is in proccess, we don't run the slice compiler now, we append the document
+ // to a list of projects that have changes and return. The projects on this list
+ // will be rebuilt when the current build process is done or canceled, see
+ // "buildDone" and "afterBuildCancel" methods in this class.
+ //
+ if(isBuilding(project))
+ {
+ List<Project> rebuildProjects = getRebuildProjects();
+ if(!rebuildProjects.Contains(project))
+ {
+ rebuildProjects.Add(project);
+ }
+ return;
+ }
+
clearErrors(project);
buildProject(project, false, vsBuildScope.vsBuildScopeProject);
}
public void projectAdded(Project project)
{
- if(Util.isSliceBuilderEnabled(project))
+ try
{
- updateDependencies(project);
+ if(Util.isSliceBuilderEnabled(project))
+ {
+ Util.verifyProjectSettings(project);
+ updateDependencies(project);
+ }
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
}
public void projectRemoved(Project project)
{
- if(_dependenciesMap.ContainsKey(project.Name))
+ try
+ {
+ DependenciesMap dependenciesMap = getDependenciesMap();
+ if(dependenciesMap.ContainsKey(project.Name))
+ {
+ dependenciesMap.Remove(project.Name);
+ }
+
+ List<Project> rebuildProjects = getRebuildProjects();
+ foreach(Project p in rebuildProjects)
+ {
+ if(project == p)
+ {
+ rebuildProjects.Remove(p);
+ break;
+ }
+ }
+ }
+ catch(Exception ex)
{
- _dependenciesMap.Remove(project.Name);
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
}
public void projectRenamed(Project project, string oldName)
{
- if(_dependenciesMap.ContainsKey(oldName))
+ try
{
- _dependenciesMap.Remove(oldName);
+ DependenciesMap dependenciesMap = getDependenciesMap();
+ if(dependenciesMap.ContainsKey(oldName))
+ {
+ dependenciesMap.Remove(oldName);
+ }
+ updateDependencies(project);
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
- updateDependencies(project);
}
- public void cleanProject(Project project)
+ public void cleanProject(Project project, bool remove)
{
if(project == null)
{
@@ -475,11 +1013,11 @@ namespace Ice.VisualStudio
if(Util.isCSharpProject(project))
{
- removeCSharpGeneratedItems(project, project.ProjectItems, false);
+ removeCSharpGeneratedItems(project, project.ProjectItems, remove);
}
else if(Util.isCppProject(project))
{
- removeCppGeneratedItems(project.ProjectItems, false);
+ removeCppGeneratedItems(project.ProjectItems, remove);
}
}
@@ -493,8 +1031,8 @@ namespace Ice.VisualStudio
{
return;
}
-
- foreach(ProjectItem i in items)
+ List<ProjectItem> tmpItems = Util.clone(items);
+ foreach(ProjectItem i in tmpItems)
{
if(i == null)
{
@@ -529,6 +1067,11 @@ namespace Ice.VisualStudio
return;
}
+
+ //
+ // When building a single project, we must first build projects
+ // that this project depends on.
+ //
if(vsBuildScope.vsBuildScopeProject == scope)
{
BuildDependencies dependencies = _applicationObject.Solution.SolutionBuild.BuildDependencies;
@@ -545,9 +1088,22 @@ namespace Ice.VisualStudio
}
}
}
+
+ //
+ // Setup environment used by Freeze demo custom build steps.
+ //
+ setCustomBuildStepEnv(project);
+
+ string msg = "------ Slice compilation started ";
+ int verboseLevel = Util.getVerboseLevel(project);
+ if(verboseLevel >= (int)Util.msgLevel.msgDebug)
+ {
+ DateTime now = DateTime.Now;
+ msg += "at: " + now.ToShortTimeString() + " ";
+ }
+ msg += "Project: " + project.Name + " ------\n";
+ Util.write(project, Util.msgLevel.msgInfo, msg);
- write(project, Util.msgLevel.msgInfo,
- "------ Slice compilation started: Project: " + project.Name + " ------\n");
if(Util.isCSharpProject(project))
{
buildCSharpProject(project, force, excludeItem);
@@ -556,22 +1112,21 @@ namespace Ice.VisualStudio
{
buildCppProject(project, force);
}
+
if(hasErrors(project))
{
- write(project, Util.msgLevel.msgError,
+ Util.write(project, Util.msgLevel.msgError,
"------ Slice compilation failed: Project: " + project.Name + " ------\n");
}
else
{
- write(project, Util.msgLevel.msgInfo,
+ Util.write(project, Util.msgLevel.msgInfo,
"------ Slice compilation succeeded: Project: " + project.Name + " ------\n");
}
}
public bool buildCppProject(Project project, bool force)
- {
- // string argsDepend = getSliceCompilerArgs(project, true);
- // string argsCompile = getSliceCompilerArgs(project, false);
+ {
string sliceCompiler = getSliceCompilerPath(project);
return buildCppProject(project, project.ProjectItems, sliceCompiler, force);
}
@@ -579,7 +1134,8 @@ namespace Ice.VisualStudio
public bool buildCppProject(Project project, ProjectItems items, string sliceCompiler, bool force)
{
bool success = true;
- foreach(ProjectItem i in items)
+ List<ProjectItem> tmpItems = Util.clone(items);
+ foreach(ProjectItem i in tmpItems)
{
if(i == null)
{
@@ -627,9 +1183,9 @@ namespace Ice.VisualStudio
}
FileInfo iceFileInfo = new FileInfo(item.Properties.Item("FullPath").Value.ToString());
- FileInfo hFileInfo = new FileInfo(getCppGeneratedFileName(Path.GetDirectoryName(project.FullName),
- iceFileInfo.FullName, "h"));
- FileInfo cppFileInfo = new FileInfo(Path.ChangeExtension(hFileInfo.FullName, "cpp"));
+ FileInfo hFileInfo = new FileInfo(getCppGeneratedFileName(project,
+ iceFileInfo.FullName, Util.getHeaderExt(project)));
+ FileInfo cppFileInfo = new FileInfo(Path.ChangeExtension(hFileInfo.FullName, Util.getSourceExt(project)));
string output = Path.GetDirectoryName(cppFileInfo.FullName);
return buildCppProjectItem(project, output, iceFileInfo, cppFileInfo, hFileInfo, sliceCompiler, force);
@@ -661,11 +1217,12 @@ namespace Ice.VisualStudio
else
{
//
- // Now check it any of the dependencies has changed.
+ // Now check if any of the dependencies have changed.
//
- if(_dependenciesMap.ContainsKey(project.Name))
+ DependenciesMap solutionDependenciesMap = getDependenciesMap();
+ if(solutionDependenciesMap.ContainsKey(project.Name))
{
- Dictionary<string, List<string>> dependenciesMap = _dependenciesMap[project.Name];
+ Dictionary<string, List<string>> dependenciesMap = solutionDependenciesMap[project.Name];
if(dependenciesMap.ContainsKey(ice.FullName))
{
List<string> fileDependencies = dependenciesMap[ice.FullName];
@@ -695,25 +1252,21 @@ namespace Ice.VisualStudio
if(!Directory.Exists(output))
{
Directory.CreateDirectory(output);
- }
+ }
if(updateDependencies(project, null, ice.FullName, sliceCompiler) && updated)
{
if(runSliceCompiler(project, sliceCompiler, ice.FullName, output))
{
- addCppGeneratedFiles(project, ice, cpp, h);
success = true;
}
}
}
- else
- {
- //
- // Make sure generated files are part of project.
- //
- addCppGeneratedFiles(project, ice, cpp, h);
- }
- return !updated | success;
+ //
+ // Make sure generated files are part of project, and tracked by the FileTracker.
+ //
+ addCppGeneratedFiles(project, ice, cpp, h);
+ return !updated || success;
}
public void addCppGeneratedFiles(Project project, FileSystemInfo ice, FileSystemInfo cpp, FileSystemInfo h)
@@ -727,7 +1280,7 @@ namespace Ice.VisualStudio
if(File.Exists(cpp.FullName))
{
- _fileTracker.trackFile(project, ice.FullName, h.FullName);
+ fileTracker().trackFile(project, ice.FullName, h.FullName);
VCFile file = Util.findVCFile((IVCCollection)vcProject.Files, cpp.Name, cpp.FullName);
if(file == null)
{
@@ -737,7 +1290,7 @@ namespace Ice.VisualStudio
if(File.Exists(h.FullName))
{
- _fileTracker.trackFile(project, ice.FullName, cpp.FullName);
+ fileTracker().trackFile(project, ice.FullName, cpp.FullName);
VCFile file = Util.findVCFile((IVCCollection)vcProject.Files, h.Name, h.FullName);
if(file == null)
{
@@ -753,7 +1306,7 @@ namespace Ice.VisualStudio
public void buildCSharpProject(Project project, bool force, ProjectItem excludeItem)
{
- string projectDir = Path.GetDirectoryName(project.FileName);
+ string projectDir = Path.GetDirectoryName(project.FileName);
string sliceCompiler = getSliceCompilerPath(project);
buildCSharpProject(project, projectDir, project.ProjectItems, sliceCompiler, force, excludeItem);
}
@@ -761,7 +1314,8 @@ namespace Ice.VisualStudio
public void buildCSharpProject(Project project, string projectDir, ProjectItems items, string sliceCompiler,
bool force, ProjectItem excludeItem)
{
- foreach(ProjectItem i in items)
+ List<ProjectItem> tmpItems = Util.clone(items);
+ foreach(ProjectItem i in tmpItems)
{
if(i == null || i == excludeItem)
{
@@ -779,9 +1333,9 @@ namespace Ice.VisualStudio
}
}
- public static String getCppGeneratedFileName(String projectDir, String fullPath, string extension)
+ public static String getCppGeneratedFileName(Project project, String fullPath, string extension)
{
- if(String.IsNullOrEmpty(projectDir) || String.IsNullOrEmpty(fullPath))
+ if(project == null || String.IsNullOrEmpty(fullPath))
{
return "";
}
@@ -791,43 +1345,91 @@ namespace Ice.VisualStudio
return "";
}
- if(Path.GetFullPath(fullPath).StartsWith(Path.GetFullPath(projectDir),
- StringComparison.CurrentCultureIgnoreCase))
+ string projectDir = Path.GetDirectoryName(project.FileName).Trim();
+ string outputAbsolutePath = Util.getProjectAbsoluteOutputDir(project);
+
+ string itemRelativePath = "";
+
+ //
+ // If source isn't inside project directory, we put the generated file in the
+ // root of our output directory.
+ //
+ if(!Path.GetFullPath(fullPath).StartsWith(Path.GetFullPath(projectDir),
+ StringComparison.CurrentCultureIgnoreCase))
+ {
+ itemRelativePath = Path.GetFileName(fullPath);
+ }
+ //
+ // If source file is in generated directory, just change the extension to the path.
+ //
+ else if(Path.GetFullPath(fullPath).StartsWith(outputAbsolutePath,
+ StringComparison.CurrentCultureIgnoreCase))
{
return Path.ChangeExtension(fullPath, extension);
}
- // If two projects reference the same file, Studio will put the build outputs in the project
- // folders, not with the file. We do the same. The makes sense because compiler settings may
- // vary project to project. The example for slice is whether you generate C# or C++.
- return Path.ChangeExtension(Path.Combine(projectDir, Path.GetFileName(fullPath)), extension);
+ else
+ {
+ itemRelativePath = Util.relativePath(project, Path.GetDirectoryName(fullPath));
+ }
+
+ if(String.IsNullOrEmpty(itemRelativePath))
+ {
+ return "";
+ }
+
+ string generatedDir = Path.GetDirectoryName(itemRelativePath);
+
+ string path = System.IO.Path.Combine(outputAbsolutePath, generatedDir);
+ return Path.GetFullPath(
+ Path.Combine(path, Path.ChangeExtension(Path.GetFileName(fullPath), extension))).Trim();
}
public static string getCSharpGeneratedFileName(Project project, ProjectItem item, string extension)
{
- if(project == null)
+ if(project == null || item == null || String.IsNullOrEmpty(extension))
{
return "";
}
+ string fullPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(project.FileName),
+ Util.getPathRelativeToProject(item)));
- if(item == null)
+ return getCSharpGeneratedFileName(project, fullPath, extension).Trim();
+ }
+
+ public static string getCSharpGeneratedFileName(Project project, string fullPath, string extension)
+ {
+ if(project == null || String.IsNullOrEmpty(fullPath) || String.IsNullOrEmpty(extension))
{
return "";
}
- if(!Util.isSliceFilename(item.Name))
+ if(!Util.isSliceFilename(fullPath))
{
return "";
}
string projectDir = Path.GetDirectoryName(project.FileName);
- string itemRelativePath = Util.getPathRelativeToProject(item);
- if(!String.IsNullOrEmpty(itemRelativePath))
+
+ string itemRelativePath = Util.relativePath(project, fullPath);
+ if(String.IsNullOrEmpty(itemRelativePath))
{
- string generatedDir = Path.GetDirectoryName(itemRelativePath);
- string path = System.IO.Path.Combine(projectDir, generatedDir);
- return System.IO.Path.Combine(path, Path.ChangeExtension(item.Name, extension));
+ return "";
+ }
+
+ string outputAbsolutePath = Util.getProjectAbsoluteOutputDir(project);
+ //
+ // If source file is in generated directory, just change the extension to the path.
+ //
+ if(Path.GetFullPath(fullPath).StartsWith(outputAbsolutePath, StringComparison.CurrentCultureIgnoreCase))
+ {
+ return Path.ChangeExtension(fullPath, extension);
}
- return "";
+
+ string generatedDir = Path.GetDirectoryName(itemRelativePath);
+
+ string path = Path.Combine(outputAbsolutePath, generatedDir);
+ return Path.GetFullPath(
+ Path.Combine(path, Path.ChangeExtension(Path.GetFileName(fullPath), extension))).Trim();
}
public bool buildCSharpProjectItem(Project project, ProjectItem item, string sliceCompiler, bool force)
@@ -867,12 +1469,12 @@ namespace Ice.VisualStudio
else
{
//
- // Now check it any of the dependencies has changed.
- //
+ // Now check if any of the dependencies have changed.
//
- if(_dependenciesMap.ContainsKey(project.Name))
+ DependenciesMap solutionDependenciesMap = getDependenciesMap();
+ if(solutionDependenciesMap.ContainsKey(project.Name))
{
- Dictionary<string, List<string>> dependenciesMap = _dependenciesMap[project.Name];
+ Dictionary<string, List<string>> dependenciesMap = solutionDependenciesMap[project.Name];
if(dependenciesMap.ContainsKey(iceFileInfo.FullName))
{
List<string> fileDependencies = dependenciesMap[iceFileInfo.FullName];
@@ -902,26 +1504,22 @@ namespace Ice.VisualStudio
{
if(runSliceCompiler(project, sliceCompiler, iceFileInfo.FullName, generatedFileInfo.DirectoryName))
{
- addCSharpGeneratedFiles(project, iceFileInfo, generatedFileInfo);
success = true;
}
}
}
- else
- {
- //
- // Make sure generated files are part of project.
- //
- addCSharpGeneratedFiles(project, iceFileInfo, generatedFileInfo);
- }
- return !updated | success;
+ //
+ // Make sure generated files are part of project, and tracked by FileTracker.
+ //
+ addCSharpGeneratedFiles(project, iceFileInfo, generatedFileInfo);
+ return !updated || success;
}
private void addCSharpGeneratedFiles(Project project, FileInfo ice, FileInfo file)
{
if(File.Exists(file.FullName))
{
- _fileTracker.trackFile(project, ice.FullName, file.FullName);
+ fileTracker().trackFile(project, ice.FullName, file.FullName);
ProjectItem generatedItem = Util.findItem(file.FullName, project.ProjectItems);
if(generatedItem == null)
@@ -934,18 +1532,18 @@ namespace Ice.VisualStudio
private static string getSliceCompilerPath(Project project)
{
string compiler = Util.slice2cpp;
- if (Util.isCSharpProject(project))
- {
+ if(Util.isCSharpProject(project))
+ {
compiler = Util.slice2cs;
- if (Util.isSilverlightProject(project))
+ if(Util.isSilverlightProject(project))
{
compiler = Util.slice2sl;
}
- }
-
+ }
+
string iceHome = Util.absolutePath(project, Util.getIceHome(project));
// "cpp" implies source distribution
- if (Directory.Exists(Path.Combine(iceHome, "cpp")))
+ if(Directory.Exists(Path.Combine(iceHome, "cpp")))
{
iceHome = Path.Combine(iceHome, "cpp");
}
@@ -964,8 +1562,7 @@ namespace Ice.VisualStudio
process = System.Diagnostics.Process.Start(processInfo);
process.WaitForExit();
- string version = process.StandardOutput.ReadLine();
- return version;
+ return process.StandardOutput.ReadLine().Trim();
}
private static string getSliceCompilerArgs(Project project, bool depend)
@@ -1008,7 +1605,7 @@ namespace Ice.VisualStudio
{
continue;
}
- String include = Util.subEnvironmentVars(i);
+ String include = Util.expandEnvironmentVars(i);
if(include.EndsWith("\\", StringComparison.Ordinal) &&
include.Split(new char[]{'\\'}, StringSplitOptions.RemoveEmptyEntries).Length == 1)
{
@@ -1023,9 +1620,9 @@ namespace Ice.VisualStudio
args += "-I" + Util.quote(include) + " ";
}
- if(extraOpts.Length != 0)
+ if(!String.IsNullOrEmpty(extraOpts))
{
- args += Util.subEnvironmentVars(extraOpts) + " ";
+ args += Util.expandEnvironmentVars(extraOpts) + " ";
}
if(tie && Util.isCSharpProject(project) && !Util.isSilverlightProject(project))
@@ -1058,7 +1655,8 @@ namespace Ice.VisualStudio
public bool updateDependencies(Project project, ProjectItem excludeItem)
{
- _dependenciesMap[project.Name] = new Dictionary<string, List<string>>();
+ DependenciesMap dependenciesMap = getDependenciesMap();
+ dependenciesMap[project.Name] = new Dictionary<string, List<string>>();
string sliceCompiler = getSliceCompilerPath(project);
return updateDependencies(project, project.ProjectItems, sliceCompiler, excludeItem);
}
@@ -1069,29 +1667,33 @@ namespace Ice.VisualStudio
{
return;
}
+
if(String.IsNullOrEmpty(project.Name))
{
return;
}
- if(!_dependenciesMap.ContainsKey(project.Name))
+
+ DependenciesMap dependenciesMap = getDependenciesMap();
+ if(!dependenciesMap.ContainsKey(project.Name))
{
return;
}
- Dictionary<string, List<string>> projectDependencies = _dependenciesMap[project.Name];
+ Dictionary<string, List<string>> projectDependencies = dependenciesMap[project.Name];
if(!projectDependencies.ContainsKey(file))
{
return;
}
projectDependencies.Remove(file);
- _dependenciesMap[project.Name] = projectDependencies;
+ dependenciesMap[project.Name] = projectDependencies;
}
public bool updateDependencies(Project project, ProjectItems items, string sliceCompiler,
- ProjectItem excludeItem)
+ ProjectItem excludeItem)
{
bool success = true;
- foreach(ProjectItem item in items)
+ List<ProjectItem> tmpItems = Util.clone(items);
+ foreach(ProjectItem item in tmpItems)
{
if(item == null || item == excludeItem)
{
@@ -1123,36 +1725,77 @@ namespace Ice.VisualStudio
}
public bool updateDependencies(Project project, ProjectItem item, string file, string sliceCompiler)
- {
- write(project, Util.msgLevel.msgDebug,
- "updateDependencies: " + Util.quote(project.Name) + ": " + Util.quote(file) + "\n");
-
- ProcessStartInfo processInfo;
- System.Diagnostics.Process process;
-
- string args = getSliceCompilerArgs(project, true) + " " + Util.quote(file);
- processInfo = new ProcessStartInfo(sliceCompiler, args);
- processInfo.CreateNoWindow = true;
- processInfo.UseShellExecute = false;
- processInfo.RedirectStandardError = true;
- processInfo.RedirectStandardOutput = true;
- processInfo.WorkingDirectory = Path.GetDirectoryName(project.FileName);
+ {
+ Util.write(project, Util.msgLevel.msgDebug,
+ "updateDependencies: " + Util.quote(project.Name) + ": " + Util.quote(file) + "\n");
- if(!File.Exists(sliceCompiler))
- {
- write(project, Util.msgLevel.msgError,
- "'" + sliceCompiler + "' not found. Review 'Ice Home' setting.\n");
+ if(!File.Exists(sliceCompiler))
+ {
+ Util.write(project, Util.msgLevel.msgError,
+ "'" + sliceCompiler + "' not found. Review 'Ice Home' setting.\n");
addError(project, file, TaskErrorCategory.Error, 0, 0,
- sliceCompiler + " not found. Review 'Ice Home' setting.");
+ sliceCompiler + " not found. Review 'Ice Home' setting.");
return false;
- }
-
- write(project, Util.msgLevel.msgInfo, sliceCompiler + " " + args + "\n");
+ }
+
+ string args = getSliceCompilerArgs(project, true) + " " + Util.quote(file);
+
+ System.Diagnostics.Process process = new System.Diagnostics.Process();
+ process.StartInfo.FileName = sliceCompiler;
+ process.StartInfo.Arguments = args;
+ process.StartInfo.CreateNoWindow = true;
+ process.StartInfo.UseShellExecute = false;
+ process.StartInfo.RedirectStandardError = true;
+ process.StartInfo.RedirectStandardOutput = true;
+
+ process.StartInfo.WorkingDirectory = Path.GetDirectoryName(project.FileName);
+ StreamReader reader = new StreamReader();
+ process.OutputDataReceived += new DataReceivedEventHandler(reader.appendData);
+
+ Util.write(project, Util.msgLevel.msgInfo, sliceCompiler + " " + args + "\n");
- process = System.Diagnostics.Process.Start(processInfo);
+ try
+ {
+ process.Start();
+ }
+ catch(InvalidOperationException ex)
+ {
+ Util.write(project, Util.msgLevel.msgError,
+ "An exception was thrown when trying to start the slice compiler\n" +
+ ex.ToString());
+ addError(project, file, TaskErrorCategory.Error, 0, 0,
+ "An exception was thrown when trying to start slice compiler\n" +
+ ex.ToString());
+ return false;
+ }
+ catch(System.ComponentModel.Win32Exception ex)
+ {
+ Util.write(project, Util.msgLevel.msgError,
+ "An exception was thrown when trying to start the slice compiler\n" +
+ ex.ToString());
+ addError(project, file, TaskErrorCategory.Error, 0, 0,
+ "An exception was thrown when trying to start slice compiler\n" +
+ ex.ToString());
+ return false;
+ }
+
+ //
+ // When StandardError and StandardOutput are redirected, at least one
+ // should use asynchronous reads to prevent deadlocks when calling
+ // process.WaitForExit; the other can be read synchronously using ReadToEnd.
+ //
+ // See the Remarks section in the below link:
+ //
+ // http://msdn.microsoft.com/en-us/library/system.diagnostics.process.standarderror.aspx
+ //
+
+ // Start the asynchronous read of the standard output stream.
+ process.BeginOutputReadLine();
+ // Read Standard error.
+ string stderr = process.StandardError.ReadToEnd();
process.WaitForExit();
- if (parseErrors(project, sliceCompiler, file, process.StandardError))
+ if(parseErrors(project, sliceCompiler, file, stderr))
{
bringErrorsToFront();
process.Close();
@@ -1168,19 +1811,20 @@ namespace Ice.VisualStudio
}
List<string> dependencies = new List<string>();
- TextReader output = process.StandardOutput;
+ StringReader output = new StringReader(reader.data());
string line = null;
- if(!_dependenciesMap.ContainsKey(project.Name))
+ DependenciesMap dependenciesMap = getDependenciesMap();
+ if(!dependenciesMap.ContainsKey(project.Name))
{
- _dependenciesMap[project.Name] = new Dictionary<string,List<string>>();
+ dependenciesMap[project.Name] = new Dictionary<string,List<string>>();
}
- Dictionary<string, List<string>> projectDeps = _dependenciesMap[project.Name];
+ Dictionary<string, List<string>> projectDeps = dependenciesMap[project.Name];
while((line = output.ReadLine()) != null)
{
- write(project, Util.msgLevel.msgInfo, line + "\n");
+ Util.write(project, Util.msgLevel.msgInfo, line + "\n");
if(!String.IsNullOrEmpty(line))
{
if(line.EndsWith(" \\", StringComparison.Ordinal))
@@ -1193,9 +1837,8 @@ namespace Ice.VisualStudio
//
line = line.Replace("\\ ", " ");
- // TODO: != doing case-sensitive filename comparison?
- if(line.EndsWith(".ice", StringComparison.Ordinal) &&
- System.IO.Path.GetFileName(line) != System.IO.Path.GetFileName(file))
+ if(line.EndsWith(".ice", StringComparison.CurrentCultureIgnoreCase) &&
+ !System.IO.Path.GetFileName(line).Trim().Equals(System.IO.Path.GetFileName(file)))
{
line = line.Replace('/', '\\');
dependencies.Add(line);
@@ -1203,7 +1846,7 @@ namespace Ice.VisualStudio
}
}
projectDeps[file] = dependencies;
- _dependenciesMap[project.Name] = projectDeps;
+ dependenciesMap[project.Name] = projectDeps;
process.Close();
return true;
@@ -1211,7 +1854,7 @@ namespace Ice.VisualStudio
public void initDocumentEvents()
{
- //Csharp project item events.
+ // Csharp project item events.
_csProjectItemsEvents =
(EnvDTE.ProjectItemsEvents)_applicationObject.Events.GetObject("CSharpProjectItemsEvents");
if(_csProjectItemsEvents != null)
@@ -1220,11 +1863,9 @@ namespace Ice.VisualStudio
new _dispProjectItemsEvents_ItemAddedEventHandler(csharpItemAdded);
_csProjectItemsEvents.ItemRemoved +=
new _dispProjectItemsEvents_ItemRemovedEventHandler(csharpItemRemoved);
- _csProjectItemsEvents.ItemRenamed +=
- new _dispProjectItemsEvents_ItemRenamedEventHandler(csharpItemRenamed);
}
- //Cpp project item events.
+ // Cpp project item events.
_vcProjectItemsEvents =
(VCProjectEngineEvents)_applicationObject.Events.GetObject("VCProjectEngineEventsObject");
if(_vcProjectItemsEvents != null)
@@ -1233,11 +1874,9 @@ namespace Ice.VisualStudio
new _dispVCProjectEngineEvents_ItemAddedEventHandler(cppItemAdded);
_vcProjectItemsEvents.ItemRemoved +=
new _dispVCProjectEngineEvents_ItemRemovedEventHandler(cppItemRemoved);
- _vcProjectItemsEvents.ItemRenamed +=
- new _dispVCProjectEngineEvents_ItemRenamedEventHandler(cppItemRenamed);
}
- //Visual Studio document events.
+ // Visual Studio document events.
_docEvents = _applicationObject.Events.get_DocumentEvents(null);
if(_docEvents != null)
{
@@ -1248,31 +1887,27 @@ namespace Ice.VisualStudio
public void removeDocumentEvents()
{
- //Csharp project item events.
+ // Csharp project item events.
if(_csProjectItemsEvents != null)
{
_csProjectItemsEvents.ItemAdded -=
new _dispProjectItemsEvents_ItemAddedEventHandler(csharpItemAdded);
_csProjectItemsEvents.ItemRemoved -=
new _dispProjectItemsEvents_ItemRemovedEventHandler(csharpItemRemoved);
- _csProjectItemsEvents.ItemRenamed -=
- new _dispProjectItemsEvents_ItemRenamedEventHandler(csharpItemRenamed);
_csProjectItemsEvents = null;
}
- //Cpp project item events.
+ // Cpp project item events.
if(_vcProjectItemsEvents != null)
{
_vcProjectItemsEvents.ItemAdded -=
new _dispVCProjectEngineEvents_ItemAddedEventHandler(cppItemAdded);
_vcProjectItemsEvents.ItemRemoved -=
new _dispVCProjectEngineEvents_ItemRemovedEventHandler(cppItemRemoved);
- _vcProjectItemsEvents.ItemRenamed -=
- new _dispVCProjectEngineEvents_ItemRenamedEventHandler(cppItemRenamed);
_vcProjectItemsEvents = null;
}
- //Visual Studio document events.
+ // Visual Studio document events.
if(_docEvents != null)
{
_docEvents.DocumentSaved -= new _dispDocumentEvents_DocumentSavedEventHandler(documentSaved);
@@ -1295,97 +1930,15 @@ namespace Ice.VisualStudio
}
return projects.GetValue(0) as Project;
}
-
- private void cppItemRenamed(object obj, object parent, string oldName)
- {
- try
- {
- if(obj == null)
- {
- return;
- }
- VCFile file = obj as VCFile;
- if(file == null)
- {
- return;
- }
- if(!Util.isSliceFilename(file.Name))
- {
- return;
- }
- Array projects = (Array)_applicationObject.ActiveSolutionProjects;
- if(projects == null)
- {
- return;
- }
- Project project = projects.GetValue(0) as Project;
- if(project == null)
- {
- return;
- }
- if(!Util.isSliceBuilderEnabled(project))
- {
- return;
- }
- _fileTracker.reap(project);
- ProjectItem item = Util.findItem(file.FullPath, project.ProjectItems);
-
- string fullPath = file.FullPath;
- if(Util.isCppProject(project))
- {
- string cppPath = Path.ChangeExtension(fullPath, ".cpp");
- string hPath = Path.ChangeExtension(cppPath, ".h");
- if(File.Exists(cppPath) || Util.hasItemNamed(project.ProjectItems, Path.GetFileName(cppPath)))
- {
- System.Windows.Forms.MessageBox.Show("A file named '" + Path.GetFileName(cppPath) +
- "' already exists.\n" + "If you want to add '" +
- Path.GetFileName(fullPath) + "' first remove " + " '" +
- Path.GetFileName(cppPath) + "' and '" +
- Path.GetFileName(hPath) + "' from your project.",
- "Ice Visual Studio Extension",
- System.Windows.Forms.MessageBoxButtons.OK,
- System.Windows.Forms.MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
- item.Name = oldName;
- return;
- }
-
- if(File.Exists(hPath) || Util.hasItemNamed(project.ProjectItems, Path.GetFileName(hPath)))
- {
- System.Windows.Forms.MessageBox.Show("A file named '" + Path.GetFileName(hPath) +
- "' already exists.\n" + "If you want to add '" +
- Path.GetFileName(fullPath) + "' first remove " +
- " '" + Path.GetFileName(cppPath) + "' and '" +
- Path.GetFileName(hPath) + "' from your project.",
- "Ice Visual Studio Extension",
- System.Windows.Forms.MessageBoxButtons.OK,
- System.Windows.Forms.MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
- item.Name = oldName;
- return;
- }
- }
-
- // Do a full build on a rename
- clearErrors(project);
- buildProject(project, false, vsBuildScope.vsBuildScopeProject);
- }
- catch(Exception ex)
- {
- write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
- }
- }
private void removeDependency(Project project, String path)
{
- if(_dependenciesMap.ContainsKey(project.Name))
+ DependenciesMap dependenciesMap = getDependenciesMap();
+ if(dependenciesMap.ContainsKey(project.Name))
{
- // TODO: case-sensitive filename comparison?
- if(_dependenciesMap[project.Name].ContainsKey(path))
+ if(dependenciesMap[project.Name].ContainsKey(path))
{
- _dependenciesMap[project.Name].Remove(path);
+ dependenciesMap[project.Name].Remove(path);
}
}
}
@@ -1432,15 +1985,17 @@ namespace Ice.VisualStudio
removeCppGeneratedItems(project, file.FullPath, true);
//
- // It appears that file is not actually removed from disk at this
- // point. Thus we need to delay dependency update until after delete,
- // or after remove command has been executed.
+ // It appears that the file is not actually removed from disk at this
+ // point. Thus we need to delay dependency updates until after delete,
+ // or after the remove command has been executed.
//
_deletedFile = file.FullPath;
}
catch(Exception ex)
{
- write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
}
@@ -1488,21 +2043,20 @@ namespace Ice.VisualStudio
}
if(Util.isCppProject(project))
{
- string cppPath =
- getCppGeneratedFileName(Path.GetDirectoryName(project.FullName), file.FullPath, "cpp");
- string hPath = Path.ChangeExtension(cppPath, ".h");
+ string cppPath = getCppGeneratedFileName(project, file.FullPath, Util.getSourceExt(project));
+ string hPath = Path.ChangeExtension(cppPath, "." + Util.getHeaderExt(project));
if(File.Exists(cppPath) || Util.hasItemNamed(project.ProjectItems, Path.GetFileName(cppPath)))
{
- System.Windows.Forms.MessageBox.Show("A file named '" + Path.GetFileName(cppPath) +
- "' already exists.\n" + "If you want to add '" +
- Path.GetFileName(fullPath) + "' first remove " +
- " '" + Path.GetFileName(cppPath) + "' and '" +
- Path.GetFileName(hPath) + "'.",
- "Ice Visual Studio Extension",
- System.Windows.Forms.MessageBoxButtons.OK,
- System.Windows.Forms.MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
+ MessageBox.Show("A file named '" + Path.GetFileName(cppPath) +
+ "' already exists.\n" + "If you want to add '" +
+ Path.GetFileName(fullPath) + "' first remove " +
+ " '" + Path.GetFileName(cppPath) + "' and '" +
+ Path.GetFileName(hPath) + "'.",
+ "Ice Visual Studio Add-In",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0);
_deleted.Add(fullPath);
item.Remove();
return;
@@ -1510,16 +2064,16 @@ namespace Ice.VisualStudio
if(File.Exists(hPath) || Util.hasItemNamed(project.ProjectItems, Path.GetFileName(hPath)))
{
- System.Windows.Forms.MessageBox.Show("A file named '" + Path.GetFileName(hPath) +
- "' already exists.\n" + "If you want to add '" +
- Path.GetFileName(fullPath) + "' first remove " +
- " '" + Path.GetFileName(cppPath) + "' and '" +
- Path.GetFileName(hPath) + "'.",
- "Ice Visual Studio Extension",
- System.Windows.Forms.MessageBoxButtons.OK,
- System.Windows.Forms.MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
+ MessageBox.Show("A file named '" + Path.GetFileName(hPath) +
+ "' already exists.\n" + "If you want to add '" +
+ Path.GetFileName(fullPath) + "' first remove " +
+ " '" + Path.GetFileName(cppPath) + "' and '" +
+ Path.GetFileName(hPath) + "'.",
+ "Ice Visual Studio Add-In",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0);
_deleted.Add(fullPath);
item.Remove();
return;
@@ -1531,57 +2085,9 @@ namespace Ice.VisualStudio
}
catch(Exception ex)
{
- write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
- }
- }
-
- private void csharpItemRenamed(ProjectItem item, string oldName)
- {
- try
- {
- if(item == null || _fileTracker == null || String.IsNullOrEmpty(oldName) ||
- item.ContainingProject == null)
- {
- return;
- }
- if(!Util.isSliceBuilderEnabled(item.ContainingProject))
- {
- return;
- }
- if(!Util.isSliceFilename(oldName) || !Util.isProjectItemFile(item))
- {
- return;
- }
-
- //Get rid of generated files, for the .ice removed file.
- _fileTracker.reap(item.ContainingProject);
-
- string fullPath = item.Properties.Item("FullPath").Value.ToString();
- if(Util.isCSharpProject(item.ContainingProject))
- {
- string csPath = Path.ChangeExtension(fullPath, ".cs");
- if(File.Exists(csPath) ||
- Util.hasItemNamed(item.ContainingProject.ProjectItems, Path.GetFileName(csPath)))
- {
- System.Windows.Forms.MessageBox.Show("A file named '" + Path.GetFileName(csPath) +
- "' already exists.\n" + oldName +
- " could not be renamed to '" + item.Name + "'.",
- "Ice Visual Studio Extension",
- System.Windows.Forms.MessageBoxButtons.OK,
- System.Windows.Forms.MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
- item.Name = oldName;
- return;
- }
- }
-
- clearErrors(item.ContainingProject);
- buildProject(item.ContainingProject, false, vsBuildScope.vsBuildScopeProject);
- }
- catch(Exception ex)
- {
- write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
}
@@ -1589,7 +2095,7 @@ namespace Ice.VisualStudio
{
try
{
- if(item == null || _fileTracker == null)
+ if(item == null)
{
return;
}
@@ -1616,7 +2122,9 @@ namespace Ice.VisualStudio
}
catch(Exception ex)
{
- write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
}
@@ -1646,25 +2154,21 @@ namespace Ice.VisualStudio
string fullPath = item.Properties.Item("FullPath").Value.ToString();
Project project = item.ContainingProject;
- if(project == null)
- {
- return;
- }
String csPath = getCSharpGeneratedFileName(project, item, "cs");
ProjectItem csItem = Util.findItem(csPath, project.ProjectItems);
if(File.Exists(csPath) || csItem != null)
{
- System.Windows.Forms.MessageBox.Show("A file named '" + Path.GetFileName(csPath) +
- "' already exists.\n" + "If you want to add '" +
- Path.GetFileName(fullPath) + "' first remove " +
- " '" + Path.GetFileName(csPath) + "'.",
- "Ice Visual Studio Extension",
- System.Windows.Forms.MessageBoxButtons.OK,
- System.Windows.Forms.MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
+ MessageBox.Show("A file named '" + Path.GetFileName(csPath) +
+ "' already exists.\n" + "If you want to add '" +
+ Path.GetFileName(fullPath) + "' first remove " +
+ " '" + Path.GetFileName(csPath) + "'.",
+ "Ice Visual Studio Add-In",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0);
_deleted.Add(fullPath);
item.Remove();
return;
@@ -1675,7 +2179,9 @@ namespace Ice.VisualStudio
}
catch(Exception ex)
{
- write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
}
@@ -1686,7 +2192,7 @@ namespace Ice.VisualStudio
return;
}
- if(item.Name == null)
+ if(String.IsNullOrEmpty(item.Name))
{
return;
}
@@ -1697,29 +2203,32 @@ namespace Ice.VisualStudio
}
String generatedPath = getCSharpGeneratedFileName(item.ContainingProject, item, "cs");
- if(!String.IsNullOrEmpty(generatedPath))
+ if(String.IsNullOrEmpty(generatedPath))
{
- FileInfo generatedFileInfo = new FileInfo(generatedPath);
- if(File.Exists(generatedFileInfo.FullName))
- {
- File.Delete(generatedFileInfo.FullName);
- }
+ return;
+ }
- if(remove)
+ FileInfo generatedFileInfo = new FileInfo(generatedPath);
+ if(File.Exists(generatedFileInfo.FullName))
+ {
+ File.Delete(generatedFileInfo.FullName);
+ }
+
+ if(remove)
+ {
+ ProjectItem generated =
+ Util.findItem(generatedFileInfo.FullName, item.ContainingProject.ProjectItems);
+ if(generated != null)
{
- ProjectItem generated =
- Util.findItem(generatedFileInfo.FullName, item.ContainingProject.ProjectItems);
- if(generated != null)
- {
- generated.Remove();
- }
+ generated.Remove();
}
}
}
private static void removeCppGeneratedItems(ProjectItems items, bool remove)
{
- foreach(ProjectItem i in items)
+ List<ProjectItem> tmpItems = Util.clone(items);
+ foreach(ProjectItem i in tmpItems)
{
if(Util.isProjectItemFile(i))
{
@@ -1746,7 +2255,7 @@ namespace Ice.VisualStudio
return;
}
- if(item.Name == null)
+ if(String.IsNullOrEmpty(item.Name))
{
return;
}
@@ -1756,37 +2265,48 @@ namespace Ice.VisualStudio
return;
}
removeCppGeneratedItems(item.ContainingProject, item.Properties.Item("FullPath").Value.ToString(), remove);
- }
-
- // Delete from disk, remove from project if remove=true
- public static void deleteProjectItem(Project project, string file, bool remove)
- {
- if (remove)
- {
- ProjectItem generated = Util.findItem(file, project.ProjectItems);
- if (generated != null)
- {
- generated.Remove();
- }
- }
- if (File.Exists(file))
- {
- File.Delete(file);
- }
- }
-
+ }
+
+ // Delete from disk, remove from project if remove=true
+ public static void deleteProjectItem(Project project, string file, bool remove)
+ {
+ if(File.Exists(file))
+ {
+ File.Delete(file);
+ }
+
+ if(remove)
+ {
+ ProjectItem generated = Util.findItem(file, project.ProjectItems);
+ if(generated != null)
+ {
+ generated.Remove();
+ }
+ }
+ }
+
public static void removeCppGeneratedItems(Project project, String slice, bool remove)
{
- String projectDir = Path.GetDirectoryName(project.FileName);
- FileInfo hFileInfo = new FileInfo(getCppGeneratedFileName(projectDir, slice, "h"));
- FileInfo cppFileInfo = new FileInfo(Path.ChangeExtension(hFileInfo.FullName, "cpp"));
-
- deleteProjectItem(project, hFileInfo.FullName, remove);
+ FileInfo hFileInfo = new FileInfo(getCppGeneratedFileName(project, slice, Util.getHeaderExt(project)));
+ FileInfo cppFileInfo = new FileInfo(Path.ChangeExtension(hFileInfo.FullName, Util.getSourceExt(project)));
+
+ deleteProjectItem(project, hFileInfo.FullName, remove);
deleteProjectItem(project, cppFileInfo.FullName, remove);
}
private bool runSliceCompiler(Project project, string sliceCompiler, string file, string outputDir)
{
+ if(!File.Exists(sliceCompiler))
+ {
+ Util.write(project, Util.msgLevel.msgError,
+ "'" + sliceCompiler + "' not found. Review 'Ice Home' setting in Ice Configuration for " +
+ Util.quote(project.Name) + ".\n");
+ addError(project, file, TaskErrorCategory.Error, 0, 0,
+ "'" + sliceCompiler + "' not found. Review 'Ice Home' setting in Ice Configuration for " +
+ Util.quote(project.Name) + ".\n");
+ return false;
+ }
+
string args = getSliceCompilerArgs(project, false);
if(!String.IsNullOrEmpty(outputDir))
@@ -1797,31 +2317,85 @@ namespace Ice.VisualStudio
}
args += " --output-dir " + Util.quote(outputDir) + " ";
}
-
+
args += " " + Util.quote(file);
- ProcessStartInfo processInfo = new ProcessStartInfo(sliceCompiler, args);
- processInfo.CreateNoWindow = true;
- processInfo.UseShellExecute = false;
- processInfo.RedirectStandardOutput = true;
- processInfo.RedirectStandardError = true;
- processInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(project.FileName);
-
- if(!File.Exists(sliceCompiler))
- {
- write(project, Util.msgLevel.msgError,
- "'" + sliceCompiler + "' not found. Review 'Ice Home' setting in Ice Configuration for " +
- Util.quote(project.Name) + ".\n");
- addError(project, file, TaskErrorCategory.Error, 0, 0,
- "'" + sliceCompiler + "' not found. Review 'Ice Home' setting in Ice Configuration for " +
- Util.quote(project.Name) + ".\n");
+
+ System.Diagnostics.Process process = new System.Diagnostics.Process();
+ process.StartInfo.FileName = sliceCompiler;
+ process.StartInfo.Arguments = args;
+ process.StartInfo.CreateNoWindow = true;
+ process.StartInfo.UseShellExecute = false;
+ process.StartInfo.RedirectStandardOutput = true;
+ process.StartInfo.RedirectStandardError = true;
+ process.StartInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(project.FileName);
+
+ StreamReader reader = new StreamReader();
+ process.OutputDataReceived += new DataReceivedEventHandler(reader.appendData);
+
+ Util.write(project, Util.msgLevel.msgInfo, sliceCompiler + " " + args + "\n");
+
+ if(!Directory.Exists(outputDir))
+ {
+ try
+ {
+ Directory.CreateDirectory(outputDir);
+ }
+ catch(System.IO.IOException ex)
+ {
+ Util.write(project, Util.msgLevel.msgError,
+ "An exception was thrown when trying to create the output directory.\n" +
+ ex.ToString());
+ addError(project, file, TaskErrorCategory.Error, 0, 0,
+ "An exception was thrown when trying to create the output directory.\n" + ex.ToString());
+ return false;
+ }
+ }
+
+ try
+ {
+ process.Start();
+ }
+ catch(InvalidOperationException ex)
+ {
+ Util.write(project, Util.msgLevel.msgError,
+ "An exception was thrown when trying to start the slice compiler\n" +
+ ex.ToString());
+ addError(project, file, TaskErrorCategory.Error, 0, 0,
+ "An exception was thrown when trying to start slice compiler\n" +
+ ex.ToString());
+ return false;
+ }
+ catch(System.ComponentModel.Win32Exception ex)
+ {
+ Util.write(project, Util.msgLevel.msgError,
+ "An exception was thrown when trying to start the slice compiler\n" +
+ ex.ToString());
+ addError(project, file, TaskErrorCategory.Error, 0, 0,
+ "An exception was thrown when trying to start slice compiler\n" +
+ ex.ToString());
return false;
- }
-
- write(project, Util.msgLevel.msgInfo, sliceCompiler + " " + args + "\n");
- System.Diagnostics.Process process = System.Diagnostics.Process.Start(processInfo);
+ }
+
+ //
+ // When StandardError and StandardOutput are redirected, at least one
+ // should use asynchronous reads to prevent deadlocks when calling
+ // process.WaitForExit; the other can be read synchronously using ReadToEnd.
+ //
+ // See the Remarks section in the below link:
+ //
+ // http://msdn.microsoft.com/en-us/library/system.diagnostics.process.standarderror.aspx
+ //
+
+ string stderr = process.StandardError.ReadToEnd();
+ // Start the asynchronous read of the standard output stream.
+ process.BeginOutputReadLine();
process.WaitForExit();
+ //
+ // slice2sl <= 0.3 doesn't print all errors to standard error, we check the slice2sl
+ // version to know if we need to parse standard output for errors.
+ //
bool standardError = true;
if(Util.isSilverlightProject(project))
{
@@ -1837,10 +2411,10 @@ namespace Ice.VisualStudio
}
}
- bool hasErrors = parseErrors(project, sliceCompiler, file, process.StandardError);
+ bool hasErrors = parseErrors(project, sliceCompiler, file, stderr);
if(!standardError)
{
- hasErrors = hasErrors || parseErrors(project, sliceCompiler, file, process.StandardOutput);
+ hasErrors = hasErrors || parseErrors(project, sliceCompiler, file, reader.data());
}
process.Close();
if(hasErrors)
@@ -1862,9 +2436,10 @@ namespace Ice.VisualStudio
return !hasErrors;
}
- private bool parseErrors(Project project, string sliceCompiler, string file, TextReader strer)
+ private bool parseErrors(Project project, string sliceCompiler, string file, string stderr)
{
bool hasErrors = false;
+ StringReader strer = new StringReader(stderr);
string errorMessage = strer.ReadLine();
bool firstLine = true;
@@ -1883,8 +2458,8 @@ namespace Ice.VisualStudio
}
errorMessage += "\n" + message;
message = strer.ReadLine();
- }
- write(project, Util.msgLevel.msgError, errorMessage + "\n");
+ }
+ Util.write(project, Util.msgLevel.msgError, errorMessage + "\n");
addError(project, file, TaskErrorCategory.Error, 0, 0, errorMessage.Replace("error:", ""));
break;
}
@@ -1893,16 +2468,16 @@ namespace Ice.VisualStudio
{
if(firstLine)
{
- errorMessage += strer.ReadToEnd();
- write(project, Util.msgLevel.msgError, errorMessage + "\n");
+ errorMessage += strer.ReadToEnd();
+ Util.write(project, Util.msgLevel.msgError, errorMessage + "\n");
addError(project, "", TaskErrorCategory.Error, 1, 1, errorMessage);
hasErrors = true;
break;
}
errorMessage = strer.ReadLine();
continue;
- }
- write(project, Util.msgLevel.msgError, errorMessage + "\n");
+ }
+ Util.write(project, Util.msgLevel.msgError, errorMessage + "\n");
if(errorMessage.StartsWith(" ", StringComparison.Ordinal)) // Still the same mcpp warning
{
@@ -1938,7 +2513,15 @@ namespace Ice.VisualStudio
{
l = Int16.Parse(n, CultureInfo.InvariantCulture);
}
- catch(Exception)
+ catch(OverflowException)
+ {
+ l = 0;
+ }
+ catch(FormatException)
+ {
+ l = 0;
+ }
+ catch(ArgumentException)
{
l = 0;
}
@@ -1954,8 +2537,8 @@ namespace Ice.VisualStudio
{
//
// Display only errors from this file or files outside the project.
- //
- bool currentFile = Util.equalPath(f, file);
+ //
+ bool currentFile = Util.equalPath(f, file, Path.GetDirectoryName(project.FileName));
bool found = Util.findItem(f, project.ProjectItems) != null;
TaskErrorCategory category = TaskErrorCategory.Error;
if(errorMessage.StartsWith("warning:", StringComparison.CurrentCultureIgnoreCase))
@@ -1968,14 +2551,14 @@ namespace Ice.VisualStudio
}
if(currentFile || !found)
{
- if(found)
- {
+ if(found)
+ {
addError(project, file, category, l, 1, errorMessage);
}
- else
- {
- write(project, Util.msgLevel.msgError,
- "from file: " + f + "\n" + errorMessage + "\n");
+ else
+ {
+ Util.write(project, Util.msgLevel.msgError,
+ "from file: " + f + "\n" + errorMessage + "\n");
addError(project, file, category, l, 1, "from file: " + f + "\n" + errorMessage);
}
}
@@ -2005,9 +2588,10 @@ namespace Ice.VisualStudio
}
catch(Exception ex)
{
- write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
- return null;
}
IVsProfferCommands vsProfferCmds = (IVsProfferCommands)objService;
return vsProfferCmds.FindCommandBar(IntPtr.Zero, ref guidCmdGroup, menuID) as CommandBar;
@@ -2024,9 +2608,26 @@ namespace Ice.VisualStudio
private void buildBegin(vsBuildScope scope, vsBuildAction action)
{
+ if(action == vsBuildAction.vsBuildActionBuild || action == vsBuildAction.vsBuildActionRebuildAll)
+ {
+ //
+ // Ensure slice compiler is only run once for parallel builds;
+ // no need to lock, this is always called from main thread.
+ //
+ if(!_sliceBuild)
+ {
+ _sliceBuild = true;
+ }
+ else
+ {
+ return;
+ }
+ }
+
try
{
_building = true;
+ _buildScope = scope;
if(action == vsBuildAction.vsBuildActionBuild || action == vsBuildAction.vsBuildActionRebuildAll)
{
switch(scope)
@@ -2034,6 +2635,7 @@ namespace Ice.VisualStudio
case vsBuildScope.vsBuildScopeProject:
{
Project project = getSelectedProject();
+ _buildProject = project;
if(project != null)
{
if(!Util.isSliceBuilderEnabled(project))
@@ -2043,21 +2645,21 @@ namespace Ice.VisualStudio
clearErrors(project);
if(action == vsBuildAction.vsBuildActionRebuildAll)
{
- cleanProject(project);
+ cleanProject(project, false);
}
buildProject(project, false, scope);
}
if(hasErrors(project))
{
bringErrorsToFront();
- write(project, Util.msgLevel.msgError,
- "------ Slice compilation contains errors. Build canceled. ------\n");
- if (_connectMode == ext_ConnectMode.ext_cm_CommandLine)
- {
- // Is this the best we can do? Is there a clean way to exit?
- Environment.Exit(-1);
- }
- _applicationObject.ExecuteCommand("Build.Cancel", "");
+ Util.write(project, Util.msgLevel.msgError,
+ "------ Slice compilation contains errors. Build canceled. ------\n");
+ if(_connectMode == ext_ConnectMode.ext_cm_CommandLine)
+ {
+ // Is this the best we can do? Is there a clean way to exit?
+ Environment.Exit(-1);
+ }
+ _applicationObject.ExecuteCommand("Build.Cancel", "");
}
break;
}
@@ -2074,22 +2676,22 @@ namespace Ice.VisualStudio
}
if(action == vsBuildAction.vsBuildActionRebuildAll)
{
- cleanProject(p);
+ cleanProject(p, false);
}
buildProject(p, false, scope);
}
}
if(hasErrors())
{
- bringErrorsToFront();
- write(null, Util.msgLevel.msgError,
- "------ Slice compilation contains errors. Build canceled. ------\n");
- if (_connectMode == ext_ConnectMode.ext_cm_CommandLine)
- {
- // Is this the best we can do? Is there a clean way to exit?
- Environment.Exit(-1);
- }
- _applicationObject.ExecuteCommand("Build.Cancel", "");
+ bringErrorsToFront();
+ Util.write(null, Util.msgLevel.msgError,
+ "------ Slice compilation contains errors. Build canceled. ------\n");
+ if(_connectMode == ext_ConnectMode.ext_cm_CommandLine)
+ {
+ // Is this the best we can do? Is there a clean way to exit?
+ Environment.Exit(-1);
+ }
+ _applicationObject.ExecuteCommand("Build.Cancel", "");
}
break;
}
@@ -2102,9 +2704,10 @@ namespace Ice.VisualStudio
case vsBuildScope.vsBuildScopeProject:
{
Project project = getSelectedProject();
+ _buildProject = project;
if(project != null)
{
- cleanProject(project);
+ cleanProject(project, false);
}
break;
}
@@ -2114,7 +2717,7 @@ namespace Ice.VisualStudio
{
if(p != null)
{
- cleanProject(p);
+ cleanProject(p, false);
}
}
break;
@@ -2124,8 +2727,11 @@ namespace Ice.VisualStudio
}
catch(Exception ex)
{
- write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
+ return;
}
//
@@ -2217,7 +2823,9 @@ namespace Ice.VisualStudio
}
catch(Exception ex)
{
- write(project, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.write(project, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
}
}
@@ -2225,7 +2833,7 @@ namespace Ice.VisualStudio
}
//
- // Add a error to slice builder error list provider.
+ // Add an error to slice builder error list provider.
//
private void addError(Project project, string file, TaskErrorCategory category, int line, int column,
string text)
@@ -2255,7 +2863,7 @@ namespace Ice.VisualStudio
}
//
- // True if there was any errors in last slice compilation.
+ // True if there were any errors in the last slice compilation.
//
private bool hasErrors()
{
@@ -2284,48 +2892,20 @@ namespace Ice.VisualStudio
return errors;
}
- private OutputWindowPane buildOutput()
+ public OutputWindowPane buildOutput()
{
if(_output == null)
- {
+ {
OutputWindow window = (OutputWindow)_applicationObject.Windows.Item(
EnvDTE.Constants.vsWindowKindOutput).Object;
_output = window.OutputWindowPanes.Item("Build");
}
return _output;
- }
-
- private void write(Project p, Util.msgLevel msgLevel, string message)
- {
- int verboseLevel = (int)Util.msgLevel.msgDebug;
- if (p != null)
- {
- try
- {
- verboseLevel = Int32.Parse(Util.getProjectProperty(p, Util.PropertyVerboseLevel));
- }
- catch
- {
- }
- }
-
- if ((int)msgLevel <= verboseLevel)
- {
- if (_connectMode != ext_ConnectMode.ext_cm_CommandLine)
- {
- OutputWindowPane pane = buildOutput();
- if (pane == null)
- {
- return;
- }
- pane.Activate();
- pane.OutputString(message);
- }
- else
- {
- System.Console.Write(message);
- }
- }
+ }
+
+ public ext_ConnectMode connectMode()
+ {
+ return _connectMode;
}
//
@@ -2353,13 +2933,342 @@ namespace Ice.VisualStudio
_errorListProvider.Navigate(task, new Guid(EnvDTE.Constants.vsViewKindTextView));
task.Line -= 1;
}
- catch
+ catch(Exception ex)
{
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
}
+ private DependenciesMap
+ getDependenciesMap()
+ {
+ if(_dependenciesMap == null)
+ {
+ _dependenciesMap = new DependenciesMap();
+ }
+ return _dependenciesMap;
+ }
+
+ private List<Project>
+ getRebuildProjects()
+ {
+ if(_rebuildProjects == null)
+ {
+ _rebuildProjects = new List<Project>();
+ }
+ return _rebuildProjects;
+ }
+
+ private IVsTrackProjectDocuments2 GetTrackProjectDocuments()
+ {
+ // get IServiceProvider (OLE version, not .NET version) from DTE object
+ IOleServiceProvider sp = (IOleServiceProvider)_applicationObject;
+
+ // retrieve IVsTrackProjectDocuments2 interface via QueryService
+ Guid guidSP = typeof(SVsTrackProjectDocuments).GUID;
+ Guid guidIID = typeof(IVsTrackProjectDocuments2).GUID;
+ object ptrUnknown;
+ int rc = sp.QueryService(ref guidSP, ref guidIID, out ptrUnknown);
+ if(ErrorHandler.Failed(rc))
+ {
+ try
+ {
+ ErrorHandler.ThrowOnFailure(rc);
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+ IVsTrackProjectDocuments2 vsTrackProjDocs = (IVsTrackProjectDocuments2)ptrUnknown;
+ return vsTrackProjDocs;
+ }
+
+ public void beginTrackDocumentEvents()
+ {
+ int rc = GetTrackProjectDocuments().AdviseTrackProjectDocumentsEvents(this, out _dwCookie);
+ if(ErrorHandler.Failed(rc))
+ {
+ try
+ {
+ ErrorHandler.ThrowOnFailure(rc);
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+ }
+
+ public void endTrackDocumentEvents()
+ {
+ int rc = GetTrackProjectDocuments().UnadviseTrackProjectDocumentsEvents(_dwCookie);
+ if(ErrorHandler.Failed(rc))
+ {
+ try
+ {
+ ErrorHandler.ThrowOnFailure(rc);
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+ }
+
+#region IVsTrackProjectDocumentsEvents2 Members
+
+ public int OnAfterAddDirectoriesEx(int cProjects, int cDirectories, IVsProject[] rgpProjects,
+ int[] rgFirstIndices, string[] rgpszMkDocuments,
+ VSADDDIRECTORYFLAGS[] rgFlags)
+ {
+ return 0;
+ }
+
+ public int OnAfterAddFilesEx(int cProjects, int cFiles, IVsProject[] rgpProjects, int[] rgFirstIndices,
+ string[] rgpszMkDocuments, VSADDFILEFLAGS[] rgFlags)
+ {
+ return 0;
+ }
+
+ public int OnAfterRemoveDirectories(int cProjects, int cDirectories, IVsProject[] rgpProjects,
+ int[] rgFirstIndices, string[] rgpszMkDocuments,
+ VSREMOVEDIRECTORYFLAGS[] rgFlags)
+ {
+ return 0;
+ }
+
+ public int OnAfterRemoveFiles(int cProjects, int cFiles, IVsProject[] rgpProjects, int[] rgFirstIndices,
+ string[] rgpszMkDocuments, VSREMOVEFILEFLAGS[] rgFlags)
+ {
+ return 0;
+ }
+
+ public int OnAfterRenameDirectories(int cProjects, int cDirs, IVsProject[] rgpProjects, int[] rgFirstIndices,
+ string[] rgszMkOldNames, string[] rgszMkNewNames,
+ VSRENAMEDIRECTORYFLAGS[] rgFlags)
+ {
+ return 0;
+ }
+
+ public int OnAfterRenameFiles(int cProjects, int cFiles, IVsProject[] rgpProjects, int[] rgFirstIndices,
+ string[] oldNames, string[] newNames, VSRENAMEFILEFLAGS[] rgFlags)
+ {
+ foreach(string newName in newNames)
+ {
+ if(!Util.isSliceFilename(newName))
+ {
+ continue;
+ }
+ ProjectItem item = Util.findItem(newName);
+ if(item == null)
+ {
+ continue;
+ }
+ Project project = item.ContainingProject;
+ if(project == null)
+ {
+ continue;
+ }
+ if(!Util.isSliceBuilderEnabled(project))
+ {
+ continue;
+ }
+ buildProject(project, false, vsBuildScope.vsBuildScopeProject);
+ }
+ return 0;
+ }
+
+ public int OnAfterSccStatusChanged(int cProjects, int cFiles, IVsProject[] rgpProjects, int[] rgFirstIndices,
+ string[] rgpszMkDocuments, uint[] rgdwSccStatus)
+ {
+ return 0;
+ }
+
+ public int OnQueryAddDirectories(IVsProject pProject, int cDirectories, string[] rgpszMkDocuments,
+ VSQUERYADDDIRECTORYFLAGS[] rgFlags,
+ VSQUERYADDDIRECTORYRESULTS[] pSummaryResult,
+ VSQUERYADDDIRECTORYRESULTS[] rgResults)
+ {
+ return 0;
+ }
+
+ public int OnQueryAddFiles(IVsProject pProject, int cFiles, string[] rgpszMkDocuments,
+ VSQUERYADDFILEFLAGS[] rgFlags, VSQUERYADDFILERESULTS[] pSummaryResult,
+ VSQUERYADDFILERESULTS[] rgResults)
+ {
+ return 0;
+ }
+
+ public int OnQueryRemoveDirectories(IVsProject pProject, int cDirectories, string[] rgpszMkDocuments,
+ VSQUERYREMOVEDIRECTORYFLAGS[] rgFlags,
+ VSQUERYREMOVEDIRECTORYRESULTS[] pSummaryResult,
+ VSQUERYREMOVEDIRECTORYRESULTS[] rgResults)
+ {
+ return 0;
+ }
+
+ public int OnQueryRemoveFiles(IVsProject pProject, int cFiles, string[] rgpszMkDocuments,
+ VSQUERYREMOVEFILEFLAGS[] rgFlags,
+ VSQUERYREMOVEFILERESULTS[] pSummaryResult,
+ VSQUERYREMOVEFILERESULTS[] rgResults)
+ {
+ return 0;
+ }
+
+ public int OnQueryRenameDirectories(IVsProject pProject, int cDirs, string[] rgszMkOldNames,
+ string[] rgszMkNewNames, VSQUERYRENAMEDIRECTORYFLAGS[] rgFlags,
+ VSQUERYRENAMEDIRECTORYRESULTS[] pSummaryResult,
+ VSQUERYRENAMEDIRECTORYRESULTS[] rgResults)
+ {
+ return 0;
+ }
+
+ public int OnQueryRenameFiles(IVsProject ivsProject, int cFiles, string[] oldNames, string[] newNames,
+ VSQUERYRENAMEFILEFLAGS[] rgFlags, VSQUERYRENAMEFILERESULTS[] pSummaryResult,
+ VSQUERYRENAMEFILERESULTS[] rgResults)
+ {
+ for(int i = 0; i < oldNames.Length; ++i)
+ {
+ string oldName = oldNames[i];
+ string newName = newNames[i];
+
+ if(String.IsNullOrEmpty(oldName) || String.IsNullOrEmpty(newName))
+ {
+ continue;
+ }
+
+ if(!Util.isSliceFilename(oldName) )
+ {
+ continue;
+ }
+ ProjectItem item = Util.findItem(oldName);
+ if(item == null)
+ {
+ continue;
+ }
+ if(!Util.isProjectItemFile(item))
+ {
+ continue;
+ }
+ Project project = item.ContainingProject;
+ if(project == null)
+ {
+ continue;
+ }
+ try
+ {
+ if(Util.isCSharpProject(project))
+ {
+ String csPath = getCSharpGeneratedFileName(project, newName, "cs");
+ if(File.Exists(csPath) || Util.findItem(csPath, project.ProjectItems) != null)
+ {
+ MessageBox.Show("A file named '" + Path.GetFileName(csPath) +
+ "' already exists.\n" + oldName +
+ " could not be renamed to '" + item.Name + "'.",
+ "Ice Visual Studio Add-In",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0);
+ return -1;
+ }
+
+ //
+ // Get rid of generated files, for the removed .ice file.
+ //
+ fileTracker().reap(project);
+
+ ProjectItem generatedItem = Util.findItem(getCSharpGeneratedFileName(project, item, "cs"),
+ project.ProjectItems);
+ if(generatedItem == null)
+ {
+ continue;
+ }
+ generatedItem.Delete();
+ }
+ else if(Util.isCppProject(project))
+ {
+ string cppPath = getCppGeneratedFileName(project, newName, "." + Util.getSourceExt(project));
+ string hPath = Path.ChangeExtension(cppPath, "." + Util.getHeaderExt(project));
+ if(File.Exists(cppPath) || Util.findItem(cppPath, project.ProjectItems) != null)
+ {
+ MessageBox.Show("A file named '" + Path.GetFileName(cppPath) +
+ "' already exists.\n" + "If you want to add '" +
+ Path.GetFileName(newName) + "' first remove " + " '" +
+ Path.GetFileName(cppPath) + "' and '" +
+ Path.GetFileName(hPath) + "' from your project.",
+ "Ice Visual Studio Add-In",
+ MessageBoxButtons.OK, MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1, (MessageBoxOptions)0);
+ return -1;
+ }
+
+ if(File.Exists(hPath) || Util.findItem(hPath, project.ProjectItems) != null)
+ {
+ MessageBox.Show("A file named '" + Path.GetFileName(hPath) +
+ "' already exists.\n" + "If you want to add '" +
+ Path.GetFileName(newName) + "' first remove " +
+ " '" + Path.GetFileName(cppPath) + "' and '" +
+ Path.GetFileName(hPath) + "' from your project.",
+ "Ice Visual Studio Add-In",
+ MessageBoxButtons.OK, MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1, (MessageBoxOptions)0);
+ return -1;
+ }
+
+ //
+ // Get rid of generated files, for the removed .ice file.
+ //
+ fileTracker().reap(project);
+
+ string cppGeneratedPath = getCppGeneratedFileName(project, oldName, Util.getSourceExt(project));
+ string hGeneratedPath = Path.ChangeExtension(cppGeneratedPath, Util.getHeaderExt(project));
+
+ ProjectItem generatedItem = Util.findItem(cppGeneratedPath, project.ProjectItems);
+ if(generatedItem != null)
+ {
+ generatedItem.Delete();
+ }
+
+ generatedItem = Util.findItem(hGeneratedPath, project.ProjectItems);
+ if(generatedItem != null)
+ {
+ generatedItem.Delete();
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+ return 0;
+ }
+
+ #endregion
+
+ private FileTracker fileTracker()
+ {
+ if(_fileTracker == null)
+ {
+ _fileTracker = new FileTracker();
+ }
+ return _fileTracker;
+ }
+
private DTE2 _applicationObject;
- private AddIn _addInInstance;
+ private AddIn _addInInstance;
private ext_ConnectMode _connectMode;
private SolutionEvents _solutionEvents;
private BuildEvents _buildEvents;
@@ -2372,16 +3281,50 @@ namespace Ice.VisualStudio
private List<ErrorTask> _errors;
private int _errorCount;
private FileTracker _fileTracker;
- private Dictionary<string, Dictionary<string, List<string>>> _dependenciesMap;
+ private DependenciesMap _dependenciesMap;
private string _deletedFile;
private OutputWindowPane _output;
private CommandEvents _addNewItemEvent;
private CommandEvents _addExistingItemEvent;
private CommandEvents _editRemoveEvent;
+ private CommandEvents _excludeFromProjectEvent;
private CommandEvents _editDeleteEvent;
+ private CommandEvents _buildCancelEvent;
+ private CommandEvents _buildCompileEvent;
+ private CommandEvents _debugStartEvent;
+ private CommandEvents _debugStartWithoutDebuggingEvent;
+ private CommandEvents _debugStartNewInstance;
private List<String> _deleted = new List<String>();
+ private List<Project> _rebuildProjects;
private Command _iceConfigurationCmd;
+
+ private string _excludedItem = null;
+
+ //
+ // The first of several parallel builds sets it to true in the "buildBegin"
+ // event handler, to ensure the slice compiler is run only once, then it's reset
+ // to false when the build ends or is canceled.
+ //
+ private bool _sliceBuild = false;
+
+ //
+ // True if build is in process, false otherwise.
+ //
private bool _building;
+
+ //
+ // If build is in process, this contains the build scope.
+ //
+ private vsBuildScope _buildScope = vsBuildScope.vsBuildScopeSolution;
+
+ //
+ // If build is in process and the build scope is "vsBuildScopeProject",
+ // this contains a reference to the project, otherwise it's null.
+ //
+ private Project _buildProject;
+
+
+ private uint _dwCookie;
}
}
diff --git a/vsaddin/src/Connect.cs b/vsaddin/src/Connect.cs
new file mode 100644
index 00000000000..05b4934bc47
--- /dev/null
+++ b/vsaddin/src/Connect.cs
@@ -0,0 +1,246 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Text;
+using System.IO;
+using System.Diagnostics;
+using System.Collections.Generic;
+using Extensibility;
+using EnvDTE;
+using EnvDTE80;
+using Microsoft.VisualStudio.CommandBars;
+using Microsoft.VisualStudio.VCProjectEngine;
+using Microsoft.VisualStudio.VCProject;
+using Microsoft.VisualStudio.Shell;
+using Microsoft.VisualStudio.Shell.Interop;
+using System.Resources;
+using System.Reflection;
+using System.Globalization;
+using System.Runtime.InteropServices;
+
+namespace Ice.VisualStudio
+{
+ [ComVisibleAttribute(true)]
+ public class Connect : IDTExtensibility2, IDTCommandTarget
+ {
+ [ComVisibleAttribute(false)]
+ public static Builder getBuilder()
+ {
+ return _builder;
+ }
+
+ [ComVisibleAttribute(false)]
+ public static DTE getCurrentDTE()
+ {
+ if(_builder == null)
+ {
+ return null;
+ }
+ return _builder.getCurrentDTE();
+ }
+
+ public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
+ {
+ try
+ {
+ _applicationObject = (DTE2)application;
+ _addInInstance = (AddIn)addInInst;
+
+ if(connectMode == ext_ConnectMode.ext_cm_Startup || connectMode == ext_ConnectMode.ext_cm_CommandLine)
+ {
+ if(_builder == null)
+ {
+
+ //
+ // This property is set to false to avoid VC++ "no matching rule" dialog, the property
+ // doesn't exist in VS2010
+ //
+#if VS2008
+ EnvDTE.Properties props = _applicationObject.get_Properties("Projects", "VCGeneral");
+ EnvDTE.Property prop = props.Item("ShowNoMatchingRuleDlg");
+ prop.Value = false;
+#endif
+ _builder = new Builder();
+ _builder.init(_applicationObject, connectMode, _addInInstance);
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ //
+ // VS calls this method to retrieve the status of the add-in commands.
+ //
+ public void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status,
+ ref object commandText)
+ {
+ try
+ {
+ if(neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone)
+ {
+ if(commandName == "Ice.VisualStudio.Connect.IceConfiguration")
+ {
+ Builder builder = getBuilder();
+ if(builder == null)
+ {
+ status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported;
+ return;
+ }
+ if(builder.isBuilding())
+ {
+ status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported;
+ return;
+ }
+ Project project = builder.getSelectedProject();
+
+ if(project == null)
+ {
+ ProjectItem item = Util.getSelectedProjectItem(_applicationObject.DTE);
+ if(item != null)
+ {
+ project = item.ContainingProject;
+ }
+ }
+
+ if(project == null)
+ {
+ status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported;
+ return;
+ }
+
+ if(!Util.isCppProject(project) && !Util.isCSharpProject(project) && !Util.isVBProject(project))
+ {
+ status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported;
+ return;
+ }
+ status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported |
+ vsCommandStatus.vsCommandStatusEnabled;
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ public void Exec(string commandName, vsCommandExecOption executeOption, ref object varIn, ref object varOut,
+ ref bool handled)
+ {
+ try
+ {
+ handled = false;
+ Builder builder = getBuilder();
+ if(builder == null)
+ {
+ return;
+ }
+
+ if(executeOption == vsCommandExecOption.vsCommandExecOptionDoDefault)
+ {
+ if(commandName == "Ice.VisualStudio.Connect.IceConfiguration")
+ {
+ Project project = builder.getSelectedProject();
+ if(project == null)
+ {
+ ProjectItem item = Util.getSelectedProjectItem(_applicationObject.DTE);
+ if(item != null)
+ {
+ project = item.ContainingProject;
+ }
+ }
+
+ if(project == null)
+ {
+ handled = false;
+ return;
+ }
+
+ if(Util.isCSharpProject(project))
+ {
+ if(Util.isSilverlightProject(project))
+ {
+ IceSilverlightConfigurationDialog dialog = new IceSilverlightConfigurationDialog(project);
+ dialog.ShowDialog();
+ }
+ else
+ {
+ IceCsharpConfigurationDialog dialog = new IceCsharpConfigurationDialog(project);
+ dialog.ShowDialog();
+ }
+ }
+ else if(Util.isVBProject(project))
+ {
+ IceVBConfigurationDialog dialog = new IceVBConfigurationDialog(project);
+ dialog.ShowDialog();
+ }
+ else if(Util.isCppProject(project))
+ {
+ IceCppConfigurationDialog dialog = new IceCppConfigurationDialog(project);
+ dialog.ShowDialog();
+ }
+ handled = true;
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ public void OnDisconnection(ext_DisconnectMode disconnectMode, ref Array custom)
+ {
+ try
+ {
+ if(disconnectMode == ext_DisconnectMode.ext_dm_HostShutdown ||
+ disconnectMode == ext_DisconnectMode.ext_dm_UserClosed)
+ {
+ if(_builder != null)
+ {
+ _builder.disconnect();
+ _builder.Dispose();
+ _builder = null;
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ public void OnAddInsUpdate(ref Array custom)
+ {
+ }
+
+ public void OnStartupComplete(ref Array custom)
+ {
+ }
+ public void OnBeginShutdown(ref Array custom)
+ {
+ }
+
+ private DTE2 _applicationObject;
+ private AddIn _addInInstance;
+ private static Builder _builder;
+ }
+}
diff --git a/vsaddin/src/ExtraCompilerOptionsView.Designer.cs b/vsaddin/src/ExtraCompilerOptionsView.Designer.cs
new file mode 100644
index 00000000000..7715c91215c
--- /dev/null
+++ b/vsaddin/src/ExtraCompilerOptionsView.Designer.cs
@@ -0,0 +1,87 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+namespace Ice.VisualStudio
+{
+ partial class ExtraCompilerOptionsView
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if(disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupExtraOptions = new System.Windows.Forms.GroupBox();
+ this.txtExtraOptions = new System.Windows.Forms.TextBox();
+ this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+ this.groupExtraOptions.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupExtraOptions
+ //
+ this.groupExtraOptions.Controls.Add(this.txtExtraOptions);
+ this.groupExtraOptions.Location = new System.Drawing.Point(5, 3);
+ this.groupExtraOptions.Name = "groupExtraOptions";
+ this.groupExtraOptions.Size = new System.Drawing.Size(487, 67);
+ this.groupExtraOptions.TabIndex = 0;
+ this.groupExtraOptions.TabStop = false;
+ this.groupExtraOptions.Text = "Extra Compiler Options";
+ //
+ // txtExtraOptions
+ //
+ this.txtExtraOptions.Location = new System.Drawing.Point(6, 19);
+ this.txtExtraOptions.Multiline = true;
+ this.txtExtraOptions.Name = "txtExtraOptions";
+ this.txtExtraOptions.Size = new System.Drawing.Size(475, 42);
+ this.txtExtraOptions.TabIndex = 0;
+ this.txtExtraOptions.TextChanged += new System.EventHandler(this.txtExtraOptions_TextChanged);
+ this.txtExtraOptions.Enter += new System.EventHandler(this.txtExtraOptions_Enter);
+ this.txtExtraOptions.LostFocus += new System.EventHandler(this.txtExtraOptions_LostFocus);
+ //
+ // ExtraCompilerOptionsView
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupExtraOptions);
+ this.Name = "ExtraCompilerOptionsView";
+ this.Size = new System.Drawing.Size(495, 75);
+ this.groupExtraOptions.ResumeLayout(false);
+ this.groupExtraOptions.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupExtraOptions;
+ private System.Windows.Forms.TextBox txtExtraOptions;
+ private System.Windows.Forms.ToolTip toolTip;
+ }
+}
diff --git a/vsaddin/src/ExtraCompilerOptionsView.cs b/vsaddin/src/ExtraCompilerOptionsView.cs
new file mode 100644
index 00000000000..c45c4b551b0
--- /dev/null
+++ b/vsaddin/src/ExtraCompilerOptionsView.cs
@@ -0,0 +1,146 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using EnvDTE;
+
+namespace Ice.VisualStudio
+{
+ public partial class ExtraCompilerOptionsView : UserControl
+ {
+ public ExtraCompilerOptionsView()
+ {
+ InitializeComponent();
+ toolTip.SetToolTip(txtExtraOptions, "Extra options passed to slice compiler.");
+ }
+
+ public void init(IceConfigurationDialog dialog, Project project)
+ {
+ _dialog = dialog;
+ _project = project;
+ }
+
+ public void load()
+ {
+ txtExtraOptions.Text = Util.getProjectProperty(_project, Util.PropertyIceExtraOptions);
+ }
+
+ public bool hasUnsavedChanges()
+ {
+ return !txtExtraOptions.Text.Trim().Equals(Util.getProjectProperty(_project, Util.PropertyIceExtraOptions),
+ StringComparison.CurrentCulture);
+ }
+
+ public bool apply(ref bool changed)
+ {
+ changed = false;
+ if(hasUnsavedChanges())
+ {
+ if(!checkExtraOptions())
+ {
+ txtExtraOptions.Focus();
+ return false;
+ }
+ Util.setProjectProperty(_project, Util.PropertyIceExtraOptions, txtExtraOptions.Text);
+ if(Util.isCppProject(_project))
+ {
+ //
+ // If header or source extension has changed, we need to delete generated items
+ // from the project. The new items will be added when the project is build, on dialog
+ // close.
+ //
+ if(!Util.getHeaderExt(_project).Equals(_headerExt) ||
+ !Util.getSourceExt(_project).Equals(_sourceExt))
+ {
+ Util.cleanProject(_project, true);
+ }
+ Util.setProjectProperty(_project, Util.PropertyIceHeaderExt, _headerExt);
+ Util.setProjectProperty(_project, Util.PropertyIceSourceExt, _sourceExt);
+ }
+ changed = true;
+ _dialog.needSave();
+ }
+ return true;
+ }
+
+ public void setEnabled(bool enabled)
+ {
+ txtExtraOptions.Enabled = enabled;
+ }
+
+ private void txtExtraOptions_Enter(object sender, EventArgs e)
+ {
+ if(_dialog.editingIncludeDir())
+ {
+ _dialog.endEditIncludeDir(true);
+ }
+ }
+
+ private void txtExtraOptions_LostFocus(object sender, EventArgs e)
+ {
+ _dialog.needSave();
+ }
+
+ private void txtExtraOptions_TextChanged(object sender, EventArgs e)
+ {
+ _dialog.needSave();
+ }
+
+ private bool parseSlice2slOptions()
+ {
+ Options opts = null;
+ return Util.parseSlice2slOptions(txtExtraOptions.Text, true, ref opts);
+ }
+
+ private bool parseSlice2csOptions()
+ {
+ Options opts = null;
+ return Util.parseSlice2csOptions(txtExtraOptions.Text, true, ref opts);
+ }
+
+ private bool parseSlice2cppOptions()
+ {
+ Options opts = null;
+ _headerExt = ".h";
+ _sourceExt = ".cpp";
+ return Util.parseSlice2cppOptions(txtExtraOptions.Text, true, ref opts, ref _headerExt, ref _sourceExt);
+ }
+
+ private bool checkExtraOptions()
+ {
+ if(Util.isCppProject(_project))
+ {
+ return parseSlice2cppOptions();
+ }
+ else if(Util.isCSharpProject(_project))
+ {
+ if(Util.isSilverlightProject(_project))
+ {
+ return parseSlice2slOptions();
+ }
+ else
+ {
+ return parseSlice2csOptions();
+ }
+ }
+ return true;
+ }
+
+ private IceConfigurationDialog _dialog;
+ private Project _project;
+ private string _headerExt = "h";
+ private string _sourceExt = "cpp";
+ }
+}
diff --git a/vsaddin/src/ExtraCompilerOptionsView.resx b/vsaddin/src/ExtraCompilerOptionsView.resx
new file mode 100644
index 00000000000..a5979aadfff
--- /dev/null
+++ b/vsaddin/src/ExtraCompilerOptionsView.resx
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+</root> \ No newline at end of file
diff --git a/vsplugin/src/FileTracker.cs b/vsaddin/src/FileTracker.cs
index 1900b6a660f..9ede51efde9 100644
--- a/vsplugin/src/FileTracker.cs
+++ b/vsaddin/src/FileTracker.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
@@ -19,7 +19,7 @@ namespace Ice.VisualStudio
{
public FileTracker()
{
- _files = new Dictionary<string, Dictionary<string,List<string>>>();
+ _files = new Dictionary<string, Dictionary<string, List<string>>>();
}
public void clear()
@@ -50,11 +50,11 @@ namespace Ice.VisualStudio
foreach(KeyValuePair<String, List<String>> k in projectFiles)
{
if(Path.GetFileName(k.Key).Equals(Path.GetFileName(Path.ChangeExtension(generated, ".ice")),
- StringComparison.CurrentCultureIgnoreCase))
+ StringComparison.CurrentCultureIgnoreCase))
{
foreach(String path in k.Value)
{
- if (Util.equalPath(path, generated))
+ if(Util.equalPath(path, generated, Path.GetDirectoryName(project.FileName)))
{
found = true;
break;
@@ -116,11 +116,13 @@ namespace Ice.VisualStudio
foreach(KeyValuePair<string, List<string>> i in projectFiles)
{
ProjectItem item = Util.findItem(i.Key, project.ProjectItems);
- if(item == null) //Slice file not longer in the project.
+ if(item == null) // Slice file no longer in the project.
{
removedSlice.Add(i.Key);
- //Remove generated files for the slice.
+ //
+ // Remove generated files corresponding to the Slice file.
+ //
List<String> removedFiles = new List<string>();
List<ProjectItem> generated = new List<ProjectItem>();
foreach(string f in i.Value)
@@ -168,8 +170,11 @@ namespace Ice.VisualStudio
projectFiles.Remove(slice);
}
}
- catch(Exception)
+ catch(Exception ex)
{
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
}
finally
{
diff --git a/vsplugin/src/IceCppConfigurationDialog.Designer.cs b/vsaddin/src/IceCppConfigurationDialog.Designer.cs
index 1cc950c4ca9..61c6c6a3182 100644
--- a/vsplugin/src/IceCppConfigurationDialog.Designer.cs
+++ b/vsaddin/src/IceCppConfigurationDialog.Designer.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
@@ -36,471 +36,362 @@ namespace Ice.VisualStudio
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.chkEnableBuilder = new System.Windows.Forms.CheckBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.btnEditInclude = new System.Windows.Forms.Button();
- this.includeInfo = new System.Windows.Forms.Label();
- this.btnMoveIncludeDown = new System.Windows.Forms.Button();
- this.btnMoveIncludeUp = new System.Windows.Forms.Button();
- this.btnRemoveInclude = new System.Windows.Forms.Button();
- this.btnAddInclude = new System.Windows.Forms.Button();
- this.includeDirList = new System.Windows.Forms.CheckedListBox();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.txtExtraOptions = new System.Windows.Forms.TextBox();
- this.groupBox3 = new System.Windows.Forms.GroupBox();
- this.chkIceUtil = new System.Windows.Forms.CheckBox();
- this.chkFreeze = new System.Windows.Forms.CheckBox();
- this.chkIceStorm = new System.Windows.Forms.CheckBox();
- this.chkIceSSL = new System.Windows.Forms.CheckBox();
- this.chkIcePatch2 = new System.Windows.Forms.CheckBox();
- this.chkIceGrid = new System.Windows.Forms.CheckBox();
- this.chkIceBox = new System.Windows.Forms.CheckBox();
- this.chkGlacier2 = new System.Windows.Forms.CheckBox();
- this.chkIce = new System.Windows.Forms.CheckBox();
- this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.label1 = new System.Windows.Forms.Label();
- this.comboBoxVerboseLevel = new System.Windows.Forms.ComboBox();
- this.chkChecksum = new System.Windows.Forms.CheckBox();
- this.chkIcePrefix = new System.Windows.Forms.CheckBox();
- this.chkStreaming = new System.Windows.Forms.CheckBox();
- this.btnClose = new System.Windows.Forms.Button();
- this.groupBox5 = new System.Windows.Forms.GroupBox();
- this.btnSelectIceHome = new System.Windows.Forms.Button();
- this.txtIceHome = new System.Windows.Forms.TextBox();
- this.toolTip = new System.Windows.Forms.ToolTip(this.components);
- this.grouDllExportSymbol = new System.Windows.Forms.GroupBox();
- this.txtDllExportSymbol = new System.Windows.Forms.TextBox();
- this.groupBox1.SuspendLayout();
- this.groupBox2.SuspendLayout();
- this.groupBox3.SuspendLayout();
- this.groupBox4.SuspendLayout();
- this.groupBox5.SuspendLayout();
- this.grouDllExportSymbol.SuspendLayout();
- this.SuspendLayout();
- //
- // chkEnableBuilder
- //
- this.chkEnableBuilder.AutoSize = true;
- this.chkEnableBuilder.Location = new System.Drawing.Point(12, 13);
- this.chkEnableBuilder.Name = "chkEnableBuilder";
- this.chkEnableBuilder.Size = new System.Drawing.Size(112, 17);
- this.chkEnableBuilder.TabIndex = 0;
- this.chkEnableBuilder.Text = "Enable Ice Builder";
- this.chkEnableBuilder.UseVisualStyleBackColor = true;
- this.chkEnableBuilder.CheckedChanged += new System.EventHandler(this.chkEnableBuilder_CheckedChanged);
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.btnEditInclude);
- this.groupBox1.Controls.Add(this.includeInfo);
- this.groupBox1.Controls.Add(this.btnMoveIncludeDown);
- this.groupBox1.Controls.Add(this.btnMoveIncludeUp);
- this.groupBox1.Controls.Add(this.btnRemoveInclude);
- this.groupBox1.Controls.Add(this.btnAddInclude);
- this.groupBox1.Controls.Add(this.includeDirList);
- this.groupBox1.Location = new System.Drawing.Point(12, 214);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(487, 169);
- this.groupBox1.TabIndex = 1;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Slice Include Path";
- //
- // btnEditInclude
- //
- this.btnEditInclude.Location = new System.Drawing.Point(405, 46);
- this.btnEditInclude.Name = "btnEditInclude";
- this.btnEditInclude.Size = new System.Drawing.Size(75, 23);
- this.btnEditInclude.TabIndex = 11;
- this.btnEditInclude.Text = "Edit";
- this.btnEditInclude.UseVisualStyleBackColor = true;
- this.btnEditInclude.Click += new System.EventHandler(this.btnEdit_Click);
- //
- // includeInfo
- //
- this.includeInfo.AutoSize = true;
- this.includeInfo.Location = new System.Drawing.Point(7, 146);
- this.includeInfo.Name = "includeInfo";
- this.includeInfo.Size = new System.Drawing.Size(315, 13);
- this.includeInfo.TabIndex = 12;
- this.includeInfo.Text = "Select checkboxes for absolute paths, deselect for relative paths.";
- //
- // btnMoveIncludeDown
- //
- this.btnMoveIncludeDown.Location = new System.Drawing.Point(405, 127);
- this.btnMoveIncludeDown.Name = "btnMoveIncludeDown";
- this.btnMoveIncludeDown.Size = new System.Drawing.Size(75, 23);
- this.btnMoveIncludeDown.TabIndex = 14;
- this.btnMoveIncludeDown.Text = "Down";
- this.btnMoveIncludeDown.UseVisualStyleBackColor = true;
- this.btnMoveIncludeDown.Click += new System.EventHandler(this.btnMoveIncludeDown_Click);
- //
- // btnMoveIncludeUp
- //
- this.btnMoveIncludeUp.Location = new System.Drawing.Point(405, 100);
- this.btnMoveIncludeUp.Name = "btnMoveIncludeUp";
- this.btnMoveIncludeUp.Size = new System.Drawing.Size(75, 23);
- this.btnMoveIncludeUp.TabIndex = 13;
- this.btnMoveIncludeUp.Text = "Up";
- this.btnMoveIncludeUp.UseVisualStyleBackColor = true;
- this.btnMoveIncludeUp.Click += new System.EventHandler(this.btnMoveIncludeUp_Click);
- //
- // btnRemoveInclude
- //
- this.btnRemoveInclude.Location = new System.Drawing.Point(405, 73);
- this.btnRemoveInclude.Name = "btnRemoveInclude";
- this.btnRemoveInclude.Size = new System.Drawing.Size(75, 23);
- this.btnRemoveInclude.TabIndex = 12;
- this.btnRemoveInclude.Text = "Remove";
- this.btnRemoveInclude.UseVisualStyleBackColor = true;
- this.btnRemoveInclude.Click += new System.EventHandler(this.btnRemoveInclude_Click);
- //
- // btnAddInclude
- //
- this.btnAddInclude.Location = new System.Drawing.Point(405, 19);
- this.btnAddInclude.Name = "btnAddInclude";
- this.btnAddInclude.Size = new System.Drawing.Size(75, 23);
- this.btnAddInclude.TabIndex = 10;
- this.btnAddInclude.Text = "Add";
- this.btnAddInclude.UseVisualStyleBackColor = true;
- this.btnAddInclude.Click += new System.EventHandler(this.btnAddInclude_Click);
- //
- // includeDirList
- //
- this.includeDirList.FormattingEnabled = true;
- this.includeDirList.Location = new System.Drawing.Point(10, 19);
- this.includeDirList.Name = "includeDirList";
- this.includeDirList.Size = new System.Drawing.Size(390, 124);
- this.includeDirList.TabIndex = 9;
- this.includeDirList.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.includeDirList_ItemCheck);
- this.includeDirList.SelectedIndexChanged += new System.EventHandler(this.includeDirList_SelectedIndexChanged);
- //
- // groupBox2
- //
- this.groupBox2.Controls.Add(this.txtExtraOptions);
- this.groupBox2.Location = new System.Drawing.Point(12, 138);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(487, 70);
- this.groupBox2.TabIndex = 2;
- this.groupBox2.TabStop = false;
- this.groupBox2.Text = "Extra Compiler Options";
- //
- // txtExtraOptions
- //
- this.txtExtraOptions.Location = new System.Drawing.Point(6, 19);
- this.txtExtraOptions.Multiline = true;
- this.txtExtraOptions.Name = "txtExtraOptions";
- this.txtExtraOptions.Size = new System.Drawing.Size(474, 40);
- this.txtExtraOptions.TabIndex = 8;
- this.txtExtraOptions.Enter += new System.EventHandler(this.txtExtraOptions_Focus);
- this.txtExtraOptions.LostFocus += new System.EventHandler(this.txtExtraOptions_LostFocus);
- //
- // groupBox3
- //
- this.groupBox3.Controls.Add(this.chkIceUtil);
- this.groupBox3.Controls.Add(this.chkFreeze);
- this.groupBox3.Controls.Add(this.chkIceStorm);
- this.groupBox3.Controls.Add(this.chkIceSSL);
- this.groupBox3.Controls.Add(this.chkIcePatch2);
- this.groupBox3.Controls.Add(this.chkIceGrid);
- this.groupBox3.Controls.Add(this.chkIceBox);
- this.groupBox3.Controls.Add(this.chkGlacier2);
- this.groupBox3.Controls.Add(this.chkIce);
- this.groupBox3.Location = new System.Drawing.Point(12, 438);
- this.groupBox3.Name = "groupBox3";
- this.groupBox3.Size = new System.Drawing.Size(486, 62);
- this.groupBox3.TabIndex = 3;
- this.groupBox3.TabStop = false;
- this.groupBox3.Text = "Ice Components";
- //
- // chkIceUtil
- //
- this.chkIceUtil.AutoSize = true;
- this.chkIceUtil.Location = new System.Drawing.Point(74, 39);
- this.chkIceUtil.Name = "chkIceUtil";
- this.chkIceUtil.Size = new System.Drawing.Size(56, 17);
- this.chkIceUtil.TabIndex = 24;
- this.chkIceUtil.TabStop = false;
- this.chkIceUtil.Text = "IceUtil";
- this.chkIceUtil.UseVisualStyleBackColor = true;
- this.chkIceUtil.CheckedChanged += new System.EventHandler(this.chkIceUtil_CheckedChanged);
- //
- // chkFreeze
- //
- this.chkFreeze.AutoSize = true;
- this.chkFreeze.Location = new System.Drawing.Point(7, 19);
- this.chkFreeze.Name = "chkFreeze";
- this.chkFreeze.Size = new System.Drawing.Size(58, 17);
- this.chkFreeze.TabIndex = 16;
- this.chkFreeze.Text = "Freeze";
- this.chkFreeze.UseVisualStyleBackColor = true;
- this.chkFreeze.CheckedChanged += new System.EventHandler(this.chkFreeze_CheckedChanged);
- //
- // chkIceStorm
- //
- this.chkIceStorm.AutoSize = true;
- this.chkIceStorm.Location = new System.Drawing.Point(7, 39);
- this.chkIceStorm.Name = "chkIceStorm";
- this.chkIceStorm.Size = new System.Drawing.Size(68, 17);
- this.chkIceStorm.TabIndex = 23;
- this.chkIceStorm.TabStop = false;
- this.chkIceStorm.Text = "IceStorm";
- this.chkIceStorm.UseVisualStyleBackColor = true;
- this.chkIceStorm.CheckedChanged += new System.EventHandler(this.chkIceStorm_CheckedChanged);
- //
- // chkIceSSL
- //
- this.chkIceSSL.AutoSize = true;
- this.chkIceSSL.Location = new System.Drawing.Point(419, 19);
- this.chkIceSSL.Name = "chkIceSSL";
- this.chkIceSSL.Size = new System.Drawing.Size(61, 17);
- this.chkIceSSL.TabIndex = 22;
- this.chkIceSSL.TabStop = false;
- this.chkIceSSL.Text = "IceSSL";
- this.chkIceSSL.UseVisualStyleBackColor = true;
- this.chkIceSSL.CheckedChanged += new System.EventHandler(this.chkIceSSL_CheckedChanged);
- //
- // chkIcePatch2
- //
- this.chkIcePatch2.AutoSize = true;
- this.chkIcePatch2.Location = new System.Drawing.Point(335, 19);
- this.chkIcePatch2.Name = "chkIcePatch2";
- this.chkIcePatch2.Size = new System.Drawing.Size(75, 17);
- this.chkIcePatch2.TabIndex = 21;
- this.chkIcePatch2.TabStop = false;
- this.chkIcePatch2.Text = "IcePatch2";
- this.chkIcePatch2.UseVisualStyleBackColor = true;
- this.chkIcePatch2.CheckedChanged += new System.EventHandler(this.chkIcePatch2_CheckedChanged);
- //
- // chkIceGrid
- //
- this.chkIceGrid.AutoSize = true;
- this.chkIceGrid.Location = new System.Drawing.Point(266, 19);
- this.chkIceGrid.Name = "chkIceGrid";
- this.chkIceGrid.Size = new System.Drawing.Size(60, 17);
- this.chkIceGrid.TabIndex = 20;
- this.chkIceGrid.TabStop = false;
- this.chkIceGrid.Text = "IceGrid";
- this.chkIceGrid.UseVisualStyleBackColor = true;
- this.chkIceGrid.CheckedChanged += new System.EventHandler(this.chkIceGrid_CheckedChanged);
- //
- // chkIceBox
- //
- this.chkIceBox.AutoSize = true;
- this.chkIceBox.Location = new System.Drawing.Point(198, 19);
- this.chkIceBox.Name = "chkIceBox";
- this.chkIceBox.Size = new System.Drawing.Size(59, 17);
- this.chkIceBox.TabIndex = 19;
- this.chkIceBox.TabStop = false;
- this.chkIceBox.Text = "IceBox";
- this.chkIceBox.UseVisualStyleBackColor = true;
- this.chkIceBox.CheckedChanged += new System.EventHandler(this.chkIceBox_CheckedChanged);
- //
- // chkGlacier2
- //
- this.chkGlacier2.AutoSize = true;
- this.chkGlacier2.Location = new System.Drawing.Point(74, 19);
- this.chkGlacier2.Name = "chkGlacier2";
- this.chkGlacier2.Size = new System.Drawing.Size(65, 17);
- this.chkGlacier2.TabIndex = 17;
- this.chkGlacier2.TabStop = false;
- this.chkGlacier2.Text = "Glacier2";
- this.chkGlacier2.UseVisualStyleBackColor = true;
- this.chkGlacier2.CheckedChanged += new System.EventHandler(this.chkGlacier2_CheckedChanged);
- //
- // chkIce
- //
- this.chkIce.AutoSize = true;
- this.chkIce.Location = new System.Drawing.Point(148, 19);
- this.chkIce.Name = "chkIce";
- this.chkIce.Size = new System.Drawing.Size(41, 17);
- this.chkIce.TabIndex = 18;
- this.chkIce.TabStop = false;
- this.chkIce.Text = "Ice";
- this.chkIce.UseVisualStyleBackColor = true;
- this.chkIce.CheckedChanged += new System.EventHandler(this.chkIce_CheckedChanged);
- //
- // groupBox4
- //
- this.groupBox4.Controls.Add(this.label1);
- this.groupBox4.Controls.Add(this.comboBoxVerboseLevel);
- this.groupBox4.Controls.Add(this.chkChecksum);
- this.groupBox4.Controls.Add(this.chkIcePrefix);
- this.groupBox4.Controls.Add(this.chkStreaming);
- this.groupBox4.Location = new System.Drawing.Point(12, 88);
- this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(487, 44);
- this.groupBox4.TabIndex = 4;
- this.groupBox4.TabStop = false;
- this.groupBox4.Text = "Slice Compiler Options";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(286, 19);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(67, 13);
- this.label1.TabIndex = 8;
- this.label1.Text = "Trace Level:";
-
- //
- // comboBoxVerboseLevel
- //
- this.comboBoxVerboseLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxVerboseLevel.FormattingEnabled = true;
- this.comboBoxVerboseLevel.Items.AddRange(new object[] {
- "Errors",
- "Info",
- "Debug"});
- this.comboBoxVerboseLevel.Location = new System.Drawing.Point(359, 15);
- this.comboBoxVerboseLevel.Name = "comboBoxVerboseLevel";
- this.comboBoxVerboseLevel.Size = new System.Drawing.Size(121, 21);
- this.comboBoxVerboseLevel.TabIndex = 7;
- this.comboBoxVerboseLevel.SelectedIndexChanged += new System.EventHandler(this.comboBoxVerboseLevel_SelectedIndexChanged);
- //
- // chkChecksum
- //
- this.chkChecksum.AutoSize = true;
- this.chkChecksum.Location = new System.Drawing.Point(181, 19);
- this.chkChecksum.Name = "chkChecksum";
- this.chkChecksum.Size = new System.Drawing.Size(76, 17);
- this.chkChecksum.TabIndex = 5;
- this.chkChecksum.Text = "Checksum";
- this.chkChecksum.UseVisualStyleBackColor = true;
- this.chkChecksum.CheckedChanged += new System.EventHandler(this.chkChecksum_CheckedChanged);
- //
- // chkIcePrefix
- //
- this.chkIcePrefix.AutoSize = true;
- this.chkIcePrefix.Location = new System.Drawing.Point(10, 19);
- this.chkIcePrefix.Name = "chkIcePrefix";
- this.chkIcePrefix.Size = new System.Drawing.Size(41, 17);
- this.chkIcePrefix.TabIndex = 3;
- this.chkIcePrefix.Text = "Ice";
- this.chkIcePrefix.UseVisualStyleBackColor = true;
- this.chkIcePrefix.CheckedChanged += new System.EventHandler(this.chkIcePrefix_CheckedChanged);
- //
- // chkStreaming
- //
- this.chkStreaming.AutoSize = true;
- this.chkStreaming.Location = new System.Drawing.Point(86, 19);
- this.chkStreaming.Name = "chkStreaming";
- this.chkStreaming.Size = new System.Drawing.Size(73, 17);
- this.chkStreaming.TabIndex = 4;
- this.chkStreaming.Text = "Streaming";
- this.chkStreaming.UseVisualStyleBackColor = true;
- this.chkStreaming.CheckedChanged += new System.EventHandler(this.chkStreaming_CheckedChanged);
- //
- // btnClose
- //
- this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.btnClose.Location = new System.Drawing.Point(424, 506);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 25;
- this.btnClose.Text = "Close";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnCancel_Click);
- //
- // groupBox5
- //
- this.groupBox5.Controls.Add(this.btnSelectIceHome);
- this.groupBox5.Controls.Add(this.txtIceHome);
- this.groupBox5.Location = new System.Drawing.Point(12, 37);
- this.groupBox5.Name = "groupBox5";
- this.groupBox5.Size = new System.Drawing.Size(486, 45);
- this.groupBox5.TabIndex = 6;
- this.groupBox5.TabStop = false;
- this.groupBox5.Text = "Ice Home";
- //
- // btnSelectIceHome
- //
- this.btnSelectIceHome.Location = new System.Drawing.Point(405, 16);
- this.btnSelectIceHome.Name = "btnSelectIceHome";
- this.btnSelectIceHome.Size = new System.Drawing.Size(75, 23);
- this.btnSelectIceHome.TabIndex = 2;
- this.btnSelectIceHome.Text = "....";
- this.btnSelectIceHome.UseVisualStyleBackColor = true;
- this.btnSelectIceHome.Click += new System.EventHandler(this.btnSelectIceHome_Click);
- //
- // txtIceHome
- //
- this.txtIceHome.Location = new System.Drawing.Point(10, 20);
- this.txtIceHome.Name = "txtIceHome";
- this.txtIceHome.Size = new System.Drawing.Size(386, 20);
- this.txtIceHome.TabIndex = 1;
- this.txtIceHome.Enter += new System.EventHandler(this.txtIceHome_Focus);
- this.txtIceHome.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtIceHome_KeyPress);
- this.txtIceHome.LostFocus += new System.EventHandler(this.txtIceHome_LostFocus);
- //
- // grouDllExportSymbol
- //
- this.grouDllExportSymbol.Controls.Add(this.txtDllExportSymbol);
- this.grouDllExportSymbol.Location = new System.Drawing.Point(12, 389);
- this.grouDllExportSymbol.Name = "grouDllExportSymbol";
- this.grouDllExportSymbol.Size = new System.Drawing.Size(486, 43);
- this.grouDllExportSymbol.TabIndex = 7;
- this.grouDllExportSymbol.TabStop = false;
- this.grouDllExportSymbol.Text = "DLL Export Symbol";
- //
- // txtDllExportSymbol
- //
- this.txtDllExportSymbol.Location = new System.Drawing.Point(6, 16);
- this.txtDllExportSymbol.Name = "txtDllExportSymbol";
- this.txtDllExportSymbol.Size = new System.Drawing.Size(474, 20);
- this.txtDllExportSymbol.TabIndex = 15;
- this.txtDllExportSymbol.Enter += new System.EventHandler(this.txtDllExportSymbol_Focus);
- this.txtDllExportSymbol.LostFocus += new System.EventHandler(this.txtDllExportSymbol_LostFocus);
- //
- // IceCppConfigurationDialog
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.CancelButton = this.btnClose;
- this.ClientSize = new System.Drawing.Size(515, 536);
- this.Controls.Add(this.grouDllExportSymbol);
- this.Controls.Add(this.groupBox3);
- this.Controls.Add(this.groupBox5);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.groupBox4);
- this.Controls.Add(this.groupBox2);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.chkEnableBuilder);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
- this.MaximizeBox = false;
- this.Name = "IceCppConfigurationDialog";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Ice Configuration";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing);
- this.groupBox1.ResumeLayout(false);
- this.groupBox1.PerformLayout();
- this.groupBox2.ResumeLayout(false);
- this.groupBox2.PerformLayout();
- this.groupBox3.ResumeLayout(false);
- this.groupBox3.PerformLayout();
- this.groupBox4.ResumeLayout(false);
- this.groupBox4.PerformLayout();
- this.groupBox5.ResumeLayout(false);
- this.groupBox5.PerformLayout();
- this.grouDllExportSymbol.ResumeLayout(false);
- this.grouDllExportSymbol.PerformLayout();
- this.ResumeLayout(false);
- this.PerformLayout();
-
+ {
+ this.components = new System.ComponentModel.Container();
+ this.chkEnableBuilder = new System.Windows.Forms.CheckBox();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.chkIceUtil = new System.Windows.Forms.CheckBox();
+ this.chkFreeze = new System.Windows.Forms.CheckBox();
+ this.chkIceStorm = new System.Windows.Forms.CheckBox();
+ this.chkIceSSL = new System.Windows.Forms.CheckBox();
+ this.chkIcePatch2 = new System.Windows.Forms.CheckBox();
+ this.chkIceGrid = new System.Windows.Forms.CheckBox();
+ this.chkIceBox = new System.Windows.Forms.CheckBox();
+ this.chkGlacier2 = new System.Windows.Forms.CheckBox();
+ this.chkIce = new System.Windows.Forms.CheckBox();
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.comboBoxVerboseLevel = new System.Windows.Forms.ComboBox();
+ this.chkChecksum = new System.Windows.Forms.CheckBox();
+ this.chkIcePrefix = new System.Windows.Forms.CheckBox();
+ this.chkStreaming = new System.Windows.Forms.CheckBox();
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+ this.grouDllExportSymbol = new System.Windows.Forms.GroupBox();
+ this.txtDllExportSymbol = new System.Windows.Forms.TextBox();
+ this.btnOk = new System.Windows.Forms.Button();
+ this.btnApply = new System.Windows.Forms.Button();
+ this.outputDirView = new Ice.VisualStudio.OutputDirView();
+ this.iceHomeView = new Ice.VisualStudio.IceHomeView();
+ this.includePathView = new Ice.VisualStudio.IncludePathView();
+ this.extraCompilerOptions = new Ice.VisualStudio.ExtraCompilerOptionsView();
+ this.groupBox3.SuspendLayout();
+ this.groupBox4.SuspendLayout();
+ this.grouDllExportSymbol.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // chkEnableBuilder
+ //
+ this.chkEnableBuilder.AutoSize = true;
+ this.chkEnableBuilder.Location = new System.Drawing.Point(12, 13);
+ this.chkEnableBuilder.Name = "chkEnableBuilder";
+ this.chkEnableBuilder.Size = new System.Drawing.Size(112, 17);
+ this.chkEnableBuilder.TabIndex = 0;
+ this.chkEnableBuilder.Text = "Enable Ice Builder";
+ this.chkEnableBuilder.UseVisualStyleBackColor = true;
+ this.chkEnableBuilder.CheckedChanged += new System.EventHandler(this.chkEnableBuilder_CheckedChanged);
+ //
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.chkIceUtil);
+ this.groupBox3.Controls.Add(this.chkFreeze);
+ this.groupBox3.Controls.Add(this.chkIceStorm);
+ this.groupBox3.Controls.Add(this.chkIceSSL);
+ this.groupBox3.Controls.Add(this.chkIcePatch2);
+ this.groupBox3.Controls.Add(this.chkIceGrid);
+ this.groupBox3.Controls.Add(this.chkIceBox);
+ this.groupBox3.Controls.Add(this.chkGlacier2);
+ this.groupBox3.Controls.Add(this.chkIce);
+ this.groupBox3.Location = new System.Drawing.Point(11, 481);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(488, 62);
+ this.groupBox3.TabIndex = 3;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Ice Components";
+ //
+ // chkIceUtil
+ //
+ this.chkIceUtil.AutoSize = true;
+ this.chkIceUtil.Location = new System.Drawing.Point(74, 80);
+ this.chkIceUtil.Name = "chkIceUtil";
+ this.chkIceUtil.Size = new System.Drawing.Size(56, 17);
+ this.chkIceUtil.TabIndex = 24;
+ this.chkIceUtil.TabStop = false;
+ this.chkIceUtil.Text = "IceUtil";
+ this.chkIceUtil.UseVisualStyleBackColor = true;
+ this.chkIceUtil.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkFreeze
+ //
+ this.chkFreeze.AutoSize = true;
+ this.chkFreeze.Location = new System.Drawing.Point(7, 19);
+ this.chkFreeze.Name = "chkFreeze";
+ this.chkFreeze.Size = new System.Drawing.Size(58, 17);
+ this.chkFreeze.TabIndex = 16;
+ this.chkFreeze.Text = "Freeze";
+ this.chkFreeze.UseVisualStyleBackColor = true;
+ this.chkFreeze.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIceStorm
+ //
+ this.chkIceStorm.AutoSize = true;
+ this.chkIceStorm.Location = new System.Drawing.Point(7, 39);
+ this.chkIceStorm.Name = "chkIceStorm";
+ this.chkIceStorm.Size = new System.Drawing.Size(68, 17);
+ this.chkIceStorm.TabIndex = 23;
+ this.chkIceStorm.TabStop = false;
+ this.chkIceStorm.Text = "IceStorm";
+ this.chkIceStorm.UseVisualStyleBackColor = true;
+ this.chkIceStorm.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIceSSL
+ //
+ this.chkIceSSL.AutoSize = true;
+ this.chkIceSSL.Location = new System.Drawing.Point(419, 19);
+ this.chkIceSSL.Name = "chkIceSSL";
+ this.chkIceSSL.Size = new System.Drawing.Size(61, 17);
+ this.chkIceSSL.TabIndex = 22;
+ this.chkIceSSL.TabStop = false;
+ this.chkIceSSL.Text = "IceSSL";
+ this.chkIceSSL.UseVisualStyleBackColor = true;
+ this.chkIceSSL.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIcePatch2
+ //
+ this.chkIcePatch2.AutoSize = true;
+ this.chkIcePatch2.Location = new System.Drawing.Point(335, 19);
+ this.chkIcePatch2.Name = "chkIcePatch2";
+ this.chkIcePatch2.Size = new System.Drawing.Size(75, 17);
+ this.chkIcePatch2.TabIndex = 21;
+ this.chkIcePatch2.TabStop = false;
+ this.chkIcePatch2.Text = "IcePatch2";
+ this.chkIcePatch2.UseVisualStyleBackColor = true;
+ this.chkIcePatch2.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIceGrid
+ //
+ this.chkIceGrid.AutoSize = true;
+ this.chkIceGrid.Location = new System.Drawing.Point(266, 19);
+ this.chkIceGrid.Name = "chkIceGrid";
+ this.chkIceGrid.Size = new System.Drawing.Size(60, 17);
+ this.chkIceGrid.TabIndex = 20;
+ this.chkIceGrid.TabStop = false;
+ this.chkIceGrid.Text = "IceGrid";
+ this.chkIceGrid.UseVisualStyleBackColor = true;
+ this.chkIceGrid.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIceBox
+ //
+ this.chkIceBox.AutoSize = true;
+ this.chkIceBox.Location = new System.Drawing.Point(198, 19);
+ this.chkIceBox.Name = "chkIceBox";
+ this.chkIceBox.Size = new System.Drawing.Size(59, 17);
+ this.chkIceBox.TabIndex = 19;
+ this.chkIceBox.TabStop = false;
+ this.chkIceBox.Text = "IceBox";
+ this.chkIceBox.UseVisualStyleBackColor = true;
+ this.chkIceBox.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkGlacier2
+ //
+ this.chkGlacier2.AutoSize = true;
+ this.chkGlacier2.Location = new System.Drawing.Point(74, 19);
+ this.chkGlacier2.Name = "chkGlacier2";
+ this.chkGlacier2.Size = new System.Drawing.Size(65, 17);
+ this.chkGlacier2.TabIndex = 17;
+ this.chkGlacier2.TabStop = false;
+ this.chkGlacier2.Text = "Glacier2";
+ this.chkGlacier2.UseVisualStyleBackColor = true;
+ this.chkGlacier2.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIce
+ //
+ this.chkIce.AutoSize = true;
+ this.chkIce.Location = new System.Drawing.Point(148, 19);
+ this.chkIce.Name = "chkIce";
+ this.chkIce.Size = new System.Drawing.Size(41, 17);
+ this.chkIce.TabIndex = 18;
+ this.chkIce.TabStop = false;
+ this.chkIce.Text = "Ice";
+ this.chkIce.UseVisualStyleBackColor = true;
+ this.chkIce.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // groupBox4
+ //
+ this.groupBox4.Controls.Add(this.label1);
+ this.groupBox4.Controls.Add(this.comboBoxVerboseLevel);
+ this.groupBox4.Controls.Add(this.chkChecksum);
+ this.groupBox4.Controls.Add(this.chkIcePrefix);
+ this.groupBox4.Controls.Add(this.chkStreaming);
+ this.groupBox4.Location = new System.Drawing.Point(11, 134);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(487, 44);
+ this.groupBox4.TabIndex = 4;
+ this.groupBox4.TabStop = false;
+ this.groupBox4.Text = "Slice Compiler Options";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(286, 19);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(67, 13);
+ this.label1.TabIndex = 8;
+ this.label1.Text = "Trace Level:";
+ //
+ // comboBoxVerboseLevel
+ //
+ this.comboBoxVerboseLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxVerboseLevel.FormattingEnabled = true;
+ this.comboBoxVerboseLevel.Items.AddRange(new object[] {
+ "Errors",
+ "Info",
+ "Debug"});
+ this.comboBoxVerboseLevel.Location = new System.Drawing.Point(359, 15);
+ this.comboBoxVerboseLevel.Name = "comboBoxVerboseLevel";
+ this.comboBoxVerboseLevel.Size = new System.Drawing.Size(121, 21);
+ this.comboBoxVerboseLevel.TabIndex = 7;
+ this.comboBoxVerboseLevel.SelectedIndexChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkChecksum
+ //
+ this.chkChecksum.AutoSize = true;
+ this.chkChecksum.Location = new System.Drawing.Point(181, 19);
+ this.chkChecksum.Name = "chkChecksum";
+ this.chkChecksum.Size = new System.Drawing.Size(76, 17);
+ this.chkChecksum.TabIndex = 5;
+ this.chkChecksum.Text = "Checksum";
+ this.chkChecksum.UseVisualStyleBackColor = true;
+ this.chkChecksum.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIcePrefix
+ //
+ this.chkIcePrefix.AutoSize = true;
+ this.chkIcePrefix.Location = new System.Drawing.Point(10, 19);
+ this.chkIcePrefix.Name = "chkIcePrefix";
+ this.chkIcePrefix.Size = new System.Drawing.Size(41, 17);
+ this.chkIcePrefix.TabIndex = 3;
+ this.chkIcePrefix.Text = "Ice";
+ this.chkIcePrefix.UseVisualStyleBackColor = true;
+ this.chkIcePrefix.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkStreaming
+ //
+ this.chkStreaming.AutoSize = true;
+ this.chkStreaming.Location = new System.Drawing.Point(86, 19);
+ this.chkStreaming.Name = "chkStreaming";
+ this.chkStreaming.Size = new System.Drawing.Size(73, 17);
+ this.chkStreaming.TabIndex = 4;
+ this.chkStreaming.Text = "Streaming";
+ this.chkStreaming.UseVisualStyleBackColor = true;
+ this.chkStreaming.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // btnCancel
+ //
+ this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnCancel.Location = new System.Drawing.Point(423, 550);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.TabIndex = 25;
+ this.btnCancel.Text = "Cancel";
+ this.btnCancel.UseVisualStyleBackColor = true;
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // grouDllExportSymbol
+ //
+ this.grouDllExportSymbol.Controls.Add(this.txtDllExportSymbol);
+ this.grouDllExportSymbol.Location = new System.Drawing.Point(11, 436);
+ this.grouDllExportSymbol.Name = "grouDllExportSymbol";
+ this.grouDllExportSymbol.Size = new System.Drawing.Size(487, 43);
+ this.grouDllExportSymbol.TabIndex = 7;
+ this.grouDllExportSymbol.TabStop = false;
+ this.grouDllExportSymbol.Text = "DLL Export Symbol";
+ //
+ // txtDllExportSymbol
+ //
+ this.txtDllExportSymbol.Location = new System.Drawing.Point(6, 16);
+ this.txtDllExportSymbol.Name = "txtDllExportSymbol";
+ this.txtDllExportSymbol.Size = new System.Drawing.Size(474, 20);
+ this.txtDllExportSymbol.TabIndex = 15;
+ this.txtDllExportSymbol.TextChanged += new System.EventHandler(this.txtDllExportSymbol_Changed);
+ this.txtDllExportSymbol.Enter += new System.EventHandler(this.txtDllExportSymbol_Focus);
+ this.txtDllExportSymbol.LostFocus += new System.EventHandler(this.txtDllExportSymbol_Changed);
+ //
+ // btnOk
+ //
+ this.btnOk.Location = new System.Drawing.Point(262, 550);
+ this.btnOk.Name = "btnOk";
+ this.btnOk.Size = new System.Drawing.Size(75, 23);
+ this.btnOk.TabIndex = 26;
+ this.btnOk.Text = "Ok";
+ this.btnOk.UseVisualStyleBackColor = true;
+ this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
+ //
+ // btnApply
+ //
+ this.btnApply.Location = new System.Drawing.Point(342, 550);
+ this.btnApply.Name = "btnApply";
+ this.btnApply.Size = new System.Drawing.Size(75, 23);
+ this.btnApply.TabIndex = 27;
+ this.btnApply.Text = "Apply";
+ this.btnApply.UseVisualStyleBackColor = true;
+ this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
+ //
+ // outputDirView
+ //
+ this.outputDirView.Location = new System.Drawing.Point(5, 82);
+ this.outputDirView.Name = "outputDirView";
+ this.outputDirView.Size = new System.Drawing.Size(498, 52);
+ this.outputDirView.TabIndex = 31;
+ //
+ // iceHomeView
+ //
+ this.iceHomeView.Location = new System.Drawing.Point(5, 34);
+ this.iceHomeView.Name = "iceHomeView";
+ this.iceHomeView.Size = new System.Drawing.Size(498, 48);
+ this.iceHomeView.TabIndex = 30;
+ //
+ // includePathView
+ //
+ this.includePathView.Location = new System.Drawing.Point(8, 259);
+ this.includePathView.Name = "includePathView";
+ this.includePathView.Size = new System.Drawing.Size(493, 174);
+ this.includePathView.TabIndex = 29;
+ //
+ // extraCompilerOptions
+ //
+ this.extraCompilerOptions.Location = new System.Drawing.Point(5, 182);
+ this.extraCompilerOptions.Name = "extraCompilerOptions";
+ this.extraCompilerOptions.Size = new System.Drawing.Size(495, 79);
+ this.extraCompilerOptions.TabIndex = 28;
+ //
+ // IceCppConfigurationDialog
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.btnCancel;
+ this.ClientSize = new System.Drawing.Size(515, 583);
+ this.Controls.Add(this.outputDirView);
+ this.Controls.Add(this.iceHomeView);
+ this.Controls.Add(this.includePathView);
+ this.Controls.Add(this.extraCompilerOptions);
+ this.Controls.Add(this.btnApply);
+ this.Controls.Add(this.btnOk);
+ this.Controls.Add(this.grouDllExportSymbol);
+ this.Controls.Add(this.groupBox3);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.groupBox4);
+ this.Controls.Add(this.chkEnableBuilder);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+ this.MaximizeBox = false;
+ this.Name = "IceCppConfigurationDialog";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Ice Configuration";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing);
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
+ this.grouDllExportSymbol.ResumeLayout(false);
+ this.grouDllExportSymbol.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
}
#endregion
private System.Windows.Forms.CheckBox chkEnableBuilder;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Button btnMoveIncludeDown;
- private System.Windows.Forms.Button btnMoveIncludeUp;
- private System.Windows.Forms.Button btnRemoveInclude;
- private System.Windows.Forms.Button btnAddInclude;
- private System.Windows.Forms.CheckedListBox includeDirList;
- private System.Windows.Forms.GroupBox groupBox2;
- private System.Windows.Forms.TextBox txtExtraOptions;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.CheckBox chkIceStorm;
private System.Windows.Forms.CheckBox chkIceSSL;
@@ -512,19 +403,20 @@ namespace Ice.VisualStudio
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.CheckBox chkIcePrefix;
private System.Windows.Forms.CheckBox chkStreaming;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.GroupBox groupBox5;
- private System.Windows.Forms.Button btnSelectIceHome;
- private System.Windows.Forms.TextBox txtIceHome;
+ private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.ToolTip toolTip;
- private System.Windows.Forms.CheckBox chkFreeze;
+ private System.Windows.Forms.CheckBox chkFreeze;
private System.Windows.Forms.CheckBox chkIceUtil;
private System.Windows.Forms.GroupBox grouDllExportSymbol;
private System.Windows.Forms.TextBox txtDllExportSymbol;
private System.Windows.Forms.CheckBox chkChecksum;
- private System.Windows.Forms.Label includeInfo;
- private System.Windows.Forms.Button btnEditInclude;
- private System.Windows.Forms.ComboBox comboBoxVerboseLevel;
+ private System.Windows.Forms.ComboBox comboBoxVerboseLevel;
private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button btnOk;
+ private System.Windows.Forms.Button btnApply;
+ private IncludePathView includePathView;
+ private IceHomeView iceHomeView;
+ private OutputDirView outputDirView;
+ private ExtraCompilerOptionsView extraCompilerOptions;
}
}
diff --git a/vsaddin/src/IceCppConfigurationDialog.cs b/vsaddin/src/IceCppConfigurationDialog.cs
new file mode 100644
index 00000000000..c9c55ffa6ca
--- /dev/null
+++ b/vsaddin/src/IceCppConfigurationDialog.cs
@@ -0,0 +1,743 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+using System.Globalization;
+using EnvDTE;
+
+namespace Ice.VisualStudio
+{
+ public partial class IceCppConfigurationDialog : Form, IceConfigurationDialog
+ {
+ public IceCppConfigurationDialog(Project project)
+ {
+ InitializeComponent();
+ _project = project;
+ iceHomeView.init(this, _project);
+ outputDirView.init(this, _project);
+ includePathView.init(this, _project);
+ extraCompilerOptions.init(this, project);
+
+ //
+ // Set the toolTip messages.
+ //
+
+ toolTip.SetToolTip(chkStreaming, "Generate marshaling support for stream API (--stream).");
+ toolTip.SetToolTip(chkChecksum, "Generate checksums for Slice definitions (--checksum).");
+ toolTip.SetToolTip(chkIcePrefix, "Permit Ice prefixes (--ice).");
+
+ if(_project != null)
+ {
+ this.Text = "Ice Configuration - Project: " + _project.Name;
+ bool enabled = Util.isSliceBuilderEnabled(project);
+ setEnabled(enabled);
+ chkEnableBuilder.Checked = enabled;
+ load();
+ _initialized = true;
+ }
+ }
+
+#region IceConfigurationDialog interface
+ public bool editingIncludeDir()
+ {
+ return includePathView.editingIncludeDir();
+ }
+
+ public void endEditIncludeDir(bool saveChanges)
+ {
+ includePathView.endEditIncludeDir(saveChanges);
+ }
+
+ public void needSave()
+ {
+ if(_initialized)
+ {
+ btnApply.Enabled = hasUnsavedChanges();
+ }
+ }
+
+ public void unsetCancelButton()
+ {
+ CancelButton = null;
+ }
+
+ public void setCancelButton()
+ {
+ CancelButton = btnCancel;
+ }
+#endregion IceConfigurationDialog interface
+
+ private void load()
+ {
+ if(_project == null)
+ {
+ return;
+ }
+ Cursor = Cursors.WaitCursor;
+
+
+ iceHomeView.load();
+ outputDirView.load();
+ extraCompilerOptions.load();
+
+ chkIcePrefix.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix);
+
+ chkStreaming.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIceStreaming);
+ chkChecksum.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIceChecksum);
+
+ comboBoxVerboseLevel.SelectedIndex = Util.getVerboseLevel(_project);
+
+ includePathView.load();
+
+ loadComponents();
+ txtDllExportSymbol.Text = Util.getProjectProperty(_project, Util.PropertyIceDllExport);
+
+ btnApply.Enabled = false;
+ Cursor = Cursors.Default;
+ }
+
+ private void loadComponents()
+ {
+ ComponentList selectedComponents = Util.getIceCppComponents(_project);
+ foreach(String s in Util.getCppNames())
+ {
+ if(selectedComponents.Contains(s))
+ {
+ checkComponent(s, true);
+ }
+ else
+ {
+ checkComponent(s, false);
+ }
+ }
+ }
+
+ private void checkComponent(String component, bool check)
+ {
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+ switch(component)
+ {
+ case "Freeze":
+ {
+ chkFreeze.Checked = check;
+ break;
+ }
+ case "Glacier2":
+ {
+ chkGlacier2.Checked = check;
+ break;
+ }
+ case "Ice":
+ {
+ chkIce.Checked = check;
+ break;
+ }
+ case "IceBox":
+ {
+ chkIceBox.Checked = check;
+ break;
+ }
+ case "IceGrid":
+ {
+ chkIceGrid.Checked = check;
+ break;
+ }
+ case "IcePatch2":
+ {
+ chkIcePatch2.Checked = check;
+ break;
+ }
+ case "IceSSL":
+ {
+ chkIceSSL.Checked = check;
+ break;
+ }
+ case "IceStorm":
+ {
+ chkIceStorm.Checked = check;
+ break;
+ }
+ case "IceUtil":
+ {
+ chkIceUtil.Checked = check;
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ }
+
+ private void chkEnableBuilder_CheckedChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+ if(_initialized)
+ {
+ _initialized = false;
+ setEnabled(chkEnableBuilder.Checked);
+ ComponentList components;
+ if(chkEnableBuilder.Checked)
+ {
+ //
+ // Enable the components that were previously enabled if any.
+ //
+ components =
+ new ComponentList(Util.getProjectProperty(_project, Util.PropertyIceComponents));
+
+ //
+ // If there isn't a previous set of componets, we enable the default components.
+ //
+ if(components.Count == 0)
+ {
+ components.Add("Ice");
+ components.Add("IceUtil");
+ }
+ for(int i = 0; i < components.Count; ++i)
+ {
+ checkComponent(components[i], true);
+ }
+ }
+ else
+ {
+ components = iceComponents();
+ }
+
+ //
+ // Enable / Disable the given set of components
+ //
+ for(int i = 0; i < components.Count; ++i)
+ {
+ checkComponent(components[i], chkEnableBuilder.Checked);
+ }
+
+ chkEnableBuilder.Enabled = true;
+ _initialized = true;
+ needSave();
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void setEnabled(bool enabled)
+ {
+ iceHomeView.setEnabled(enabled);
+ outputDirView.setEnabled(enabled);
+ chkIcePrefix.Enabled = enabled;
+ chkStreaming.Enabled = enabled;
+ chkChecksum.Enabled = enabled;
+
+ comboBoxVerboseLevel.Enabled = enabled;
+ includePathView.setEnabled(enabled);
+
+ extraCompilerOptions.setEnabled(enabled);
+
+ chkFreeze.Enabled = enabled;
+ chkGlacier2.Enabled = enabled;
+ chkIce.Enabled = enabled;
+ chkIceBox.Enabled = enabled;
+ chkIceGrid.Enabled = enabled;
+ chkIcePatch2.Enabled = enabled;
+ chkIceSSL.Enabled = enabled;
+ chkIceStorm.Enabled = enabled;
+ chkIceUtil.Enabled = enabled;
+ txtDllExportSymbol.Enabled = enabled;
+ }
+
+ private void formClosing(object sender, FormClosingEventArgs e)
+ {
+ try
+ {
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(false);
+ }
+
+ if(hasUnsavedChanges())
+ {
+ if(!Util.warnUnsavedChanges(this))
+ {
+ e.Cancel = true;
+ return;
+ }
+ }
+
+ Cursor = Cursors.WaitCursor;
+ if(_changed && Util.isSliceBuilderEnabled(_project))
+ {
+ Util.rebuildProject(_project);
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void component_Changed(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+ needSave();
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void txtDllExportSymbol_Focus(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(includePathView.editingIncludeDir())
+ {
+ includePathView.endEditIncludeDir(true);
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void txtDllExportSymbol_Changed(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ needSave();
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void btnOk_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(apply())
+ {
+ Close();
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void btnApply_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ apply();
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Close();
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private ComponentList iceComponents()
+ {
+ ComponentList components = new ComponentList();
+ if(chkFreeze.Checked)
+ {
+ components.Add("Freeze");
+ }
+ if(chkGlacier2.Checked)
+ {
+ components.Add("Glacier2");
+ }
+ if(chkIce.Checked)
+ {
+ components.Add("Ice");
+ }
+ if(chkIceBox.Checked)
+ {
+ components.Add("IceBox");
+ }
+ if(chkIceGrid.Checked)
+ {
+ components.Add("IceGrid");
+ }
+ if(chkIcePatch2.Checked)
+ {
+ components.Add("IcePatch2");
+ }
+ if(chkIceSSL.Checked)
+ {
+ components.Add("IceSSL");
+ }
+ if(chkIceStorm.Checked)
+ {
+ components.Add("IceStorm");
+ }
+ if(chkIceUtil.Checked)
+ {
+ components.Add("IceUtil");
+ }
+ return components;
+ }
+
+ //
+ // Apply unsaved changes, returns true if new settings are all applied correctly,
+ // otherwise returns false.
+ //
+ private bool apply()
+ {
+ if(!hasUnsavedChanges())
+ {
+ return true; // Nothing to do.
+ }
+
+ try
+ {
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+
+ //
+ // This must be the first setting to be updated, as other settings cannot be
+ // updated if the add-in is disabled.
+ //
+ bool enabling = false;
+ if(chkEnableBuilder.Checked && !Util.isSliceBuilderEnabled(_project))
+ {
+ Util.addBuilderToProject(_project, iceComponents());
+ _changed = true;
+ _initialized = false;
+ loadComponents();
+ _initialized = true;
+ enabling = true;
+ }
+
+ bool changed = false;
+ if(!iceHomeView.apply(ref changed))
+ {
+ return false;
+ }
+
+ if(changed)
+ {
+ _changed = true;
+ }
+
+ changed = false;
+ if(!outputDirView.apply(ref changed))
+ {
+ return false;
+ }
+
+ if(changed)
+ {
+ _changed = true;
+ }
+
+ if(chkIcePrefix.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix))
+ {
+ Util.setProjectProperty(_project, Util.PropertyIcePrefix, chkIcePrefix.Checked.ToString());
+ _changed = true;
+ }
+
+ if(chkStreaming.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIceStreaming))
+ {
+ Util.setProjectProperty(_project, Util.PropertyIceStreaming, chkStreaming.Checked.ToString());
+ _changed = true;
+ }
+
+ if(chkChecksum.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIceChecksum))
+ {
+ Util.setProjectProperty(_project, Util.PropertyIceChecksum, chkChecksum.Checked.ToString());
+ _changed = true;
+ }
+
+ if(comboBoxVerboseLevel.SelectedIndex != Util.getVerboseLevel(_project))
+ {
+ Util.setProjectProperty(_project, Util.PropertyVerboseLevel,
+ comboBoxVerboseLevel.SelectedIndex.ToString(CultureInfo.InvariantCulture));
+ _changed = true;
+ }
+
+ changed = false;
+ if(!extraCompilerOptions.apply(ref changed))
+ {
+ return false;
+ }
+ if(changed)
+ {
+ _changed = true;
+ }
+
+ if(includePathView.apply())
+ {
+ _changed = true;
+ }
+
+ if(!txtDllExportSymbol.Text.Equals(Util.getProjectProperty(_project, Util.PropertyIceDllExport),
+ StringComparison.CurrentCulture))
+ {
+ Util.setProjectProperty(_project, Util.PropertyIceDllExport, txtDllExportSymbol.Text);
+ _changed = true;
+ }
+
+ if(!enabling)
+ {
+ if(chkFreeze.Checked != Util.hasIceCppLib(_project, "Freeze"))
+ {
+ componentChanged("Freeze", chkFreeze.Checked);
+ }
+ if(chkGlacier2.Checked != Util.hasIceCppLib(_project, "Glacier2"))
+ {
+ componentChanged("Glacier2", chkGlacier2.Checked);
+ }
+ if(chkIce.Checked != Util.hasIceCppLib(_project, "Ice"))
+ {
+ componentChanged("Ice", chkIce.Checked);
+ }
+ if(chkIceBox.Checked != Util.hasIceCppLib(_project, "IceBox"))
+ {
+ componentChanged("IceBox", chkIceBox.Checked);
+ }
+ if(chkIceGrid.Checked != Util.hasIceCppLib(_project, "IceGrid"))
+ {
+ componentChanged("IceGrid", chkIceGrid.Checked);
+ }
+ if(chkIcePatch2.Checked != Util.hasIceCppLib(_project, "IcePatch2"))
+ {
+ componentChanged("IcePatch2", chkIcePatch2.Checked);
+ }
+ if(chkIceSSL.Checked != Util.hasIceCppLib(_project, "IceSSL"))
+ {
+ componentChanged("IceSSL", chkIceSSL.Checked);
+ }
+ if(chkIceStorm.Checked != Util.hasIceCppLib(_project, "IceStorm"))
+ {
+ componentChanged("IceStorm", chkIceStorm.Checked);
+ }
+ if(chkIceUtil.Checked != Util.hasIceCppLib(_project, "IceUtil"))
+ {
+ componentChanged("IceUtil", chkIceUtil.Checked);
+ }
+ }
+
+ //
+ // This must be the last setting to be updated, as we want to update
+ // all other settings and that isn't possible if the builder is disabled.
+ //
+ if(!chkEnableBuilder.Checked && Util.isSliceBuilderEnabled(_project))
+ {
+ Util.removeBuilderFromProject(_project);
+ _initialized = false;
+ load();
+ _initialized = true;
+ _changed = true;
+ }
+
+ return true;
+ }
+ finally
+ {
+ needSave(); // Call needSave to update apply button status
+ }
+ }
+
+ private bool hasUnsavedChanges()
+ {
+ if(chkEnableBuilder.Checked != Util.isSliceBuilderEnabled(_project))
+ {
+ return true;
+ }
+
+ //
+ // If the builder is disabled, we are not interested in the other settings
+ // to compute changes.
+ //
+ if(!Util.isSliceBuilderEnabled(_project))
+ {
+ return false;
+ }
+
+ if(iceHomeView.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ if(outputDirView.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ if(chkIcePrefix.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix))
+ {
+ return true;
+ }
+
+ if(chkStreaming.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIceStreaming))
+ {
+ return true;
+ }
+
+ if(chkChecksum.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIceChecksum))
+ {
+ return true;
+ }
+
+ if(comboBoxVerboseLevel.SelectedIndex != Util.getVerboseLevel(_project))
+ {
+ return true;
+ }
+
+ if(extraCompilerOptions.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ if(!txtDllExportSymbol.Text.Trim().Equals(Util.getProjectProperty(_project, Util.PropertyIceDllExport),
+ StringComparison.CurrentCulture))
+ {
+ return true;
+ }
+
+ if(includePathView.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ // Ice libraries
+ if(chkFreeze.Checked != Util.hasIceCppLib(_project, "Freeze"))
+ {
+ return true;
+ }
+ if(chkGlacier2.Checked != Util.hasIceCppLib(_project, "Glacier2"))
+ {
+ return true;
+ }
+ if(chkIce.Checked != Util.hasIceCppLib(_project, "Ice"))
+ {
+ return true;
+ }
+ if(chkIceBox.Checked != Util.hasIceCppLib(_project, "IceBox"))
+ {
+ return true;
+ }
+ if(chkIceGrid.Checked != Util.hasIceCppLib(_project, "IceGrid"))
+ {
+ return true;
+ }
+ if(chkIcePatch2.Checked != Util.hasIceCppLib(_project, "IcePatch2"))
+ {
+ return true;
+ }
+ if(chkIceSSL.Checked != Util.hasIceCppLib(_project, "IceSSL"))
+ {
+ return true;
+ }
+ if(chkIceStorm.Checked != Util.hasIceCppLib(_project, "IceStorm"))
+ {
+ return true;
+ }
+ if(chkIceUtil.Checked != Util.hasIceCppLib(_project, "IceUtil"))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ private void componentChanged(String name, bool isChecked)
+ {
+ if(isChecked)
+ {
+ Util.addIceCppLibs(_project, new ComponentList(name));
+ }
+ else
+ {
+ Util.removeIceCppLibs(_project, new ComponentList(name));
+ }
+ _changed = true;
+ }
+
+ private bool _initialized;
+ private Project _project;
+ private bool _changed = false;
+ }
+}
diff --git a/vsplugin/src/IceCppConfigurationDialog.resx b/vsaddin/src/IceCppConfigurationDialog.resx
index 026c576b40e..a5979aadfff 100644
--- a/vsplugin/src/IceCppConfigurationDialog.resx
+++ b/vsaddin/src/IceCppConfigurationDialog.resx
@@ -112,12 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> \ No newline at end of file
diff --git a/vsplugin/src/IceCsharpConfigurationDialog.Designer.cs b/vsaddin/src/IceCsharpConfigurationDialog.Designer.cs
index 366869768ec..32c040be54e 100644
--- a/vsplugin/src/IceCsharpConfigurationDialog.Designer.cs
+++ b/vsaddin/src/IceCsharpConfigurationDialog.Designer.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
@@ -36,432 +36,322 @@ namespace Ice.VisualStudio
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.chkEnableBuilder = new System.Windows.Forms.CheckBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.btnEditInclude = new System.Windows.Forms.Button();
- this.includeInfo = new System.Windows.Forms.Label();
- this.btnMoveIncludeDown = new System.Windows.Forms.Button();
- this.btnMoveIncludeUp = new System.Windows.Forms.Button();
- this.btnRemoveInclude = new System.Windows.Forms.Button();
- this.btnAddInclude = new System.Windows.Forms.Button();
- this.includeDirList = new System.Windows.Forms.CheckedListBox();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.txtExtraOptions = new System.Windows.Forms.TextBox();
- this.groupBox3 = new System.Windows.Forms.GroupBox();
- this.chkIceStorm = new System.Windows.Forms.CheckBox();
- this.chkIceSSL = new System.Windows.Forms.CheckBox();
- this.chkIcePatch2 = new System.Windows.Forms.CheckBox();
- this.chkIceGrid = new System.Windows.Forms.CheckBox();
- this.chkIceBox = new System.Windows.Forms.CheckBox();
- this.chkGlacier2 = new System.Windows.Forms.CheckBox();
- this.chkIce = new System.Windows.Forms.CheckBox();
- this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.label1 = new System.Windows.Forms.Label();
- this.comboBoxVerboseLevel = new System.Windows.Forms.ComboBox();
- this.chkChecksum = new System.Windows.Forms.CheckBox();
- this.chkIcePrefix = new System.Windows.Forms.CheckBox();
- this.chkStreaming = new System.Windows.Forms.CheckBox();
- this.chkTie = new System.Windows.Forms.CheckBox();
- this.btnClose = new System.Windows.Forms.Button();
- this.groupBox5 = new System.Windows.Forms.GroupBox();
- this.btnSelectIceHome = new System.Windows.Forms.Button();
- this.txtIceHome = new System.Windows.Forms.TextBox();
- this.toolTip = new System.Windows.Forms.ToolTip(this.components);
- this.groupBox1.SuspendLayout();
- this.groupBox2.SuspendLayout();
- this.groupBox3.SuspendLayout();
- this.groupBox4.SuspendLayout();
- this.groupBox5.SuspendLayout();
- this.SuspendLayout();
- //
- // chkEnableBuilder
- //
- this.chkEnableBuilder.AutoSize = true;
- this.chkEnableBuilder.Location = new System.Drawing.Point(12, 13);
- this.chkEnableBuilder.Name = "chkEnableBuilder";
- this.chkEnableBuilder.Size = new System.Drawing.Size(112, 17);
- this.chkEnableBuilder.TabIndex = 0;
- this.chkEnableBuilder.Text = "Enable Ice Builder";
- this.chkEnableBuilder.UseVisualStyleBackColor = true;
- this.chkEnableBuilder.CheckedChanged += new System.EventHandler(this.chkEnableBuilder_CheckedChanged);
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.btnEditInclude);
- this.groupBox1.Controls.Add(this.includeInfo);
- this.groupBox1.Controls.Add(this.btnMoveIncludeDown);
- this.groupBox1.Controls.Add(this.btnMoveIncludeUp);
- this.groupBox1.Controls.Add(this.btnRemoveInclude);
- this.groupBox1.Controls.Add(this.btnAddInclude);
- this.groupBox1.Controls.Add(this.includeDirList);
- this.groupBox1.Location = new System.Drawing.Point(12, 209);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(487, 169);
- this.groupBox1.TabIndex = 1;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Slice Include Path";
- //
- // btnEditInclude
- //
- this.btnEditInclude.Location = new System.Drawing.Point(406, 46);
- this.btnEditInclude.Name = "btnEditInclude";
- this.btnEditInclude.Size = new System.Drawing.Size(75, 23);
- this.btnEditInclude.TabIndex = 13;
- this.btnEditInclude.Text = "Edit";
- this.btnEditInclude.UseVisualStyleBackColor = true;
- this.btnEditInclude.Click += new System.EventHandler(this.btnEdit_Click);
- //
- // includeInfo
- //
- this.includeInfo.AutoSize = true;
- this.includeInfo.Location = new System.Drawing.Point(3, 149);
- this.includeInfo.Name = "includeInfo";
- this.includeInfo.Size = new System.Drawing.Size(315, 13);
- this.includeInfo.TabIndex = 12;
- this.includeInfo.Text = "Select checkboxes for absolute paths, deselect for relative paths.";
- //
- // btnMoveIncludeDown
- //
- this.btnMoveIncludeDown.Location = new System.Drawing.Point(405, 127);
- this.btnMoveIncludeDown.Name = "btnMoveIncludeDown";
- this.btnMoveIncludeDown.Size = new System.Drawing.Size(75, 23);
- this.btnMoveIncludeDown.TabIndex = 11;
- this.btnMoveIncludeDown.Text = "Down";
- this.btnMoveIncludeDown.UseVisualStyleBackColor = true;
- this.btnMoveIncludeDown.Click += new System.EventHandler(this.btnMoveIncludeDown_Click);
- //
- // btnMoveIncludeUp
- //
- this.btnMoveIncludeUp.Location = new System.Drawing.Point(405, 100);
- this.btnMoveIncludeUp.Name = "btnMoveIncludeUp";
- this.btnMoveIncludeUp.Size = new System.Drawing.Size(75, 23);
- this.btnMoveIncludeUp.TabIndex = 10;
- this.btnMoveIncludeUp.Text = "Up";
- this.btnMoveIncludeUp.UseVisualStyleBackColor = true;
- this.btnMoveIncludeUp.Click += new System.EventHandler(this.btnMoveIncludeUp_Click);
- //
- // btnRemoveInclude
- //
- this.btnRemoveInclude.Location = new System.Drawing.Point(405, 73);
- this.btnRemoveInclude.Name = "btnRemoveInclude";
- this.btnRemoveInclude.Size = new System.Drawing.Size(75, 23);
- this.btnRemoveInclude.TabIndex = 9;
- this.btnRemoveInclude.Text = "Remove";
- this.btnRemoveInclude.UseVisualStyleBackColor = true;
- this.btnRemoveInclude.Click += new System.EventHandler(this.btnRemoveInclude_Click);
- //
- // btnAddInclude
- //
- this.btnAddInclude.Location = new System.Drawing.Point(405, 19);
- this.btnAddInclude.Name = "btnAddInclude";
- this.btnAddInclude.Size = new System.Drawing.Size(75, 23);
- this.btnAddInclude.TabIndex = 8;
- this.btnAddInclude.Text = "Add";
- this.btnAddInclude.UseVisualStyleBackColor = true;
- this.btnAddInclude.Click += new System.EventHandler(this.btnAddInclude_Click);
- //
- // includeDirList
- //
- this.includeDirList.FormattingEnabled = true;
- this.includeDirList.Location = new System.Drawing.Point(6, 22);
- this.includeDirList.Name = "includeDirList";
- this.includeDirList.Size = new System.Drawing.Size(390, 124);
- this.includeDirList.TabIndex = 7;
- this.includeDirList.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.includeDirList_ItemCheck);
- this.includeDirList.SelectedIndexChanged += new System.EventHandler(this.includeDirList_SelectedIndexChanged);
- //
- // groupBox2
- //
- this.groupBox2.Controls.Add(this.txtExtraOptions);
- this.groupBox2.Location = new System.Drawing.Point(12, 138);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(487, 65);
- this.groupBox2.TabIndex = 2;
- this.groupBox2.TabStop = false;
- this.groupBox2.Text = "Extra Compiler Options";
- //
- // txtExtraOptions
- //
- this.txtExtraOptions.Location = new System.Drawing.Point(6, 19);
- this.txtExtraOptions.Multiline = true;
- this.txtExtraOptions.Name = "txtExtraOptions";
- this.txtExtraOptions.Size = new System.Drawing.Size(474, 40);
- this.txtExtraOptions.TabIndex = 6;
- this.txtExtraOptions.Enter += new System.EventHandler(this.txtExtraOptions_Focus);
- this.txtExtraOptions.LostFocus += new System.EventHandler(this.txtExtraOptions_LostFocus);
- //
- // groupBox3
- //
- this.groupBox3.Controls.Add(this.chkIceStorm);
- this.groupBox3.Controls.Add(this.chkIceSSL);
- this.groupBox3.Controls.Add(this.chkIcePatch2);
- this.groupBox3.Controls.Add(this.chkIceGrid);
- this.groupBox3.Controls.Add(this.chkIceBox);
- this.groupBox3.Controls.Add(this.chkGlacier2);
- this.groupBox3.Controls.Add(this.chkIce);
- this.groupBox3.Location = new System.Drawing.Point(12, 384);
- this.groupBox3.Name = "groupBox3";
- this.groupBox3.Size = new System.Drawing.Size(487, 47);
- this.groupBox3.TabIndex = 3;
- this.groupBox3.TabStop = false;
- this.groupBox3.Text = "Ice Components";
- //
- // chkIceStorm
- //
- this.chkIceStorm.AutoSize = true;
- this.chkIceStorm.Location = new System.Drawing.Point(404, 19);
- this.chkIceStorm.Name = "chkIceStorm";
- this.chkIceStorm.Size = new System.Drawing.Size(68, 17);
- this.chkIceStorm.TabIndex = 6;
- this.chkIceStorm.TabStop = false;
- this.chkIceStorm.Text = "IceStorm";
- this.chkIceStorm.UseVisualStyleBackColor = true;
- this.chkIceStorm.CheckedChanged += new System.EventHandler(this.chkIceStorm_CheckedChanged);
- //
- // chkIceSSL
- //
- this.chkIceSSL.AutoSize = true;
- this.chkIceSSL.Location = new System.Drawing.Point(337, 19);
- this.chkIceSSL.Name = "chkIceSSL";
- this.chkIceSSL.Size = new System.Drawing.Size(61, 17);
- this.chkIceSSL.TabIndex = 5;
- this.chkIceSSL.TabStop = false;
- this.chkIceSSL.Text = "IceSSL";
- this.chkIceSSL.UseVisualStyleBackColor = true;
- this.chkIceSSL.CheckedChanged += new System.EventHandler(this.chkIceSSL_CheckedChanged);
- //
- // chkIcePatch2
- //
- this.chkIcePatch2.AutoSize = true;
- this.chkIcePatch2.Location = new System.Drawing.Point(256, 19);
- this.chkIcePatch2.Name = "chkIcePatch2";
- this.chkIcePatch2.Size = new System.Drawing.Size(75, 17);
- this.chkIcePatch2.TabIndex = 4;
- this.chkIcePatch2.TabStop = false;
- this.chkIcePatch2.Text = "IcePatch2";
- this.chkIcePatch2.UseVisualStyleBackColor = true;
- this.chkIcePatch2.CheckedChanged += new System.EventHandler(this.chkIcePatch2_CheckedChanged);
- //
- // chkIceGrid
- //
- this.chkIceGrid.AutoSize = true;
- this.chkIceGrid.Location = new System.Drawing.Point(190, 19);
- this.chkIceGrid.Name = "chkIceGrid";
- this.chkIceGrid.Size = new System.Drawing.Size(60, 17);
- this.chkIceGrid.TabIndex = 3;
- this.chkIceGrid.TabStop = false;
- this.chkIceGrid.Text = "IceGrid";
- this.chkIceGrid.UseVisualStyleBackColor = true;
- this.chkIceGrid.CheckedChanged += new System.EventHandler(this.chkIceGrid_CheckedChanged);
- //
- // chkIceBox
- //
- this.chkIceBox.AutoSize = true;
- this.chkIceBox.Location = new System.Drawing.Point(125, 19);
- this.chkIceBox.Name = "chkIceBox";
- this.chkIceBox.Size = new System.Drawing.Size(59, 17);
- this.chkIceBox.TabIndex = 2;
- this.chkIceBox.TabStop = false;
- this.chkIceBox.Text = "IceBox";
- this.chkIceBox.UseVisualStyleBackColor = true;
- this.chkIceBox.CheckedChanged += new System.EventHandler(this.chkIceBox_CheckedChanged);
- //
- // chkGlacier2
- //
- this.chkGlacier2.AutoSize = true;
- this.chkGlacier2.Location = new System.Drawing.Point(7, 19);
- this.chkGlacier2.Name = "chkGlacier2";
- this.chkGlacier2.Size = new System.Drawing.Size(65, 17);
- this.chkGlacier2.TabIndex = 0;
- this.chkGlacier2.TabStop = false;
- this.chkGlacier2.Text = "Glacier2";
- this.chkGlacier2.UseVisualStyleBackColor = true;
- this.chkGlacier2.CheckedChanged += new System.EventHandler(this.chkGlacier2_CheckedChanged);
- //
- // chkIce
- //
- this.chkIce.AutoSize = true;
- this.chkIce.Location = new System.Drawing.Point(78, 19);
- this.chkIce.Name = "chkIce";
- this.chkIce.Size = new System.Drawing.Size(41, 17);
- this.chkIce.TabIndex = 1;
- this.chkIce.TabStop = false;
- this.chkIce.Text = "Ice";
- this.chkIce.UseVisualStyleBackColor = true;
- this.chkIce.CheckedChanged += new System.EventHandler(this.chkIce_CheckedChanged);
- //
- // groupBox4
- //
- this.groupBox4.Controls.Add(this.label1);
- this.groupBox4.Controls.Add(this.comboBoxVerboseLevel);
- this.groupBox4.Controls.Add(this.chkChecksum);
- this.groupBox4.Controls.Add(this.chkIcePrefix);
- this.groupBox4.Controls.Add(this.chkStreaming);
- this.groupBox4.Controls.Add(this.chkTie);
- this.groupBox4.Location = new System.Drawing.Point(12, 88);
- this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(487, 44);
- this.groupBox4.TabIndex = 4;
- this.groupBox4.TabStop = false;
- this.groupBox4.Text = "Slice Compiler Options";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(278, 20);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(75, 13);
- this.label1.TabIndex = 7;
- this.label1.Text = "Tracing Level:";
- //
- // comboBoxVerboseLevel
- //
- this.comboBoxVerboseLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxVerboseLevel.FormattingEnabled = true;
- this.comboBoxVerboseLevel.Items.AddRange(new object[] {
- "Errors",
- "Info",
- "Debug"});
- this.comboBoxVerboseLevel.Location = new System.Drawing.Point(359, 15);
- this.comboBoxVerboseLevel.Name = "comboBoxVerboseLevel";
- this.comboBoxVerboseLevel.Size = new System.Drawing.Size(121, 21);
- this.comboBoxVerboseLevel.TabIndex = 6;
- this.comboBoxVerboseLevel.SelectedIndexChanged += new System.EventHandler(this.comboBoxVerboseLevel_SelectedIndexChanged);
-
- //
- // chkChecksum
- //
- this.chkChecksum.AutoSize = true;
- this.chkChecksum.Location = new System.Drawing.Point(179, 19);
- this.chkChecksum.Name = "chkChecksum";
- this.chkChecksum.Size = new System.Drawing.Size(76, 17);
- this.chkChecksum.TabIndex = 5;
- this.chkChecksum.Text = "Checksum";
- this.chkChecksum.UseVisualStyleBackColor = true;
- this.chkChecksum.CheckedChanged += new System.EventHandler(this.chkChecksum_CheckedChanged);
- //
- // chkIcePrefix
- //
- this.chkIcePrefix.AutoSize = true;
- this.chkIcePrefix.Location = new System.Drawing.Point(6, 19);
- this.chkIcePrefix.Name = "chkIcePrefix";
- this.chkIcePrefix.Size = new System.Drawing.Size(41, 17);
- this.chkIcePrefix.TabIndex = 2;
- this.chkIcePrefix.Text = "Ice";
- this.chkIcePrefix.UseVisualStyleBackColor = true;
- this.chkIcePrefix.CheckedChanged += new System.EventHandler(this.chkIcePrefix_CheckedChanged);
- //
- // chkStreaming
- //
- this.chkStreaming.AutoSize = true;
- this.chkStreaming.Location = new System.Drawing.Point(100, 19);
- this.chkStreaming.Name = "chkStreaming";
- this.chkStreaming.Size = new System.Drawing.Size(73, 17);
- this.chkStreaming.TabIndex = 1;
- this.chkStreaming.Text = "Streaming";
- this.chkStreaming.UseVisualStyleBackColor = true;
- this.chkStreaming.CheckedChanged += new System.EventHandler(this.chkStreaming_CheckedChanged);
- //
- // chkTie
- //
- this.chkTie.AutoSize = true;
- this.chkTie.Location = new System.Drawing.Point(53, 19);
- this.chkTie.Name = "chkTie";
- this.chkTie.Size = new System.Drawing.Size(41, 17);
- this.chkTie.TabIndex = 0;
- this.chkTie.Text = "Tie";
- this.chkTie.UseVisualStyleBackColor = true;
- this.chkTie.CheckedChanged += new System.EventHandler(this.chkTie_CheckedChanged);
- //
- // btnClose
- //
- this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.btnClose.Location = new System.Drawing.Point(424, 437);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 5;
- this.btnClose.Text = "Close";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnCancel_Click);
- //
- // groupBox5
- //
- this.groupBox5.Controls.Add(this.btnSelectIceHome);
- this.groupBox5.Controls.Add(this.txtIceHome);
- this.groupBox5.Location = new System.Drawing.Point(12, 37);
- this.groupBox5.Name = "groupBox5";
- this.groupBox5.Size = new System.Drawing.Size(486, 45);
- this.groupBox5.TabIndex = 6;
- this.groupBox5.TabStop = false;
- this.groupBox5.Text = "Ice Home";
- //
- // btnSelectIceHome
- //
- this.btnSelectIceHome.Location = new System.Drawing.Point(405, 16);
- this.btnSelectIceHome.Name = "btnSelectIceHome";
- this.btnSelectIceHome.Size = new System.Drawing.Size(75, 23);
- this.btnSelectIceHome.TabIndex = 1;
- this.btnSelectIceHome.Text = "....";
- this.btnSelectIceHome.UseVisualStyleBackColor = true;
- this.btnSelectIceHome.Click += new System.EventHandler(this.btnSelectIceHome_Click);
- //
- // txtIceHome
- //
- this.txtIceHome.Location = new System.Drawing.Point(10, 20);
- this.txtIceHome.Name = "txtIceHome";
- this.txtIceHome.Size = new System.Drawing.Size(386, 20);
- this.txtIceHome.TabIndex = 0;
- this.txtIceHome.Enter += new System.EventHandler(this.txtIceHome_Focus);
- this.txtIceHome.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtIceHome_KeyPress);
- this.txtIceHome.LostFocus += new System.EventHandler(this.txtIceHome_LostFocus);
- //
- // IceCsharpConfigurationDialog
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.CancelButton = this.btnClose;
- this.ClientSize = new System.Drawing.Size(512, 469);
- this.Controls.Add(this.groupBox5);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.groupBox4);
- this.Controls.Add(this.groupBox3);
- this.Controls.Add(this.groupBox2);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.chkEnableBuilder);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
- this.MaximizeBox = false;
- this.Name = "IceCsharpConfigurationDialog";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Ice Configuration";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing);
- this.groupBox1.ResumeLayout(false);
- this.groupBox1.PerformLayout();
- this.groupBox2.ResumeLayout(false);
- this.groupBox2.PerformLayout();
- this.groupBox3.ResumeLayout(false);
- this.groupBox3.PerformLayout();
- this.groupBox4.ResumeLayout(false);
- this.groupBox4.PerformLayout();
- this.groupBox5.ResumeLayout(false);
- this.groupBox5.PerformLayout();
- this.ResumeLayout(false);
- this.PerformLayout();
-
+ {
+ this.components = new System.ComponentModel.Container();
+ this.chkEnableBuilder = new System.Windows.Forms.CheckBox();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.chkIceStorm = new System.Windows.Forms.CheckBox();
+ this.chkIceSSL = new System.Windows.Forms.CheckBox();
+ this.chkIcePatch2 = new System.Windows.Forms.CheckBox();
+ this.chkIceGrid = new System.Windows.Forms.CheckBox();
+ this.chkIceBox = new System.Windows.Forms.CheckBox();
+ this.chkGlacier2 = new System.Windows.Forms.CheckBox();
+ this.chkIce = new System.Windows.Forms.CheckBox();
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.comboBoxVerboseLevel = new System.Windows.Forms.ComboBox();
+ this.chkChecksum = new System.Windows.Forms.CheckBox();
+ this.chkIcePrefix = new System.Windows.Forms.CheckBox();
+ this.chkStreaming = new System.Windows.Forms.CheckBox();
+ this.chkTie = new System.Windows.Forms.CheckBox();
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+ this.btnApply = new System.Windows.Forms.Button();
+ this.btnOk = new System.Windows.Forms.Button();
+ this.extraCompilerOptions = new Ice.VisualStudio.ExtraCompilerOptionsView();
+ this.iceHomeView = new Ice.VisualStudio.IceHomeView();
+ this.includePathView = new Ice.VisualStudio.IncludePathView();
+ this.outputDirView = new Ice.VisualStudio.OutputDirView();
+ this.groupBox3.SuspendLayout();
+ this.groupBox4.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // chkEnableBuilder
+ //
+ this.chkEnableBuilder.AutoSize = true;
+ this.chkEnableBuilder.Location = new System.Drawing.Point(12, 13);
+ this.chkEnableBuilder.Name = "chkEnableBuilder";
+ this.chkEnableBuilder.Size = new System.Drawing.Size(112, 17);
+ this.chkEnableBuilder.TabIndex = 0;
+ this.chkEnableBuilder.Text = "Enable Ice Builder";
+ this.chkEnableBuilder.UseVisualStyleBackColor = true;
+ this.chkEnableBuilder.CheckedChanged += new System.EventHandler(this.chkEnableBuilder_CheckedChanged);
+ //
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.chkIceStorm);
+ this.groupBox3.Controls.Add(this.chkIceSSL);
+ this.groupBox3.Controls.Add(this.chkIcePatch2);
+ this.groupBox3.Controls.Add(this.chkIceGrid);
+ this.groupBox3.Controls.Add(this.chkIceBox);
+ this.groupBox3.Controls.Add(this.chkGlacier2);
+ this.groupBox3.Controls.Add(this.chkIce);
+ this.groupBox3.Location = new System.Drawing.Point(12, 439);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(487, 47);
+ this.groupBox3.TabIndex = 3;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Ice Components";
+ //
+ // chkIceStorm
+ //
+ this.chkIceStorm.AutoSize = true;
+ this.chkIceStorm.Location = new System.Drawing.Point(404, 19);
+ this.chkIceStorm.Name = "chkIceStorm";
+ this.chkIceStorm.Size = new System.Drawing.Size(68, 17);
+ this.chkIceStorm.TabIndex = 6;
+ this.chkIceStorm.TabStop = false;
+ this.chkIceStorm.Text = "IceStorm";
+ this.chkIceStorm.UseVisualStyleBackColor = true;
+ this.chkIceStorm.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIceSSL
+ //
+ this.chkIceSSL.AutoSize = true;
+ this.chkIceSSL.Location = new System.Drawing.Point(337, 19);
+ this.chkIceSSL.Name = "chkIceSSL";
+ this.chkIceSSL.Size = new System.Drawing.Size(61, 17);
+ this.chkIceSSL.TabIndex = 5;
+ this.chkIceSSL.TabStop = false;
+ this.chkIceSSL.Text = "IceSSL";
+ this.chkIceSSL.UseVisualStyleBackColor = true;
+ this.chkIceSSL.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIcePatch2
+ //
+ this.chkIcePatch2.AutoSize = true;
+ this.chkIcePatch2.Location = new System.Drawing.Point(256, 19);
+ this.chkIcePatch2.Name = "chkIcePatch2";
+ this.chkIcePatch2.Size = new System.Drawing.Size(75, 17);
+ this.chkIcePatch2.TabIndex = 4;
+ this.chkIcePatch2.TabStop = false;
+ this.chkIcePatch2.Text = "IcePatch2";
+ this.chkIcePatch2.UseVisualStyleBackColor = true;
+ this.chkIcePatch2.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIceGrid
+ //
+ this.chkIceGrid.AutoSize = true;
+ this.chkIceGrid.Location = new System.Drawing.Point(190, 19);
+ this.chkIceGrid.Name = "chkIceGrid";
+ this.chkIceGrid.Size = new System.Drawing.Size(60, 17);
+ this.chkIceGrid.TabIndex = 3;
+ this.chkIceGrid.TabStop = false;
+ this.chkIceGrid.Text = "IceGrid";
+ this.chkIceGrid.UseVisualStyleBackColor = true;
+ this.chkIceGrid.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIceBox
+ //
+ this.chkIceBox.AutoSize = true;
+ this.chkIceBox.Location = new System.Drawing.Point(125, 19);
+ this.chkIceBox.Name = "chkIceBox";
+ this.chkIceBox.Size = new System.Drawing.Size(59, 17);
+ this.chkIceBox.TabIndex = 2;
+ this.chkIceBox.TabStop = false;
+ this.chkIceBox.Text = "IceBox";
+ this.chkIceBox.UseVisualStyleBackColor = true;
+ this.chkIceBox.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkGlacier2
+ //
+ this.chkGlacier2.AutoSize = true;
+ this.chkGlacier2.Location = new System.Drawing.Point(7, 19);
+ this.chkGlacier2.Name = "chkGlacier2";
+ this.chkGlacier2.Size = new System.Drawing.Size(65, 17);
+ this.chkGlacier2.TabIndex = 0;
+ this.chkGlacier2.TabStop = false;
+ this.chkGlacier2.Text = "Glacier2";
+ this.chkGlacier2.UseVisualStyleBackColor = true;
+ this.chkGlacier2.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIce
+ //
+ this.chkIce.AutoSize = true;
+ this.chkIce.Location = new System.Drawing.Point(78, 19);
+ this.chkIce.Name = "chkIce";
+ this.chkIce.Size = new System.Drawing.Size(41, 17);
+ this.chkIce.TabIndex = 1;
+ this.chkIce.TabStop = false;
+ this.chkIce.Text = "Ice";
+ this.chkIce.UseVisualStyleBackColor = true;
+ this.chkIce.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // groupBox4
+ //
+ this.groupBox4.Controls.Add(this.label1);
+ this.groupBox4.Controls.Add(this.comboBoxVerboseLevel);
+ this.groupBox4.Controls.Add(this.chkChecksum);
+ this.groupBox4.Controls.Add(this.chkIcePrefix);
+ this.groupBox4.Controls.Add(this.chkStreaming);
+ this.groupBox4.Controls.Add(this.chkTie);
+ this.groupBox4.Location = new System.Drawing.Point(12, 142);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(487, 44);
+ this.groupBox4.TabIndex = 4;
+ this.groupBox4.TabStop = false;
+ this.groupBox4.Text = "Slice Compiler Options";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(278, 20);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(75, 13);
+ this.label1.TabIndex = 7;
+ this.label1.Text = "Tracing Level:";
+ //
+ // comboBoxVerboseLevel
+ //
+ this.comboBoxVerboseLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxVerboseLevel.FormattingEnabled = true;
+ this.comboBoxVerboseLevel.Items.AddRange(new object[] {
+ "Errors",
+ "Info",
+ "Debug"});
+ this.comboBoxVerboseLevel.Location = new System.Drawing.Point(359, 15);
+ this.comboBoxVerboseLevel.Name = "comboBoxVerboseLevel";
+ this.comboBoxVerboseLevel.Size = new System.Drawing.Size(121, 21);
+ this.comboBoxVerboseLevel.TabIndex = 6;
+ this.comboBoxVerboseLevel.SelectedIndexChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkChecksum
+ //
+ this.chkChecksum.AutoSize = true;
+ this.chkChecksum.Location = new System.Drawing.Point(179, 19);
+ this.chkChecksum.Name = "chkChecksum";
+ this.chkChecksum.Size = new System.Drawing.Size(76, 17);
+ this.chkChecksum.TabIndex = 5;
+ this.chkChecksum.Text = "Checksum";
+ this.chkChecksum.UseVisualStyleBackColor = true;
+ this.chkChecksum.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIcePrefix
+ //
+ this.chkIcePrefix.AutoSize = true;
+ this.chkIcePrefix.Location = new System.Drawing.Point(6, 19);
+ this.chkIcePrefix.Name = "chkIcePrefix";
+ this.chkIcePrefix.Size = new System.Drawing.Size(41, 17);
+ this.chkIcePrefix.TabIndex = 2;
+ this.chkIcePrefix.Text = "Ice";
+ this.chkIcePrefix.UseVisualStyleBackColor = true;
+ this.chkIcePrefix.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkStreaming
+ //
+ this.chkStreaming.AutoSize = true;
+ this.chkStreaming.Location = new System.Drawing.Point(100, 19);
+ this.chkStreaming.Name = "chkStreaming";
+ this.chkStreaming.Size = new System.Drawing.Size(73, 17);
+ this.chkStreaming.TabIndex = 1;
+ this.chkStreaming.Text = "Streaming";
+ this.chkStreaming.UseVisualStyleBackColor = true;
+ this.chkStreaming.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkTie
+ //
+ this.chkTie.AutoSize = true;
+ this.chkTie.Location = new System.Drawing.Point(53, 19);
+ this.chkTie.Name = "chkTie";
+ this.chkTie.Size = new System.Drawing.Size(41, 17);
+ this.chkTie.TabIndex = 0;
+ this.chkTie.Text = "Tie";
+ this.chkTie.UseVisualStyleBackColor = true;
+ this.chkTie.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // btnCancel
+ //
+ this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnCancel.Location = new System.Drawing.Point(424, 494);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.TabIndex = 5;
+ this.btnCancel.Text = "Cancel";
+ this.btnCancel.UseVisualStyleBackColor = true;
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // btnApply
+ //
+ this.btnApply.Location = new System.Drawing.Point(343, 494);
+ this.btnApply.Name = "btnApply";
+ this.btnApply.Size = new System.Drawing.Size(75, 23);
+ this.btnApply.TabIndex = 7;
+ this.btnApply.Text = "Apply";
+ this.btnApply.UseVisualStyleBackColor = true;
+ this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
+ //
+ // btnOk
+ //
+ this.btnOk.Location = new System.Drawing.Point(262, 494);
+ this.btnOk.Name = "btnOk";
+ this.btnOk.Size = new System.Drawing.Size(75, 23);
+ this.btnOk.TabIndex = 8;
+ this.btnOk.Text = "Ok";
+ this.btnOk.UseVisualStyleBackColor = true;
+ this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
+ //
+ // extraCompilerOptions
+ //
+ this.extraCompilerOptions.Location = new System.Drawing.Point(7, 192);
+ this.extraCompilerOptions.Name = "extraCompilerOptions";
+ this.extraCompilerOptions.Size = new System.Drawing.Size(494, 73);
+ this.extraCompilerOptions.TabIndex = 9;
+ //
+ // iceHomeView
+ //
+ this.iceHomeView.Location = new System.Drawing.Point(7, 36);
+ this.iceHomeView.Name = "iceHomeView";
+ this.iceHomeView.Size = new System.Drawing.Size(498, 48);
+ this.iceHomeView.TabIndex = 10;
+ //
+ // includePathView
+ //
+ this.includePathView.Location = new System.Drawing.Point(9, 264);
+ this.includePathView.Name = "includePathView";
+ this.includePathView.Size = new System.Drawing.Size(495, 174);
+ this.includePathView.TabIndex = 11;
+ //
+ // outputDirView
+ //
+ this.outputDirView.Location = new System.Drawing.Point(5, 80);
+ this.outputDirView.Name = "outputDirView";
+ this.outputDirView.Size = new System.Drawing.Size(498, 54);
+ this.outputDirView.TabIndex = 12;
+ //
+ // IceCsharpConfigurationDialog
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.btnCancel;
+ this.ClientSize = new System.Drawing.Size(512, 526);
+ this.Controls.Add(this.outputDirView);
+ this.Controls.Add(this.includePathView);
+ this.Controls.Add(this.iceHomeView);
+ this.Controls.Add(this.extraCompilerOptions);
+ this.Controls.Add(this.btnOk);
+ this.Controls.Add(this.btnApply);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.groupBox4);
+ this.Controls.Add(this.groupBox3);
+ this.Controls.Add(this.chkEnableBuilder);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+ this.MaximizeBox = false;
+ this.Name = "IceCsharpConfigurationDialog";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Ice Configuration";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing);
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
}
#endregion
private System.Windows.Forms.CheckBox chkEnableBuilder;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Button btnMoveIncludeDown;
- private System.Windows.Forms.Button btnMoveIncludeUp;
- private System.Windows.Forms.Button btnRemoveInclude;
- private System.Windows.Forms.Button btnAddInclude;
- private System.Windows.Forms.CheckedListBox includeDirList;
- private System.Windows.Forms.GroupBox groupBox2;
- private System.Windows.Forms.TextBox txtExtraOptions;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.CheckBox chkIceStorm;
private System.Windows.Forms.CheckBox chkIceSSL;
@@ -474,15 +364,16 @@ namespace Ice.VisualStudio
private System.Windows.Forms.CheckBox chkTie;
private System.Windows.Forms.CheckBox chkIcePrefix;
private System.Windows.Forms.CheckBox chkStreaming;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.GroupBox groupBox5;
- private System.Windows.Forms.Button btnSelectIceHome;
- private System.Windows.Forms.TextBox txtIceHome;
+ private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.CheckBox chkChecksum;
- private System.Windows.Forms.Label includeInfo;
- private System.Windows.Forms.Button btnEditInclude;
- private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBoxVerboseLevel;
+ private System.Windows.Forms.Button btnOk;
+ private System.Windows.Forms.Button btnApply;
+ private ExtraCompilerOptionsView extraCompilerOptions;
+ private IceHomeView iceHomeView;
+ private IncludePathView includePathView;
+ private OutputDirView outputDirView;
}
}
diff --git a/vsaddin/src/IceCsharpConfigurationDialog.cs b/vsaddin/src/IceCsharpConfigurationDialog.cs
new file mode 100644
index 00000000000..10dab8a32aa
--- /dev/null
+++ b/vsaddin/src/IceCsharpConfigurationDialog.cs
@@ -0,0 +1,653 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+using System.Globalization;
+using EnvDTE;
+
+namespace Ice.VisualStudio
+{
+ public partial class IceCsharpConfigurationDialog : Form, IceConfigurationDialog
+ {
+ public IceCsharpConfigurationDialog(Project project)
+ {
+ InitializeComponent();
+ _project = project;
+
+ iceHomeView.init(this, _project);
+ outputDirView.init(this, _project);
+ extraCompilerOptions.init(this, _project);
+ includePathView.init(this, _project);
+
+ //
+ // Set the toolTip messages.
+ //
+ toolTip.SetToolTip(chkStreaming, "Generate marshaling support for stream API (--stream).");
+ toolTip.SetToolTip(chkChecksum, "Generate checksums for Slice definitions (--checksum).");
+ toolTip.SetToolTip(chkIcePrefix, "Permit Ice prefixes (--ice).");
+ toolTip.SetToolTip(chkTie, "Generate TIE classes (--tie).");
+
+ if(_project != null)
+ {
+ this.Text = "Ice Configuration - Project: " + _project.Name;
+ bool enabled = Util.isSliceBuilderEnabled(project);
+ setEnabled(enabled);
+ chkEnableBuilder.Checked = enabled;
+ load();
+ _initialized = true;
+ }
+ }
+
+ private void load()
+ {
+ if(_project == null)
+ {
+ return;
+ }
+
+ Cursor = Cursors.WaitCursor;
+ iceHomeView.load();
+ outputDirView.load();
+ extraCompilerOptions.load();
+
+ chkIcePrefix.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix);
+ chkTie.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIceTie);
+ chkStreaming.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIceStreaming);
+ chkChecksum.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIceChecksum);
+ comboBoxVerboseLevel.SelectedIndex = Util.getVerboseLevel(_project);
+
+ includePathView.load();
+
+ loadComponents();
+ btnApply.Enabled = false;
+ Cursor = Cursors.Default;
+ }
+
+ private void loadComponents()
+ {
+ ComponentList selectedComponents = Util.getIceDotNetComponents(_project);
+ string[] dotNetNames = Util.getDotNetNames();
+ foreach(String s in dotNetNames)
+ {
+ if(selectedComponents.Contains(s))
+ {
+ checkComponent(s, true);
+ }
+ else
+ {
+ checkComponent(s, false);
+ }
+ }
+ }
+
+#region IceConfigurationDialog interface
+
+ public bool editingIncludeDir()
+ {
+ return includePathView.editingIncludeDir();
+ }
+
+ public void endEditIncludeDir(bool saveChanges)
+ {
+ includePathView.endEditIncludeDir(saveChanges);
+ }
+
+ public void needSave()
+ {
+ if(_initialized)
+ {
+ btnApply.Enabled = hasUnsavedChanges();
+ }
+ }
+
+ public void unsetCancelButton()
+ {
+ CancelButton = null;
+ }
+
+ public void setCancelButton()
+ {
+ CancelButton = btnCancel;
+ }
+
+#endregion IceConfigurationDialog interface
+
+ private void checkComponent(String component, bool check)
+ {
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+ switch(component)
+ {
+ case "Glacier2":
+ {
+ chkGlacier2.Checked = check;
+ break;
+ }
+ case "Ice":
+ {
+ chkIce.Checked = check;
+ break;
+ }
+ case "IceBox":
+ {
+ chkIceBox.Checked = check;
+ break;
+ }
+ case "IceGrid":
+ {
+ chkIceGrid.Checked = check;
+ break;
+ }
+ case "IcePatch2":
+ {
+ chkIcePatch2.Checked = check;
+ break;
+ }
+ case "IceSSL":
+ {
+ chkIceSSL.Checked = check;
+ break;
+ }
+ case "IceStorm":
+ {
+ chkIceStorm.Checked = check;
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ }
+
+ private void chkEnableBuilder_CheckedChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+ if(_initialized)
+ {
+ _initialized = false;
+ setEnabled(chkEnableBuilder.Checked);
+
+ ComponentList components;
+ if(chkEnableBuilder.Checked)
+ {
+ //
+ // Enable the components that were previously enabled, if any.
+ //
+ components = new ComponentList(Util.getProjectProperty(_project, Util.PropertyIceComponents));
+
+ //
+ // If there isn't a previous set of components, we enable the default components.
+ //
+ if(components.Count == 0)
+ {
+ components.Add("Ice");
+ }
+ }
+ else
+ {
+ components = iceComponents();
+ }
+
+ //
+ // Enable / Disable the given set of components
+ //
+ for(int i = 0; i < components.Count; ++i)
+ {
+ checkComponent(components[i], chkEnableBuilder.Checked);
+ }
+
+ chkEnableBuilder.Enabled = true;
+ _initialized = true;
+ needSave();
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void setEnabled(bool enabled)
+ {
+ iceHomeView.setEnabled(enabled);
+ outputDirView.setEnabled(enabled);
+ chkIcePrefix.Enabled = enabled;
+ chkTie.Enabled = enabled;
+ chkStreaming.Enabled = enabled;
+ chkChecksum.Enabled = enabled;
+ comboBoxVerboseLevel.Enabled = enabled;
+ extraCompilerOptions.setEnabled(enabled);
+ includePathView.setEnabled(enabled);
+ chkGlacier2.Enabled = enabled;
+ chkIce.Enabled = enabled;
+ chkIceBox.Enabled = enabled;
+ chkIceGrid.Enabled = enabled;
+ chkIcePatch2.Enabled = enabled;
+ chkIceSSL.Enabled = enabled;
+ chkIceStorm.Enabled = enabled;
+ }
+
+ private void formClosing(object sender, FormClosingEventArgs e)
+ {
+ try
+ {
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(false);
+ }
+
+ if(hasUnsavedChanges())
+ {
+ if(!Util.warnUnsavedChanges(this))
+ {
+ e.Cancel = true;
+ return;
+ }
+ }
+
+ Cursor = Cursors.WaitCursor;
+ if(_changed && Util.isSliceBuilderEnabled(_project))
+ {
+ Util.rebuildProject(_project);
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Close();
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void componentChanged(string name, bool value, bool development)
+ {
+ if(value)
+ {
+ if(!Util.addDotNetReference(_project, name, Util.getIceHome(_project), development))
+ {
+ checkComponent(name, false);
+ }
+ }
+ else
+ {
+ Util.removeDotNetReference(_project, name);
+ }
+ _changed = true;
+ }
+
+ private void component_Changed(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+ needSave();
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void btnOk_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(apply())
+ {
+ Close();
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void btnApply_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ apply();
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private ComponentList iceComponents()
+ {
+ ComponentList components = new ComponentList();
+
+ if(chkGlacier2.Checked)
+ {
+ components.Add("Glacier2");
+ }
+ if(chkIce.Checked)
+ {
+ components.Add("Ice");
+ }
+ if(chkIceBox.Checked)
+ {
+ components.Add("IceBox");
+ }
+ if(chkIceGrid.Checked)
+ {
+ components.Add("IceGrid");
+ }
+ if(chkIcePatch2.Checked)
+ {
+ components.Add("IcePatch2");
+ }
+ if(chkIceSSL.Checked)
+ {
+ components.Add("IceSSL");
+ }
+ if(chkIceStorm.Checked)
+ {
+ components.Add("IceStorm");
+ }
+ return components;
+ }
+
+ //
+ // Apply unsaved changes, returns true if new settings are all applied correctly,
+ // otherwise returns false.
+ //
+ private bool apply()
+ {
+ if(!hasUnsavedChanges())
+ {
+ return true; // Nothing to do.
+ }
+
+ try
+ {
+
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+
+ //
+ // This must be the first setting to be updated, as other settings cannot be
+ // updated if the add-in is disabled.
+ //
+ if(chkEnableBuilder.Checked && !Util.isSliceBuilderEnabled(_project))
+ {
+ Util.addBuilderToProject(_project, iceComponents());
+ _changed = true;
+ _initialized = false;
+ loadComponents();
+ _initialized = true;
+ }
+
+ bool changed = false;
+ if(!iceHomeView.apply(ref changed))
+ {
+ //
+ // We don't apply other changes until that error is fixed.
+ // This should not happen in normal circumstances, as we check
+ // that Ice Home is valid when the corresponding field is changed.
+ // This could happen if the directory is removed after the field
+ // was edited and apply was clicked.
+ //
+ return false;
+ }
+ if(changed)
+ {
+ _changed = true;
+ }
+
+ if(!outputDirView.apply(ref changed))
+ {
+ return false;
+ }
+ if(changed)
+ {
+ _changed = true;
+ }
+
+ if(chkIcePrefix.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix))
+ {
+ Util.setProjectProperty(_project, Util.PropertyIcePrefix, chkIcePrefix.Checked.ToString());
+ _changed = true;
+ }
+
+ if(chkStreaming.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIceStreaming))
+ {
+ Util.setProjectProperty(_project, Util.PropertyIceStreaming, chkStreaming.Checked.ToString());
+ _changed = true;
+ }
+
+ if(chkChecksum.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIceChecksum))
+ {
+ Util.setProjectProperty(_project, Util.PropertyIceChecksum, chkChecksum.Checked.ToString());
+ _changed = true;
+ }
+
+ if(comboBoxVerboseLevel.SelectedIndex != Util.getVerboseLevel(_project))
+ {
+ Util.setProjectProperty(_project, Util.PropertyVerboseLevel,
+ comboBoxVerboseLevel.SelectedIndex.ToString(CultureInfo.InvariantCulture));
+ _changed = true;
+ }
+
+ changed = false;
+ if(!extraCompilerOptions.apply(ref changed))
+ {
+ return false;
+ }
+ if(changed)
+ {
+ _changed = true;
+ }
+
+ if(includePathView.apply())
+ {
+ _changed = true;
+ }
+
+ bool development = Util.developmentMode(_project);
+ if(chkGlacier2.Checked != Util.hasDotNetReference(_project, "Glacier2"))
+ {
+ componentChanged("Glacier2", chkGlacier2.Checked, development);
+ }
+ if(chkIce.Checked != Util.hasDotNetReference(_project, "Ice"))
+ {
+ componentChanged("Ice", chkIce.Checked, development);
+ }
+ if(chkIceBox.Checked != Util.hasDotNetReference(_project, "IceBox"))
+ {
+ componentChanged("IceBox", chkIceBox.Checked, development);
+ }
+ if(chkIceGrid.Checked != Util.hasDotNetReference(_project, "IceGrid"))
+ {
+ componentChanged("IceGrid", chkIceGrid.Checked, development);
+ }
+ if(chkIcePatch2.Checked != Util.hasDotNetReference(_project, "IcePatch2"))
+ {
+ componentChanged("IcePatch2", chkIcePatch2.Checked, development);
+ }
+ if(chkIceSSL.Checked != Util.hasDotNetReference(_project, "IceSSL"))
+ {
+ componentChanged("IceSSL", chkIceSSL.Checked, development);
+ }
+ if(chkIceStorm.Checked != Util.hasDotNetReference(_project, "IceStorm"))
+ {
+ componentChanged("IceStorm", chkIceStorm.Checked, development);
+ }
+
+ //
+ // This must be the last setting to be updated, as we want to update
+ // all other settings and that isn't possible if the builder is disabled.
+ //
+ if(!chkEnableBuilder.Checked && Util.isSliceBuilderEnabled(_project))
+ {
+ Util.removeBuilderFromProject(_project);
+ _initialized = false;
+ load();
+ _initialized = true;
+ _changed = true;
+ }
+ return true;
+ }
+ finally
+ {
+ needSave(); // Call needSave to update apply button status
+ }
+ }
+
+ private bool hasUnsavedChanges()
+ {
+ if(chkEnableBuilder.Checked != Util.isSliceBuilderEnabled(_project))
+ {
+ return true;
+ }
+
+ //
+ // If the builder is disabled, we are not interested in the other settings
+ // to compute changes.
+ //
+ if(!Util.isSliceBuilderEnabled(_project))
+ {
+ return false;
+ }
+
+ if(iceHomeView.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ if(outputDirView.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ if(chkIcePrefix.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix))
+ {
+ return true;
+ }
+
+ if(chkStreaming.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIceStreaming))
+ {
+ return true;
+ }
+
+ if(chkChecksum.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIceChecksum))
+ {
+ return true;
+ }
+
+ if(comboBoxVerboseLevel.SelectedIndex != Util.getVerboseLevel(_project))
+ {
+ return true;
+ }
+
+ if(extraCompilerOptions.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ if(includePathView.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ // Ice libraries
+ if(chkGlacier2.Checked != Util.hasDotNetReference(_project, "Glacier2"))
+ {
+ return true;
+ }
+ if(chkIce.Checked != Util.hasDotNetReference(_project, "Ice"))
+ {
+ return true;
+ }
+ if(chkIceBox.Checked != Util.hasDotNetReference(_project, "IceBox"))
+ {
+ return true;
+ }
+ if(chkIceGrid.Checked != Util.hasDotNetReference(_project, "IceGrid"))
+ {
+ return true;
+ }
+ if(chkIcePatch2.Checked != Util.hasDotNetReference(_project, "IcePatch2"))
+ {
+ return true;
+ }
+ if(chkIceSSL.Checked != Util.hasDotNetReference(_project, "IceSSL"))
+ {
+ return true;
+ }
+ if(chkIceStorm.Checked != Util.hasDotNetReference(_project, "IceStorm"))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ private bool _initialized;
+ private Project _project;
+ private bool _changed = false;
+ }
+}
diff --git a/vsplugin/src/IceCsharpConfigurationDialog.resx b/vsaddin/src/IceCsharpConfigurationDialog.resx
index 026c576b40e..a5979aadfff 100644
--- a/vsplugin/src/IceCsharpConfigurationDialog.resx
+++ b/vsaddin/src/IceCsharpConfigurationDialog.resx
@@ -112,12 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> \ No newline at end of file
diff --git a/vsaddin/src/IceDialog.cs b/vsaddin/src/IceDialog.cs
new file mode 100644
index 00000000000..d9aefadb627
--- /dev/null
+++ b/vsaddin/src/IceDialog.cs
@@ -0,0 +1,25 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using EnvDTE;
+
+namespace Ice.VisualStudio
+{
+ public interface IceConfigurationDialog
+ {
+ void unsetCancelButton();
+ void setCancelButton();
+ void needSave();
+ void endEditIncludeDir(bool save);
+ bool editingIncludeDir();
+ }
+}
diff --git a/vsaddin/src/IceHomeView.Designer.cs b/vsaddin/src/IceHomeView.Designer.cs
new file mode 100644
index 00000000000..6051975de93
--- /dev/null
+++ b/vsaddin/src/IceHomeView.Designer.cs
@@ -0,0 +1,101 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+namespace Ice.VisualStudio
+{
+ partial class IceHomeView
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if(disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.txtIceHome = new System.Windows.Forms.TextBox();
+ this.btnSelectIceHome = new System.Windows.Forms.Button();
+ this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.txtIceHome);
+ this.groupBox1.Controls.Add(this.btnSelectIceHome);
+ this.groupBox1.Location = new System.Drawing.Point(5, 0);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(487, 45);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Ice Home";
+ //
+ // txtIceHome
+ //
+ this.txtIceHome.Location = new System.Drawing.Point(7, 16);
+ this.txtIceHome.Name = "txtIceHome";
+ this.txtIceHome.Size = new System.Drawing.Size(393, 20);
+ this.txtIceHome.TabIndex = 2;
+ this.txtIceHome.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtIceHome_KeyPress);
+ this.txtIceHome.KeyUp += new System.Windows.Forms.KeyEventHandler(txtIceHome_KeyUp);
+ this.txtIceHome.Enter += new System.EventHandler(this.txtIceHome_Focus);
+ this.txtIceHome.LostFocus += new System.EventHandler(this.txtIceHome_LostFocus);
+
+ //
+ // btnSelectIceHome
+ //
+ this.btnSelectIceHome.Location = new System.Drawing.Point(406, 16);
+ this.btnSelectIceHome.Name = "btnSelectIceHome";
+ this.btnSelectIceHome.Size = new System.Drawing.Size(75, 23);
+ this.btnSelectIceHome.TabIndex = 1;
+ this.btnSelectIceHome.Text = "...";
+ this.btnSelectIceHome.UseVisualStyleBackColor = true;
+ this.btnSelectIceHome.Click += new System.EventHandler(this.btnSelectIceHome_Click);
+ //
+ // IceHomeView
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupBox1);
+ this.Name = "IceHomeView";
+ this.Size = new System.Drawing.Size(498, 48);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.TextBox txtIceHome;
+ private System.Windows.Forms.Button btnSelectIceHome;
+ private System.Windows.Forms.ToolTip toolTip;
+ }
+}
diff --git a/vsaddin/src/IceHomeView.cs b/vsaddin/src/IceHomeView.cs
new file mode 100644
index 00000000000..e92d07425ec
--- /dev/null
+++ b/vsaddin/src/IceHomeView.cs
@@ -0,0 +1,149 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+using EnvDTE;
+
+namespace Ice.VisualStudio
+{
+ public partial class IceHomeView : UserControl
+ {
+ public IceHomeView()
+ {
+ InitializeComponent();
+ toolTip.SetToolTip(txtIceHome, "Ice installation directory.");
+ toolTip.SetToolTip(btnSelectIceHome, "Ice installation directory.");
+ }
+
+ public void init(IceConfigurationDialog dialog, Project project)
+ {
+ this._dialog = dialog;
+ this._project = project;
+ }
+
+ public void load()
+ {
+ txtIceHome.Text = Util.getIceHomeRaw(_project, false);
+ }
+
+ public void setEnabled(bool enabled)
+ {
+ txtIceHome.Enabled = enabled;
+ btnSelectIceHome.Enabled = enabled;
+ }
+
+ public bool apply(ref bool changed)
+ {
+ changed = false;
+ if(hasUnsavedChanges())
+ {
+ if(!Util.updateIceHome(_project, txtIceHome.Text.Trim(), false))
+ {
+ txtIceHome.Focus();
+ return false;
+ }
+ changed = true;
+ }
+ return true;
+ }
+
+ public bool hasUnsavedChanges()
+ {
+ if(!txtIceHome.Text.Trim().Equals(Util.getIceHomeRaw(_project, false),
+ StringComparison.CurrentCultureIgnoreCase))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ private void btnSelectIceHome_Click(object sender, EventArgs e)
+ {
+ if(_dialog.editingIncludeDir())
+ {
+ _dialog.endEditIncludeDir(true);
+ }
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.SelectedPath = Util.absolutePath(_project, Util.getIceHome(_project));
+ dialog.Description = "Select Ice Home Installation Directory";
+ DialogResult result = dialog.ShowDialog();
+ if(result == DialogResult.OK)
+ {
+ if(!Util.checkIceHomeAndShowWarning(_project, dialog.SelectedPath))
+ {
+ //
+ // If IceHome isn't valid, return focus to the component.
+ //
+ txtIceHome.Focus();
+ }
+ else
+ {
+ txtIceHome.Text = dialog.SelectedPath;
+ _dialog.needSave();
+ }
+ }
+ }
+
+ private void txtIceHome_KeyPress(object sender, KeyPressEventArgs e)
+ {
+ if(e.KeyChar == (char)Keys.Return)
+ {
+ checkIceHome();
+ e.Handled = true;
+ }
+ }
+
+ private void txtIceHome_KeyUp(object sender, KeyEventArgs e)
+ {
+ if(e.KeyCode != Keys.Return)
+ {
+ _dialog.needSave();
+ }
+ }
+
+ private void txtIceHome_LostFocus(object sender, EventArgs e)
+ {
+ _dialog.needSave();
+ }
+
+ private void txtIceHome_Focus(object sender, EventArgs e)
+ {
+ if(_dialog.editingIncludeDir())
+ {
+ _dialog.endEditIncludeDir(true);
+ }
+ }
+
+ private void checkIceHome()
+ {
+ if(hasUnsavedChanges())
+ {
+ if(!Util.checkIceHomeAndShowWarning(_project, txtIceHome.Text))
+ {
+ //
+ // If IceHome isn't valid, return focus to the component.
+ //
+ txtIceHome.Focus();
+ txtIceHome.Text = Util.getProjectProperty(_project, Util.PropertyIceHome);
+ }
+ _dialog.needSave();
+ }
+ }
+
+ private IceConfigurationDialog _dialog;
+ private Project _project;
+ }
+}
diff --git a/vsaddin/src/IceHomeView.resx b/vsaddin/src/IceHomeView.resx
new file mode 100644
index 00000000000..a5979aadfff
--- /dev/null
+++ b/vsaddin/src/IceHomeView.resx
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+</root> \ No newline at end of file
diff --git a/vsaddin/src/IceSilverlightConfigurationDialog.Designer.cs b/vsaddin/src/IceSilverlightConfigurationDialog.Designer.cs
new file mode 100644
index 00000000000..669954023a3
--- /dev/null
+++ b/vsaddin/src/IceSilverlightConfigurationDialog.Designer.cs
@@ -0,0 +1,247 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+namespace Ice.VisualStudio
+{
+ partial class IceSilverlightConfigurationDialog
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.chkEnableBuilder = new System.Windows.Forms.CheckBox();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.chkIceSl = new System.Windows.Forms.CheckBox();
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.comboBoxVerboseLevel = new System.Windows.Forms.ComboBox();
+ this.chkIcePrefix = new System.Windows.Forms.CheckBox();
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+ this.iceHomeView = new Ice.VisualStudio.IceHomeView();
+ this.extraCompilerOptions = new Ice.VisualStudio.ExtraCompilerOptionsView();
+ this.includePathView = new Ice.VisualStudio.IncludePathView();
+ this.btnApply = new System.Windows.Forms.Button();
+ this.btnOk = new System.Windows.Forms.Button();
+ this.outputDirView = new Ice.VisualStudio.OutputDirView();
+ this.groupBox3.SuspendLayout();
+ this.groupBox4.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // chkEnableBuilder
+ //
+ this.chkEnableBuilder.AutoSize = true;
+ this.chkEnableBuilder.Location = new System.Drawing.Point(12, 13);
+ this.chkEnableBuilder.Name = "chkEnableBuilder";
+ this.chkEnableBuilder.Size = new System.Drawing.Size(112, 17);
+ this.chkEnableBuilder.TabIndex = 0;
+ this.chkEnableBuilder.Text = "Enable Ice Builder";
+ this.chkEnableBuilder.UseVisualStyleBackColor = true;
+ this.chkEnableBuilder.CheckedChanged += new System.EventHandler(this.chkEnableBuilder_CheckedChanged);
+ //
+ // groupBox3
+ //
+ this.groupBox3.Controls.Add(this.chkIceSl);
+ this.groupBox3.Location = new System.Drawing.Point(12, 421);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(487, 47);
+ this.groupBox3.TabIndex = 3;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Ice Components";
+ //
+ // chkIceSl
+ //
+ this.chkIceSl.AutoSize = true;
+ this.chkIceSl.Location = new System.Drawing.Point(10, 19);
+ this.chkIceSl.Name = "chkIceSl";
+ this.chkIceSl.Size = new System.Drawing.Size(50, 17);
+ this.chkIceSl.TabIndex = 1;
+ this.chkIceSl.TabStop = false;
+ this.chkIceSl.Text = "IceSl";
+ this.chkIceSl.UseVisualStyleBackColor = true;
+ this.chkIceSl.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // groupBox4
+ //
+ this.groupBox4.Controls.Add(this.label1);
+ this.groupBox4.Controls.Add(this.comboBoxVerboseLevel);
+ this.groupBox4.Controls.Add(this.chkIcePrefix);
+ this.groupBox4.Location = new System.Drawing.Point(12, 135);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(487, 44);
+ this.groupBox4.TabIndex = 4;
+ this.groupBox4.TabStop = false;
+ this.groupBox4.Text = "Slice Compiler Options";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(279, 20);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(75, 13);
+ this.label1.TabIndex = 4;
+ this.label1.Text = "Tracing Level:";
+ //
+ // comboBoxVerboseLevel
+ //
+ this.comboBoxVerboseLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxVerboseLevel.FormattingEnabled = true;
+ this.comboBoxVerboseLevel.Items.AddRange(new object[] {
+ "Errors",
+ "Info",
+ "Debug"});
+ this.comboBoxVerboseLevel.Location = new System.Drawing.Point(360, 15);
+ this.comboBoxVerboseLevel.Name = "comboBoxVerboseLevel";
+ this.comboBoxVerboseLevel.Size = new System.Drawing.Size(121, 21);
+ this.comboBoxVerboseLevel.TabIndex = 3;
+ this.comboBoxVerboseLevel.SelectedIndexChanged += new System.EventHandler(this.component_Changed);
+ //
+ // chkIcePrefix
+ //
+ this.chkIcePrefix.AutoSize = true;
+ this.chkIcePrefix.Location = new System.Drawing.Point(10, 19);
+ this.chkIcePrefix.Name = "chkIcePrefix";
+ this.chkIcePrefix.Size = new System.Drawing.Size(41, 17);
+ this.chkIcePrefix.TabIndex = 2;
+ this.chkIcePrefix.Text = "Ice";
+ this.chkIcePrefix.UseVisualStyleBackColor = true;
+ this.chkIcePrefix.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // btnCancel
+ //
+ this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnCancel.Location = new System.Drawing.Point(423, 475);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.TabIndex = 5;
+ this.btnCancel.Text = "Cancel";
+ this.btnCancel.UseVisualStyleBackColor = true;
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // iceHomeView
+ //
+ this.iceHomeView.Location = new System.Drawing.Point(8, 37);
+ this.iceHomeView.Name = "iceHomeView";
+ this.iceHomeView.Size = new System.Drawing.Size(498, 48);
+ this.iceHomeView.TabIndex = 6;
+ //
+ // extraCompilerOptions
+ //
+ this.extraCompilerOptions.Location = new System.Drawing.Point(6, 178);
+ this.extraCompilerOptions.Name = "extraCompilerOptions";
+ this.extraCompilerOptions.Size = new System.Drawing.Size(498, 75);
+ this.extraCompilerOptions.TabIndex = 7;
+ //
+ // includePathView
+ //
+ this.includePathView.Location = new System.Drawing.Point(8, 251);
+ this.includePathView.Name = "includePathView";
+ this.includePathView.Size = new System.Drawing.Size(495, 174);
+ this.includePathView.TabIndex = 8;
+ //
+ // btnApply
+ //
+ this.btnApply.Location = new System.Drawing.Point(342, 475);
+ this.btnApply.Name = "btnApply";
+ this.btnApply.Size = new System.Drawing.Size(75, 23);
+ this.btnApply.TabIndex = 9;
+ this.btnApply.Text = "Apply";
+ this.btnApply.UseVisualStyleBackColor = true;
+ this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
+ //
+ // btnOk
+ //
+ this.btnOk.Location = new System.Drawing.Point(261, 475);
+ this.btnOk.Name = "btnOk";
+ this.btnOk.Size = new System.Drawing.Size(75, 23);
+ this.btnOk.TabIndex = 10;
+ this.btnOk.Text = "Ok";
+ this.btnOk.UseVisualStyleBackColor = true;
+ this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
+ //
+ // outputDirView
+ //
+ this.outputDirView.Location = new System.Drawing.Point(6, 82);
+ this.outputDirView.Name = "outputDirView";
+ this.outputDirView.Size = new System.Drawing.Size(498, 52);
+ this.outputDirView.TabIndex = 11;
+ //
+ // IceSilverlightConfigurationDialog
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.btnCancel;
+ this.ClientSize = new System.Drawing.Size(515, 509);
+ this.Controls.Add(this.outputDirView);
+ this.Controls.Add(this.btnOk);
+ this.Controls.Add(this.btnApply);
+ this.Controls.Add(this.includePathView);
+ this.Controls.Add(this.extraCompilerOptions);
+ this.Controls.Add(this.iceHomeView);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.groupBox4);
+ this.Controls.Add(this.groupBox3);
+ this.Controls.Add(this.chkEnableBuilder);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
+ this.MaximizeBox = false;
+ this.Name = "IceSilverlightConfigurationDialog";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Ice Configuration";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing);
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.CheckBox chkEnableBuilder;
+ private System.Windows.Forms.GroupBox groupBox3;
+ private System.Windows.Forms.CheckBox chkIceSl;
+ private System.Windows.Forms.GroupBox groupBox4;
+ private System.Windows.Forms.CheckBox chkIcePrefix;
+ private System.Windows.Forms.Button btnCancel;
+ private System.Windows.Forms.ToolTip toolTip;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.ComboBox comboBoxVerboseLevel;
+ private IceHomeView iceHomeView;
+ private ExtraCompilerOptionsView extraCompilerOptions;
+ private IncludePathView includePathView;
+ private System.Windows.Forms.Button btnApply;
+ private System.Windows.Forms.Button btnOk;
+ private OutputDirView outputDirView;
+ }
+}
diff --git a/vsaddin/src/IceSilverlightConfigurationDialog.cs b/vsaddin/src/IceSilverlightConfigurationDialog.cs
new file mode 100644
index 00000000000..2fad2471b8d
--- /dev/null
+++ b/vsaddin/src/IceSilverlightConfigurationDialog.cs
@@ -0,0 +1,498 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+using System.Globalization;
+using EnvDTE;
+
+namespace Ice.VisualStudio
+{
+ public partial class IceSilverlightConfigurationDialog : Form, IceConfigurationDialog
+ {
+ public IceSilverlightConfigurationDialog(Project project)
+ {
+ InitializeComponent();
+ _project = project;
+
+ iceHomeView.init(this, _project);
+ outputDirView.init(this, _project);
+ extraCompilerOptions.init(this, _project);
+ includePathView.init(this, _project);
+
+ //
+ // Set the toolTip messages.
+ //
+ toolTip.SetToolTip(chkIcePrefix, "Allow Ice prefix (--ice).");
+
+ if(_project != null)
+ {
+ this.Text = "Ice Configuration - Project: " + _project.Name;
+ bool enabled = Util.isSliceBuilderEnabled(project);
+ setEnabled(enabled);
+ chkEnableBuilder.Checked = enabled;
+ load();
+ _initialized = true;
+ }
+ }
+
+#region IceConfigurationDialog interface
+
+ public bool editingIncludeDir()
+ {
+ return includePathView.editingIncludeDir();
+ }
+
+ public void endEditIncludeDir(bool saveChanges)
+ {
+ includePathView.endEditIncludeDir(saveChanges);
+ }
+
+ public void needSave()
+ {
+ if(_initialized)
+ {
+ btnApply.Enabled = hasUnsavedChanges();
+ }
+ }
+
+ public void unsetCancelButton()
+ {
+ CancelButton = null;
+ }
+
+ public void setCancelButton()
+ {
+ CancelButton = btnCancel;
+ }
+
+#endregion IceConfigurationDialog interface
+ private void load()
+ {
+ if(_project == null)
+ {
+ return;
+ }
+ Cursor = Cursors.WaitCursor;
+ iceHomeView.load();
+ outputDirView.load();
+ extraCompilerOptions.load();
+
+ chkIcePrefix.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix);
+ comboBoxVerboseLevel.SelectedIndex = Util.getVerboseLevel(_project);
+
+ includePathView.load();
+
+ loadComponents();
+
+ btnApply.Enabled = false;
+ Cursor = Cursors.Default;
+ }
+
+ private void loadComponents()
+ {
+ ComponentList selectedComponents = Util.getIceSilverlightComponents(_project);
+ foreach(String s in Util.getSilverlightNames())
+ {
+ if(selectedComponents.Contains(s))
+ {
+ checkComponent(s, true);
+ }
+ else
+ {
+ checkComponent(s, false);
+ }
+ }
+ }
+
+ private void checkComponent(String component, bool check)
+ {
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+ switch(component)
+ {
+ case "IceSL":
+ {
+ chkIceSl.Checked = check;
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ }
+ private void chkEnableBuilder_CheckedChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+ if(_initialized)
+ {
+ _initialized = false;
+ setEnabled(chkEnableBuilder.Checked);
+
+ ComponentList components;
+ if(chkEnableBuilder.Checked)
+ {
+ //
+ // Enable the components that were previously enabled, if any.
+ //
+ components = new ComponentList(Util.getProjectProperty(_project, Util.PropertyIceComponents));
+
+ //
+ // If there isn't a previous set of components, we enable the default components.
+ //
+ if(components.Count == 0)
+ {
+ components.Add("IceSL");
+ }
+ }
+ else
+ {
+ components = new ComponentList("IceSL");
+ }
+
+ // Enable / Disable the given set of components
+ for(int i = 0; i < components.Count; ++i)
+ {
+ checkComponent(components[i], chkEnableBuilder.Checked);
+ }
+
+ chkEnableBuilder.Enabled = true;
+ _initialized = true;
+ needSave();
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void setEnabled(bool enabled)
+ {
+ iceHomeView.setEnabled(enabled);
+ outputDirView.setEnabled(enabled);
+ chkIcePrefix.Enabled = enabled;
+ comboBoxVerboseLevel.Enabled = enabled;
+ extraCompilerOptions.setEnabled(enabled);
+ includePathView.setEnabled(enabled);
+ chkIceSl.Enabled = enabled;
+ }
+
+ private void formClosing(object sender, FormClosingEventArgs e)
+ {
+ try
+ {
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(false);
+ }
+
+ if(hasUnsavedChanges())
+ {
+ if(!Util.warnUnsavedChanges(this))
+ {
+ e.Cancel = true;
+ return;
+ }
+ }
+
+ Cursor = Cursors.WaitCursor;
+ if(_changed && Util.isSliceBuilderEnabled(_project))
+ {
+ Util.rebuildProject(_project);
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Close();
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void component_Changed(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+ needSave();
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void componentChanged(string name, bool value, bool development)
+ {
+ if(value)
+ {
+ if(!Util.addDotNetReference(_project, name, Util.getIceHome(_project), development))
+ {
+ checkComponent(name, false);
+ }
+ }
+ else
+ {
+ Util.removeDotNetReference(_project, name);
+ }
+ }
+
+ //
+ // Apply unsaved changes, returns true if new settings are all applied correctly,
+ // otherwise returns false.
+ //
+ private bool apply()
+ {
+ if(!hasUnsavedChanges())
+ {
+ return true; // Nothing to do.
+ }
+
+ try
+ {
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+
+ //
+ // This must be the first setting to be updated, as other settings cannot be
+ // updated if the add-in is disabled.
+ //
+ if(chkEnableBuilder.Checked && !Util.isSliceBuilderEnabled(_project))
+ {
+ Util.addBuilderToProject(_project, new ComponentList(Util.getSilverlightNames()));
+ _changed = true;
+ _initialized = false;
+ loadComponents();
+ _initialized = true;
+ }
+
+ bool changed = false;
+ if(!iceHomeView.apply(ref changed))
+ {
+ //
+ // We don't apply other changes until that error is fixed.
+ // This should not happen in normal circumstances, as we check
+ // that Ice Home is valid when the corresponding field is changed.
+ // This could happen if the directory is removed after the field
+ // was edited and apply was clicked.
+ //
+ return false;
+ }
+ if(changed)
+ {
+ _changed = true;
+ }
+
+ changed = false;
+ if(!outputDirView.apply(ref changed))
+ {
+ return false;
+ }
+ if(changed)
+ {
+ _changed = true;
+ }
+
+ if(chkIcePrefix.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix))
+ {
+ Util.setProjectProperty(_project, Util.PropertyIcePrefix, chkIcePrefix.Checked.ToString());
+ _changed = true;
+ }
+
+ if(comboBoxVerboseLevel.SelectedIndex != Util.getVerboseLevel(_project))
+ {
+ Util.setProjectProperty(_project, Util.PropertyVerboseLevel,
+ comboBoxVerboseLevel.SelectedIndex.ToString(CultureInfo.InvariantCulture));
+ _changed = true;
+ }
+
+ changed = false;
+ if(!extraCompilerOptions.apply(ref changed))
+ {
+ return false;
+ }
+ if(changed)
+ {
+ _changed = true;
+ }
+
+ if(includePathView.apply())
+ {
+ _changed = true;
+ }
+
+ bool development = Util.developmentMode(_project);
+ if(chkIceSl.Checked != Util.hasDotNetReference(_project, "IceSl"))
+ {
+ componentChanged("IceSL", chkIceSl.Checked, development);
+ }
+
+ //
+ // This must be the last setting to be updated, as we want to update
+ // all other settings and that isn't possible if the builder is disabled.
+ //
+ if(!chkEnableBuilder.Checked && Util.isSliceBuilderEnabled(_project))
+ {
+ Util.removeBuilderFromProject(_project);
+ _initialized = false;
+ load();
+ _initialized = true;
+ _changed = true;
+ }
+
+ return true;
+ }
+ finally
+ {
+ needSave(); // Call needSave to update apply button status
+ }
+ }
+
+ private bool hasUnsavedChanges()
+ {
+ if(chkEnableBuilder.Checked != Util.isSliceBuilderEnabled(_project))
+ {
+ return true;
+ }
+
+ //
+ // If the builder is disabled, we are not interested in the other settings
+ // to compute changes.
+ //
+ if(!Util.isSliceBuilderEnabled(_project))
+ {
+ return false;
+ }
+
+ if(iceHomeView.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ if(outputDirView.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ if(chkIcePrefix.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix))
+ {
+ return true;
+ }
+
+ if(comboBoxVerboseLevel.SelectedIndex != Util.getVerboseLevel(_project))
+ {
+ return true;
+ }
+
+ if(extraCompilerOptions.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ if(includePathView.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ // Ice libraries
+ if(chkIceSl.Checked != Util.hasDotNetReference(_project, "IceSL"))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ private void btnOk_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(apply())
+ {
+ Close();
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void btnApply_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ apply();
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private bool _initialized;
+ private bool _changed;
+ private Project _project;
+ }
+}
diff --git a/vsplugin/src/IceSilverlightConfigurationDialog.resx b/vsaddin/src/IceSilverlightConfigurationDialog.resx
index 026c576b40e..a5979aadfff 100644
--- a/vsplugin/src/IceSilverlightConfigurationDialog.resx
+++ b/vsaddin/src/IceSilverlightConfigurationDialog.resx
@@ -112,12 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> \ No newline at end of file
diff --git a/vsplugin/src/IceVBConfigurationDialog.Designer.cs b/vsaddin/src/IceVBConfigurationDialog.Designer.cs
index 2d1a87af1b4..9e3b4151690 100755..100644
--- a/vsplugin/src/IceVBConfigurationDialog.Designer.cs
+++ b/vsaddin/src/IceVBConfigurationDialog.Designer.cs
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
@@ -37,7 +37,6 @@ namespace Ice.VisualStudio
/// </summary>
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
this.chkEnableBuilder = new System.Windows.Forms.CheckBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.chkIceStorm = new System.Windows.Forms.CheckBox();
@@ -47,13 +46,11 @@ namespace Ice.VisualStudio
this.chkIceBox = new System.Windows.Forms.CheckBox();
this.chkGlacier2 = new System.Windows.Forms.CheckBox();
this.chkIce = new System.Windows.Forms.CheckBox();
- this.btnClose = new System.Windows.Forms.Button();
- this.groupBox5 = new System.Windows.Forms.GroupBox();
- this.btnSelectIceHome = new System.Windows.Forms.Button();
- this.txtIceHome = new System.Windows.Forms.TextBox();
- this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+ this.btnCancel = new System.Windows.Forms.Button();
+ this.iceHomeView = new Ice.VisualStudio.IceHomeView();
+ this.btnApply = new System.Windows.Forms.Button();
+ this.btnOk = new System.Windows.Forms.Button();
this.groupBox3.SuspendLayout();
- this.groupBox5.SuspendLayout();
this.SuspendLayout();
//
// chkEnableBuilder
@@ -93,7 +90,7 @@ namespace Ice.VisualStudio
this.chkIceStorm.TabStop = false;
this.chkIceStorm.Text = "IceStorm";
this.chkIceStorm.UseVisualStyleBackColor = true;
- this.chkIceStorm.CheckedChanged += new System.EventHandler(this.chkIceStorm_CheckedChanged);
+ this.chkIceStorm.CheckedChanged += new System.EventHandler(this.component_Changed);
//
// chkIceSSL
//
@@ -105,7 +102,7 @@ namespace Ice.VisualStudio
this.chkIceSSL.TabStop = false;
this.chkIceSSL.Text = "IceSSL";
this.chkIceSSL.UseVisualStyleBackColor = true;
- this.chkIceSSL.CheckedChanged += new System.EventHandler(this.chkIceSSL_CheckedChanged);
+ this.chkIceSSL.CheckedChanged += new System.EventHandler(this.component_Changed);
//
// chkIcePatch2
//
@@ -117,7 +114,7 @@ namespace Ice.VisualStudio
this.chkIcePatch2.TabStop = false;
this.chkIcePatch2.Text = "IcePatch2";
this.chkIcePatch2.UseVisualStyleBackColor = true;
- this.chkIcePatch2.CheckedChanged += new System.EventHandler(this.chkIcePatch2_CheckedChanged);
+ this.chkIcePatch2.CheckedChanged += new System.EventHandler(this.component_Changed);
//
// chkIceGrid
//
@@ -129,7 +126,7 @@ namespace Ice.VisualStudio
this.chkIceGrid.TabStop = false;
this.chkIceGrid.Text = "IceGrid";
this.chkIceGrid.UseVisualStyleBackColor = true;
- this.chkIceGrid.CheckedChanged += new System.EventHandler(this.chkIceGrid_CheckedChanged);
+ this.chkIceGrid.CheckedChanged += new System.EventHandler(this.component_Changed);
//
// chkIceBox
//
@@ -141,7 +138,7 @@ namespace Ice.VisualStudio
this.chkIceBox.TabStop = false;
this.chkIceBox.Text = "IceBox";
this.chkIceBox.UseVisualStyleBackColor = true;
- this.chkIceBox.CheckedChanged += new System.EventHandler(this.chkIceBox_CheckedChanged);
+ this.chkIceBox.CheckedChanged += new System.EventHandler(this.component_Changed);
//
// chkGlacier2
//
@@ -153,7 +150,7 @@ namespace Ice.VisualStudio
this.chkGlacier2.TabStop = false;
this.chkGlacier2.Text = "Glacier2";
this.chkGlacier2.UseVisualStyleBackColor = true;
- this.chkGlacier2.CheckedChanged += new System.EventHandler(this.chkGlacier2_CheckedChanged);
+ this.chkGlacier2.CheckedChanged += new System.EventHandler(this.component_Changed);
//
// chkIce
//
@@ -165,68 +162,66 @@ namespace Ice.VisualStudio
this.chkIce.TabStop = false;
this.chkIce.Text = "Ice";
this.chkIce.UseVisualStyleBackColor = true;
- this.chkIce.CheckedChanged += new System.EventHandler(this.chkIce_CheckedChanged);
- //
- // btnClose
- //
- this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.btnClose.Location = new System.Drawing.Point(417, 141);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 5;
- this.btnClose.Text = "Close";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnCancel_Click);
- //
- // groupBox5
- //
- this.groupBox5.Controls.Add(this.btnSelectIceHome);
- this.groupBox5.Controls.Add(this.txtIceHome);
- this.groupBox5.Location = new System.Drawing.Point(12, 37);
- this.groupBox5.Name = "groupBox5";
- this.groupBox5.Size = new System.Drawing.Size(486, 45);
- this.groupBox5.TabIndex = 6;
- this.groupBox5.TabStop = false;
- this.groupBox5.Text = "Ice Home";
- //
- // btnSelectIceHome
- //
- this.btnSelectIceHome.Location = new System.Drawing.Point(405, 16);
- this.btnSelectIceHome.Name = "btnSelectIceHome";
- this.btnSelectIceHome.Size = new System.Drawing.Size(75, 23);
- this.btnSelectIceHome.TabIndex = 1;
- this.btnSelectIceHome.Text = "....";
- this.btnSelectIceHome.UseVisualStyleBackColor = true;
- this.btnSelectIceHome.Click += new System.EventHandler(this.btnSelectIceHome_Click);
- //
- // txtIceHome
- //
- this.txtIceHome.Location = new System.Drawing.Point(10, 20);
- this.txtIceHome.Name = "txtIceHome";
- this.txtIceHome.Size = new System.Drawing.Size(386, 20);
- this.txtIceHome.TabIndex = 0;
- this.txtIceHome.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtIceHome_KeyPress);
- this.txtIceHome.LostFocus += new System.EventHandler(this.txtIceHome_LostFocus);
+ this.chkIce.CheckedChanged += new System.EventHandler(this.component_Changed);
+ //
+ // btnCancel
+ //
+ this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnCancel.Location = new System.Drawing.Point(417, 141);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.TabIndex = 5;
+ this.btnCancel.Text = "Cancel";
+ this.btnCancel.UseVisualStyleBackColor = true;
+ this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+ //
+ // iceHomeView
+ //
+ this.iceHomeView.Location = new System.Drawing.Point(7, 37);
+ this.iceHomeView.Name = "iceHomeView";
+ this.iceHomeView.Size = new System.Drawing.Size(498, 48);
+ this.iceHomeView.TabIndex = 6;
+ //
+ // btnApply
+ //
+ this.btnApply.Location = new System.Drawing.Point(334, 141);
+ this.btnApply.Name = "btnApply";
+ this.btnApply.Size = new System.Drawing.Size(75, 23);
+ this.btnApply.TabIndex = 7;
+ this.btnApply.Text = "Apply";
+ this.btnApply.UseVisualStyleBackColor = true;
+ this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
+ //
+ // btnOk
+ //
+ this.btnOk.Location = new System.Drawing.Point(253, 141);
+ this.btnOk.Name = "btnOk";
+ this.btnOk.Size = new System.Drawing.Size(75, 23);
+ this.btnOk.TabIndex = 8;
+ this.btnOk.Text = "Ok";
+ this.btnOk.UseVisualStyleBackColor = true;
+ this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// IceVBConfigurationDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.CancelButton = this.btnClose;
+ this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(512, 177);
- this.Controls.Add(this.groupBox5);
- this.Controls.Add(this.btnClose);
+ this.Controls.Add(this.btnOk);
+ this.Controls.Add(this.btnApply);
+ this.Controls.Add(this.iceHomeView);
+ this.Controls.Add(this.btnCancel);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.chkEnableBuilder);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.Name = "IceVBConfigurationDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Ice Configuration";
+ this.Text = "Ice Configuration";
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing);
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
- this.groupBox5.ResumeLayout(false);
- this.groupBox5.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -243,10 +238,9 @@ namespace Ice.VisualStudio
private System.Windows.Forms.CheckBox chkIceBox;
private System.Windows.Forms.CheckBox chkGlacier2;
private System.Windows.Forms.CheckBox chkIce;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.GroupBox groupBox5;
- private System.Windows.Forms.Button btnSelectIceHome;
- private System.Windows.Forms.TextBox txtIceHome;
- private System.Windows.Forms.ToolTip toolTip;
+ private System.Windows.Forms.Button btnCancel;
+ private IceHomeView iceHomeView;
+ private System.Windows.Forms.Button btnApply;
+ private System.Windows.Forms.Button btnOk;
}
}
diff --git a/vsaddin/src/IceVBConfigurationDialog.cs b/vsaddin/src/IceVBConfigurationDialog.cs
new file mode 100644
index 00000000000..ddbeccf43df
--- /dev/null
+++ b/vsaddin/src/IceVBConfigurationDialog.cs
@@ -0,0 +1,513 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+
+using EnvDTE;
+
+namespace Ice.VisualStudio
+{
+ public partial class IceVBConfigurationDialog : Form, IceConfigurationDialog
+ {
+ public IceVBConfigurationDialog(Project project)
+ {
+ InitializeComponent();
+ _project = project;
+
+ iceHomeView.init(this, _project);
+
+ if(_project != null)
+ {
+ this.Text = "Ice Configuration - Project: " + _project.Name;
+ bool enabled = Util.isSliceBuilderEnabled(project);
+ setEnabled(enabled);
+ chkEnableBuilder.Checked = enabled;
+ load();
+ _initialized = true;
+ }
+ }
+
+#region IceConfigurationDialog interface
+
+ public bool editingIncludeDir()
+ {
+ return false;
+ }
+
+ public void endEditIncludeDir(bool saveChanges)
+ {
+ }
+
+ public void needSave()
+ {
+ if(_initialized)
+ {
+ btnApply.Enabled = hasUnsavedChanges();
+ }
+ }
+
+ public void unsetCancelButton()
+ {
+ CancelButton = null;
+ }
+
+ public void setCancelButton()
+ {
+ CancelButton = btnCancel;
+ }
+
+#endregion IceConfigurationDialog interface
+
+ private void load()
+ {
+ if(_project == null)
+ {
+ return;
+ }
+ Cursor = Cursors.WaitCursor;
+ iceHomeView.load();
+
+ loadComponents();
+ btnApply.Enabled = false;
+ Cursor = Cursors.Default;
+ }
+
+ private void loadComponents()
+ {
+ ComponentList selectedComponents = Util.getIceDotNetComponents(_project);
+ string[] dotNetNames = Util.getDotNetNames();
+ foreach(String s in dotNetNames)
+ {
+ if(selectedComponents.Contains(s))
+ {
+ checkComponent(s, true);
+ }
+ else
+ {
+ checkComponent(s, false);
+ }
+ }
+ }
+
+ private void checkComponent(String component, bool check)
+ {
+ switch(component)
+ {
+ case "Glacier2":
+ {
+ chkGlacier2.Checked = check;
+ break;
+ }
+ case "Ice":
+ {
+ chkIce.Checked = check;
+ break;
+ }
+ case "IceBox":
+ {
+ chkIceBox.Checked = check;
+ break;
+ }
+ case "IceGrid":
+ {
+ chkIceGrid.Checked = check;
+ break;
+ }
+ case "IcePatch2":
+ {
+ chkIcePatch2.Checked = check;
+ break;
+ }
+ case "IceSSL":
+ {
+ chkIceSSL.Checked = check;
+ break;
+ }
+ case "IceStorm":
+ {
+ chkIceStorm.Checked = check;
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ }
+ private void chkEnableBuilder_CheckedChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(_initialized)
+ {
+ _initialized = false;
+ setEnabled(chkEnableBuilder.Checked);
+
+ ComponentList components;
+ if(chkEnableBuilder.Checked)
+ {
+ //
+ // Enable the components that were previously enabled, if any.
+ //
+ components = new ComponentList(Util.getProjectProperty(_project, Util.PropertyIceComponents));
+
+ //
+ // If there isn't a previous set of components, we enable the default components.
+ //
+ if(components.Count == 0)
+ {
+ components.Add("Ice");
+ }
+ }
+ else
+ {
+ components = iceComponents();
+ }
+
+ // Enable / Disable the given set of components
+ for(int i = 0; i < components.Count; ++i)
+ {
+ checkComponent(components[i], chkEnableBuilder.Checked);
+ }
+
+ chkEnableBuilder.Enabled = true;
+ _initialized = true;
+ needSave();
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void setEnabled(bool enabled)
+ {
+ iceHomeView.setEnabled(enabled);
+ chkGlacier2.Enabled = enabled;
+ chkIce.Enabled = enabled;
+ chkIceBox.Enabled = enabled;
+ chkIceGrid.Enabled = enabled;
+ chkIcePatch2.Enabled = enabled;
+ chkIceSSL.Enabled = enabled;
+ chkIceStorm.Enabled = enabled;
+ }
+
+ private void componentChanged(string name, bool value, bool development)
+ {
+ if(value)
+ {
+ if(!Util.addDotNetReference(_project, name, Util.getIceHome(_project), development))
+ {
+ checkComponent(name, false);
+ }
+ }
+ else
+ {
+ Util.removeDotNetReference(_project, name);
+ }
+ }
+
+ private void component_Changed(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+ needSave();
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ //
+ // Apply unsaved changes, returns true if new settings are all applied correctly,
+ // otherwise returns false.
+ //
+ private bool apply()
+ {
+ if(!hasUnsavedChanges())
+ {
+ return true; // Nothing to do.
+ }
+
+ try
+ {
+ if(editingIncludeDir())
+ {
+ endEditIncludeDir(true);
+ }
+
+ //
+ // This must be the first setting to be updated, as other settings cannot be
+ // updated if the add-in is disabled.
+ //
+ if(chkEnableBuilder.Checked && !Util.isSliceBuilderEnabled(_project))
+ {
+ Util.addBuilderToProject(_project, iceComponents());
+ _initialized = false;
+ load();
+ _initialized = true;
+ // There aren't other changes at this point, we have just enabled the add-in.
+ return true;
+ }
+
+ bool changed = false;
+ if(!iceHomeView.apply(ref changed))
+ {
+ //
+ // We don't apply other changes until that error is fixed.
+ // This should not happen in normal circumstances, as we check
+ // that Ice Home is valid when the corresponding field is changed.
+ // This could happen if the directory is removed after the field
+ // was edited and apply was clicked.
+ //
+ return false;
+ }
+
+ bool development = Util.developmentMode(_project);
+ if(chkGlacier2.Checked != Util.hasDotNetReference(_project, "Glacier2"))
+ {
+ componentChanged("Glacier2", chkGlacier2.Checked, development);
+ }
+ if(chkIce.Checked != Util.hasDotNetReference(_project, "Ice"))
+ {
+ componentChanged("Ice", chkIce.Checked, development);
+ }
+ if(chkIceBox.Checked != Util.hasDotNetReference(_project, "IceBox"))
+ {
+ componentChanged("IceBox", chkIceBox.Checked, development);
+ }
+ if(chkIceGrid.Checked != Util.hasDotNetReference(_project, "IceGrid"))
+ {
+ componentChanged("IceGrid", chkIceGrid.Checked, development);
+ }
+ if(chkIcePatch2.Checked != Util.hasDotNetReference(_project, "IcePatch2"))
+ {
+ componentChanged("IcePatch2", chkIcePatch2.Checked, development);
+ }
+ if(chkIceSSL.Checked != Util.hasDotNetReference(_project, "IceSSL"))
+ {
+ componentChanged("IceSSL", chkIceSSL.Checked, development);
+ }
+ if(chkIceStorm.Checked != Util.hasDotNetReference(_project, "IceStorm"))
+ {
+ componentChanged("IceStorm", chkIceStorm.Checked, development);
+ }
+
+ //
+ // This must be the last setting to be updated, as we want to update
+ // all other settings and that isn't possible if the builder is disabled.
+ //
+ if(!chkEnableBuilder.Checked && Util.isSliceBuilderEnabled(_project))
+ {
+ Util.removeBuilderFromProject(_project);
+ _initialized = false;
+ load();
+ _initialized = true;
+ }
+
+ return true;
+ }
+ finally
+ {
+ needSave(); // Call needSave to update apply button status
+ }
+ }
+
+ private bool hasUnsavedChanges()
+ {
+ if(chkEnableBuilder.Checked != Util.isSliceBuilderEnabled(_project))
+ {
+ return true;
+ }
+
+ //
+ // If the builder is disabled, we are not interested in the other settings
+ // to compute changes.
+ //
+ if(!Util.isSliceBuilderEnabled(_project))
+ {
+ return false;
+ }
+
+ if(iceHomeView.hasUnsavedChanges())
+ {
+ return true;
+ }
+
+ // Ice libraries
+ if(chkGlacier2.Checked != Util.hasDotNetReference(_project, "Glacier2"))
+ {
+ return true;
+ }
+ if(chkIce.Checked != Util.hasDotNetReference(_project, "Ice"))
+ {
+ return true;
+ }
+ if(chkIceBox.Checked != Util.hasDotNetReference(_project, "IceBox"))
+ {
+ return true;
+ }
+ if(chkIceGrid.Checked != Util.hasDotNetReference(_project, "IceGrid"))
+ {
+ return true;
+ }
+ if(chkIcePatch2.Checked != Util.hasDotNetReference(_project, "IcePatch2"))
+ {
+ return true;
+ }
+ if(chkIceSSL.Checked != Util.hasDotNetReference(_project, "IceSSL"))
+ {
+ return true;
+ }
+ if(chkIceStorm.Checked != Util.hasDotNetReference(_project, "IceStorm"))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ private ComponentList iceComponents()
+ {
+ ComponentList components = new ComponentList();
+
+ if(chkGlacier2.Checked)
+ {
+ components.Add("Glacier2");
+ }
+ if(chkIce.Checked)
+ {
+ components.Add("Ice");
+ }
+ if(chkIceBox.Checked)
+ {
+ components.Add("IceBox");
+ }
+ if(chkIceGrid.Checked)
+ {
+ components.Add("IceGrid");
+ }
+ if(chkIcePatch2.Checked)
+ {
+ components.Add("IcePatch2");
+ }
+ if(chkIceSSL.Checked)
+ {
+ components.Add("IceSSL");
+ }
+ if(chkIceStorm.Checked)
+ {
+ components.Add("IceStorm");
+ }
+ return components;
+ }
+
+ private void formClosing(object sender, FormClosingEventArgs e)
+ {
+ try
+ {
+ if(!hasUnsavedChanges())
+ {
+ return;
+ }
+
+ if(!Util.warnUnsavedChanges(this))
+ {
+ e.Cancel = true;
+ return;
+ }
+ }
+ catch(Exception ex)
+ {
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void btnOk_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ if(apply())
+ {
+ Close();
+ }
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void btnApply_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ apply();
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private void btnCancel_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Cursor = Cursors.WaitCursor;
+ Close();
+ Cursor = Cursors.Default;
+ }
+ catch(Exception ex)
+ {
+ Cursor = Cursors.Default;
+ Util.write(null, Util.msgLevel.msgError, ex.ToString() + "\n");
+ Util.unexpectedExceptionWarning(ex);
+ throw;
+ }
+ }
+
+ private bool _initialized;
+ private Project _project;
+ }
+}
diff --git a/vsplugin/src/IceVBConfigurationDialog.resx b/vsaddin/src/IceVBConfigurationDialog.resx
index a499e2cedc5..a5979aadfff 100755..100644
--- a/vsplugin/src/IceVBConfigurationDialog.resx
+++ b/vsaddin/src/IceVBConfigurationDialog.resx
@@ -120,4 +120,4 @@
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
-</root>
+</root> \ No newline at end of file
diff --git a/vsaddin/src/IncludePathView.Designer.cs b/vsaddin/src/IncludePathView.Designer.cs
new file mode 100644
index 00000000000..5a420d8368f
--- /dev/null
+++ b/vsaddin/src/IncludePathView.Designer.cs
@@ -0,0 +1,160 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+namespace Ice.VisualStudio
+{
+ partial class IncludePathView
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if(disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.btnDown = new System.Windows.Forms.Button();
+ this.btnUp = new System.Windows.Forms.Button();
+ this.btnRemove = new System.Windows.Forms.Button();
+ this.btnEdit = new System.Windows.Forms.Button();
+ this.btnAdd = new System.Windows.Forms.Button();
+ this.includePathInfo = new System.Windows.Forms.Label();
+ this.sliceIncludeList = new System.Windows.Forms.CheckedListBox();
+ this.groupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.btnDown);
+ this.groupBox1.Controls.Add(this.btnUp);
+ this.groupBox1.Controls.Add(this.btnRemove);
+ this.groupBox1.Controls.Add(this.btnEdit);
+ this.groupBox1.Controls.Add(this.btnAdd);
+ this.groupBox1.Controls.Add(this.includePathInfo);
+ this.groupBox1.Controls.Add(this.sliceIncludeList);
+ this.groupBox1.Location = new System.Drawing.Point(3, 3);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(487, 166);
+ this.groupBox1.TabIndex = 0;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Slice Include Path";
+ //
+ // btnDown
+ //
+ this.btnDown.Location = new System.Drawing.Point(406, 135);
+ this.btnDown.Name = "btnDown";
+ this.btnDown.Size = new System.Drawing.Size(75, 23);
+ this.btnDown.TabIndex = 6;
+ this.btnDown.Text = "Down";
+ this.btnDown.UseVisualStyleBackColor = true;
+ this.btnDown.Click += new System.EventHandler(this.btnDown_Click);
+ //
+ // btnUp
+ //
+ this.btnUp.Location = new System.Drawing.Point(406, 106);
+ this.btnUp.Name = "btnUp";
+ this.btnUp.Size = new System.Drawing.Size(75, 23);
+ this.btnUp.TabIndex = 5;
+ this.btnUp.Text = "Up";
+ this.btnUp.UseVisualStyleBackColor = true;
+ this.btnUp.Click += new System.EventHandler(this.btnUp_Click);
+ //
+ // btnRemove
+ //
+ this.btnRemove.Location = new System.Drawing.Point(406, 77);
+ this.btnRemove.Name = "btnRemove";
+ this.btnRemove.Size = new System.Drawing.Size(75, 23);
+ this.btnRemove.TabIndex = 4;
+ this.btnRemove.Text = "Remove";
+ this.btnRemove.UseVisualStyleBackColor = true;
+ this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
+ //
+ // btnEdit
+ //
+ this.btnEdit.Location = new System.Drawing.Point(406, 48);
+ this.btnEdit.Name = "btnEdit";
+ this.btnEdit.Size = new System.Drawing.Size(75, 23);
+ this.btnEdit.TabIndex = 3;
+ this.btnEdit.Text = "Edit";
+ this.btnEdit.UseVisualStyleBackColor = true;
+ this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
+ //
+ // btnAdd
+ //
+ this.btnAdd.Location = new System.Drawing.Point(406, 19);
+ this.btnAdd.Name = "btnAdd";
+ this.btnAdd.Size = new System.Drawing.Size(75, 23);
+ this.btnAdd.TabIndex = 2;
+ this.btnAdd.Text = "Add";
+ this.btnAdd.UseVisualStyleBackColor = true;
+ this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
+ //
+ // includePathInfo
+ //
+ this.includePathInfo.AutoSize = true;
+ this.includePathInfo.Location = new System.Drawing.Point(6, 150);
+ this.includePathInfo.Name = "includePathInfo";
+ this.includePathInfo.Size = new System.Drawing.Size(315, 13);
+ this.includePathInfo.TabIndex = 1;
+ this.includePathInfo.Text = "Select checkboxes for absolute paths, deselect for relative paths.";
+ //
+ // sliceIncludeList
+ //
+ this.sliceIncludeList.FormattingEnabled = true;
+ this.sliceIncludeList.Location = new System.Drawing.Point(6, 19);
+ this.sliceIncludeList.Name = "sliceIncludeList";
+ this.sliceIncludeList.Size = new System.Drawing.Size(394, 124);
+ this.sliceIncludeList.TabIndex = 0;
+ this.sliceIncludeList.SelectedIndexChanged += new System.EventHandler(this.sliceIncludeList_SelectedIndexChanged);
+ this.sliceIncludeList.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.sliceIncludeList_ItemCheck);
+ //
+ // IncludePathView
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupBox1);
+ this.Name = "IncludePathView";
+ this.Size = new System.Drawing.Size(495, 174);
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.CheckedListBox sliceIncludeList;
+ private System.Windows.Forms.Label includePathInfo;
+ private System.Windows.Forms.Button btnUp;
+ private System.Windows.Forms.Button btnRemove;
+ private System.Windows.Forms.Button btnEdit;
+ private System.Windows.Forms.Button btnAdd;
+ private System.Windows.Forms.Button btnDown;
+ }
+}
diff --git a/vsaddin/src/IncludePathView.cs b/vsaddin/src/IncludePathView.cs
new file mode 100644
index 00000000000..5683721c2de
--- /dev/null
+++ b/vsaddin/src/IncludePathView.cs
@@ -0,0 +1,443 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+
+using System.Text;
+using System.Windows.Forms;
+
+using System.IO;
+
+using EnvDTE;
+
+namespace Ice.VisualStudio
+{
+ public partial class IncludePathView : UserControl
+ {
+ public IncludePathView()
+ {
+ InitializeComponent();
+ }
+
+ public void load()
+ {
+ sliceIncludeList.Items.Clear();
+ IncludePathList list =
+ new IncludePathList(Util.getProjectProperty(_project, Util.PropertyIceIncludePath));
+ foreach(String s in list)
+ {
+ sliceIncludeList.Items.Add(s.Trim());
+ if(Path.IsPathRooted(s.Trim()))
+ {
+ sliceIncludeList.SetItemCheckState(sliceIncludeList.Items.Count - 1, CheckState.Checked);
+ }
+ }
+ }
+
+ public void setEnabled(bool enabled)
+ {
+ sliceIncludeList.Enabled = enabled;
+ btnAdd.Enabled = enabled;
+ btnEdit.Enabled = enabled;
+ btnRemove.Enabled = enabled;
+ btnUp.Enabled = enabled;
+ btnDown.Enabled = enabled;
+ }
+
+ public bool hasUnsavedChanges()
+ {
+ if(_editingIncludes &&
+ !_txtIncludeDir.Text.Trim().TrimEnd(Path.DirectorySeparatorChar).Equals(_editingIncludeDir))
+ {
+ return true;
+ }
+
+ if(!sliceIncludes().Equal(new IncludePathList(
+ Util.getProjectProperty(_project, Util.PropertyIceIncludePath))))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ public bool apply()
+ {
+ bool changed = false;
+ IncludePathList includes = sliceIncludes();
+ if(!includes.Equal(new IncludePathList(
+ Util.getProjectProperty(_project, Util.PropertyIceIncludePath))))
+ {
+ String s = includes.ToString();
+ Util.setProjectProperty(_project, Util.PropertyIceIncludePath, s);
+ changed = true;
+ }
+ return changed;
+ }
+
+ public void setIceConfigurationDialog(IceConfigurationDialog dialog)
+ {
+ _dialog = dialog;
+ }
+
+ public bool editingIncludeDir()
+ {
+ return _editingIncludes;
+ }
+
+ private void sliceIncludeList_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if(_editingIncludes)
+ {
+ endEditIncludeDir(true);
+ }
+ }
+
+ private void beginEditIncludeDir()
+ {
+ if(_editingIncludes)
+ {
+ endEditIncludeDir(true);
+ }
+ _editingIncludes = true;
+ _dialog.unsetCancelButton();
+ if(_editingIndex != -1)
+ {
+ _txtIncludeDir = new TextBox();
+ _txtIncludeDir.Text = sliceIncludeList.Items[sliceIncludeList.SelectedIndex].ToString();
+ _editingIncludeDir = _txtIncludeDir.Text;
+ sliceIncludeList.SelectionMode = SelectionMode.One;
+
+ Rectangle rect = sliceIncludeList.GetItemRectangle(sliceIncludeList.SelectedIndex);
+ _txtIncludeDir.Location = new Point(sliceIncludeList.Location.X + 2,
+ sliceIncludeList.Location.Y + rect.Y);
+ _txtIncludeDir.Width = sliceIncludeList.Width - 50;
+ _txtIncludeDir.Parent = sliceIncludeList;
+ _txtIncludeDir.KeyDown += new KeyEventHandler(includeDirKeyDown);
+ _txtIncludeDir.KeyUp += new KeyEventHandler(includeDirKeyUp);
+ groupBox1.Controls.Add(_txtIncludeDir);
+
+ _btnSelectInclude = new Button();
+ _btnSelectInclude.Text = "...";
+ _btnSelectInclude.Location = new Point(sliceIncludeList.Location.X + _txtIncludeDir.Width,
+ sliceIncludeList.Location.Y + rect.Y);
+ _btnSelectInclude.Width = 49;
+ _btnSelectInclude.Height = _txtIncludeDir.Height;
+ _btnSelectInclude.Click += new EventHandler(selectIncludeClicked);
+ groupBox1.Controls.Add(_btnSelectInclude);
+
+
+ _txtIncludeDir.Show();
+ _txtIncludeDir.BringToFront();
+ _txtIncludeDir.Focus();
+
+ _btnSelectInclude.Show();
+ _btnSelectInclude.BringToFront();
+ }
+ }
+
+ public void endEditIncludeDir(bool saveChanges)
+ {
+ if(!_editingIncludes)
+ {
+ _dialog.needSave();
+ return;
+ }
+ _editingIncludes = false;
+ String path = null;
+ if(_editingIndex > -1 && _editingIndex < sliceIncludeList.Items.Count)
+ {
+ path = sliceIncludeList.Items[_editingIndex].ToString();
+ }
+
+ lock(this)
+ {
+ _dialog.setCancelButton();
+ if(_txtIncludeDir == null || _btnSelectInclude == null)
+ {
+ _dialog.needSave();
+ return;
+ }
+ if(saveChanges)
+ {
+ path = _txtIncludeDir.Text;
+ if(path != null)
+ {
+ path = path.Trim();
+ }
+ }
+
+ this.groupBox1.Controls.Remove(_txtIncludeDir);
+ _txtIncludeDir = null;
+
+ this.groupBox1.Controls.Remove(_btnSelectInclude);
+ _btnSelectInclude = null;
+ }
+
+ if(String.IsNullOrEmpty(path))
+ {
+ if(_editingIndex != -1)
+ {
+ sliceIncludeList.Items.RemoveAt(_editingIndex);
+ sliceIncludeList.SelectedIndex = sliceIncludeList.Items.Count - 1;
+ _editingIndex = -1;
+ }
+ }
+ else if(_editingIndex != -1 && saveChanges)
+ {
+ if(!path.Equals(sliceIncludeList.Items[_editingIndex].ToString(),
+ StringComparison.CurrentCultureIgnoreCase))
+ {
+ IncludePathList includes = sliceIncludes();
+ if(includes.Count > _editingIndex)
+ {
+ //
+ // We don't want an item to be considered a duplicate of itself.
+ //
+ includes.RemoveAt(_editingIndex);
+ }
+ if(includes.Contains(_project, path))
+ {
+ MessageBox.Show(this, "The Slice Include Path doesn't allow duplicates.\n" +
+ "Value: `" + path + "' will be removed.\n",
+ "Ice Visual Studio Add-In", MessageBoxButtons.OK,
+ MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0);
+ sliceIncludeList.Items.RemoveAt(_editingIndex);
+ sliceIncludeList.SelectedIndex = sliceIncludeList.Items.Count - 1;
+ _editingIndex = -1;
+ }
+ else
+ {
+ sliceIncludeList.Items[_editingIndex] = path;
+ if(Path.IsPathRooted(path))
+ {
+ sliceIncludeList.SetItemCheckState(_editingIndex, CheckState.Checked);
+ }
+ else
+ {
+ sliceIncludeList.SetItemCheckState(_editingIndex, CheckState.Unchecked);
+ }
+ }
+ }
+ }
+ resetIncludeDirChecks();
+ _dialog.needSave();
+ }
+
+ private void includeDirKeyDown(object sender, KeyEventArgs e)
+ {
+ if(e.KeyCode.Equals(Keys.Escape))
+ {
+ endEditIncludeDir(false);
+ }
+ else if(e.KeyCode.Equals(Keys.Enter))
+ {
+ endEditIncludeDir(true);
+ }
+ }
+
+ private void includeDirKeyUp(object sender, KeyEventArgs e)
+ {
+ if(!e.KeyCode.Equals(Keys.Enter) && !e.KeyCode.Equals(Keys.Escape) &&
+ _editingIncludes)
+ {
+ _dialog.needSave();
+ }
+ }
+
+ private void selectIncludeClicked(object sender, EventArgs e)
+ {
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ string projectDir = Path.GetFullPath(Path.GetDirectoryName(_project.FileName));
+ dialog.SelectedPath = projectDir;
+ dialog.Description = "Slice Include Directory";
+ DialogResult result = dialog.ShowDialog();
+ if(result == DialogResult.OK)
+ {
+ string path = dialog.SelectedPath;
+ if(!Util.containsEnvironmentVars(path))
+ {
+ path = Util.relativePath(_project, Path.GetFullPath(path));
+ }
+ _txtIncludeDir.Text = path;
+ }
+ endEditIncludeDir(true);
+ }
+
+ private void btnAdd_Click(object sender, EventArgs e)
+ {
+ if(_editingIncludes)
+ {
+ endEditIncludeDir(true);
+ }
+ sliceIncludeList.Items.Add("");
+ sliceIncludeList.SelectedIndex = sliceIncludeList.Items.Count - 1;
+ _editingIndex = sliceIncludeList.SelectedIndex;
+ beginEditIncludeDir();
+ }
+
+ private void btnEdit_Click(object sender, EventArgs e)
+ {
+ if(sliceIncludeList.SelectedIndex != -1)
+ {
+ _editingIndex = sliceIncludeList.SelectedIndex;
+ beginEditIncludeDir();
+ }
+ }
+
+ private void btnRemove_Click(object sender, EventArgs e)
+ {
+ Cursor = Cursors.WaitCursor;
+ int index = sliceIncludeList.SelectedIndex;
+ if(_editingIncludes)
+ {
+ index = _editingIndex;
+ endEditIncludeDir(true);
+ }
+ if(index > -1 && index < sliceIncludeList.Items.Count)
+ {
+ int selected = index;
+ sliceIncludeList.Items.RemoveAt(selected);
+ if(sliceIncludeList.Items.Count > 0)
+ {
+ if(selected > 0)
+ {
+ selected -= 1;
+ }
+ sliceIncludeList.SelectedIndex = selected;
+ }
+ }
+ _dialog.needSave();
+ Cursor = Cursors.Default;
+ }
+
+ private IncludePathList sliceIncludes()
+ {
+ IncludePathList paths = new IncludePathList();
+ foreach(String s in sliceIncludeList.Items)
+ {
+ paths.Add(s.Trim());
+ }
+ return paths;
+ }
+
+ private void btnUp_Click(object sender, EventArgs e)
+ {
+ Cursor = Cursors.WaitCursor;
+ if(_editingIncludes)
+ {
+ endEditIncludeDir(true);
+ }
+ int index = sliceIncludeList.SelectedIndex;
+ if(index > 0)
+ {
+ string current = sliceIncludeList.SelectedItem.ToString();
+ sliceIncludeList.Items.RemoveAt(index);
+ sliceIncludeList.Items.Insert(index - 1, current);
+ sliceIncludeList.SelectedIndex = index - 1;
+ resetIncludeDirChecks();
+ _dialog.needSave();
+ }
+ Cursor = Cursors.Default;
+ }
+
+ private void btnDown_Click(object sender, EventArgs e)
+ {
+ Cursor = Cursors.WaitCursor;
+ if(_editingIncludes)
+ {
+ endEditIncludeDir(true);
+ }
+ int index = sliceIncludeList.SelectedIndex;
+ if(index < sliceIncludeList.Items.Count - 1 && index > -1)
+ {
+ string current = sliceIncludeList.SelectedItem.ToString();
+ sliceIncludeList.Items.RemoveAt(index);
+ sliceIncludeList.Items.Insert(index + 1, current);
+ sliceIncludeList.SelectedIndex = index + 1;
+ resetIncludeDirChecks();
+ _dialog.needSave();
+ }
+ Cursor = Cursors.Default;
+ }
+
+ //
+ // Reset the include dir checkboxes that indicate if the path
+ // is absolute or relative. This should be called after the list
+ // is populated or the includes list order is modified.
+ //
+ private void resetIncludeDirChecks()
+ {
+ for(int i = 0; i < sliceIncludeList.Items.Count; ++i)
+ {
+ String path = sliceIncludeList.Items[i].ToString();
+ if(String.IsNullOrEmpty(path))
+ {
+ continue;
+ }
+
+ if(Path.IsPathRooted(path))
+ {
+ sliceIncludeList.SetItemCheckState(i, CheckState.Checked);
+ }
+ else
+ {
+ sliceIncludeList.SetItemCheckState(i, CheckState.Unchecked);
+ }
+ }
+ }
+
+ private void sliceIncludeList_ItemCheck(object sender, ItemCheckEventArgs e)
+ {
+ if(_editingIncludes)
+ {
+ return;
+ }
+ string path = sliceIncludeList.Items[e.Index].ToString();
+ if(Util.containsEnvironmentVars(path))
+ {
+ return;
+ }
+
+ if(e.NewValue == CheckState.Unchecked)
+ {
+ path = Util.relativePath(_project, path);
+ }
+ else if(e.NewValue == CheckState.Checked)
+ {
+ if(!Path.IsPathRooted(path))
+ {
+ path = Util.absolutePath(_project, path);
+ }
+ }
+
+ sliceIncludeList.Items[e.Index] = path;
+
+ _dialog.needSave();
+ }
+
+ public void init(IceConfigurationDialog dialog, Project project)
+ {
+ _dialog = dialog;
+ _project = project;
+ }
+
+ private Project _project;
+ private IceConfigurationDialog _dialog;
+ private int _editingIndex = -1;
+ private bool _editingIncludes;
+ private string _editingIncludeDir = null;
+ private TextBox _txtIncludeDir;
+ private Button _btnSelectInclude;
+ }
+}
diff --git a/vsaddin/src/IncludePathView.resx b/vsaddin/src/IncludePathView.resx
new file mode 100644
index 00000000000..ff31a6db56e
--- /dev/null
+++ b/vsaddin/src/IncludePathView.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/vsplugin/src/Makefile.mak b/vsaddin/src/Makefile.mak
index 994f46205ac..2841cfa5961 100644
--- a/vsplugin/src/Makefile.mak
+++ b/vsaddin/src/Makefile.mak
@@ -1,6 +1,6 @@
# **********************************************************************
#
-# Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+# Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
@@ -19,7 +19,14 @@ INSTALL_SUBDIRS = $(install_bindir) $(install_configdir)
TARGETS = $(top_srcdir)\bin\$(PKG).dll
PDBS = $(top_srcdir)\bin\$(PKG).pdb
-SRCS = AssemblyInfo.cs \
+SRCS = IceDialog.cs \
+ IceHomeView.Designer.cs \
+ IceHomeView.cs \
+ ExtraCompilerOptionsView.Designer.cs \
+ ExtraCompilerOptionsView.cs \
+ IncludePathView.Designer.cs \
+ IncludePathView.cs \
+ AssemblyInfo.cs \
Builder.cs \
Connect.cs \
FileTracker.cs \
@@ -31,12 +38,19 @@ SRCS = AssemblyInfo.cs \
IceSilverlightConfigurationDialog.Designer.cs \
IceVBConfigurationDialog.cs \
IceVBConfigurationDialog.Designer.cs \
+ OutputDirView.cs \
+ OutputDirView.Designer.cs \
+ Options.cs \
Util.cs
RESOURCES = /resource:IceCppConfigurationDialog.resx \
/resource:IceCsharpConfigurationDialog.resx \
/resource:IceSilverlightConfigurationDialog.resx \
- /resource:IceVBConfigurationDialog.resx
+ /resource:IceVBConfigurationDialog.resx \
+ /resource:IceHomeView.resx \
+ /resource:ExtraCompilerOptionsView.resx \
+ /resource:IncludePathView.resx \
+ /resource:OutputDirView.resx
MCSFLAGS = $(MCSFLAGS) -out:$(TARGETS)
diff --git a/vsaddin/src/Options.cs b/vsaddin/src/Options.cs
new file mode 100644
index 00000000000..363d66711bb
--- /dev/null
+++ b/vsaddin/src/Options.cs
@@ -0,0 +1,836 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Text;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Security.Permissions;
+using System.Runtime.Serialization;
+
+using ValidOpts = System.Collections.Generic.Dictionary<string, Ice.VisualStudio.Options.OptionDetails>;
+using Opts = System.Collections.Generic.Dictionary<string, Ice.VisualStudio.Options.OptionValue>;
+using ROpts = System.Collections.Generic.Dictionary<string, Ice.VisualStudio.Options.OptionValueVector>;
+using Synonyms = System.Collections.Generic.Dictionary<string, string>;
+
+namespace Ice.VisualStudio
+{
+
+[SerializableAttribute]
+public class BadOptionException : Exception
+{
+ public BadOptionException()
+ {
+ this.reason = "";
+ }
+
+ public BadOptionException(string reason)
+ {
+ this.reason = reason;
+ }
+
+ public string reason
+ {
+ get
+ {
+ return _reason;
+ }
+ set
+ {
+ _reason = value;
+ }
+ }
+
+ [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
+ public override void GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+ if(info == null)
+ {
+ throw new ArgumentNullException("info");
+ }
+ base.GetObjectData(info, context);
+ info.AddValue("reason", reason);
+ }
+
+ private string _reason;
+}
+
+[SerializableAttribute]
+public class APIException : Exception
+{
+ public APIException()
+ {
+ this.reason = "";
+ }
+
+ public APIException(string reason)
+ {
+ this.reason = reason;
+ }
+
+ public string reason
+ {
+ get
+ {
+ return _reason;
+ }
+ set
+ {
+ _reason = value;
+ }
+ }
+
+ [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
+ public override void GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+ if(info == null)
+ {
+ throw new ArgumentNullException("info");
+ }
+ base.GetObjectData(info, context);
+ info.AddValue("reason", reason);
+ }
+
+ private string _reason;
+}
+
+public class Options
+{
+ public enum LengthType { ShortOpt, LongOpt };
+ public enum RepeatType { Repeat, NoRepeat };
+ public enum ArgType { NeedArg, NoArg };
+ private enum ParseState { Normal, DoubleQuote, SingleQuote };
+ private bool parseCalled = false;
+
+ public struct OptionDetails
+ {
+ public LengthType length;
+ public ArgType arg;
+ public RepeatType repeat;
+ public bool hasDefault;
+ }
+
+ public struct OptionValue
+ {
+ public string val;
+ }
+
+ public struct OptionValueVector
+ {
+ public List<string> vals;
+ }
+
+ ValidOpts _validOpts = new ValidOpts(); // Valid options and their details.
+ Opts _opts = new Opts(); // Value of non-repeating options.
+ ROpts _ropts = new ROpts(); // Value of repeating options.
+ Synonyms _synonyms = new Synonyms(); // Map from short to long option and vice versa.
+
+ public void addOpt(string shortOpt)
+ {
+ addOpt(shortOpt, "", ArgType.NoArg, "", RepeatType.NoRepeat);
+ }
+
+ public void addOpt(string shortOpt, string longOpt)
+ {
+ addOpt(shortOpt, longOpt, ArgType.NoArg, "", RepeatType.NoRepeat);
+ }
+
+ public void addOpt(string shortOpt, string longOpt, ArgType at)
+ {
+ addOpt(shortOpt, longOpt, at, "", RepeatType.NoRepeat);
+ }
+
+ public void addOpt(string shortOpt, string longOpt, ArgType at, string dflt)
+ {
+ addOpt(shortOpt, longOpt, at, dflt, RepeatType.NoRepeat);
+ }
+
+ public void addOpt(string shortOpt, string longOpt, ArgType at, string dflt, RepeatType rt)
+ {
+ checkArgs(shortOpt, longOpt, at == ArgType.NeedArg, dflt);
+ addValidOpt(shortOpt, longOpt, at, dflt, rt);
+ }
+
+ public List<string> parse(List<string> args)
+ {
+ if(parseCalled)
+ {
+ throw new APIException("cannot call parse() more than once on the same Option instance");
+ }
+ parseCalled = true;
+
+ List<string> seenNonRepeatableOpts = new List<string>(); // To catch repeated non-repeatable options.
+
+ List<string> result = new List<string>();
+
+ int i;
+ for(i = 0; i < args.Count; ++i)
+ {
+ if(args[i] == "-" || args[i] == "--")
+ {
+ ++i;
+ break; // "-" and "--" indicate end of options.
+ }
+
+ string opt = null;
+ OptionDetails pos = new OptionDetails();
+ pos.repeat = RepeatType.NoRepeat;
+ pos.length = LengthType.ShortOpt;
+ pos.hasDefault = false;
+ pos.arg = ArgType.NoArg;
+
+ bool argDone = false;
+
+ if(args[i].StartsWith("--", StringComparison.Ordinal))
+ {
+ //
+ // Long option. If the option has an argument, it can either be separated by '='
+ // or appear as a separate argument. For example, "--name value" is the same
+ // as "--name=value".
+ //
+ int p = args[i].IndexOf('=', 2);
+ if(p >= 0)
+ {
+ opt = args[i].Substring(2, p - 2);
+ }
+ else
+ {
+ opt = args[i].Substring(2);
+ }
+
+ pos = checkOpt(opt, LengthType.LongOpt);
+
+ if(pos.repeat == RepeatType.NoRepeat)
+ {
+ if(seenNonRepeatableOpts.Contains(opt))
+ {
+ string err = "`--";
+ err += opt + ":' option cannot be repeated";
+ throw new BadOptionException(err);
+ }
+ seenNonRepeatableOpts.Add(opt);
+ string synonym = getSynonym(opt);
+ if(!String.IsNullOrEmpty(synonym))
+ {
+ seenNonRepeatableOpts.Add(synonym);
+ }
+ }
+
+ if(p >= 0)
+ {
+ if(pos.arg == ArgType.NoArg && p != args[i].Length - 1)
+ {
+ string err = "`";
+ err += args[i];
+ err += "': option does not take an argument";
+ throw new BadOptionException(err);
+ }
+ setOpt(opt, "", args[i].Substring(p + 1), pos.repeat);
+ argDone = true;
+ }
+ }
+ else if(!String.IsNullOrEmpty(args[i]) && args[i][0] == '-')
+ {
+ //
+ // Short option.
+ //
+ for(int p = 1; p < args[i].Length; ++p)
+ {
+ opt = "";
+ opt += args[i][p];
+ pos = checkOpt(opt, LengthType.ShortOpt);
+
+ if(pos.repeat == RepeatType.NoRepeat)
+ {
+ if(seenNonRepeatableOpts.Contains(opt))
+ {
+ string err = "`-";
+ err += opt + ":' option cannot be repeated";
+ throw new BadOptionException(err);
+ }
+ seenNonRepeatableOpts.Add(opt);
+ string synonym = getSynonym(opt);
+ if(!String.IsNullOrEmpty(synonym))
+ {
+ seenNonRepeatableOpts.Add(synonym);
+ }
+ }
+
+ if(pos.arg == ArgType.NeedArg && p != args[i].Length - 1)
+ {
+ string optArg = args[i].Substring(p + 1);
+ setOpt(opt, "", optArg, pos.repeat);
+ argDone = true;
+ break;
+ }
+ }
+ }
+ else
+ {
+ //
+ // Not an option or option argument.
+ //
+ result.Add(args[i]);
+ argDone = true;
+ }
+
+ if(!argDone)
+ {
+ if(pos.arg == ArgType.NeedArg) // Need an argument that is separated by whitespace.
+ {
+ if(i == args.Count - 1)
+ {
+ string err = "`-";
+ if(opt.Length != 1)
+ {
+ err += "-";
+ }
+ err += opt;
+ err += "' option requires an argument";
+ throw new BadOptionException(err);
+ }
+ setOpt(opt, "", args[++i], pos.repeat);
+ }
+ else
+ {
+ setOpt(opt, "", "1", pos.repeat);
+ }
+ }
+ }
+
+ _synonyms.Clear(); // Don't need the contents anymore.
+
+ while(i < args.Count)
+ {
+ result.Add(args[i++]);
+ }
+
+ return result;
+ }
+
+ public bool isSet(string opt)
+ {
+ if(!parseCalled)
+ {
+ throw new APIException("cannot lookup options before calling parse()");
+ }
+
+ OptionDetails pos = checkOptIsValid(opt);
+ return pos.repeat == RepeatType.NoRepeat ? _opts.ContainsKey(opt) : _ropts.ContainsKey(opt);
+ }
+
+ public string optArg(string opt)
+ {
+ if(!parseCalled)
+ {
+ throw new APIException("cannot lookup options before calling parse()");
+ }
+
+ OptionDetails pos = checkOptHasArg(opt);
+
+ if(pos.repeat == RepeatType.Repeat)
+ {
+ string err = "`-";
+ if(pos.length == LengthType.LongOpt)
+ {
+ err += '-';
+ }
+ err += opt;
+ err += "': is a repeating option -- use argVec() to get its arguments";
+ throw new BadOptionException(err);
+ }
+
+ if(!_opts.ContainsKey(opt))
+ {
+ return "";
+ }
+ return _opts[opt].val;
+ }
+
+ public List<string> argVec(string opt)
+ {
+ if(!parseCalled)
+ {
+ throw new APIException("cannot lookup options before calling parse()");
+ }
+
+ OptionDetails pos = checkOptHasArg(opt);
+
+ if(pos.repeat == RepeatType.NoRepeat)
+ {
+ string err = "`-";
+ if(pos.length == LengthType.LongOpt)
+ {
+ err += '-';
+ }
+ err += opt + "': is a non-repeating option -- use optArg() to get its argument";
+ throw new BadOptionException(err);
+ }
+
+ if(!_ropts.ContainsKey(opt))
+ {
+ return new List<string>();
+ }
+ return _ropts[opt].vals;
+ }
+
+ private void
+ addValidOpt(string shortOpt, string longOpt, ArgType at, string dflt, RepeatType rt)
+ {
+ if(shortOpt.Length > 0 && _validOpts.ContainsKey(shortOpt))
+ {
+ string err = "`";
+ err += shortOpt;
+ err += "': duplicate option";
+ throw new BadOptionException(err);
+ }
+ if(longOpt.Length > 0 && _validOpts.ContainsKey(longOpt))
+ {
+ string err = "`";
+ err += longOpt;
+ err += "': duplicate option";
+ throw new BadOptionException(err);
+ }
+
+ OptionDetails odp = new OptionDetails();
+ odp.arg = at;
+ odp.repeat = rt;
+ odp.hasDefault = dflt.Length > 0;
+
+ if(shortOpt.Length > 0)
+ {
+ odp.length = LengthType.ShortOpt;
+ _validOpts[shortOpt] = odp;
+ }
+ if(longOpt.Length > 0)
+ {
+ odp.length = LengthType.LongOpt;
+ _validOpts[longOpt] = odp;
+ }
+
+ updateSynonyms(shortOpt, longOpt);
+
+ if(at == ArgType.NeedArg && dflt.Length > 0)
+ {
+ setOpt(shortOpt, longOpt, dflt, rt);
+ }
+ }
+
+ void
+ updateSynonyms(string shortOpt, string longOpt)
+ {
+ if(shortOpt.Length > 0 && longOpt.Length > 0)
+ {
+ _synonyms[shortOpt] = longOpt;
+ _synonyms[longOpt] = shortOpt;
+ }
+ }
+
+ string
+ getSynonym(string optName)
+ {
+ return _synonyms.ContainsKey(optName) ? _synonyms[optName] : "";
+ }
+
+ private static void
+ checkArgs(string shortOpt, string longOpt, bool needArg, string dflt)
+ {
+ if(shortOpt.Length == 0 && longOpt.Length == 0)
+ {
+ throw new BadOptionException("short and long option cannot both be empty");
+ }
+
+ if(shortOpt.Length > 0)
+ {
+ if(shortOpt.Length != 1)
+ {
+ string err = "`";
+ err += shortOpt;
+ err += "': a short option cannot specify more than one option";
+ throw new BadOptionException(err);
+ }
+ if(" \t\n\r\f\v".IndexOf(shortOpt, StringComparison.Ordinal) >= 0)
+ {
+ string err = "`";
+ err += shortOpt;
+ err += "': a short option cannot be whitespace";
+ throw new BadOptionException(err);
+ }
+ if(!String.IsNullOrEmpty(shortOpt) && shortOpt[0].Equals('-'))
+ {
+ string err = "`";
+ err += shortOpt;
+ err += "': a short option cannot be `-'";
+ throw new BadOptionException(err);
+ }
+ }
+
+ if(longOpt.Length > 0)
+ {
+ if(" \t\n\r\f\v".IndexOf(longOpt, StringComparison.Ordinal) >= 0)
+ {
+ string err = "`";
+ err += shortOpt;
+ err += "': a long option cannot be whitespace";
+ throw new BadOptionException(err);
+ }
+ if(!String.IsNullOrEmpty(shortOpt) && shortOpt[0].Equals('-'))
+ {
+ string err = "`";
+ err += shortOpt;
+ err += "': a long option cannot be `-'";
+ throw new BadOptionException(err);
+ }
+ }
+
+ if(!needArg && dflt.Length > 0)
+ {
+ throw new BadOptionException("a default value can be specified only for options requiring an argument");
+ }
+ }
+
+ //
+ // Split a command line into argv-style arguments, applying
+ // bash quoting rules. The return value is the arguments
+ // in the command line, with all shell escapes applied, and
+ // quotes removed.
+ //
+ static public List<string> split(string line)
+ {
+ const string IFS = " \t\n"; // Internal Field Separator.
+ if(String.IsNullOrEmpty(line))
+ {
+ return new List<string>();
+ }
+ String l = line.Trim(' ').Trim('\t').Trim('\n');
+
+ if(String.IsNullOrEmpty(l))
+ {
+ return new List<string>();
+ }
+
+ List<string> vec = new List<string>();
+
+
+ ParseState state = ParseState.Normal;
+
+ string arg = null;
+
+ for(int i = 0; i < l.Length; ++i)
+ {
+ char c = l[i];
+ switch(state)
+ {
+ case ParseState.Normal:
+ {
+ switch(c)
+ {
+ case '\\':
+ {
+ //
+ // Ignore a backslash at the end of the string,
+ // and strip backslash-newline pairs. If a
+ // backslash is followed by a space, single quote,
+ // double quote, or dollar sign, we drop the backslash
+ // and write the space, single quote, double quote,
+ // or dollar sign. This is necessary to allow quotes
+ // to be escaped. Dropping the backslash preceding a
+ // space deviates from bash quoting rules, but is
+ // necessary so we don't drop backslashes from Windows
+ // path names.)
+ //
+ if(i < l.Length - 1 && l[++i] != '\n')
+ {
+ switch(l[i])
+ {
+ case ' ':
+ case '$':
+ case '\'':
+ case '"':
+ {
+ arg += l[i];
+ break;
+ }
+ default:
+ {
+ arg += '\\';
+ arg += l[i];
+ break;
+ }
+ }
+ }
+ break;
+ }
+ case '\'':
+ {
+ state = ParseState.SingleQuote;
+ break;
+ }
+ case '"':
+ {
+ state = ParseState.DoubleQuote;
+ break;
+ }
+ default:
+ {
+ if(IFS.IndexOf(l[i]) >= 0)
+ {
+ vec.Add(arg);
+ arg = "";
+
+ //
+ // Move to start of next argument.
+ //
+ while(++i < l.Length && IFS.IndexOf(l[i]) >= 0)
+ {
+ ;
+ }
+ --i;
+ }
+ else
+ {
+ arg += l[i];
+ }
+ break;
+ }
+ }
+ break;
+ }
+ case ParseState.DoubleQuote:
+ {
+ //
+ // Within double quotes, only backslash retains its special
+ // meaning, and only if followed by double quote, backslash,
+ // or newline. If not followed by one of these characters,
+ // both the backslash and the character are preserved.
+ //
+ if(c.Equals('\\') && i < l.Length - 1)
+ {
+ switch(c = l[++i])
+ {
+ case '"':
+ case '\\':
+ case '\n':
+ {
+ arg += c;
+ break;
+ }
+ default:
+ {
+ arg += '\\';
+ arg += c;
+ break;
+ }
+ }
+ }
+ else if(c.Equals('"')) // End of double-quote mode.
+ {
+ state = ParseState.Normal;
+ }
+ else
+ {
+ arg += c; // Everything else is taken literally.
+ }
+ break;
+ }
+ case ParseState.SingleQuote:
+ {
+ if(c.Equals('\'')) // End of single-quote mode.
+ {
+ state = ParseState.Normal;
+ }
+ else
+ {
+ arg += c; // Everything else is taken literally.
+ }
+ break;
+ }
+ default:
+ {
+ // Impossible parse state
+ Debug.Assert(false);
+ break;
+ }
+ }
+ }
+
+ switch(state)
+ {
+ case ParseState.Normal:
+ {
+ vec.Add(arg);
+ break;
+ }
+ case ParseState.SingleQuote:
+ {
+ throw new BadOptionException("missing closing single quote");
+ }
+ case ParseState.DoubleQuote:
+ {
+ throw new BadOptionException("missing closing double quote");
+ }
+ default:
+ {
+ // Impossible parse state
+ Debug.Assert(false);
+ break;
+ }
+ }
+ return vec;
+ }
+
+ void setOpt(string opt1, string opt2, string val, RepeatType rt)
+ {
+ //
+ // opt1 and opt2 (short and long opt) can't both be empty.
+ //
+ Debug.Assert(!(String.IsNullOrEmpty(opt1) && String.IsNullOrEmpty(opt2)));
+
+ if(rt == RepeatType.NoRepeat)
+ {
+ setNonRepeatingOpt(opt1, val);
+ setNonRepeatingOpt(opt2, val);
+ }
+ else
+ {
+ setRepeatingOpt(opt1, val);
+ setRepeatingOpt(opt2, val);
+ }
+ }
+
+ void setNonRepeatingOpt(string opt, string val)
+ {
+ if(String.IsNullOrEmpty(opt))
+ {
+ return;
+ }
+
+ //
+ // The option must not have been set before or, if it was set, it must have
+ // been because of a default value.
+ //
+ Debug.Assert(!_opts.ContainsKey(opt) || _validOpts[opt].hasDefault);
+
+ OptionValue ovp = new OptionValue();
+ ovp.val = val;
+ _opts[opt] = ovp;
+
+ string synonym = getSynonym(opt);
+ if(!String.IsNullOrEmpty(synonym))
+ {
+ _opts[synonym] = ovp;
+ }
+ }
+
+ void setRepeatingOpt(string opt, string val)
+ {
+ if(String.IsNullOrEmpty(opt))
+ {
+ return;
+ }
+
+ Debug.Assert(_validOpts.ContainsKey(opt));
+ OptionDetails vpos = _validOpts[opt];
+
+ string synonym = getSynonym(opt);
+
+
+ if(_ropts.ContainsKey(opt))
+ {
+ Debug.Assert(_validOpts.ContainsKey(opt));
+ Debug.Assert(_ropts.ContainsKey(opt));
+ Debug.Assert(vpos.repeat == RepeatType.Repeat);
+
+ OptionValueVector pos = _ropts[opt];
+ if(vpos.hasDefault && pos.vals.Count == 1)
+ {
+ pos.vals[0] = val;
+ vpos.hasDefault = false;
+ }
+ else
+ {
+ pos.vals.Add(val);
+ }
+ }
+ else if(_ropts.ContainsKey(synonym))
+ {
+ Debug.Assert(_validOpts.ContainsKey(synonym));
+ Debug.Assert(_validOpts[synonym].repeat == RepeatType.Repeat);
+
+ OptionValueVector spos = _ropts[synonym];
+
+ if(vpos.hasDefault && spos.vals.Count == 1)
+ {
+ spos.vals[0] = val;
+ vpos.hasDefault = false;
+ }
+ else
+ {
+ spos.vals.Add(val);
+ }
+ }
+ else
+ {
+ OptionValueVector ovp = new OptionValueVector();
+ ovp.vals.Add(val);
+ _ropts[opt] = ovp;
+ if(!String.IsNullOrEmpty(synonym))
+ {
+ _ropts[synonym] = ovp;
+ }
+ }
+ }
+
+ OptionDetails checkOpt(string opt, LengthType lt)
+ {
+ if(!_validOpts.ContainsKey(opt))
+ {
+ string err = "invalid option: `-";
+ if(lt == LengthType.LongOpt)
+ {
+ err += '-';
+ }
+ err += opt;
+ err += '\'';
+ throw new BadOptionException(err);
+ }
+ return _validOpts[opt];
+ }
+
+ OptionDetails checkOptIsValid(string opt)
+ {
+ if(!_validOpts.ContainsKey(opt))
+ {
+ string err = "`";
+ err += opt;
+ err += "': invalid option";
+ throw new BadOptionException(err);
+ }
+ return _validOpts[opt];
+ }
+
+ OptionDetails checkOptHasArg(string opt)
+ {
+ OptionDetails pos = checkOptIsValid(opt);
+ if(pos.arg == ArgType.NoArg)
+ {
+ string err = "`-";
+ if(pos.length == LengthType.LongOpt)
+ {
+ err += '-';
+ }
+ err += opt;
+ err += "': option does not take arguments";
+ throw new BadOptionException(err);
+ }
+ return pos;
+ }
+}
+
+} \ No newline at end of file
diff --git a/vsaddin/src/OutputDirView.Designer.cs b/vsaddin/src/OutputDirView.Designer.cs
new file mode 100644
index 00000000000..8bbbd4006cf
--- /dev/null
+++ b/vsaddin/src/OutputDirView.Designer.cs
@@ -0,0 +1,100 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+namespace Ice.VisualStudio
+{
+ partial class OutputDirView
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if(disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.groupOutputDir = new System.Windows.Forms.GroupBox();
+ this.txtOutputDir = new System.Windows.Forms.TextBox();
+ this.btnSelectOutputDir = new System.Windows.Forms.Button();
+ this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+ this.groupOutputDir.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupOutputDir
+ //
+ this.groupOutputDir.Controls.Add(this.txtOutputDir);
+ this.groupOutputDir.Controls.Add(this.btnSelectOutputDir);
+ this.groupOutputDir.Location = new System.Drawing.Point(6, 4);
+ this.groupOutputDir.Name = "groupOutputDir";
+ this.groupOutputDir.Size = new System.Drawing.Size(487, 45);
+ this.groupOutputDir.TabIndex = 0;
+ this.groupOutputDir.TabStop = false;
+ this.groupOutputDir.Text = "Output Dir";
+ //
+ // txtOutputDir
+ //
+ this.txtOutputDir.Location = new System.Drawing.Point(6, 16);
+ this.txtOutputDir.Name = "txtOutputDir";
+ this.txtOutputDir.Size = new System.Drawing.Size(394, 20);
+ this.txtOutputDir.TabIndex = 1;
+ this.txtOutputDir.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtOutputDir_KeyUp);
+ this.txtOutputDir.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtOutputDir_KeyPress);
+ this.txtOutputDir.Enter += new System.EventHandler(this.txtOutputDir_Focus);
+ this.txtOutputDir.LostFocus += new System.EventHandler(this.txtOutputDir_LostFocus);
+ //
+ // btnSelectOutputDir
+ //
+ this.btnSelectOutputDir.Location = new System.Drawing.Point(406, 16);
+ this.btnSelectOutputDir.Name = "btnSelectOutputDir";
+ this.btnSelectOutputDir.Size = new System.Drawing.Size(75, 23);
+ this.btnSelectOutputDir.TabIndex = 0;
+ this.btnSelectOutputDir.Text = "...";
+ this.btnSelectOutputDir.UseVisualStyleBackColor = true;
+ this.btnSelectOutputDir.Click += new System.EventHandler(this.btnSelectOutputDir_Click);
+ //
+ // OutputDirView
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupOutputDir);
+ this.Name = "OutputDirView";
+ this.Size = new System.Drawing.Size(498, 52);
+ this.groupOutputDir.ResumeLayout(false);
+ this.groupOutputDir.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupOutputDir;
+ private System.Windows.Forms.TextBox txtOutputDir;
+ private System.Windows.Forms.Button btnSelectOutputDir;
+ private System.Windows.Forms.ToolTip toolTip;
+ }
+}
diff --git a/vsaddin/src/OutputDirView.cs b/vsaddin/src/OutputDirView.cs
new file mode 100644
index 00000000000..5b6b6981025
--- /dev/null
+++ b/vsaddin/src/OutputDirView.cs
@@ -0,0 +1,142 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.IO;
+using System.Windows.Forms;
+using EnvDTE;
+
+namespace Ice.VisualStudio
+{
+ public partial class OutputDirView : UserControl
+ {
+ public OutputDirView()
+ {
+ InitializeComponent();
+ toolTip.SetToolTip(txtOutputDir, "Output directory for Slice compiler generated files.");
+ toolTip.SetToolTip(btnSelectOutputDir, "Output directory for Slice compiler generated files.");
+ }
+
+ public void init(IceConfigurationDialog dialog, Project project)
+ {
+ this._dialog = dialog;
+ this._project = project;
+ }
+
+ public void load()
+ {
+ txtOutputDir.Text = Util.getProjectOutputDirRaw(_project);
+ }
+
+ public void setEnabled(bool enabled)
+ {
+ txtOutputDir.Enabled = enabled;
+ btnSelectOutputDir.Enabled = enabled;
+ }
+
+ public bool apply(ref bool changed)
+ {
+ changed = false;
+ if(hasUnsavedChanges())
+ {
+ if(!Util.updateOutputDir(_project, txtOutputDir.Text))
+ {
+ return false;
+ }
+ changed = true;
+ }
+ return true;
+ }
+
+ public bool hasUnsavedChanges()
+ {
+ if(!txtOutputDir.Text.Trim().Equals(Util.getProjectOutputDirRaw(_project)))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ private void btnSelectOutputDir_Click(object sender, EventArgs e)
+ {
+ if(_dialog.editingIncludeDir())
+ {
+ _dialog.endEditIncludeDir(true);
+ }
+
+ FolderBrowserDialog dialog = new FolderBrowserDialog();
+ dialog.SelectedPath = Util.getProjectAbsoluteOutputDir(_project);
+ dialog.Description = "Select Base Directory For Slice Generated Files";
+ DialogResult result = dialog.ShowDialog();
+ if(result == DialogResult.OK)
+ {
+ txtOutputDir.Text = Util.relativePath(_project, dialog.SelectedPath);
+ _dialog.needSave();
+ }
+ }
+
+ private void txtOutputDir_KeyPress(object sender, KeyPressEventArgs e)
+ {
+ _editing = true;
+ if(e.KeyChar == (char)Keys.Return)
+ {
+ checkOutputDir();
+ e.Handled = true;
+ }
+ }
+
+ private void txtOutputDir_KeyUp(object sender, KeyEventArgs e)
+ {
+ _editing = true;
+ if(e.KeyCode != Keys.Return)
+ {
+ _dialog.needSave();
+ }
+ }
+
+ private void txtOutputDir_Focus(object sender, EventArgs e)
+ {
+ if(_dialog.editingIncludeDir())
+ {
+ _dialog.endEditIncludeDir(true);
+ }
+ _editing = true;
+ }
+
+ private void txtOutputDir_LostFocus(object sender, EventArgs e)
+ {
+ if(_editing)
+ {
+ checkOutputDir();
+ }
+ }
+
+ private bool checkOutputDir()
+ {
+ //
+ // Set to false so the loss of focus does not cause another call
+ //
+ _editing = false;
+ if(hasUnsavedChanges())
+ {
+ _dialog.needSave();
+ }
+ return true;
+ }
+
+ private IceConfigurationDialog _dialog;
+ private Project _project;
+ private bool _editing = false;
+ }
+}
diff --git a/vsaddin/src/OutputDirView.resx b/vsaddin/src/OutputDirView.resx
new file mode 100644
index 00000000000..a5979aadfff
--- /dev/null
+++ b/vsaddin/src/OutputDirView.resx
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+</root> \ No newline at end of file
diff --git a/vsaddin/src/Util.cs b/vsaddin/src/Util.cs
new file mode 100644
index 00000000000..dd225050b74
--- /dev/null
+++ b/vsaddin/src/Util.cs
@@ -0,0 +1,2873 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Text;
+using System.Collections.Generic;
+using System.ComponentModel;
+
+using EnvDTE;
+using System.Windows.Forms;
+using System.Runtime.InteropServices;
+using System.IO;
+using System.Diagnostics;
+using Extensibility;
+using EnvDTE80;
+using Microsoft.VisualStudio.CommandBars;
+using Microsoft.VisualStudio.VCProjectEngine;
+using Microsoft.VisualStudio.VCProject;
+using Microsoft.VisualStudio.Shell;
+using System.Resources;
+using System.Reflection;
+using VSLangProj;
+using System.Globalization;
+
+using System.Collections;
+using System.Runtime.InteropServices.ComTypes;
+using Microsoft.CSharp;
+
+namespace Ice.VisualStudio
+{
+ public class ComponentList : List<string>
+ {
+ public ComponentList()
+ {
+ }
+
+ public ComponentList(string[] values)
+ {
+ foreach(string s in values)
+ {
+ Add(s);
+ }
+ }
+
+ public ComponentList(string value)
+ {
+ init(value, ';');
+ }
+
+ public ComponentList(string value, char separator)
+ {
+ init(value, separator);
+ }
+
+ public new void Add(string value)
+ {
+ value = value.Trim();
+ if(String.IsNullOrEmpty(value))
+ {
+ return;
+ }
+ if(!base.Contains(value))
+ {
+ base.Add(value);
+ }
+ }
+
+ public new bool Contains(string value)
+ {
+ string found = base.Find(delegate(string s)
+ {
+ return s.Equals(value.Trim(), StringComparison.CurrentCultureIgnoreCase);
+ });
+ return found != null;
+ }
+
+ public new void Remove(string value)
+ {
+ value = value.Trim();
+ if(Contains(value))
+ {
+ base.Remove(value);
+ }
+ }
+
+ private void init(string value, char separator)
+ {
+ Array items = value.Split(separator);
+ foreach(string s in items)
+ {
+ Add(s);
+ }
+ }
+
+ public override string ToString()
+ {
+ return ToString(';');
+ }
+
+ public string ToString(char separator)
+ {
+ StringBuilder sb = new StringBuilder();
+ for(int cont = 0; cont < this.Count; ++cont)
+ {
+ sb.Append(this[cont]);
+ if(cont < this.Count - 1)
+ {
+ sb.Append(separator);
+ }
+ }
+ return sb.ToString();
+ }
+
+ public bool Equal(ComponentList other)
+ {
+ if(this.Count != other.Count)
+ {
+ return false;
+ }
+ bool equal = true;
+ for(int i = 0; i < this.Count; ++i)
+ {
+ string val1 = this[i];
+ string val2 = other[i];
+ if(val1 == null && val2 == null)
+ {
+ continue;
+ }
+
+ if(val1 == null || val2 == null)
+ {
+ equal = false;
+ break;
+ }
+
+ if(!val1.Equals(val2, StringComparison.CurrentCultureIgnoreCase))
+ {
+ equal = false;
+ break;
+ }
+ }
+ return equal;
+ }
+ }
+
+ public class IncludePathList : ComponentList
+ {
+ public IncludePathList()
+ : base()
+ {
+ }
+
+ public IncludePathList(string[] values)
+ : base(values)
+ {
+ }
+
+ public IncludePathList(string value)
+ : base(value, '|')
+ {
+ }
+
+ public override string ToString()
+ {
+ return base.ToString('|');
+ }
+
+ public bool Contains(Project project, string value)
+ {
+ string path = Util.absolutePath(project, value);
+ string found = base.Find(delegate(string s)
+ {
+ string other = Util.absolutePath(project, s);
+ return path.Equals(other, StringComparison.CurrentCultureIgnoreCase);
+ });
+ return found != null;
+ }
+ }
+
+ public static class Util
+ {
+ public enum msgLevel{ msgError, msgInfo, msgDebug };
+
+ public const string slice2cs = "slice2cs.exe";
+ public const string slice2cpp = "slice2cpp.exe";
+ public const string slice2sl = "slice2sl.exe";
+
+ //
+ // Property names used to persist project configuration.
+ //
+ public const string PropertyIce = "ZerocIce_Enabled";
+ public const string PropertyIceHome = "ZerocIce_Home";
+ public const string PropertyIceOutputDir = "ZerocIce_OutputDir";
+ public const string PropertyIceHeaderExt = "ZerocIce_HeaderExt";
+ public const string PropertyIceSourceExt = "ZerocIce_SourceExt";
+ public const string PropertyIceComponents = "ZerocIce_Components";
+ public const string PropertyIceExtraOptions = "ZerocIce_ExtraOptions";
+ public const string PropertyIceIncludePath = "ZerocIce_IncludePath";
+ public const string PropertyIceStreaming = "ZerocIce_Streaming";
+ public const string PropertyIceChecksum = "ZerocIce_Checksum";
+ public const string PropertyIceTie = "ZerocIce_Tie";
+ public const string PropertyIcePrefix = "ZerocIce_Prefix";
+ public const string PropertyIceDllExport = "ZerocIce_DllExport";
+ public const string PropertyVerboseLevel = "ZerocIce_VerboseLevel";
+ public const string EnvCppBinDir = "ZeroC_VS_CppBinDir";
+ //
+ // TODO: change to ZeroC_VS_IceHome in 3.4.2
+ // In 3.4.1 we need IceHome to support Freeze demos.
+ //
+ public const string EnvIceHome = "IceHome";
+
+ private static readonly string[] silverlightNames =
+ {
+ "IceSL"
+ };
+
+ public static string[] getSilverlightNames()
+ {
+ return (string[])silverlightNames.Clone();
+ }
+
+ private static readonly string[] cppNames =
+ {
+ "Freeze", "Glacier2", "Ice", "IceBox", "IceGrid", "IcePatch2",
+ "IceSSL", "IceStorm", "IceUtil"
+ };
+
+ public static string[] getCppNames()
+ {
+ return (string[])cppNames.Clone();
+ }
+
+ private static readonly string[] dotNetNames =
+ {
+ "Glacier2", "Ice", "IceBox", "IceGrid", "IcePatch2",
+ "IceSSL", "IceStorm"
+ };
+
+ public static string[] getDotNetNames()
+ {
+ return (string[])dotNetNames.Clone();
+ }
+
+ // Silverlight handled separately because it is not part of the normal product install.
+ // It is a separate product.
+ const string iceSilverlightHome = "C:\\IceSL-0.3.3";
+
+ private static string getIceHomeDefault()
+ {
+ string defaultIceHome = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+ if(defaultIceHome.EndsWith("\\bin", StringComparison.CurrentCultureIgnoreCase))
+ {
+ defaultIceHome = defaultIceHome.Substring(0, defaultIceHome.Length - "\\bin".Length);
+ if(defaultIceHome.EndsWith("\\vsaddin", StringComparison.CurrentCultureIgnoreCase))
+ {
+ defaultIceHome = defaultIceHome.Substring(0, defaultIceHome.Length - "\\vsaddin".Length);
+ }
+ }
+ return defaultIceHome;
+ }
+
+ public static string getIceHomeRaw(Project project, bool update)
+ {
+ if(Util.isSilverlightProject(project))
+ {
+ return Util.getProjectProperty(project, Util.PropertyIceHome, iceSilverlightHome, update);
+ }
+
+ string iceHome = Util.getProjectProperty(project, Util.PropertyIceHome, "", update);
+ if(String.IsNullOrEmpty(iceHome))
+ {
+ iceHome = getIceHomeDefault();
+ }
+ return iceHome;
+ }
+
+ public static string getProjectOutputDirRaw(Project project)
+ {
+ return getProjectProperty(project, Util.PropertyIceOutputDir, "", false);
+ }
+
+ public static string getProjectOutputDir(Project project)
+ {
+ String path = getProjectOutputDirRaw(project);
+ if(containsEnvironmentVars(path))
+ {
+ path = expandEnvironmentVars(path);
+ }
+ return path;
+ }
+
+ public static string getProjectAbsoluteOutputDir(Project project)
+ {
+ String path = getProjectOutputDir(project);
+ if(!Path.IsPathRooted(path))
+ {
+ path = Util.absolutePath(project, path);
+ }
+ return path;
+ }
+
+#if VS2010
+ public static VCPropertySheet findPropertySheet(IVCCollection propertySheets, string sheetName)
+ {
+ foreach(VCPropertySheet sheet in propertySheets)
+ {
+ if(sheet.Name == sheetName)
+ {
+ return sheet;
+ }
+ }
+ return null;
+ }
+
+ public static void addPropertySheet(Project project, string sheetName)
+ {
+ VCProject vcProj = (VCProject)project.Object;
+ string propSheetFileName = vcProj.ProjectDirectory + sheetName + ".props";
+ if(!File.Exists(propSheetFileName))
+ {
+ StreamWriter sw = new StreamWriter(propSheetFileName);
+ sw.WriteLine(@"<?xml version=""1.0"" encoding=""utf-8""?>");
+ sw.WriteLine(
+ @"<Project ToolsVersion=""4.0"" xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">");
+ sw.WriteLine(@"<ImportGroup Label=""PropertySheets"" />");
+ sw.WriteLine(@"<PropertyGroup Label=""UserMacros"" />");
+ sw.WriteLine(@"<PropertyGroup />");
+ sw.WriteLine(@"<ItemDefinitionGroup />");
+ sw.WriteLine(@"<ItemGroup />");
+ sw.WriteLine(@"</Project>");
+ sw.Close();
+ }
+
+ foreach(VCConfiguration vcConfig in vcProj.Configurations as IVCCollection)
+ {
+ VCPropertySheet newSheet = findPropertySheet(vcConfig.PropertySheets as IVCCollection, sheetName);
+ if(newSheet == null)
+ {
+ newSheet = vcConfig.AddPropertySheet(propSheetFileName);
+ }
+ }
+ }
+
+ public static VCUserMacro findUserMacro(IVCCollection macros, string macroName)
+ {
+ foreach(VCUserMacro macro in macros)
+ {
+ if(macro.Name == macroName)
+ {
+ return macro;
+ }
+ }
+ return null;
+ }
+
+ public static void updateIceHomePropertySheet(Project project, string iceHome, string cppBinDir)
+ {
+ addPropertySheet(project, "ice");
+
+ VCProject vcProj = (VCProject)project.Object;
+
+ foreach(VCConfiguration vcConfig in vcProj.Configurations as IVCCollection)
+ {
+ VCPropertySheet icePropertySheet = findPropertySheet(vcConfig.PropertySheets as IVCCollection, "ice");
+
+ VCUserMacro iceHomeMacro = findUserMacro(icePropertySheet.UserMacros, EnvIceHome);
+
+ if(iceHomeMacro == null)
+ {
+ iceHomeMacro = icePropertySheet.AddUserMacro(EnvIceHome, iceHome);
+ iceHomeMacro.PerformEnvironmentSet = true;
+ icePropertySheet.Save();
+ }
+ else if(iceHomeMacro.Value != iceHome)
+ {
+ iceHomeMacro.Value = iceHome;
+ iceHomeMacro.PerformEnvironmentSet = true;
+ icePropertySheet.Save();
+ }
+
+ VCUserMacro cppBinDirMacro = findUserMacro(icePropertySheet.UserMacros, EnvCppBinDir);
+
+ if(cppBinDirMacro == null)
+ {
+ cppBinDirMacro = icePropertySheet.AddUserMacro(EnvCppBinDir, cppBinDir);
+ cppBinDirMacro.PerformEnvironmentSet = true;
+ icePropertySheet.Save();
+ }
+ else if(cppBinDirMacro.Value != cppBinDir)
+ {
+ cppBinDirMacro.Value = cppBinDir;
+ cppBinDirMacro.PerformEnvironmentSet = true;
+ icePropertySheet.Save();
+ }
+ }
+ }
+#endif
+
+ public static string getIceHome(Project project)
+ {
+ return expandEnvironmentVars(getIceHomeRaw(project, true));
+ }
+
+ public static string getCsBinDir(Project project)
+ {
+ string binDir = getIceHome(project);
+ foreach(string dir in _csBinDirs)
+ {
+ if(Directory.Exists(binDir + dir))
+ {
+ binDir += dir;
+ break;
+ }
+ }
+ return binDir;
+ }
+
+ public static string getCsBinDirDefault()
+ {
+ string binDir = getIceHomeDefault();
+ foreach(string dir in _csBinDirs)
+ {
+ if(Directory.Exists(binDir + dir))
+ {
+ binDir += dir;
+ break;
+ }
+ }
+ return binDir;
+ }
+
+ public static string getPathRelativeToProject(ProjectItem item)
+ {
+ StringBuilder path = new StringBuilder();
+ if(item != null)
+ {
+ path.Append(Util.getPathRelativeToProject(item, item.ContainingProject.ProjectItems));
+ }
+ return path.ToString();
+ }
+
+ public static string getPathRelativeToProject(ProjectItem item, ProjectItems items)
+ {
+ StringBuilder path = new StringBuilder();
+ foreach(ProjectItem i in items)
+ {
+ if(i == item)
+ {
+ if(path.Length > 0)
+ {
+ path.Append("\\");
+ }
+ path.Append(i.Name);
+ break;
+ }
+ else if(Util.isProjectItemFilter(i) || Util.isProjectItemFolder(i))
+ {
+ string token = Util.getPathRelativeToProject(item, i.ProjectItems);
+ if(!String.IsNullOrEmpty(token))
+ {
+ path.Append(i.Name);
+ path.Append("\\");
+ path.Append(token);
+ break;
+ }
+ }
+ }
+ return path.ToString();
+ }
+
+ public static void addCppIncludes(VCCLCompilerTool tool, Project project, string iceHomeRaw)
+ {
+ if(tool == null || project == null)
+ {
+ return;
+ }
+
+ removeCppIncludes(tool, iceHomeRaw, getProjectOutputDirRaw(project));
+
+ string iceIncludeDir = iceHomeRaw;
+ if(Directory.Exists(Path.Combine(Util.absolutePath(project, expandEnvironmentVars(iceIncludeDir)), "cpp\\include")))
+ {
+ iceIncludeDir = Path.Combine(iceIncludeDir, "cpp");
+ }
+ iceIncludeDir = Path.Combine(iceIncludeDir, "include");
+
+ string additionalIncludeDirectories = tool.AdditionalIncludeDirectories;
+ ComponentList includes;
+ if(String.IsNullOrEmpty(additionalIncludeDirectories))
+ {
+ includes = new ComponentList();
+ }
+ else
+ {
+ includes = new ComponentList(additionalIncludeDirectories);
+ }
+
+ bool changed = false;
+ if(!includes.Contains(iceIncludeDir) && !includes.Contains(quote(iceIncludeDir)))
+ {
+ changed = true;
+ includes.Add(quote(iceIncludeDir));
+ }
+
+ string outputDir = Util.getProjectOutputDirRaw(project);
+ if(outputDir.Equals(""))
+ {
+ outputDir = ".";
+ }
+
+ if(!includes.Contains(outputDir) && !includes.Contains(quote(outputDir)))
+ {
+ changed = true;
+ includes.Add(outputDir);
+ }
+
+ if(changed)
+ {
+ tool.AdditionalIncludeDirectories = includes.ToString();
+ }
+ }
+
+ public static void removeCppIncludes(VCCLCompilerTool tool, string iceHomeRaw, string generatedDir)
+ {
+ if(tool == null || String.IsNullOrEmpty(tool.AdditionalIncludeDirectories))
+ {
+ return;
+ }
+
+ string[] _cppIncludeDirs =
+ {
+ "include",
+ "cpp\\include",
+ };
+
+ ComponentList includes = new ComponentList(tool.AdditionalIncludeDirectories);
+ foreach(string dir in _cppIncludeDirs)
+ {
+ includes.Remove(quote(Path.Combine(iceHomeRaw, dir)));
+ includes.Remove(Path.Combine(iceHomeRaw, dir));
+ }
+
+ if(!generatedDir.Equals("."))
+ {
+ includes.Remove(generatedDir);
+ }
+
+ tool.AdditionalIncludeDirectories = includes.ToString();
+ }
+
+ private static readonly string[] _csBinDirs =
+ {
+ "\\bin\\",
+ "\\cs\\bin\\",
+ "\\sl\\bin\\",
+ };
+
+ public static bool addDotNetReference(Project project, string component, string iceHomeRel, bool development)
+ {
+ if(project == null || String.IsNullOrEmpty(component))
+ {
+ return false;
+ }
+
+ string iceHome = Util.absolutePath(project, iceHomeRel);
+ foreach(string dir in _csBinDirs)
+ {
+ string reference = iceHome + dir + component + ".dll";
+ if(!File.Exists(reference))
+ {
+ continue;
+ }
+ VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;
+ try
+ {
+ Reference r = vsProject.References.Add(reference);
+ if(development)
+ {
+ r.CopyLocal = false;
+ }
+ return true;
+ }
+ catch(COMException ex)
+ {
+ Console.WriteLine(ex);
+ }
+ }
+
+ MessageBox.Show("Could not locate '" + component +
+ ".dll'. Review your 'Ice Home' setting.",
+ "Ice Visual Studio Add-In", MessageBoxButtons.OK,
+ MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0);
+ return false;
+ }
+
+ public static bool removeDotNetReference(Project project, string component)
+ {
+ if(project == null || String.IsNullOrEmpty(component))
+ {
+ return false;
+ }
+
+ foreach(Reference r in ((VSProject)project.Object).References)
+ {
+ if(r.Identity.Equals(component, StringComparison.OrdinalIgnoreCase))
+ {
+ r.Remove();
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static void addCppLib(VCLinkerTool tool, string component, bool debug)
+ {
+ if(tool == null || String.IsNullOrEmpty(component))
+ {
+ return;
+ }
+
+ if(Array.BinarySearch(Util.getCppNames(), component) < 0)
+ {
+ return;
+ }
+
+ string libName = component;
+ if(debug)
+ {
+ libName += "d";
+ }
+ libName += ".lib";
+
+ string additionalDependencies = tool.AdditionalDependencies;
+ if(String.IsNullOrEmpty(additionalDependencies))
+ {
+ additionalDependencies = "";
+ }
+
+ ComponentList components = new ComponentList(additionalDependencies.Split(' '));
+ if(!components.Contains(libName))
+ {
+ components.Add(libName);
+ additionalDependencies = components.ToString(' ');
+ tool.AdditionalDependencies = additionalDependencies;
+ }
+ }
+
+ public static bool removeCppLib(VCLinkerTool tool, string component, bool debug)
+ {
+ if(tool == null || String.IsNullOrEmpty(tool.AdditionalDependencies))
+ {
+ return false;
+ }
+
+ string libName = component;
+ if(debug)
+ {
+ libName += "d";
+ }
+ libName += ".lib";
+
+ ComponentList components = new ComponentList(tool.AdditionalDependencies.Split(' '));
+ if(components.Contains(libName))
+ {
+ components.Remove(libName);
+ tool.AdditionalDependencies = components.ToString(' ');
+ return true;
+ }
+ return false;
+ }
+
+ //
+ // Add the Ice bin path to the debug environment.
+ //
+ // Note: Only the last setting in the environment has effect.
+ //
+ public static void addIceCppEnvironment(VCDebugSettings debugSettings, Project project, string iceHomeRaw,
+ bool x64)
+ {
+ if(debugSettings == null || project == null)
+ {
+ return;
+ }
+
+ removeIceCppEnvironment(debugSettings, iceHomeRaw);
+
+ if(String.IsNullOrEmpty(debugSettings.Environment))
+ {
+ debugSettings.Environment = "PATH=" + cppBinDir(project, iceHomeRaw, x64);
+ return;
+ }
+
+ ComponentList envs = new ComponentList(debugSettings.Environment, '\n');
+
+ string path = "";
+
+ //
+ // Find the last in the list that begins: "PATH=" accounting for case and whitespace.
+ //
+ int index = -1;
+ for(int i = 0; i < envs.Count; ++i)
+ {
+ string s = envs[i].Trim();
+ if(s.StartsWith("PATH", StringComparison.CurrentCultureIgnoreCase))
+ {
+ if(s.Substring("PATH".Length).Trim().StartsWith("=", StringComparison.CurrentCultureIgnoreCase))
+ {
+ path = s;
+ index = i;
+ }
+ }
+ }
+
+ if(index == -1)
+ {
+ envs.Add("PATH=" + cppBinDir(project, iceHomeRaw, x64));
+ }
+ else
+ {
+ string binDir = cppBinDir(project, iceHomeRaw, x64);
+ ComponentList paths = new ComponentList(assignmentValue(path), ';');
+ while(paths.Contains(binDir))
+ {
+ paths.Remove(binDir);
+ }
+ path = "PATH=" + binDir + Path.PathSeparator + paths.ToString(Path.PathSeparator);
+ path = path.TrimEnd(Path.PathSeparator);
+ envs[index] = path;
+ }
+ debugSettings.Environment = envs.ToString('\n');
+ return;
+ }
+
+ private static string removeFromPath(string path, string dir)
+ {
+ ComponentList list = new ComponentList(path.Split(Path.PathSeparator));
+ while(list.Contains(dir))
+ {
+ list.Remove(dir);
+ }
+ return list.ToString(Path.PathSeparator);
+ }
+
+ private static string assignmentValue(string expr)
+ {
+ int i = expr.IndexOf('=');
+ if(i < 0)
+ {
+ return "";
+ }
+ try
+ {
+ return expr.Substring(i).Substring(1).Trim();
+ }
+ catch(ArgumentOutOfRangeException)
+ {
+ return "";
+ }
+ }
+
+ private static string prependToPath(string path, string dir)
+ {
+ path = removeFromPath(path, dir);
+ return dir + Path.PathSeparator + path;
+ }
+
+ public static string cppBinDir(Project project, string iceHomeRaw, bool x64)
+ {
+ string cppBinDir = iceHomeRaw;
+ if(Directory.Exists(Path.Combine(Util.absolutePath(project, expandEnvironmentVars(cppBinDir)), "cpp\\bin")))
+ {
+ cppBinDir = Path.Combine(cppBinDir, "cpp\\bin");
+ }
+ else
+ {
+ cppBinDir = Path.Combine(cppBinDir, "bin");
+#if VS2010
+ cppBinDir = Path.Combine(cppBinDir, "vc100");
+#endif
+ if(x64)
+ {
+ cppBinDir = Path.Combine(cppBinDir, "x64");
+ }
+ }
+ return cppBinDir;
+ }
+
+ public static void removeIceCppEnvironment(VCDebugSettings debugSettings, string iceHomeRaw)
+ {
+ if(debugSettings == null || String.IsNullOrEmpty(debugSettings.Environment))
+ {
+ return;
+ }
+
+ string[] _cppBinDirs =
+ {
+ "bin",
+ "bin\\x64",
+ "bin\\vc100",
+ "bin\\vc100\\x64",
+ "cpp\\bin",
+ };
+
+ ComponentList envs = new ComponentList(debugSettings.Environment, '\n');
+ /* Find the last in the list that begins: "PATH=" accounting for case and whitespace. */
+ string path = "";
+ int index = -1;
+ for(int i = 0; i < envs.Count; ++i)
+ {
+ string s = envs[i];
+ if(s.StartsWith("PATH", StringComparison.CurrentCultureIgnoreCase))
+ {
+ if(s.Substring("PATH".Length).Trim().StartsWith("=", StringComparison.CurrentCultureIgnoreCase))
+ {
+ path = s;
+ index = i;
+ }
+ }
+ }
+
+ if(index == -1)
+ {
+ return;
+ }
+
+ foreach(string dir in _cppBinDirs)
+ {
+ path = "PATH=" + removeFromPath(assignmentValue(path).Trim(), Path.Combine(iceHomeRaw, dir));
+ }
+
+ if(path.Equals("PATH="))
+ {
+ envs.RemoveAt(index);
+ }
+ else
+ {
+ envs[index] = path;
+ }
+ debugSettings.Environment = envs.ToString('\n');
+ return;
+ }
+
+ public static void addIceCppLibraryDir(VCLinkerTool tool, Project project, string iceHomeRaw, bool x64)
+ {
+ if(tool == null || project == null)
+ {
+ return;
+ }
+
+ removeIceCppLibraryDir(tool, iceHomeRaw);
+
+ string iceLibDir = iceHomeRaw;
+
+ if(Directory.Exists(Path.Combine(Util.absolutePath(project, expandEnvironmentVars(iceLibDir)), "cpp\\lib")))
+ {
+ // Source distribution can only build one target at a time.
+ iceLibDir = Path.Combine(iceLibDir, "cpp\\lib");
+ }
+ else
+ {
+ iceLibDir += "\\lib";
+#if VS2010
+ iceLibDir += "\\vc100";
+#endif
+ if(x64)
+ {
+ iceLibDir += "\\x64";
+ }
+ }
+
+ string additionalLibraryDirectories = tool.AdditionalLibraryDirectories;
+ if(String.IsNullOrEmpty(additionalLibraryDirectories))
+ {
+ tool.AdditionalLibraryDirectories = quote(iceLibDir);
+ return;
+ }
+
+ ComponentList libs = new ComponentList(additionalLibraryDirectories);
+ if(!libs.Contains(iceLibDir) && !libs.Contains(quote(iceLibDir)))
+ {
+ libs.Add(quote(iceLibDir));
+ tool.AdditionalLibraryDirectories = libs.ToString();
+ return;
+ }
+ }
+
+ public static void removeIceCppLibraryDir(VCLinkerTool tool, string iceHomeRaw)
+ {
+ if(tool == null || String.IsNullOrEmpty(tool.AdditionalLibraryDirectories))
+ {
+ return;
+ }
+
+ string[] _cppLibDirs =
+ {
+ "lib",
+ "lib\\x64",
+ "lib\\vc100",
+ "lib\\vc100\\x64",
+ "cpp\\lib",
+ };
+
+ ComponentList libs = new ComponentList(tool.AdditionalLibraryDirectories);
+ foreach(string dir in _cppLibDirs)
+ {
+ libs.Remove(quote(Path.Combine(iceHomeRaw, dir)));
+ libs.Remove(Path.Combine(iceHomeRaw, dir));
+ }
+ tool.AdditionalLibraryDirectories = libs.ToString();
+ }
+
+ public static bool isSliceFilename(string s)
+ {
+ return s != null && s.EndsWith(".ice", StringComparison.CurrentCultureIgnoreCase);
+ }
+
+ public static bool equalPath(string p1, string p2, string basePath)
+ {
+ if(p1 == p2)
+ {
+ return true;
+ }
+
+ if(String.IsNullOrEmpty(p1) || String.IsNullOrEmpty(p2))
+ {
+ return false;
+ }
+
+ //
+ // Convert both paths to absolute paths if necessary
+ //
+ if(!Path.IsPathRooted(p1))
+ {
+ p1 = Path.Combine(basePath, p1);
+ }
+
+ if(!Path.IsPathRooted(p2))
+ {
+ p2 = Path.Combine(basePath, p2);
+ }
+
+ try
+ {
+ //
+ // Note that in Windows white space at the beginning or end of a file are ignored.
+ // When comparing the filenames "Foo ", " Foo", and "foo", all refer to the same file.
+ //
+ // We also need to trim / (directory separator) from the end in case it's present.
+ //
+ return 0 == String.Compare(
+ Path.GetFullPath(p1).Trim().TrimEnd(Path.DirectorySeparatorChar),
+ Path.GetFullPath(p2).Trim().TrimEnd(Path.DirectorySeparatorChar),
+ StringComparison.CurrentCultureIgnoreCase);
+ }
+ catch(ArgumentException)
+ {
+ }
+ catch(NotSupportedException)
+ {
+ }
+ catch(System.Security.SecurityException)
+ {
+ }
+ catch(PathTooLongException)
+ {
+ }
+ return false;
+ }
+
+ public static bool isSliceBuilderEnabled(Project project)
+ {
+ return Util.getProjectPropertyAsBool(project, Util.PropertyIce);
+ }
+
+ public static bool isCSharpProject(Project project)
+ {
+ if(project == null)
+ {
+ return false;
+ }
+
+ if(String.IsNullOrEmpty(project.Kind))
+ {
+ return false;
+ }
+
+ return project.Kind == VSLangProj.PrjKind.prjKindCSharpProject;
+ }
+
+ public static bool isVBProject(Project project)
+ {
+ if(project == null)
+ {
+ return false;
+ }
+
+ if(String.IsNullOrEmpty(project.Kind))
+ {
+ return false;
+ }
+
+ return project.Kind == VSLangProj.PrjKind.prjKindVBProject;
+ }
+
+ public static bool isSilverlightProject(Project project)
+ {
+ if(!Util.isCSharpProject(project))
+ {
+ return false;
+ }
+
+ Array extenders = (Array)project.ExtenderNames;
+ foreach(string s in extenders)
+ {
+ if(String.IsNullOrEmpty(s))
+ {
+ continue;
+ }
+ if(s.Equals("SilverlightProject"))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static bool isCppProject(Project project)
+ {
+ if(project == null)
+ {
+ return false;
+ }
+
+ if(String.IsNullOrEmpty(project.Kind))
+ {
+ return false;
+ }
+ return project.Kind == vcContextGuids.vcContextGuidVCProject;
+ }
+
+ public static bool isProjectItemFolder(ProjectItem item)
+ {
+ if(item == null)
+ {
+ return false;
+ }
+
+ if(String.IsNullOrEmpty(item.Kind))
+ {
+ return false;
+ }
+ return item.Kind == "{6BB5F8EF-4483-11D3-8BCF-00C04F8EC28C}";
+ }
+
+ public static bool isProjectItemFilter(ProjectItem item)
+ {
+ if(item == null)
+ {
+ return false;
+ }
+
+ if(String.IsNullOrEmpty(item.Kind))
+ {
+ return false;
+ }
+ return item.Kind == "{6BB5F8F0-4483-11D3-8BCF-00C04F8EC28C}";
+ }
+
+ public static bool isProjectItemFile(ProjectItem item)
+ {
+ if(item == null)
+ {
+ return false;
+ }
+
+ if(String.IsNullOrEmpty(item.Kind))
+ {
+ return false;
+ }
+ return item.Kind == "{6BB5F8EE-4483-11D3-8BCF-00C04F8EC28C}";
+ }
+
+ public static bool hasItemNamed(ProjectItems items, string name)
+ {
+ bool found = false;
+ foreach(ProjectItem item in items)
+ {
+ if(item == null)
+ {
+ continue;
+ }
+
+ if(item.Name == null)
+ {
+ continue;
+ }
+
+ if(item.Name.Equals(name, StringComparison.OrdinalIgnoreCase))
+ {
+ found = true;
+ break;
+ }
+ }
+ return found;
+ }
+
+ public static ProjectItem findItem(string path)
+ {
+ Builder builder = Connect.getBuilder();
+ DTE dte = builder.getCurrentDTE();
+ if(dte == null)
+ {
+ return null;
+ }
+ if(dte.Solution == null)
+ {
+ return null;
+ }
+ if(dte.Solution.Projects == null)
+ {
+ return null;
+ }
+
+ ProjectItem item = null;
+ foreach(Project project in dte.Solution.Projects)
+ {
+ item = findItem(path, project.ProjectItems);
+ if(item != null)
+ {
+ break;
+ }
+ }
+ return item;
+ }
+
+ public static ProjectItem findItem(string path, ProjectItems items)
+ {
+ if(String.IsNullOrEmpty(path))
+ {
+ return null;
+ }
+ ProjectItem item = null;
+ foreach(ProjectItem i in items)
+ {
+ if(i == null)
+ {
+ continue;
+ }
+ else if(Util.isProjectItemFile(i))
+ {
+ string fullPath = i.Properties.Item("FullPath").Value.ToString();
+ Project project = i.ContainingProject;
+ if(Util.equalPath(fullPath, path, Path.GetDirectoryName(project.FileName)))
+ {
+ item = i;
+ break;
+ }
+ }
+ else if(Util.isProjectItemFolder(i))
+ {
+ string p = Path.GetDirectoryName(i.Properties.Item("FullPath").Value.ToString());
+ Project project = i.ContainingProject;
+ if(Util.equalPath(p, path, Path.GetDirectoryName(project.FileName)))
+ {
+ item = i;
+ break;
+ }
+
+ item = findItem(path, i.ProjectItems);
+ if(item != null)
+ {
+ break;
+ }
+ }
+ else if(Util.isProjectItemFilter(i))
+ {
+ string p = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(i.ContainingProject.FileName),
+ Util.getPathRelativeToProject(i)));
+
+ Project project = i.ContainingProject;
+ if(Util.equalPath(p, path, Path.GetDirectoryName(project.FileName)))
+ {
+ item = i;
+ break;
+ }
+
+ item = findItem(path, i.ProjectItems);
+ if(item != null)
+ {
+ break;
+ }
+ }
+ }
+ return item;
+ }
+
+ public static VCFile findVCFile(IVCCollection files, string name, string fullPath)
+ {
+ VCFile vcFile = null;
+ foreach(VCFile file in files)
+ {
+ if(file.ItemName == name)
+ {
+ Project project = (Project)((VCProject) file.project).Object;
+ if(!Util.equalPath(file.FullPath, fullPath, Path.GetDirectoryName(project.FileName)))
+ {
+ file.Remove();
+ break;
+ }
+ vcFile = file;
+ break;
+ }
+ }
+ return vcFile;
+ }
+
+ public static string relativePath(Project project, string absoluteFilePath)
+ {
+ if(absoluteFilePath == null)
+ {
+ return "";
+ }
+
+ if(project == null)
+ {
+ return absoluteFilePath;
+ }
+
+ return relativePath(Path.GetDirectoryName(project.FileName), absoluteFilePath);
+ }
+
+ public static string relativePath(string mainDirPath, string absoluteFilePath)
+ {
+ if(absoluteFilePath == null)
+ {
+ return "";
+ }
+
+ if(mainDirPath == null)
+ {
+ return absoluteFilePath;
+ }
+
+ if(!Path.IsPathRooted(absoluteFilePath))
+ {
+ return absoluteFilePath;
+ }
+
+ mainDirPath = Path.GetFullPath(mainDirPath).Trim(Path.DirectorySeparatorChar);
+ absoluteFilePath = Path.GetFullPath(absoluteFilePath).Trim(Path.DirectorySeparatorChar);
+
+ string[] firstPathParts = mainDirPath.Split(Path.DirectorySeparatorChar);
+ string[] secondPathParts = absoluteFilePath.Split(Path.DirectorySeparatorChar);
+
+ int sameCounter = 0;
+ while(sameCounter < Math.Min(firstPathParts.Length, secondPathParts.Length) &&
+ String.Equals(firstPathParts[sameCounter], secondPathParts[sameCounter],
+ StringComparison.CurrentCultureIgnoreCase))
+ {
+ ++sameCounter;
+ }
+
+ // Different volumes, relative path not possible.
+ if(sameCounter == 0)
+ {
+ return absoluteFilePath;
+ }
+
+ // Pop back up to the common point.
+ string newPath = "." + Path.DirectorySeparatorChar;
+ for(int i = sameCounter; i < firstPathParts.Length; ++i)
+ {
+ newPath += ".." + Path.DirectorySeparatorChar;
+ }
+
+ // Descend to the target.
+ for(int i = sameCounter; i < secondPathParts.Length; ++i)
+ {
+ newPath += secondPathParts[i] + Path.DirectorySeparatorChar;
+ }
+ return newPath.TrimEnd(Path.DirectorySeparatorChar);
+ }
+
+ // Relative paths are relative to project.
+ // Inverse of Util.relativePath().
+ public static string absolutePath(Project project, string path)
+ {
+ if(Path.IsPathRooted(path)) // If path is absolute return that path
+ {
+ return path;
+ }
+ return Path.GetFullPath(Path.Combine(Path.GetDirectoryName(project.FileName), path)).TrimEnd(
+ Path.DirectorySeparatorChar);
+ }
+
+ public static ProjectItem getSelectedProjectItem(_DTE dte)
+ {
+ UIHierarchyItem uiItem = getSelectedUIHierearchyItem(dte);
+ if(uiItem == null)
+ {
+ return null;
+ }
+ return uiItem.Object as ProjectItem;
+ }
+
+ public static Project getSelectedProject()
+ {
+ return Util.getSelectedProject(Util.getCurrentDTE());
+ }
+
+ public static Project getSelectedProject(_DTE dte)
+ {
+ UIHierarchyItem uiItem = getSelectedUIHierearchyItem(dte);
+ if(uiItem == null)
+ {
+ return null;
+ }
+ return uiItem.Object as Project;
+ }
+
+ public static UIHierarchyItem getSelectedUIHierearchyItem(_DTE dte)
+ {
+ if(dte == null)
+ {
+ return null;
+ }
+
+ UIHierarchy uiHierarchy =
+ (EnvDTE.UIHierarchy)dte.Windows.Item(EnvDTE.Constants.vsWindowKindSolutionExplorer).Object;
+ if(uiHierarchy == null)
+ {
+ return null;
+ }
+
+ if(uiHierarchy.SelectedItems == null)
+ {
+ return null;
+ }
+
+ if(((Array)uiHierarchy.SelectedItems).Length <= 0)
+ {
+ return null;
+ }
+ return (UIHierarchyItem)((Array)uiHierarchy.SelectedItems).GetValue(0);
+ }
+
+ public static bool updateOutputDir(Project project, String outputDir)
+ {
+ //
+ // Note that ouputDir could be empty, which means the project dir will
+ // be used as the output directory, and is also the default.
+ //
+ if(project == null || outputDir == null)
+ {
+ return false;
+ }
+
+ Util.cleanProject(project, true);
+
+ string oldOutputDir = getProjectAbsoluteOutputDir(project);
+
+ string projectDir = Path.GetDirectoryName(project.FileName);
+
+ // Remove old output directory if necessary.
+ if(!equalPath(oldOutputDir, projectDir, projectDir) &&
+ isEmptyDir(oldOutputDir))
+ {
+ // In C# projects, diretories are project items, but not in C++ projects.
+ if(isCSharpProject(project))
+ {
+ ProjectItem item = findItem(oldOutputDir, project.ProjectItems);
+ if(item != null)
+ {
+ item.Delete();
+ }
+ }
+ if(Directory.Exists(oldOutputDir))
+ {
+ Directory.Delete(oldOutputDir, true);
+ }
+ }
+
+ if(isCppProject(project))
+ {
+ // We must remove old output directory from C++ project include path.
+ removeCppIncludes(project);
+ }
+
+ Util.setProjectProperty(project, Util.PropertyIceOutputDir, outputDir);
+
+ if(isCppProject(project))
+ {
+ // We must add the new output directory to C++ project include path.
+ addCppIncludes(project);
+ }
+
+ return true;
+ }
+
+ public static void removeCppIncludes(Project project)
+ {
+ if(!isCppProject(project))
+ {
+ return;
+ }
+
+ VCProject vcProject = (VCProject)project.Object;
+ IVCCollection configurations = (IVCCollection)vcProject.Configurations;
+ foreach(VCConfiguration conf in configurations)
+ {
+ if(conf != null)
+ {
+ VCCLCompilerTool compilerTool =
+ (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
+ Util.removeCppIncludes(compilerTool, getIceHomeRaw(project, false),
+ Util.getProjectOutputDirRaw(project));
+ }
+ }
+ }
+
+ public static void addCppIncludes(Project project)
+ {
+ if(!isCppProject(project))
+ {
+ return;
+ }
+
+ VCProject vcProject = (VCProject)project.Object;
+ IVCCollection configurations = (IVCCollection)vcProject.Configurations;
+ foreach(VCConfiguration conf in configurations)
+ {
+ if(conf != null)
+ {
+ VCCLCompilerTool compilerTool =
+ (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
+ Util.addCppIncludes(compilerTool, project, getIceHomeRaw(project, false));
+ }
+ }
+ }
+
+ //
+ // Return true if the directory doesn't contain any
+ // files. We use this to check if it is safe to delete
+ // the output-dir after the user changes the setting.
+ //
+ public static bool isEmptyDir(String path)
+ {
+ if(String.IsNullOrEmpty(path))
+ {
+ return false;
+ }
+
+ if(!Directory.Exists(path))
+ {
+ return false;
+ }
+
+ DirectoryInfo dir = new DirectoryInfo(path);
+ FileInfo[] files = dir.GetFiles();
+ if(files.Length == 0)
+ {
+ return true;
+ }
+ bool empty = true;
+ foreach(FileInfo f in files)
+ {
+ if(File.Exists(f.FullName))
+ {
+ empty = false;
+ break;
+ }
+ else if(Directory.Exists(f.FullName))
+ {
+ empty = isEmptyDir(f.FullName);
+ if(!empty)
+ {
+ break;
+ }
+ }
+ }
+ return empty;
+ }
+
+ public static bool updateIceHome(Project project, string iceHomeRaw, bool force)
+ {
+ if(project == null || String.IsNullOrEmpty(iceHomeRaw))
+ {
+ return false;
+ }
+
+ //
+ // We want to only update Ice Home if it is different
+ // from the current setting or force is true.
+ //
+ // We compare the Ice Home raw value, note that we don't do
+ // a path comparison as Ice Home raw could contain unexpanded
+ // environment variables in it, so we just do a case insensitive
+ // string comparision.
+ //
+ if(!force && String.Equals(Util.getIceHomeRaw(project, true), iceHomeRaw,
+ StringComparison.CurrentCultureIgnoreCase))
+ {
+ return false;
+ }
+
+ if(Util.isCSharpProject(project) || Util.isVBProject(project))
+ {
+ return updateIceHomeDotNetProject(project, iceHomeRaw);
+ }
+ else if(Util.isCppProject(project))
+ {
+ return updateIceHomeCppProject(project, iceHomeRaw);
+ }
+ return false;
+ }
+
+ private static bool updateIceHomeCppProject(Project project, string iceHomeRawNew)
+ {
+ Util.removeIceCppConfigurations(project, getIceHomeRaw(project, true));
+ bool success = Util.setIceHome(project, iceHomeRawNew);
+ Util.addIceCppConfigurations(project, getIceHomeRaw(project, true));
+ return success;
+ }
+
+ //
+ // CopyLocal property doesn't work consistently, some times is set to false,
+ // when the reference isn't found. This happens when project demos are fisrt
+ // opened, as at this point the reference path has not been fixed to use the
+ // correct IceHome value. This method returns the private metadata of a
+ // Reference from the project file, this value doesn't change as does CopyLocal.
+ //
+
+#if VS2010
+ //
+ // Note this method requires .NET 4, Microsoft.Build.BuildEngine is deprecated
+ // in .NET 4, this method use the new API Microsoft.Build.Evaluation
+ //
+ private static bool getCopyLocal(Project project, string name)
+ {
+ Microsoft.Build.Evaluation.ProjectItem referenceItem = null;
+
+ Microsoft.Build.Evaluation.Project p =
+ Microsoft.Build.Evaluation.ProjectCollection.GlobalProjectCollection.LoadProject(project.FullName);
+
+ foreach(Microsoft.Build.Evaluation.ProjectItem item in p.Items)
+ {
+ if(!item.ItemType.Equals("Reference"))
+ {
+ continue;
+ }
+
+ if(!item.HasMetadata("private"))
+ {
+ continue;
+ }
+
+ string[] tokens = item.EvaluatedInclude.Split(',');
+ if(tokens.Length <= 0)
+ {
+ continue;
+ }
+
+ if(!tokens[0].Trim().Equals(name, StringComparison.CurrentCultureIgnoreCase))
+ {
+ continue;
+ }
+
+ referenceItem = item;
+
+ if(referenceItem != null)
+ {
+ break;
+ }
+ }
+
+ if(referenceItem != null)
+ {
+ return referenceItem.GetMetadata("Private").EvaluatedValue.Equals(true.ToString(),
+ StringComparison.CurrentCultureIgnoreCase);
+ }
+ return true;
+ }
+#elif VS2008
+ //
+ // Note this method used .NET 3.5, Microsoft.Build.BuildEngine it should not be used
+ // with .NET4 as is deprecated in .NET 4.
+ //
+ private static bool getCopyLocal(Project project, string name)
+ {
+ Microsoft.Build.BuildEngine.BuildItem referenceItem = null;
+ Microsoft.Build.BuildEngine.Project p =
+ Microsoft.Build.BuildEngine.Engine.GlobalEngine.GetLoadedProject(project.FileName);
+
+ foreach(Microsoft.Build.BuildEngine.BuildItemGroup itemGroup in p.ItemGroups)
+ {
+ foreach(Microsoft.Build.BuildEngine.BuildItem item in itemGroup)
+ {
+ if(!item.Name.Equals("Reference"))
+ {
+ continue;
+ }
+
+ string[] tokens = item.Include.Split(',');
+ if(tokens.Length <= 0)
+ {
+ continue;
+ }
+
+ if(!tokens[0].Trim().Equals(name, StringComparison.CurrentCultureIgnoreCase))
+ {
+ continue;
+ }
+
+ referenceItem = item;
+
+ if(referenceItem != null)
+ {
+ break;
+ }
+ }
+ if (referenceItem != null)
+ {
+ break;
+ }
+ }
+ if(referenceItem != null)
+ {
+ return referenceItem.GetMetadata("Private").Equals(true.ToString(),
+ StringComparison.CurrentCultureIgnoreCase);
+ }
+ return true;
+ }
+#endif
+ private static void setCopyLocal(Project project, string name, bool copyLocal)
+ {
+ VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;
+ foreach(Reference r in vsProject.References)
+ {
+ if(r.Name.Equals(name))
+ {
+ r.CopyLocal = copyLocal;
+ break;
+ }
+ }
+ }
+
+ private static bool updateIceHomeDotNetProject(Project project, string iceHomeRaw)
+ {
+ bool success = Util.setIceHome(project, iceHomeRaw);
+ string iceHomeRel = getIceHome(project);
+
+ ComponentList components = Util.getIceDotNetComponents(project);
+ bool development = developmentMode(project);
+ foreach(string s in components)
+ {
+ if(String.IsNullOrEmpty(s))
+ {
+ continue;
+ }
+
+ bool copyLocal = getCopyLocal(project, s);
+ Util.removeDotNetReference(project, s);
+
+ Util.addDotNetReference(project, s, iceHomeRel, development);
+ setCopyLocal(project, s, copyLocal);
+ }
+ return success;
+ }
+
+ //
+ // Return true if value is a valid Ice installation for the given project
+ // type, otherwise returns false. This method doesn't show an error message
+ // box, if you want the error message box to be displayed
+ // use checkIceHomeAndShowWarning instead.
+ //
+ public static bool checkIceHome(Project project, string value)
+ {
+ string expanded = expandEnvironmentVars(value);
+ string fullPath = Util.absolutePath(project, expanded);
+ if(Util.isSilverlightProject(project))
+ {
+ if(!File.Exists(fullPath + "\\bin\\slice2sl.exe") || !Directory.Exists(fullPath + "\\slice\\Ice"))
+ {
+ if(!File.Exists(fullPath + "\\cpp\\bin\\slice2sl.exe") ||
+ !Directory.Exists(fullPath + "\\sl\\slice\\Ice"))
+ {
+ return false;
+ }
+ }
+ }
+ else if(Util.isCppProject(project))
+ {
+ if(!Directory.Exists(fullPath + "\\slice\\Ice") ||
+ (!File.Exists(fullPath + "\\bin\\slice2cpp.exe") &&
+ !File.Exists(fullPath + "\\cpp\\bin\\slice2cpp.exe")))
+ {
+ return false;
+ }
+ }
+ else if(Util.isCSharpProject(project))
+ {
+ if(!Directory.Exists(fullPath + "\\slice\\Ice") ||
+ (!File.Exists(fullPath + "\\bin\\slice2cs.exe") &&
+ !File.Exists(fullPath + "\\cpp\\bin\\slice2cs.exe")))
+ {
+ return false;
+ }
+ }
+ else if(Util.isVBProject(project))
+ {
+ if(!File.Exists(fullPath + "\\bin\\Ice.dll") && !File.Exists(fullPath + "\\cs\\bin\\Ice.dll"))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ //
+ // Check if value is a valid value for IceHome property with the
+ // current project.
+ //
+ public static bool checkIceHomeAndShowWarning(Project project, string value)
+ {
+ string expanded = expandEnvironmentVars(value);
+
+ if(!Util.checkIceHome(project, value))
+ {
+ if(isSilverlightProject(project))
+ {
+ MessageBox.Show("Could not locate Ice for Silverlight installation in '"
+ + expanded + "' directory.\n",
+ "Ice Visual Studio Add-In", MessageBoxButtons.OK,
+ MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0);
+ }
+ else
+ {
+ MessageBox.Show("Could not locate Ice installation in '"
+ + expanded + "' directory.\n",
+ "Ice Visual Studio Add-In", MessageBoxButtons.OK,
+ MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0);
+ }
+ return false;
+ }
+ return true;
+ }
+
+ public static bool setIceHome(Project project, string value)
+ {
+ if(!checkIceHomeAndShowWarning(project, value))
+ {
+ return false;
+ }
+
+ setProjectProperty(project, Util.PropertyIceHome, value);
+ return true;
+ }
+
+ public static int getProjectPropertyAsInt(Project project, string name)
+ {
+ int value = -1;
+ try
+ {
+ value = Convert.ToInt32(Util.getProjectProperty(project, name), CultureInfo.InvariantCulture);
+ }
+ catch(FormatException)
+ {
+ }
+ catch(OverflowException)
+ {
+ }
+ return value;
+ }
+
+ public static bool getProjectPropertyAsBool(Project project, string name)
+ {
+ return Util.getProjectProperty(project, name).Equals(
+ true.ToString(), StringComparison.CurrentCultureIgnoreCase);
+ }
+
+ public static string getProjectProperty(Project project, string name)
+ {
+ return Util.getProjectProperty(project, name, "", true);
+ }
+
+ public static string getProjectProperty(Project project, string name, string defaultValue)
+ {
+ return Util.getProjectProperty(project, name, defaultValue, true);
+ }
+
+ public static string getProjectProperty(Project project, string name, string defaultValue, bool update)
+ {
+ if(project == null || String.IsNullOrEmpty(name) || project.Globals == null)
+ {
+ return defaultValue;
+ }
+
+ if(project.Globals.get_VariableExists(name))
+ {
+ return project.Globals[name].ToString();
+ }
+
+ if(update && !String.IsNullOrEmpty(defaultValue))
+ {
+ project.Globals[name] = defaultValue;
+ if(!project.Globals.get_VariablePersists(name))
+ {
+ project.Globals.set_VariablePersists(name, true);
+ }
+ }
+ return defaultValue;
+ }
+
+ public static void setProjectProperty(Project project, string name, string value)
+ {
+ if(project == null || String.IsNullOrEmpty(name) || project.Globals == null)
+ {
+ return;
+ }
+ if(!project.Globals.get_VariableExists(name) || (string)project.Globals[name] != value)
+ {
+ project.Globals[name] = value;
+ if(!project.Globals.get_VariablePersists(name))
+ {
+ project.Globals.set_VariablePersists(name, true);
+ }
+ }
+ }
+
+ //
+ // As the add-in evolves the code changes, but users still have project files
+ // created by previous versions. This method is called when projects are opened
+ // to account for old project files and to move them to the current requirements.
+ //
+ public static void fix(Project p)
+ {
+ if(p == null || p.Globals == null)
+ {
+ return;
+ }
+
+ // This variable was removed for 3.4.1.2.
+ if(p.Globals.get_VariableExists("ZerocIce_HomeExpanded"))
+ {
+ p.Globals.set_VariablePersists("ZerocIce_HomeExpanded", false);
+ }
+
+ // This feature was made more general for 3.4.1.2.
+ if(p.Globals.get_VariableExists("ZerocIce_ConsoleOutput"))
+ {
+ if(!p.Globals.get_VariableExists(PropertyVerboseLevel))
+ {
+ setProjectProperty(p, PropertyVerboseLevel, "0");
+ if(getProjectPropertyAsBool(p, "ZerocIce_ConsoleOutput"))
+ {
+ setProjectProperty(p, PropertyVerboseLevel, "1");
+ }
+ }
+ p.Globals.set_VariablePersists("ZerocIce_ConsoleOutput", false);
+ }
+ }
+
+ public static String getPrecompileHeader(Project project)
+ {
+ if(!Util.isCppProject(project))
+ {
+ return "";
+ }
+ ConfigurationManager configManager = project.ConfigurationManager;
+ if(configManager == null)
+ {
+ return "";
+ }
+
+ Configuration activeConfig;
+ try
+ {
+ activeConfig = (Configuration)configManager.ActiveConfiguration;
+ }
+ catch(COMException)
+ {
+ return "";
+ }
+
+ if(activeConfig == null)
+ {
+ return "";
+ }
+
+ VCProject vcProject = (VCProject)project.Object;
+ IVCCollection configurations = (IVCCollection)vcProject.Configurations;
+ String preCompiledHeader = "";
+ foreach(VCConfiguration conf in configurations)
+ {
+ if(conf.Name != (activeConfig.ConfigurationName + "|" + activeConfig.PlatformName))
+ {
+ continue;
+ }
+ VCCLCompilerTool compilerTool =
+ (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
+ if(compilerTool == null)
+ {
+ break;
+ }
+ if(compilerTool.UsePrecompiledHeader == pchOption.pchCreateUsingSpecific ||
+ compilerTool.UsePrecompiledHeader == pchOption.pchUseUsingSpecific)
+ {
+ preCompiledHeader = compilerTool.PrecompiledHeaderThrough;
+ }
+ }
+ return preCompiledHeader;
+ }
+
+ public static ComponentList getIceCppComponents(Project project)
+ {
+ ComponentList components = new ComponentList();
+ ConfigurationManager configManager = project.ConfigurationManager;
+ Configuration activeConfig = (Configuration)configManager.ActiveConfiguration;
+
+ VCProject vcProject = (VCProject)project.Object;
+ IVCCollection configurations = (IVCCollection)vcProject.Configurations;
+ foreach(VCConfiguration conf in configurations)
+ {
+ if(conf == null)
+ {
+ continue;
+ }
+ if(String.IsNullOrEmpty(conf.Name))
+ {
+ continue;
+ }
+ if(!conf.Name.Equals(activeConfig.ConfigurationName + "|" + activeConfig.PlatformName))
+ {
+ continue;
+ }
+
+ VCCLCompilerTool compilerTool =
+ (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
+ VCLinkerTool linkerTool = (VCLinkerTool)(((IVCCollection)conf.Tools).Item("VCLinkerTool"));
+ if(linkerTool == null || compilerTool == null)
+ {
+ break;
+ }
+
+ if(String.IsNullOrEmpty(linkerTool.AdditionalDependencies))
+ {
+ break;
+ }
+
+ bool debug = false;
+ if(!String.IsNullOrEmpty(compilerTool.PreprocessorDefinitions))
+ {
+ debug = (compilerTool.PreprocessorDefinitions.Contains("DEBUG") &&
+ !compilerTool.PreprocessorDefinitions.Contains("NDEBUG"));
+ }
+
+ if(!debug)
+ {
+ debug = conf.Name.Contains("Debug");
+ }
+
+ List<string> componentNames = new List<string>(linkerTool.AdditionalDependencies.Split(' '));
+ foreach(string s in componentNames)
+ {
+ if(String.IsNullOrEmpty(s))
+ {
+ continue;
+ }
+
+ int index = s.LastIndexOf('.');
+ if(index <= 0)
+ {
+ continue;
+ }
+
+ string libName = s.Substring(0, index);
+ if(debug)
+ {
+ libName = libName.Substring(0, libName.Length - 1);
+ }
+ if(String.IsNullOrEmpty(libName))
+ {
+ continue;
+ }
+
+ if(Array.BinarySearch(Util.getCppNames(), libName) < 0)
+ {
+ continue;
+ }
+ components.Add(libName.Trim());
+ }
+ }
+ return components;
+ }
+
+ public static ComponentList getIceSilverlightComponents(Project project)
+ {
+ ComponentList components = new ComponentList();
+ if(project == null)
+ {
+ return components;
+ }
+
+ VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;
+ foreach(Reference r in vsProject.References)
+ {
+ if(Array.BinarySearch(Util.getSilverlightNames(), r.Name) < 0)
+ {
+ continue;
+ }
+
+ components.Add(r.Name);
+ }
+ return components;
+ }
+
+ public static ComponentList getIceDotNetComponents(Project project)
+ {
+ ComponentList components = new ComponentList();
+ if(project == null)
+ {
+ return components;
+ }
+
+ VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;
+ foreach(Reference r in vsProject.References)
+ {
+ if(Array.BinarySearch(Util.getDotNetNames(), r.Name) < 0)
+ {
+ continue;
+ }
+
+ components.Add(r.Name);
+ }
+ return components;
+ }
+
+ public static void addIceCppConfigurations(Project project, string iceHomeRaw)
+ {
+ if(!isCppProject(project))
+ {
+ return;
+ }
+
+ VCProject vcProject = (VCProject)project.Object;
+ IVCCollection configurations = (IVCCollection)vcProject.Configurations;
+ foreach(VCConfiguration conf in configurations)
+ {
+ if(conf == null)
+ {
+ continue;
+ }
+ bool x64 = false;
+ VCPlatform platform = (VCPlatform)conf.Platform;
+ String platformName = platform.Name;
+ if(platformName.Equals("x64", StringComparison.CurrentCultureIgnoreCase) ||
+ platformName.Equals("Itanium", StringComparison.CurrentCultureIgnoreCase))
+ {
+ x64 = true;
+ }
+ VCCLCompilerTool compilerTool =
+ (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
+ VCLinkerTool linkerTool = (VCLinkerTool)(((IVCCollection)conf.Tools).Item("VCLinkerTool"));
+
+ Util.addIceCppEnvironment((VCDebugSettings)conf.DebugSettings, project, iceHomeRaw, x64);
+ Util.addIceCppLibraryDir(linkerTool, project, iceHomeRaw, x64);
+ Util.addCppIncludes(compilerTool, project, iceHomeRaw);
+ }
+ }
+
+ public static void removeIceCppConfigurations(Project project, string iceHomeRaw)
+ {
+ if(!isCppProject(project))
+ {
+ return;
+ }
+
+ VCProject vcProject = (VCProject)project.Object;
+ IVCCollection configurations = (IVCCollection)vcProject.Configurations;
+ foreach(VCConfiguration conf in configurations)
+ {
+ if(conf != null)
+ {
+ VCCLCompilerTool compilerTool =
+ (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
+ VCLinkerTool linkerTool = (VCLinkerTool)(((IVCCollection)conf.Tools).Item("VCLinkerTool"));
+
+ Util.removeIceCppEnvironment((VCDebugSettings)conf.DebugSettings, iceHomeRaw);
+ Util.removeIceCppLibraryDir(linkerTool, iceHomeRaw);
+ Util.removeCppIncludes(compilerTool, iceHomeRaw,
+ Util.getProjectOutputDirRaw(project));
+ }
+ }
+ }
+
+ public static void addIceCppLibs(Project project, ComponentList components)
+ {
+ if(!isCppProject(project))
+ {
+ return;
+ }
+
+ VCProject vcProject = (VCProject)project.Object;
+ IVCCollection configurations = (IVCCollection)vcProject.Configurations;
+
+ foreach(VCConfiguration conf in configurations)
+ {
+ if(conf == null)
+ {
+ continue;
+ }
+ VCCLCompilerTool compilerTool =
+ (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
+ VCLinkerTool linkerTool = (VCLinkerTool)(((IVCCollection)conf.Tools).Item("VCLinkerTool"));
+
+ if(compilerTool == null || linkerTool == null)
+ {
+ continue;
+ }
+
+ bool debug = false;
+ if(!String.IsNullOrEmpty(compilerTool.PreprocessorDefinitions))
+ {
+ debug = (compilerTool.PreprocessorDefinitions.Contains("DEBUG") &&
+ !compilerTool.PreprocessorDefinitions.Contains("NDEBUG"));
+ }
+ if(!debug)
+ {
+ debug = conf.Name.IndexOf("Debug", StringComparison.CurrentCultureIgnoreCase) >= 0;
+ }
+
+ foreach(string component in components)
+ {
+ if(String.IsNullOrEmpty(component))
+ {
+ continue;
+ }
+ Util.addCppLib(linkerTool, component, debug);
+ }
+ }
+ }
+
+ public static ComponentList removeIceCppLibs(Project project)
+ {
+ return Util.removeIceCppLibs(project, new ComponentList(Util.getCppNames()));
+ }
+
+ public static ComponentList removeIceCppLibs(Project project, ComponentList components)
+ {
+ ComponentList removed = new ComponentList();
+ if(!isCppProject(project))
+ {
+ return removed;
+ }
+
+ VCProject vcProject = (VCProject)project.Object;
+ IVCCollection configurations = (IVCCollection)vcProject.Configurations;
+
+ foreach(VCConfiguration conf in configurations)
+ {
+ if(conf == null)
+ {
+ continue;
+ }
+ VCCLCompilerTool compilerTool =
+ (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
+ VCLinkerTool linkerTool = (VCLinkerTool)(((IVCCollection)conf.Tools).Item("VCLinkerTool"));
+
+ if(compilerTool == null || linkerTool == null)
+ {
+ continue;
+ }
+
+ bool debug = false;
+ if(!String.IsNullOrEmpty(compilerTool.PreprocessorDefinitions))
+ {
+ debug = (compilerTool.PreprocessorDefinitions.Contains("DEBUG") &&
+ !compilerTool.PreprocessorDefinitions.Contains("NDEBUG"));
+ }
+ if(!debug)
+ {
+ debug = conf.Name.Contains("Debug");
+ }
+
+ foreach(string s in components)
+ {
+ if(String.IsNullOrEmpty(s))
+ {
+ continue;
+ }
+
+ if(Util.removeCppLib(linkerTool, s, debug) && !removed.Contains(s))
+ {
+ removed.Add(s);
+ }
+ }
+ }
+ return removed;
+ }
+
+ //
+ // Return true if the .NET reference that corresponds to the Ice component
+ // is present in the given project.
+ //
+ public static bool hasDotNetReference(Project project, string component)
+ {
+ bool found = false;
+ foreach(Reference r in ((VSProject)project.Object).References)
+ {
+ if(r.Name.Equals(component, StringComparison.OrdinalIgnoreCase))
+ {
+ found = true;
+ break;
+ }
+ }
+ return found;
+ }
+
+ //
+ // Return true if at least one of the C++ project configurations contains
+ // the library corresponding to the given component.
+ //
+ public static bool hasIceCppLib(Project project, string component)
+ {
+ if(!isCppProject(project))
+ {
+ return false;
+ }
+
+ if(Array.BinarySearch(Util.getCppNames(), component) < 0)
+ {
+ return false;
+ }
+
+ VCProject vcProject = (VCProject)project.Object;
+ IVCCollection configurations = (IVCCollection)vcProject.Configurations;
+ bool found = false;
+
+ foreach(VCConfiguration conf in configurations)
+ {
+ if(conf == null)
+ {
+ continue;
+ }
+
+ VCCLCompilerTool compilerTool =
+ (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
+ VCLinkerTool linkerTool = (VCLinkerTool)(((IVCCollection)conf.Tools).Item("VCLinkerTool"));
+
+ if(compilerTool == null || linkerTool == null)
+ {
+ continue;
+ }
+
+ bool debug = false;
+ if(!String.IsNullOrEmpty(compilerTool.PreprocessorDefinitions))
+ {
+ debug = (compilerTool.PreprocessorDefinitions.Contains("DEBUG") &&
+ !compilerTool.PreprocessorDefinitions.Contains("NDEBUG"));
+ }
+ if(!debug)
+ {
+ debug = conf.Name.Contains("Debug");
+ }
+
+ string libName = component;
+ if(debug)
+ {
+ libName += "d";
+ }
+ libName += ".lib";
+
+ string additionalDependencies = linkerTool.AdditionalDependencies;
+ if(String.IsNullOrEmpty(additionalDependencies))
+ {
+ continue;
+ }
+
+ ComponentList components = new ComponentList(additionalDependencies.Split(' '));
+ if(components.Contains(libName))
+ {
+ found = true;
+ break;
+ }
+ }
+ return found;
+ }
+
+ public static DTE getCurrentDTE()
+ {
+ return Connect.getCurrentDTE();
+ }
+
+ public static string expandEnvironmentVars(string s)
+ {
+ if(String.IsNullOrEmpty(s))
+ {
+ return s;
+ }
+ string result = s;
+ int beg = 0;
+ int end = 0;
+ while(beg < result.Length &&
+ (beg = result.IndexOf("$(", beg, StringComparison.Ordinal)) != -1 &&
+ (end = result.IndexOf(")", beg, StringComparison.Ordinal)) != -1)
+ {
+ string variable = result.Substring(beg + "$(".Length, end - (beg + "$(".Length));
+ string value = System.Environment.GetEnvironmentVariable(variable);
+ if(value == null)
+ {
+ // Skip undefined vars.
+ beg += "$(".Length + variable.Length + ")".Length;
+ continue;
+ }
+ result = result.Replace("$(" + variable + ")", value);
+ beg += value.Length;
+ }
+ return result;
+ }
+
+ public static bool containsEnvironmentVars(string s)
+ {
+ if(String.IsNullOrEmpty(s))
+ {
+ return false;
+ }
+ return s.Contains("$(");
+ }
+
+ public static string quote(string arg)
+ {
+ if(String.IsNullOrEmpty(arg))
+ {
+ return "\"\"";
+ }
+ return "\"" + arg + "\"";
+ }
+
+ public static void verifyProjectSettings(Project project)
+ {
+ if(isCppProject(project))
+ {
+ addIceCppConfigurations(project, getIceHomeRaw(project, false));
+ }
+ else
+ {
+ string iceHome = getIceHome(project);
+ string binDir = getCsBinDir(project);
+
+ ComponentList components = Util.getIceDotNetComponents(project);
+ foreach(string component in components)
+ {
+ if(String.IsNullOrEmpty(component))
+ {
+ continue;
+ }
+
+
+ string reference = binDir + component + ".dll";
+
+ //
+ // If Ice components are not from the current Ice home binary
+ // directory, we update the references to use the new value of
+ // Ice home.
+ //
+ bool development = developmentMode(project);
+ foreach(Reference r in ((VSProject)project.Object).References)
+ {
+ if(r.Name.Equals(component, StringComparison.OrdinalIgnoreCase))
+ {
+ if(!r.Path.Equals(reference, StringComparison.OrdinalIgnoreCase))
+ {
+ bool copyLocal = getCopyLocal(project, component);
+ Util.removeDotNetReference(project, component);
+
+ Util.addDotNetReference(project, component, iceHome, development);
+ setCopyLocal(project, component, copyLocal);
+ }
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ public static bool addBuilderToProject(Project project, ComponentList components)
+ {
+ Builder builder = Connect.getBuilder();
+ if(builder == null || project == null)
+ {
+ return false;
+ }
+
+ if(Util.isSliceBuilderEnabled(project))
+ {
+ return false; // Already enabled.
+ }
+
+ builder.addBuilderToProject(project, components);
+ return true;
+ }
+
+ public static bool removeBuilderFromProject(Project project)
+ {
+ Builder builder = Connect.getBuilder();
+ if(builder == null || project == null)
+ {
+ return false;
+ }
+
+ if(!Util.isSliceBuilderEnabled(project))
+ {
+ return false; // Already disabled.
+ }
+
+ builder.removeBuilderFromProject(project);
+ return true;
+ }
+
+ public static void cleanProject(Project project, bool remove)
+ {
+ Builder builder = Connect.getBuilder();
+ builder.cleanProject(project, remove);
+ }
+
+ public static void rebuildProject(Project project)
+ {
+ Builder builder = Connect.getBuilder();
+ builder.cleanProject(project, false);
+ builder.buildProject(project, true, vsBuildScope.vsBuildScopeProject);
+ }
+
+ public static int getVerboseLevel(Project p)
+ {
+ int verboseLevel = (int)Util.msgLevel.msgDebug;
+ if(p != null)
+ {
+ try
+ {
+ verboseLevel = Int32.Parse(Util.getProjectProperty(p, Util.PropertyVerboseLevel),
+ CultureInfo.InvariantCulture);
+ }
+ catch(ArgumentNullException)
+ {
+ }
+ catch(FormatException)
+ {
+ }
+ catch(OverflowException)
+ {
+ }
+ }
+ return verboseLevel;
+ }
+
+ public static void write(Project p, Util.msgLevel msgLevel, string message)
+ {
+ Builder builder = Connect.getBuilder();
+ if(builder == null)
+ {
+ return;
+ }
+
+ int verboseLevel = getVerboseLevel(p);
+
+ if((int)msgLevel <= verboseLevel)
+ {
+ if(builder.connectMode() != ext_ConnectMode.ext_cm_CommandLine)
+ {
+ OutputWindowPane pane = builder.buildOutput();
+ if(pane == null)
+ {
+ return;
+ }
+ pane.Activate();
+ pane.OutputString(message);
+ }
+ else
+ {
+ System.Console.Write(message);
+ }
+ }
+ }
+
+ //
+ // Get the assembly name of a .NET project
+ //
+ public static string assemblyName(Project project)
+ {
+ if(project == null)
+ {
+ return "";
+ }
+ if(!isCSharpProject(project) && !isVBProject(project))
+ {
+ return "";
+ }
+
+ Property assemblyName = project.Properties.Item("AssemblyName");
+
+ if(assemblyName.Value == null)
+ {
+ return "";
+ }
+ return assemblyName.Value.ToString();
+ }
+
+ //
+ // Check if the Visual Studio hosting process is enabled in any of
+ // the project configurations.
+ //
+ public static bool useVSHostingProcess(Project p)
+ {
+ bool enabled = false;
+ foreach(Configuration config in p.ConfigurationManager)
+ {
+ if(config.Properties == null)
+ {
+ continue;
+ }
+ Property property = config.Properties.Item("UseVSHostingProcess");
+ if(property.Value.ToString().Equals(true.ToString(), StringComparison.CurrentCultureIgnoreCase))
+ {
+ enabled = true;
+ break;
+ }
+ }
+ return enabled;
+ }
+
+ //
+ // Enable/Disable the Visual Studio hosting process. We use this
+ // to force Visual Studio to restart the hosting process, which is
+ // necessary for the process to run with updated environment variables.
+ //
+ public static void setVsHostingProcess(Project p, bool value)
+ {
+ foreach(Configuration config in p.ConfigurationManager)
+ {
+ if(config == null)
+ {
+ continue;
+ }
+
+ if(config.Properties == null)
+ {
+ continue;
+ }
+
+ Property property = config.Properties.Item("UseVSHostingProcess");
+ if(property == null)
+ {
+ continue;
+ }
+
+ if(property.Value != null)
+ {
+ if(property.Value.ToString().Equals(value.ToString(), StringComparison.CurrentCultureIgnoreCase))
+ {
+ continue;
+ }
+ }
+ property.Value = value;
+ }
+ }
+
+ //
+ // Check if the .NET development mode is enabled in the application config that resides in
+ // the file <applicationName>.config.exe.
+ //
+ public static bool developmentMode(Project project)
+ {
+ string configPath =
+ Path.Combine(Path.GetDirectoryName(project.FileName), assemblyName(project) + ".exe.config");
+ if(!File.Exists(configPath))
+ {
+ return false;
+ }
+
+ System.Xml.XmlDocument dom = new System.Xml.XmlDocument();
+
+ try
+ {
+ dom.Load(configPath);
+ System.Xml.XmlNodeList nodes = dom.SelectNodes("/configuration/runtime/developmentMode");
+ if(nodes.Count <= 0)
+ {
+ return false;
+ }
+ System.Xml.XmlNode node = nodes[0];
+
+ System.Xml.XmlAttribute attribute = node.Attributes["developerInstallation"];
+
+ if(attribute == null)
+ {
+ return false;
+ }
+
+ if(String.IsNullOrEmpty(attribute.Value))
+ {
+ return false;
+ }
+ return attribute.Value.Equals("true", StringComparison.CurrentCultureIgnoreCase);
+ }
+ catch(System.Xml.XmlException)
+ {
+ return false; // There was an error parsing the XML
+ }
+ }
+
+ public static bool parseSlice2slOptions(string args, bool showWarning, ref Options opts)
+ {
+ try
+ {
+ opts = null;
+
+ if(String.IsNullOrEmpty(args))
+ {
+ return true; //No options to parse
+ }
+
+ opts = new Options();
+ opts.addOpt("h", "help");
+ opts.addOpt("v", "version");
+ opts.addOpt("D", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
+ opts.addOpt("U", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
+ opts.addOpt("I", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
+ opts.addOpt("E");
+ opts.addOpt("", "output-dir", Options.ArgType.NeedArg);
+ opts.addOpt("", "depend");
+ opts.addOpt("d", "debug");
+ opts.addOpt("", "ice");
+ opts.addOpt("", "case-sensitive");
+
+ opts.parse(Options.split(args));
+
+ checkInvalidOptions(opts);
+
+ return true;
+ }
+ catch(BadOptionException ex)
+ {
+ if(showWarning)
+ {
+ showExtraOptionsWarning(ex);
+ }
+ return false;
+ }
+ }
+
+ public static bool parseSlice2csOptions(string args, bool showWarning, ref Options opts)
+ {
+ try
+ {
+ opts = null;
+
+ if(String.IsNullOrEmpty(args))
+ {
+ return true; //No options to parse
+ }
+
+ opts = new Options();
+ opts.addOpt("h", "help");
+ opts.addOpt("v", "version");
+ opts.addOpt("D", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
+ opts.addOpt("U", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
+ opts.addOpt("I", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
+ opts.addOpt("E");
+ opts.addOpt("", "output-dir", Options.ArgType.NeedArg);
+ opts.addOpt("", "tie");
+ opts.addOpt("", "impl");
+ opts.addOpt("", "impl-tie");
+ opts.addOpt("", "depend");
+ opts.addOpt("d", "debug");
+ opts.addOpt("", "ice");
+ opts.addOpt("", "underscore");
+ opts.addOpt("", "checksum");
+ opts.addOpt("", "stream");
+
+ opts.parse(Options.split(args));
+
+ checkInvalidOptions(opts);
+
+ return true;
+ }
+ catch(BadOptionException ex)
+ {
+ if(showWarning)
+ {
+ showExtraOptionsWarning(ex);
+ }
+ return false;
+ }
+ }
+
+ public static bool parseSlice2cppOptions(string args, bool showWarning, ref Options opts,
+ ref string headerExt, ref string sourceExt)
+ {
+ try
+ {
+ opts = null;
+ headerExt = "";
+ sourceExt = "";
+
+ if(String.IsNullOrEmpty(args))
+ {
+ return true; //No options to parse
+ }
+
+ opts = new Options();
+ opts.addOpt("h", "help");
+ opts.addOpt("v", "version");
+ opts.addOpt("", "header-ext", Options.ArgType.NeedArg, "h");
+ opts.addOpt("", "source-ext", Options.ArgType.NeedArg, "cpp");
+ opts.addOpt("", "add-header", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
+ opts.addOpt("D", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
+ opts.addOpt("U", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
+ opts.addOpt("I", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
+ opts.addOpt("E");
+ opts.addOpt("", "include-dir", Options.ArgType.NeedArg);
+ opts.addOpt("", "output-dir", Options.ArgType.NeedArg);
+ opts.addOpt("", "dll-export", Options.ArgType.NeedArg);
+ opts.addOpt("", "impl");
+ opts.addOpt("", "depend");
+ opts.addOpt("d", "debug");
+ opts.addOpt("", "ice");
+ opts.addOpt("", "underscore");
+ opts.addOpt("", "checksum");
+ opts.addOpt("", "stream");
+
+ opts.parse(Options.split(args));
+
+ checkInvalidOptions(opts);
+
+ string hExt = opts.optArg("header-ext");
+ string cppExt = opts.optArg("source-ext");
+
+ if(Util.containsEnvironmentVars(hExt) ||
+ Util.containsEnvironmentVars(cppExt))
+ {
+ throw new BadOptionException(
+ "You cannot use environment variables in `--header-ext' or `--source-ext' options.");
+ }
+ headerExt = hExt;
+ sourceExt = cppExt;
+
+ if(opts.isSet("dll-export"))
+ {
+ throw new BadOptionException(
+ "Use the `DLL Export Symbol' text box below to set the --dll-export option\n" +
+ "instead of the `Extra Compiler Options' text box.");
+ }
+
+ return true;
+ }
+ catch(BadOptionException ex)
+ {
+ if(showWarning)
+ {
+ showExtraOptionsWarning(ex);
+ }
+ return false;
+ }
+ }
+
+ //
+ // Check for common options that must not appear in Extra Options textbox.
+ //
+ private static void checkInvalidOptions(Options opts)
+ {
+ if(opts.isSet("output-dir"))
+ {
+ throw new BadOptionException(
+ "Use the `Output Dir' text box above to set `--output-dir' option\n" +
+ "instead of the `Extra Compiler Options' text box.");
+ }
+
+ if(opts.isSet("depend"))
+ {
+ throw new BadOptionException("Don't use `--depend' option in `Extra Options' text box.");
+ }
+
+ if(opts.isSet("help"))
+ {
+ throw new BadOptionException("Don't use `--help' or `-h' option in `Extra Options' text box.");
+ }
+
+ if(opts.isSet("version"))
+ {
+ throw new BadOptionException("Don't use `--version' or `-v' option in `Extra Options' text box.");
+ }
+ }
+
+ private static void showExtraOptionsWarning(BadOptionException ex)
+ {
+ MessageBox.Show("Extra Options field contains some errors:\n" +
+ ex.reason,
+ "Ice Visual Studio Add-In", MessageBoxButtons.OK,
+ MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0);
+ }
+
+
+ public static void unexpectedExceptionWarning(Exception ex)
+ {
+ MessageBox.Show("The Ice Visual Studio Add-In has raised an unexpected exception:\n" +
+ ex.ToString(),
+ "Ice Visual Studio Add-In", MessageBoxButtons.OK,
+ MessageBoxIcon.Error,
+ MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0);
+ }
+
+ public static string getHeaderExt(Project p)
+ {
+ String extension = getProjectProperty(p, Util.PropertyIceHeaderExt);
+ if(String.IsNullOrEmpty(extension))
+ {
+ extension = "h";
+ }
+ return extension;
+ }
+
+ public static string getSourceExt(Project p)
+ {
+ String extension = getProjectProperty(p, Util.PropertyIceSourceExt);
+ if(String.IsNullOrEmpty(extension))
+ {
+ extension = "cpp";
+ }
+ return extension;
+ }
+
+ //
+ // Warn the user about unsaved changes. Returns true if the user
+ // wants to discard changes, otherwise returns false.
+ //
+ public static bool warnUnsavedChanges(IWin32Window owner)
+ {
+ if(MessageBox.Show(owner, "Are you sure you want to discard all changes?",
+ "Ice Visual Studio Add-In", MessageBoxButtons.YesNo,
+ MessageBoxIcon.Question, MessageBoxDefaultButton.Button1,
+ (MessageBoxOptions)0) == DialogResult.Yes)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ public static List<ProjectItem> clone(ProjectItems items)
+ {
+ List<ProjectItem> list = new List<ProjectItem>();
+ foreach(ProjectItem i in items)
+ {
+ list.Add(i);
+ }
+ return list;
+ }
+ }
+}
diff --git a/vsplugin/src/addin-vs2008.csproj b/vsaddin/src/addin-vs2008.csproj
index 22706dd4c94..d183704e0c8 100644
--- a/vsplugin/src/addin-vs2008.csproj
+++ b/vsaddin/src/addin-vs2008.csproj
@@ -24,6 +24,7 @@
<DefineConstants>TRACE;DEBUG;VS2008</DefineConstants>
<WarningLevel>4</WarningLevel>
<IncrementalBuild>false</IncrementalBuild>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
@@ -47,15 +48,20 @@
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Accessibility" />
+ <Reference Include="CustomMarshalers" />
<Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference Include="Microsoft.Build.Engine" />
<Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Shell, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.VisualStudio.Shell.Design, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.VCProject, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.VCProjectEngine, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.Vsa" />
<Reference Include="System" />
+ <Reference Include="System.configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
@@ -73,6 +79,19 @@
<Compile Include="Connect.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="ExtraCompilerOptionsView.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="ExtraCompilerOptionsView.Designer.cs">
+ <DependentUpon>ExtraCompilerOptionsView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="IceDialog.cs" />
+ <Compile Include="IceHomeView.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="IceHomeView.Designer.cs">
+ <DependentUpon>IceHomeView.cs</DependentUpon>
+ </Compile>
<Compile Include="IceVBConfigurationDialog.cs">
<SubType>Form</SubType>
</Compile>
@@ -98,6 +117,19 @@
<Compile Include="IceSilverlightConfigurationDialog.designer.cs">
<DependentUpon>IceSilverlightConfigurationDialog.cs</DependentUpon>
</Compile>
+ <Compile Include="IncludePathView.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="IncludePathView.Designer.cs">
+ <DependentUpon>IncludePathView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Options.cs" />
+ <Compile Include="OutputDirView.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="OutputDirView.Designer.cs">
+ <DependentUpon>OutputDirView.cs</DependentUpon>
+ </Compile>
<Compile Include="Util.cs" />
</ItemGroup>
<ItemGroup>
@@ -135,6 +167,12 @@
</COMReference>
</ItemGroup>
<ItemGroup>
+ <EmbeddedResource Include="ExtraCompilerOptionsView.resx">
+ <DependentUpon>ExtraCompilerOptionsView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="IceHomeView.resx">
+ <DependentUpon>IceHomeView.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="IceVBConfigurationDialog.resx">
<DependentUpon>IceVBConfigurationDialog.cs</DependentUpon>
</EmbeddedResource>
@@ -147,6 +185,12 @@
<EmbeddedResource Include="IceSilverlightConfigurationDialog.resx">
<DependentUpon>IceSilverlightConfigurationDialog.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="IncludePathView.resx">
+ <DependentUpon>IncludePathView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="OutputDirView.resx">
+ <DependentUpon>OutputDirView.cs</DependentUpon>
+ </EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
@@ -155,4 +199,7 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
-</Project>
+ <ProjectExtensions>
+ <VisualStudio />
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/vsplugin/src/addin-vs2010.csproj b/vsaddin/src/addin-vs2010.csproj
index 2d127e28a9a..178783bf50c 100755..100644
--- a/vsplugin/src/addin-vs2010.csproj
+++ b/vsaddin/src/addin-vs2010.csproj
@@ -77,6 +77,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference Include="Microsoft.Build" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Shell, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
@@ -111,6 +112,19 @@
<Compile Include="Connect.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="ExtraCompilerOptionsView.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="ExtraCompilerOptionsView.Designer.cs">
+ <DependentUpon>ExtraCompilerOptionsView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="IceDialog.cs" />
+ <Compile Include="IceHomeView.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="IceHomeView.Designer.cs">
+ <DependentUpon>IceHomeView.cs</DependentUpon>
+ </Compile>
<Compile Include="IceVBConfigurationDialog.cs">
<SubType>Form</SubType>
</Compile>
@@ -136,6 +150,19 @@
<Compile Include="IceSilverlightConfigurationDialog.designer.cs">
<DependentUpon>IceSilverlightConfigurationDialog.cs</DependentUpon>
</Compile>
+ <Compile Include="IncludePathView.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="IncludePathView.Designer.cs">
+ <DependentUpon>IncludePathView.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Options.cs" />
+ <Compile Include="OutputDirView.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="OutputDirView.Designer.cs">
+ <DependentUpon>OutputDirView.cs</DependentUpon>
+ </Compile>
<Compile Include="Util.cs" />
</ItemGroup>
<ItemGroup>
@@ -173,6 +200,12 @@
</COMReference>
</ItemGroup>
<ItemGroup>
+ <EmbeddedResource Include="ExtraCompilerOptionsView.resx">
+ <DependentUpon>ExtraCompilerOptionsView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="IceHomeView.resx">
+ <DependentUpon>IceHomeView.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="IceVBConfigurationDialog.resx">
<DependentUpon>IceVBConfigurationDialog.cs</DependentUpon>
</EmbeddedResource>
@@ -185,6 +218,12 @@
<EmbeddedResource Include="IceSilverlightConfigurationDialog.resx">
<DependentUpon>IceSilverlightConfigurationDialog.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="IncludePathView.resx">
+ <DependentUpon>IncludePathView.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="OutputDirView.resx">
+ <DependentUpon>OutputDirView.cs</DependentUpon>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
diff --git a/vsplugin/templates/Slice.zip b/vsaddin/templates/Slice.zip
index 98c0b217faf..98c0b217faf 100644
--- a/vsplugin/templates/Slice.zip
+++ b/vsaddin/templates/Slice.zip
Binary files differ
diff --git a/vsplugin/templates/vs/Slice/slice.vsdir b/vsaddin/templates/vs/Slice/slice.vsdir
index dee65e836b8..dee65e836b8 100644
--- a/vsplugin/templates/vs/Slice/slice.vsdir
+++ b/vsaddin/templates/vs/Slice/slice.vsdir
diff --git a/vsplugin/templates/vs/newslice.ice b/vsaddin/templates/vs/newslice.ice
index e69de29bb2d..e69de29bb2d 100644
--- a/vsplugin/templates/vs/newslice.ice
+++ b/vsaddin/templates/vs/newslice.ice
diff --git a/vsplugin/templates/vs/newslice.ico b/vsaddin/templates/vs/newslice.ico
index a25255ce3fe..a25255ce3fe 100644
--- a/vsplugin/templates/vs/newslice.ico
+++ b/vsaddin/templates/vs/newslice.ico
Binary files differ
diff --git a/vsplugin/templates/vs/slice.vsdir b/vsaddin/templates/vs/slice.vsdir
index 8c3bfdb59f2..8c3bfdb59f2 100644
--- a/vsplugin/templates/vs/slice.vsdir
+++ b/vsaddin/templates/vs/slice.vsdir
diff --git a/vsplugin/README.txt b/vsplugin/README.txt
deleted file mode 100644
index d236e5d1fc0..00000000000
--- a/vsplugin/README.txt
+++ /dev/null
@@ -1,120 +0,0 @@
-For installation instructions, please refer to the INSTALL.txt file.
-
-If you would like to install the Ice Visual Studio Extension without
-compiling any source code, you can use the binary distribution
-available at ZeroC's web site (http://www.zeroc.com).
-
-
-Description
------------
-
-The Ice Visual Studio Extension integrates Ice projects into the
-Visual Studio IDE. The extension supports C++, .NET, VB and
-Silverlight projects.
-
-
-Activating the plug-in for a project
-------------------------------------
-
-After installing the plug-in, right-click on the project in Solution
-Explorer and choose "Ice Configuration..." or go to "Ice
-Configuration..." in the "Tools" menu. This opens a dialog where you
-can configure Ice build properties.
-
-Note that after adding new configurations or platforms to your
-project, it may be necessary to disable and then re-enable the plug-in
-in order for the new configuration/platform to have the correct Ice
-settings.
-
-
-Project properties
-------------------
-
-* Ice Home
-
- Set the directory where Ice is installed.
-
-* Slice Compiler Options
-
- Tick the corresponding check boxes to pass options such as --ice,
- --stream, --checksum, or --tie (.NET only) to the Slice compiler.
-
- Tick "Console Output" if you want compiler output to appear in the
- Output window.
-
-* Extra Compiler Options
-
- Add extra Slice compiler options that are not explicitly supported
- above.
-
- These options must be entered the same as they would be on the
- command line to the Slice compiler. For example, preprocessor
- macros can be defined by entering the following:
-
- -DFOO -DBAR
-
-* Slice Include Path
-
- Set the list of directories to search for included Slice files
- (-I option).
-
- The checkbox for each directory indicates whether it should be
- stored as an absolute path or converted to a path that is relative
- to the project directory. The extension stores an absolute path if
- the box is checked, otherwise the extension attempts to convert the
- directory into a relative path. If the directory cannot be converted
- into a relative path, the directory is stored as an absolute path.
- Directories that use environment variables (see below) are not
- affected by this feature.
-
-* DLL Export Symbol (C++ only)
-
- Set the symbol to use for DLL exports (--dll-export option).
-
-* Ice Components
-
- Set the list of Ice libraries to link with.
-
-
-Environment Variables
----------------------
-
-The "Ice Home", "Extra Compiler Options", and "Slice Include Path"
-settings support the use of environment variables. Use the $(VAR)
-syntax to refer to an environment variable named VAR. For example,
-if you have defined the ICE_HOME environment variable, you could
-use $(ICE_HOME) in the "Ice Home" field.
-
-
-Adding Slice files to a project
--------------------------------
-
-Use "Add -> New Item..." to create a Slice file and add it to a
-project. Use "Slice File (.ice)" as the file type. To add an existing
-Slice file, use "Add -> Existing Item...".
-
-
-Generating code
----------------
-
-The extension compiles a Slice file whenever you save the file. The
-extension tracks dependencies among Slice files in the project and
-recompiles only those files that require it after a change.
-
-Generated files are automatically added to the project. For example,
-for Demo.ice, the extension adds Demo.cpp and Demo.h to a C++
-project, whereas the extension adds Demo.cs to a C# project.
-
-Errors that occur during Slice compilation are displayed in the Visual
-Studio "Output" and "Error List" panels.
-
-
-VC++ Pre-compiled headers
--------------------------
-
-For C++ projects, pre-compiled headers are detected automatically.
-(The extension automatically passes the required --add-header option
-to slice2cpp.)
-
-If you change the pre-compiled header setting of a project, you must
-rebuild the project.
diff --git a/vsplugin/src/Connect.cs b/vsplugin/src/Connect.cs
deleted file mode 100644
index d79b0e5203d..00000000000
--- a/vsplugin/src/Connect.cs
+++ /dev/null
@@ -1,216 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-using System;
-using System.Text;
-using System.IO;
-using System.Diagnostics;
-using System.Collections.Generic;
-using Extensibility;
-using EnvDTE;
-using EnvDTE80;
-using Microsoft.VisualStudio.CommandBars;
-using Microsoft.VisualStudio.VCProjectEngine;
-using Microsoft.VisualStudio.VCProject;
-using Microsoft.VisualStudio.Shell;
-using Microsoft.VisualStudio.Shell.Interop;
-using System.Resources;
-using System.Reflection;
-using System.Globalization;
-using System.Runtime.InteropServices;
-
-namespace Ice.VisualStudio
-{
- public class Connect : IDTExtensibility2, IDTCommandTarget
- {
-
- public static Builder getBuilder()
- {
- return _builder;
- }
-
- public static DTE getCurrentDTE()
- {
- return _builder.getCurrentDTE();
- }
-
-
- public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
- {
- _applicationObject = (DTE2)application;
- _addInInstance = (AddIn)addInInst;
-
- if(connectMode == ext_ConnectMode.ext_cm_Startup || connectMode == ext_ConnectMode.ext_cm_CommandLine)
- {
- if(_builder == null)
- {
-
- //
- // This property is set to false to avoid VC++ "no matching rule" dialog
- //
- EnvDTE.Properties props = _applicationObject.get_Properties("Projects", "VCGeneral");
- try
- {
- EnvDTE.Property prop = props.Item("ShowNoMatchingRuleDlg");
- prop.Value = false;
- }
- catch (System.ArgumentException)
- {
- // ignored: this property does not exist with Visual Studio 2010
- }
-
- _builder = new Builder();
- _builder.init(_applicationObject, connectMode, _addInInstance);
- }
- }
- }
-
-
- //
- // VS call this method to retrive the status of AddIn commands.
- //
- public void QueryStatus(string commandName, vsCommandStatusTextWanted neededText, ref vsCommandStatus status,
- ref object commandText)
- {
- if(neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone)
- {
- if(commandName == "Ice.VisualStudio.Connect.IceConfiguration")
- {
- Builder builder = getBuilder();
- if(builder == null)
- {
- status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported;
- return;
- }
- if(builder.isBuilding())
- {
- status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported;
- return;
- }
- Project project = builder.getSelectedProject();
-
- if(project == null)
- {
- ProjectItem item = Util.getSelectedProjectItem(_applicationObject.DTE);
- if(item != null)
- {
- project = item.ContainingProject;
- }
- }
-
- if(project == null)
- {
- status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported;
- return;
- }
-
- if(!Util.isCppProject(project) && !Util.isCSharpProject(project) && !Util.isVBProject(project))
- {
- status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported;
- return;
- }
- status = (vsCommandStatus)vsCommandStatus.vsCommandStatusSupported |
- vsCommandStatus.vsCommandStatusEnabled;
- }
- }
- }
-
- public void Exec(string commandName, vsCommandExecOption executeOption, ref object varIn, ref object varOut,
- ref bool handled)
- {
- handled = false;
- Builder builder = getBuilder();
- if(builder == null)
- {
- return;
- }
-
- if(executeOption == vsCommandExecOption.vsCommandExecOptionDoDefault)
- {
- if(commandName == "Ice.VisualStudio.Connect.IceConfiguration")
- {
- Project project = builder.getSelectedProject();
- if(project == null)
- {
- ProjectItem item = Util.getSelectedProjectItem(_applicationObject.DTE);
- if(item != null)
- {
- project = item.ContainingProject;
- }
- }
-
- if(project == null)
- {
- handled = false;
- return;
- }
-
- if(Util.isCSharpProject(project))
- {
- if(Util.isSilverlightProject(project))
- {
- IceSilverlightConfigurationDialog dialog = new IceSilverlightConfigurationDialog(project);
- dialog.ShowDialog();
- }
- else
- {
- IceCsharpConfigurationDialog dialog = new IceCsharpConfigurationDialog(project);
- dialog.ShowDialog();
- }
- }
- else if(Util.isVBProject(project))
- {
- IceVBConfigurationDialog dialog = new IceVBConfigurationDialog(project);
- dialog.ShowDialog();
- }
- else if(Util.isCppProject(project))
- {
- IceCppConfigurationDialog dialog = new IceCppConfigurationDialog(project);
- dialog.ShowDialog();
- }
- handled = true;
- }
- }
- }
-
- public void OnDisconnection(ext_DisconnectMode disconnectMode, ref Array custom)
- {
-#if VS2008
- // Remove Zeroc_VS_IceHome if it was created.
- Environment.SetEnvironmentVariable(Util.EnvIceHome, "");
-#endif
-
- if(disconnectMode == ext_DisconnectMode.ext_dm_HostShutdown ||
- disconnectMode == ext_DisconnectMode.ext_dm_UserClosed)
- {
- if(_builder != null)
- {
- _builder.disconnect();
- _builder.Dispose();
- _builder = null;
- }
- }
- }
-
- public void OnAddInsUpdate(ref Array custom)
- {
- }
-
- public void OnStartupComplete(ref Array custom)
- {
- }
- public void OnBeginShutdown(ref Array custom)
- {
- }
-
- private DTE2 _applicationObject;
- private AddIn _addInInstance;
- private static Builder _builder;
- }
-}
diff --git a/vsplugin/src/IceCppConfigurationDialog.cs b/vsplugin/src/IceCppConfigurationDialog.cs
deleted file mode 100644
index eb335ec8e67..00000000000
--- a/vsplugin/src/IceCppConfigurationDialog.cs
+++ /dev/null
@@ -1,773 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.IO;
-using System.Text;
-using System.Windows.Forms;
-
-using EnvDTE;
-
-namespace Ice.VisualStudio
-{
- public partial class IceCppConfigurationDialog : Form
- {
- public IceCppConfigurationDialog(Project project)
- {
- InitializeComponent();
- _project = project;
-
- //
- // Set the toolTip messages.
- //
- toolTip.SetToolTip(txtIceHome, "Ice installation directory.");
- toolTip.SetToolTip(btnSelectIceHome, "Ice installation directory.");
- toolTip.SetToolTip(chkStreaming, "Generate marshalling support for stream API (--stream).");
- toolTip.SetToolTip(chkChecksum, "Generate checksums for Slice definitions (--checksum).");
- toolTip.SetToolTip(chkIcePrefix, "Permit Ice prefixes (--ice).");
-
- if(_project != null)
- {
- this.Text = "Ice Configuration - Project: " + _project.Name;
- bool enabled = Util.isSliceBuilderEnabled(project);
- setEnabled(enabled);
- chkEnableBuilder.Checked = enabled;
- load();
- _initialized = true;
- }
- }
-
- private void load()
- {
- Cursor = Cursors.WaitCursor;
- if(_project != null)
- {
- includeDirList.Items.Clear();
- txtIceHome.Text = Util.getIceHomeRaw(_project, false);
- txtIceHome.Modified = false;
- txtExtraOptions.Text = Util.getProjectProperty(_project, Util.PropertyIceExtraOptions);
-
- chkIcePrefix.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix);
-
- chkStreaming.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIceStreaming);
- chkChecksum.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIceChecksum);
- try
- {
- comboBoxVerboseLevel.SelectedIndex = Int32.Parse(Util.getProjectProperty(_project, Util.PropertyVerboseLevel, "0"));
- }
- catch
- {
- comboBoxVerboseLevel.SelectedIndex = 0;
- }
-
- IncludePathList list =
- new IncludePathList(Util.getProjectProperty(_project, Util.PropertyIceIncludePath));
- foreach(String s in list)
- {
- includeDirList.Items.Add(s.Trim());
- if(Path.IsPathRooted(s.Trim()))
- {
- includeDirList.SetItemCheckState(includeDirList.Items.Count - 1, CheckState.Checked);
- }
- }
-
- ComponentList selectedComponents = Util.getIceCppComponents(_project);
- foreach(String s in Util.getCppNames())
- {
- if(selectedComponents.Contains(s))
- {
- checkComponent(s, true);
- }
- else
- {
- checkComponent(s, false);
- }
- }
- txtDllExportSymbol.Text = Util.getProjectProperty(_project, Util.PropertyIceDllExport);
- }
- Cursor = Cursors.Default;
- }
-
- private void checkComponent(String component, bool check)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- switch (component)
- {
- case "Glacier2":
- {
- chkGlacier2.Checked = check;
- break;
- }
- case "Ice":
- {
- chkIce.Checked = check;
- break;
- }
- case "IceBox":
- {
- chkIceBox.Checked = check;
- break;
- }
- case "IceGrid":
- {
- chkIceGrid.Checked = check;
- break;
- }
- case "IcePatch2":
- {
- chkIcePatch2.Checked = check;
- break;
- }
- case "IceSSL":
- {
- chkIceSSL.Checked = check;
- break;
- }
- case "IceStorm":
- {
- chkIceStorm.Checked = check;
- break;
- }
- case "Freeze":
- {
- chkFreeze.Checked = check;
- break;
- }
- case "IceUtil":
- {
- chkIceUtil.Checked = check;
- break;
- }
- default:
- {
- break;
- }
- }
- }
-
- private void chkEnableBuilder_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- if(_initialized)
- {
- _initialized = false;
- setEnabled(false);
- chkEnableBuilder.Enabled = false;
- Builder builder = Connect.getBuilder();
- if(chkEnableBuilder.Checked)
- {
- builder.addBuilderToProject(_project);
- }
- else
- {
- builder.removeBuilderFromProject(_project);
- }
- load();
- setEnabled(chkEnableBuilder.Checked);
- chkEnableBuilder.Enabled = true;
- _initialized = true;
- }
- Cursor = Cursors.Default;
- }
-
- private void setEnabled(bool enabled)
- {
- txtIceHome.Enabled = enabled;
- btnSelectIceHome.Enabled = enabled;
-
- chkIcePrefix.Enabled = enabled;
-
- chkStreaming.Enabled = enabled;
- chkChecksum.Enabled = enabled;
- comboBoxVerboseLevel.Enabled = enabled;
- includeDirList.Enabled = enabled;
- btnAddInclude.Enabled = enabled;
- btnEditInclude.Enabled = enabled;
- btnRemoveInclude.Enabled = enabled;
- btnMoveIncludeUp.Enabled = enabled;
- btnMoveIncludeDown.Enabled = enabled;
-
- txtExtraOptions.Enabled = enabled;
-
- chkFreeze.Enabled = enabled;
- chkGlacier2.Enabled = enabled;
- chkIce.Enabled = enabled;
- chkIceBox.Enabled = enabled;
- chkIceGrid.Enabled = enabled;
- chkIcePatch2.Enabled = enabled;
- chkIceSSL.Enabled = enabled;
- chkIceStorm.Enabled = enabled;
- chkIceUtil.Enabled = enabled;
- txtDllExportSymbol.Enabled = enabled;
- }
-
- private void formClosing(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- if(!_changed)
- {
- if(txtDllExportSymbol.Modified)
- {
- _changed = true;
- }
- else if(txtExtraOptions.Modified)
- {
- _changed = true;
- }
- else if(txtIceHome.Modified)
- {
- _changed = true;
- }
- }
-
- if(_changed && Util.isSliceBuilderEnabled(_project))
- {
- Builder builder = Connect.getBuilder();
- builder.cleanProject(_project);
- builder.buildProject(_project, true, vsBuildScope.vsBuildScopeProject);
- }
- Cursor = Cursors.Default;
- }
-
- private void btnCancel_Click(object sender, EventArgs e)
- {
- Close();
- }
-
- private void btnSelectIceHome_Click(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- FolderBrowserDialog dialog = new FolderBrowserDialog();
- dialog.SelectedPath = Util.absolutePath(_project, Util.getIceHome(_project));
- dialog.Description = "Select Ice Home Installation Directory";
- DialogResult result = dialog.ShowDialog();
- if(result == DialogResult.OK)
- {
- Util.updateIceHome(_project, dialog.SelectedPath, false);
- load();
- _changed = true;
- }
- }
-
- private void txtIceHome_KeyPress(object sender, KeyPressEventArgs e)
- {
- if(e.KeyChar == (char)Keys.Return)
- {
- updateIceHome();
- e.Handled = true;
- }
- }
-
- private void txtIceHome_Focus(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- }
-
- private void txtIceHome_LostFocus(object sender, EventArgs e)
- {
- updateIceHome();
- }
-
- private void updateIceHome()
- {
- if(!_iceHomeUpdating)
- {
- _iceHomeUpdating = true;
- if(!txtIceHome.Text.Equals(Util.getProjectProperty(_project, Util.PropertyIceHome),
- StringComparison.CurrentCultureIgnoreCase))
- {
- Util.updateIceHome(_project, txtIceHome.Text, false);
- load();
- _changed = true;
- txtIceHome.Modified = false;
- }
- _iceHomeUpdating = false;
- }
- }
-
- private void chkIcePrefix_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
-
- Util.setProjectProperty(_project, Util.PropertyIcePrefix, chkIcePrefix.Checked.ToString());
- _changed = true;
- Cursor = Cursors.Default;
- }
-
- private void chkStreaming_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- Util.setProjectProperty(_project, Util.PropertyIceStreaming, chkStreaming.Checked.ToString());
- _changed = true;
- Cursor = Cursors.Default;
- }
-
- private void chkChecksum_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- Util.setProjectProperty(_project, Util.PropertyIceChecksum, chkChecksum.Checked.ToString());
- _changed = true;
- Cursor = Cursors.Default;
- }
-
- private void saveSliceIncludes()
- {
- IncludePathList paths = new IncludePathList();
- foreach(String s in includeDirList.Items)
- {
- paths.Add(s.Trim());
- }
- String p = paths.ToString();
- Util.setProjectProperty(_project, Util.PropertyIceIncludePath, p);
- _changed = true;
- }
-
- private void btnAddInclude_Click(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- includeDirList.Items.Add("");
- includeDirList.SelectedIndex = includeDirList.Items.Count - 1;
- _editingIndex = includeDirList.SelectedIndex;
- beginEditIncludeDir();
- }
-
- private void btnRemoveInclude_Click(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- int index = includeDirList.SelectedIndex;
- if(_editingIncludes)
- {
- index = _editingIndex;
- endEditIncludeDir(true);
- }
- if(index > -1 && index < includeDirList.Items.Count)
- {
- int selected = index;
- includeDirList.Items.RemoveAt(selected);
- if(includeDirList.Items.Count > 0)
- {
- if(selected > 0)
- {
- selected -= 1;
- }
- includeDirList.SelectedIndex = selected;
- }
- saveSliceIncludes();
- }
- Cursor = Cursors.Default;
- }
-
- private void btnMoveIncludeUp_Click(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- int index = includeDirList.SelectedIndex;
- if(index > 0)
- {
- string current = includeDirList.SelectedItem.ToString();
- includeDirList.Items.RemoveAt(index);
- includeDirList.Items.Insert(index - 1, current);
- includeDirList.SelectedIndex = index - 1;
- saveSliceIncludes();
- }
- resetIncludeDirChecks();
- Cursor = Cursors.Default;
- }
-
- private void btnMoveIncludeDown_Click(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- int index = includeDirList.SelectedIndex;
- if(index < includeDirList.Items.Count - 1 && index > -1)
- {
- string current = includeDirList.SelectedItem.ToString();
- includeDirList.Items.RemoveAt(index);
- includeDirList.Items.Insert(index + 1, current);
- includeDirList.SelectedIndex = index + 1;
- saveSliceIncludes();
- resetIncludeDirChecks();
- }
- Cursor = Cursors.Default;
- }
-
- private void resetIncludeDirChecks()
- {
- _initialized = false;
- for(int i = 0; i < includeDirList.Items.Count; ++i)
- {
- String path = includeDirList.Items[i].ToString();
- if(String.IsNullOrEmpty(path))
- {
- continue;
- }
-
- if(Path.IsPathRooted(path))
- {
- includeDirList.SetItemCheckState(i, CheckState.Checked);
- }
- else
- {
- includeDirList.SetItemCheckState(i, CheckState.Unchecked);
- }
- }
- _initialized = true;
- }
-
- private void includeDirList_ItemCheck(object sender, ItemCheckEventArgs e)
- {
- if(_editingIncludes)
- {
- return;
- }
- string path = includeDirList.Items[e.Index].ToString();
- if(!Util.containsEnvironmentVars(path))
- {
- if(e.NewValue == CheckState.Unchecked)
- {
- path = Util.relativePath(_project, path);
- }
- else if(e.NewValue == CheckState.Checked)
- {
- if(!Path.IsPathRooted(path))
- {
- path = Util.absolutePath(_project, path);
- }
- }
- }
- includeDirList.Items[e.Index] = path;
- if(_initialized)
- {
- saveSliceIncludes();
- }
- }
-
- private void txtExtraOptions_Focus(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- }
-
- private void txtExtraOptions_LostFocus(object sender, EventArgs e)
- {
- if(txtExtraOptions.Modified)
- {
- Util.setProjectProperty(_project, Util.PropertyIceExtraOptions, txtExtraOptions.Text);
- _changed = true;
- }
- }
-
- private void chkGlacier2_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("Glacier2", chkGlacier2.Checked);
- }
-
- private void chkIce_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("Ice", chkIce.Checked);
- }
-
- private void chkIceBox_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceBox", chkIceBox.Checked);
- }
-
- private void chkIceGrid_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceGrid", chkIceGrid.Checked);
- }
-
- private void chkIcePatch2_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IcePatch2", chkIcePatch2.Checked);
- }
-
- private void chkIceSSL_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceSSL", chkIceSSL.Checked);
- }
-
- private void chkIceStorm_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceStorm", chkIceStorm.Checked);
- }
-
- private void chkIceUtil_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceUtil", chkIceUtil.Checked);
- }
-
- private void chkFreeze_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("Freeze", chkFreeze.Checked);
- }
-
- private void componentChanged(String name, bool isChecked)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- if(_initialized)
- {
- if(isChecked)
- {
- Util.addIceCppLibs(_project, new ComponentList(name));
- }
- else
- {
- Util.removeIceCppLibs(_project, new ComponentList(name));
- }
- _changed = true;
- }
- Cursor = Cursors.Default;
- }
-
- private void txtDllExportSymbol_Focus(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- }
-
- private void txtDllExportSymbol_LostFocus(object sender, EventArgs e)
- {
- if(txtDllExportSymbol.Modified)
- {
- Util.setProjectProperty(_project, Util.PropertyIceDllExport, txtDllExportSymbol.Text);
- _changed = true;
- }
- }
-
- private void btnEdit_Click(object sender, EventArgs e)
- {
- if(includeDirList.SelectedIndex != -1)
- {
- _editingIndex = includeDirList.SelectedIndex;
- beginEditIncludeDir();
- }
- }
-
- private void includeDirList_SelectedIndexChanged(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- }
-
- private void beginEditIncludeDir()
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- _editingIncludes = true;
- CancelButton = null;
- if(_editingIndex != -1)
- {
- _txtIncludeDir = new TextBox();
- _txtIncludeDir.Text = includeDirList.Items[includeDirList.SelectedIndex].ToString();
-
- includeDirList.SelectionMode = SelectionMode.One;
-
- Rectangle rect = includeDirList.GetItemRectangle(includeDirList.SelectedIndex);
- _txtIncludeDir.Location = new Point(includeDirList.Location.X + 2,
- includeDirList.Location.Y + rect.Y);
- _txtIncludeDir.Width = includeDirList.Width - 50;
- _txtIncludeDir.Parent = includeDirList;
- _txtIncludeDir.KeyDown += new KeyEventHandler(includeDirKeyDown);
- groupBox1.Controls.Add(_txtIncludeDir);
-
- _btnSelectInclude = new Button();
- _btnSelectInclude.Text = "...";
- _btnSelectInclude.Location = new Point(includeDirList.Location.X + _txtIncludeDir.Width,
- includeDirList.Location.Y + rect.Y);
- _btnSelectInclude.Width = 49;
- _btnSelectInclude.Height = _txtIncludeDir.Height;
- _btnSelectInclude.Click += new EventHandler(selectIncludeClicked);
- groupBox1.Controls.Add(_btnSelectInclude);
-
-
- _txtIncludeDir.Show();
- _txtIncludeDir.BringToFront();
- _txtIncludeDir.Focus();
-
- _btnSelectInclude.Show();
- _btnSelectInclude.BringToFront();
- }
- }
-
- private void endEditIncludeDir(bool saveChanges)
- {
- _initialized = false;
- if(!_editingIncludes)
- {
- _initialized = true;
- return;
- }
- _editingIncludes = false;
- String path = null;
- if(_editingIndex > -1 && _editingIndex < includeDirList.Items.Count)
- {
- path = includeDirList.Items[_editingIndex].ToString();
- }
-
- lock(this)
- {
- CancelButton = btnClose;
- if(_txtIncludeDir == null || _btnSelectInclude == null)
- {
- _initialized = true;
- return;
- }
- if(saveChanges)
- {
- path = _txtIncludeDir.Text;
- if(path != null)
- {
- path = path.Trim();
- }
- }
-
- this.groupBox1.Controls.Remove(_txtIncludeDir);
- _txtIncludeDir = null;
-
- this.groupBox1.Controls.Remove(_btnSelectInclude);
- _btnSelectInclude = null;
- }
-
- if(String.IsNullOrEmpty(path))
- {
- if(_editingIndex != -1)
- {
- includeDirList.Items.RemoveAt(_editingIndex);
- includeDirList.SelectedIndex = includeDirList.Items.Count - 1;
- _editingIndex = -1;
- saveSliceIncludes();
- }
- }
- else if(_editingIndex != -1 && saveChanges)
- {
- if(!path.Equals(includeDirList.Items[_editingIndex].ToString(),
- StringComparison.CurrentCultureIgnoreCase))
- {
- includeDirList.Items[_editingIndex] = path;
- if(Path.IsPathRooted(path))
- {
- includeDirList.SetItemCheckState(_editingIndex, CheckState.Checked);
- }
- else
- {
- includeDirList.SetItemCheckState(_editingIndex, CheckState.Unchecked);
- }
- saveSliceIncludes();
- }
- }
- resetIncludeDirChecks();
- }
-
- private void includeDirKeyDown(object sender, KeyEventArgs e)
- {
- if(e.KeyCode.Equals(Keys.Escape))
- {
- endEditIncludeDir(false);
- }
- if(e.KeyCode.Equals(Keys.Enter))
- {
- endEditIncludeDir(true);
- }
- }
-
- private void selectIncludeClicked(object sender, EventArgs e)
- {
- FolderBrowserDialog dialog = new FolderBrowserDialog();
- string projectDir = Path.GetFullPath(Path.GetDirectoryName(_project.FileName));
- dialog.SelectedPath = projectDir;
- dialog.Description = "Slice Include Directory";
- DialogResult result = dialog.ShowDialog();
- if(result == DialogResult.OK)
- {
- string path = dialog.SelectedPath;
- if(!Util.containsEnvironmentVars(path))
- {
- path = Util.relativePath(_project, Path.GetFullPath(path));
- }
- _txtIncludeDir.Text = path;
- }
- endEditIncludeDir(true);
- }
-
- private int _editingIndex = -1;
- private bool _editingIncludes;
- private bool _initialized;
- private bool _changed;
- private Project _project;
- private bool _iceHomeUpdating;
- private TextBox _txtIncludeDir;
- private Button _btnSelectInclude;
-
- private void comboBoxVerboseLevel_SelectedIndexChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if (_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- Util.setProjectProperty(_project, Util.PropertyVerboseLevel, comboBoxVerboseLevel.SelectedIndex.ToString());
- Cursor = Cursors.Default;
- }
- }
-}
diff --git a/vsplugin/src/IceCsharpConfigurationDialog.cs b/vsplugin/src/IceCsharpConfigurationDialog.cs
deleted file mode 100644
index 5694b9846d4..00000000000
--- a/vsplugin/src/IceCsharpConfigurationDialog.cs
+++ /dev/null
@@ -1,740 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.IO;
-using System.Text;
-using System.Windows.Forms;
-
-using EnvDTE;
-
-namespace Ice.VisualStudio
-{
- public partial class IceCsharpConfigurationDialog : Form
- {
- public IceCsharpConfigurationDialog(Project project)
- {
- InitializeComponent();
- _project = project;
-
- //
- // Set the toolTip messages.
- //
- toolTip.SetToolTip(txtIceHome, "Ice installation directory.");
- toolTip.SetToolTip(btnSelectIceHome, "Ice installation directory.");
- toolTip.SetToolTip(chkStreaming, "Generate marshaling support for stream API (--stream).");
- toolTip.SetToolTip(chkChecksum, "Generate checksums for Slice definitions (--checksum).");
- toolTip.SetToolTip(chkIcePrefix, "Permit Ice prefixes (--ice).");
- toolTip.SetToolTip(chkTie, "Generate TIE classes (--tie).");
-
- if(_project != null)
- {
- this.Text = "Ice Configuration - Project: " + _project.Name;
- bool enabled = Util.isSliceBuilderEnabled(project);
- setEnabled(enabled);
- chkEnableBuilder.Checked = enabled;
- load();
- _initialized = true;
- }
- }
-
- private void load()
- {
- Cursor = Cursors.WaitCursor;
- if(_project != null)
- {
- includeDirList.Items.Clear();
- txtIceHome.Text = Util.getIceHomeRaw(_project, false);
- txtExtraOptions.Text = Util.getProjectProperty(_project, Util.PropertyIceExtraOptions);
-
- chkIcePrefix.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix);
- chkTie.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIceTie);
- chkStreaming.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIceStreaming);
- chkChecksum.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIceChecksum);
- try
- {
- comboBoxVerboseLevel.SelectedIndex = Int32.Parse(Util.getProjectProperty(_project, Util.PropertyVerboseLevel, "0"));
- }
- catch
- {
- comboBoxVerboseLevel.SelectedIndex = 0;
- }
-
- IncludePathList list =
- new IncludePathList(Util.getProjectProperty(_project, Util.PropertyIceIncludePath));
- foreach(String s in list)
- {
- includeDirList.Items.Add(s.Trim());
- if(Path.IsPathRooted(s.Trim()))
- {
- includeDirList.SetItemCheckState(includeDirList.Items.Count - 1, CheckState.Checked);
- }
- }
-
- ComponentList selectedComponents = Util.getIceDotNetComponents(_project);
- foreach(String s in Util.getDotNetNames())
- {
- if(selectedComponents.Contains(s))
- {
- checkComponent(s, true);
- }
- else
- {
- checkComponent(s, false);
- }
- }
- }
- Cursor = Cursors.Default;
- }
-
- private void checkComponent(String component, bool check)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- switch (component)
- {
- case "Glacier2":
- {
- chkGlacier2.Checked = check;
- break;
- }
- case "Ice":
- {
- chkIce.Checked = check;
- break;
- }
- case "IceBox":
- {
- chkIceBox.Checked = check;
- break;
- }
- case "IceGrid":
- {
- chkIceGrid.Checked = check;
- break;
- }
- case "IcePatch2":
- {
- chkIcePatch2.Checked = check;
- break;
- }
- case "IceSSL":
- {
- chkIceSSL.Checked = check;
- break;
- }
- case "IceStorm":
- {
- chkIceStorm.Checked = check;
- break;
- }
- default:
- {
- break;
- }
- }
- }
- private void chkEnableBuilder_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- if(_initialized)
- {
- _initialized = false;
- setEnabled(false);
- chkEnableBuilder.Enabled = false;
- Builder builder = Connect.getBuilder();
- if(chkEnableBuilder.Checked)
- {
- builder.addBuilderToProject(_project);
- }
- else
- {
- builder.removeBuilderFromProject(_project);
- }
- load();
- setEnabled(chkEnableBuilder.Checked);
- chkEnableBuilder.Enabled = true;
- _initialized = true;
- }
- Cursor = Cursors.Default;
- }
-
- private void setEnabled(bool enabled)
- {
- txtIceHome.Enabled = enabled;
- btnSelectIceHome.Enabled = enabled;
-
- chkIcePrefix.Enabled = enabled;
- chkTie.Enabled = enabled;
- chkStreaming.Enabled = enabled;
- chkChecksum.Enabled = enabled;
- comboBoxVerboseLevel.Enabled = enabled;
- includeDirList.Enabled = enabled;
- btnAddInclude.Enabled = enabled;
- btnEditInclude.Enabled = enabled;
- btnRemoveInclude.Enabled = enabled;
- btnMoveIncludeUp.Enabled = enabled;
- btnMoveIncludeDown.Enabled = enabled;
-
- txtExtraOptions.Enabled = enabled;
-
- chkGlacier2.Enabled = enabled;
- chkIce.Enabled = enabled;
- chkIceBox.Enabled = enabled;
- chkIceGrid.Enabled = enabled;
- chkIcePatch2.Enabled = enabled;
- chkIceSSL.Enabled = enabled;
- chkIceStorm.Enabled = enabled;
- }
-
- private void formClosing(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- if(!_changed)
- {
- if(txtExtraOptions.Modified)
- {
- _changed = true;
- }
- else if(txtIceHome.Modified)
- {
- _changed = true;
- }
- }
-
- if(_changed && Util.isSliceBuilderEnabled(_project))
- {
- Builder builder = Connect.getBuilder();
- builder.cleanProject(_project);
- builder.buildProject(_project, true, vsBuildScope.vsBuildScopeProject);
- }
- Cursor = Cursors.Default;
- }
-
- private void btnCancel_Click(object sender, EventArgs e)
- {
- Close();
- }
-
- private void btnSelectIceHome_Click(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- FolderBrowserDialog dialog = new FolderBrowserDialog();
- dialog.SelectedPath = Util.absolutePath(_project, Util.getIceHome(_project));
- dialog.Description = "Select Ice Home Installation Directory";
- DialogResult result = dialog.ShowDialog();
- if(result == DialogResult.OK)
- {
- Util.updateIceHome(_project, dialog.SelectedPath, false);
- load();
- _changed = true;
- }
- }
-
- private void txtIceHome_KeyPress(object sender, KeyPressEventArgs e)
- {
- if(e.KeyChar == (char)Keys.Return)
- {
- updateIceHome();
- e.Handled = true;
- }
- }
-
- private void txtIceHome_Focus(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- }
-
- private void txtIceHome_LostFocus(object sender, EventArgs e)
- {
- updateIceHome();
- }
-
- private void updateIceHome()
- {
- if(!_iceHomeUpdating)
- {
- _iceHomeUpdating = true;
- if(!txtIceHome.Text.Equals(Util.getProjectProperty(_project, Util.PropertyIceHome),
- StringComparison.CurrentCultureIgnoreCase))
- {
- Util.updateIceHome(_project, txtIceHome.Text, false);
- load();
- _changed = true;
- txtIceHome.Modified = false;
- }
- _iceHomeUpdating = false;
- }
- }
-
- private void chkIcePrefix_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- Util.setProjectProperty(_project, Util.PropertyIcePrefix, chkIcePrefix.Checked.ToString());
- _changed = true;
- Cursor = Cursors.Default;
- }
-
- private void chkTie_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- Util.setProjectProperty(_project, Util.PropertyIceTie, chkTie.Checked.ToString());
- _changed = true;
- Cursor = Cursors.Default;
- }
-
- private void chkStreaming_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- Util.setProjectProperty(_project, Util.PropertyIceStreaming, chkStreaming.Checked.ToString());
- _changed = true;
- Cursor = Cursors.Default;
- }
-
- private void chkChecksum_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- Util.setProjectProperty(_project, Util.PropertyIceChecksum, chkChecksum.Checked.ToString());
- _changed = true;
- Cursor = Cursors.Default;
- }
-
- private void saveSliceIncludes()
- {
- Cursor = Cursors.WaitCursor;
- IncludePathList paths = new IncludePathList();
- foreach(String s in includeDirList.Items)
- {
- paths.Add(s.Trim());
- }
- Util.setProjectProperty(_project, Util.PropertyIceIncludePath, paths.ToString());
- _changed = true;
- Cursor = Cursors.Default;
- }
-
- private void btnAddInclude_Click(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- includeDirList.Items.Add("");
- includeDirList.SelectedIndex = includeDirList.Items.Count - 1;
- _editingIndex = includeDirList.SelectedIndex;
- beginEditIncludeDir();
- }
-
- private void btnRemoveInclude_Click(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- int index = includeDirList.SelectedIndex;
- if(_editingIncludes)
- {
- index = _editingIndex;
- endEditIncludeDir(true);
- }
-
- if(index > -1 && index < includeDirList.Items.Count)
- {
- int selected = index;
- includeDirList.Items.RemoveAt(selected);
- if(includeDirList.Items.Count > 0)
- {
- if(selected > 0)
- {
- selected -= 1;
- }
- includeDirList.SelectedIndex = selected;
- }
- saveSliceIncludes();
- }
- Cursor = Cursors.Default;
- }
-
- private void btnMoveIncludeUp_Click(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- int index = includeDirList.SelectedIndex;
- if(index > 0)
- {
- string current = includeDirList.SelectedItem.ToString();
- includeDirList.Items.RemoveAt(index);
- includeDirList.Items.Insert(index - 1, current);
- includeDirList.SelectedIndex = index - 1;
- saveSliceIncludes();
- }
- resetIncludeDirChecks();
- Cursor = Cursors.Default;
- }
-
- private void btnMoveIncludeDown_Click(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- int index = includeDirList.SelectedIndex;
- if(index < includeDirList.Items.Count - 1 && index > -1)
- {
- string current = includeDirList.SelectedItem.ToString();
- includeDirList.Items.RemoveAt(index);
- includeDirList.Items.Insert(index + 1, current);
- includeDirList.SelectedIndex = index + 1;
- saveSliceIncludes();
- resetIncludeDirChecks();
- }
- Cursor = Cursors.Default;
- }
-
- private void resetIncludeDirChecks()
- {
- _initialized = false;
- for(int i = 0; i < includeDirList.Items.Count; ++i)
- {
- String path = includeDirList.Items[i].ToString();
- if(String.IsNullOrEmpty(path))
- {
- continue;
- }
-
- if(Path.IsPathRooted(path))
- {
- includeDirList.SetItemCheckState(i, CheckState.Checked);
- }
- else
- {
- includeDirList.SetItemCheckState(i, CheckState.Unchecked);
- }
- }
- _initialized = true;
- }
-
- private void includeDirList_ItemCheck(object sender, ItemCheckEventArgs e)
- {
- if(_editingIncludes)
- {
- return;
- }
- string path = includeDirList.Items[e.Index].ToString();
- if(!Util.containsEnvironmentVars(path))
- {
- if (e.NewValue == CheckState.Unchecked)
- {
- path = Util.relativePath(_project, path);
- }
- else if(e.NewValue == CheckState.Checked)
- {
- if (!Path.IsPathRooted(path))
- {
- path = Util.absolutePath(_project, path);
- }
- }
- }
- includeDirList.Items[e.Index] = path;
- if(_initialized)
- {
- saveSliceIncludes();
- }
- }
-
- private void txtExtraOptions_Focus(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- }
-
- private void txtExtraOptions_LostFocus(object sender, EventArgs e)
- {
- if(txtExtraOptions.Modified)
- {
- Util.setProjectProperty(_project, Util.PropertyIceExtraOptions, txtExtraOptions.Text);
- _changed = true;
- }
- }
-
- private void componentChanged(string name, bool value)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- if(_initialized)
- {
- if(value)
- {
- Util.addDotNetReference(_project, name, Util.getIceHome(_project));
- }
- else
- {
- Util.removeDotNetReference(_project, name);
- }
- _changed = true;
- }
- Cursor = Cursors.Default;
- }
-
- private void chkGlacier2_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("Glacier2", chkGlacier2.Checked);
- }
-
- private void chkIce_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("Ice", chkIce.Checked);
- }
-
- private void chkIceBox_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceBox", chkIceBox.Checked);
- }
-
- private void chkIceGrid_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceGrid", chkIceGrid.Checked);
- }
-
- private void chkIcePatch2_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IcePatch2", chkIcePatch2.Checked);
- }
-
- private void chkIceSSL_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceSSL", chkIceSSL.Checked);
- }
-
- private void chkIceStorm_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceStorm", chkIceStorm.Checked);
- }
-
- private void btnEdit_Click(object sender, EventArgs e)
- {
- if(includeDirList.SelectedIndex != -1)
- {
- _editingIndex = includeDirList.SelectedIndex;
- beginEditIncludeDir();
- }
- }
-
- private void includeDirList_SelectedIndexChanged(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- }
-
- private void beginEditIncludeDir()
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- _editingIncludes = true;
- CancelButton = null;
- if(_editingIndex != -1)
- {
- _txtIncludeDir = new TextBox();
- _txtIncludeDir.Text = includeDirList.Items[includeDirList.SelectedIndex].ToString();
-
- includeDirList.SelectionMode = SelectionMode.One;
-
- Rectangle rect = includeDirList.GetItemRectangle(includeDirList.SelectedIndex);
- _txtIncludeDir.Location = new Point(includeDirList.Location.X + 2,
- includeDirList.Location.Y + rect.Y);
- _txtIncludeDir.Width = includeDirList.Width - 50;
- _txtIncludeDir.Parent = includeDirList;
- _txtIncludeDir.KeyDown += new KeyEventHandler(includeDirKeyDown);
- groupBox1.Controls.Add(_txtIncludeDir);
-
- _btnSelectInclude = new Button();
- _btnSelectInclude.Text = "...";
- _btnSelectInclude.Location = new Point(includeDirList.Location.X + _txtIncludeDir.Width,
- includeDirList.Location.Y + rect.Y);
- _btnSelectInclude.Width = 49;
- _btnSelectInclude.Height = _txtIncludeDir.Height;
- _btnSelectInclude.Click += new EventHandler(selectIncludeClicked);
- groupBox1.Controls.Add(_btnSelectInclude);
-
-
- _txtIncludeDir.Show();
- _txtIncludeDir.BringToFront();
- _txtIncludeDir.Focus();
-
- _btnSelectInclude.Show();
- _btnSelectInclude.BringToFront();
- }
- }
-
- private void endEditIncludeDir(bool saveChanges)
- {
- _initialized = false;
- if(!_editingIncludes)
- {
- _initialized = true;
- return;
- }
- _editingIncludes = false;
- String path = null;
- if(_editingIndex > -1 && _editingIndex < includeDirList.Items.Count)
- {
- path = includeDirList.Items[_editingIndex].ToString();
- }
-
- lock(this)
- {
- CancelButton = btnClose;
- if(_txtIncludeDir == null || _btnSelectInclude == null)
- {
- _initialized = true;
- return;
- }
- if(saveChanges)
- {
- path = _txtIncludeDir.Text;
- if(path != null)
- {
- path = path.Trim();
- }
- }
-
- this.groupBox1.Controls.Remove(_txtIncludeDir);
- _txtIncludeDir = null;
-
- this.groupBox1.Controls.Remove(_btnSelectInclude);
- _btnSelectInclude = null;
- }
-
- if(String.IsNullOrEmpty(path))
- {
- if(_editingIndex != -1)
- {
- includeDirList.Items.RemoveAt(_editingIndex);
- includeDirList.SelectedIndex = includeDirList.Items.Count - 1;
- _editingIndex = -1;
- saveSliceIncludes();
- }
- }
- else if(_editingIndex != -1 && saveChanges)
- {
- if(!path.Equals(includeDirList.Items[_editingIndex].ToString(),
- StringComparison.CurrentCultureIgnoreCase))
- {
- includeDirList.Items[_editingIndex] = path;
- if(Path.IsPathRooted(path))
- {
- includeDirList.SetItemCheckState(_editingIndex, CheckState.Checked);
- }
- else
- {
- includeDirList.SetItemCheckState(_editingIndex, CheckState.Unchecked);
- }
- saveSliceIncludes();
- }
- }
- resetIncludeDirChecks();
- }
-
- private void includeDirKeyDown(object sender, KeyEventArgs e)
- {
- if(e.KeyCode.Equals(Keys.Escape))
- {
- endEditIncludeDir(false);
- }
- if(e.KeyCode.Equals(Keys.Enter))
- {
- endEditIncludeDir(true);
- }
- }
-
- private void selectIncludeClicked(object sender, EventArgs e)
- {
- FolderBrowserDialog dialog = new FolderBrowserDialog();
- string projectDir = Path.GetFullPath(Path.GetDirectoryName(_project.FileName));
- dialog.SelectedPath = projectDir;
- dialog.Description = "Slice Include Directory";
- DialogResult result = dialog.ShowDialog();
- if(result == DialogResult.OK)
- {
- string path = dialog.SelectedPath;
- if(!Util.containsEnvironmentVars(path))
- {
- path = Util.relativePath(_project, Path.GetFullPath(path));
- }
- _txtIncludeDir.Text = path;
- }
- endEditIncludeDir(true);
- }
-
- private int _editingIndex = -1;
- private bool _editingIncludes;
- private bool _changed;
- private bool _initialized;
- private Project _project;
- private bool _iceHomeUpdating;
- private TextBox _txtIncludeDir;
- private Button _btnSelectInclude;
-
- private void comboBoxVerboseLevel_SelectedIndexChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if (_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- Util.setProjectProperty(_project, Util.PropertyVerboseLevel, comboBoxVerboseLevel.SelectedIndex.ToString());
- Cursor = Cursors.Default;
- }
- }
-}
diff --git a/vsplugin/src/IceSilverlightConfigurationDialog.Designer.cs b/vsplugin/src/IceSilverlightConfigurationDialog.Designer.cs
deleted file mode 100644
index 69557387b51..00000000000
--- a/vsplugin/src/IceSilverlightConfigurationDialog.Designer.cs
+++ /dev/null
@@ -1,356 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-namespace Ice.VisualStudio
-{
- partial class IceSilverlightConfigurationDialog
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.chkEnableBuilder = new System.Windows.Forms.CheckBox();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.btnEditInclude = new System.Windows.Forms.Button();
- this.includeInfo = new System.Windows.Forms.Label();
- this.btnMoveIncludeDown = new System.Windows.Forms.Button();
- this.btnMoveIncludeUp = new System.Windows.Forms.Button();
- this.btnRemoveInclude = new System.Windows.Forms.Button();
- this.btnAddInclude = new System.Windows.Forms.Button();
- this.includeDirList = new System.Windows.Forms.CheckedListBox();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.txtExtraOptions = new System.Windows.Forms.TextBox();
- this.groupBox3 = new System.Windows.Forms.GroupBox();
- this.chkIceSl = new System.Windows.Forms.CheckBox();
- this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.label1 = new System.Windows.Forms.Label();
- this.comboBoxVerboseLevel = new System.Windows.Forms.ComboBox();
- this.chkIcePrefix = new System.Windows.Forms.CheckBox();
- this.btnClose = new System.Windows.Forms.Button();
- this.groupBox5 = new System.Windows.Forms.GroupBox();
- this.btnSelectIceHome = new System.Windows.Forms.Button();
- this.txtIceHome = new System.Windows.Forms.TextBox();
- this.toolTip = new System.Windows.Forms.ToolTip(this.components);
- this.groupBox1.SuspendLayout();
- this.groupBox2.SuspendLayout();
- this.groupBox3.SuspendLayout();
- this.groupBox4.SuspendLayout();
- this.groupBox5.SuspendLayout();
- this.SuspendLayout();
- //
- // chkEnableBuilder
- //
- this.chkEnableBuilder.AutoSize = true;
- this.chkEnableBuilder.Location = new System.Drawing.Point(12, 13);
- this.chkEnableBuilder.Name = "chkEnableBuilder";
- this.chkEnableBuilder.Size = new System.Drawing.Size(112, 17);
- this.chkEnableBuilder.TabIndex = 0;
- this.chkEnableBuilder.Text = "Enable Ice Builder";
- this.chkEnableBuilder.UseVisualStyleBackColor = true;
- this.chkEnableBuilder.CheckedChanged += new System.EventHandler(this.chkEnableBuilder_CheckedChanged);
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.btnEditInclude);
- this.groupBox1.Controls.Add(this.includeInfo);
- this.groupBox1.Controls.Add(this.btnMoveIncludeDown);
- this.groupBox1.Controls.Add(this.btnMoveIncludeUp);
- this.groupBox1.Controls.Add(this.btnRemoveInclude);
- this.groupBox1.Controls.Add(this.btnAddInclude);
- this.groupBox1.Controls.Add(this.includeDirList);
- this.groupBox1.Location = new System.Drawing.Point(12, 210);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(487, 169);
- this.groupBox1.TabIndex = 1;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Slice Include Path";
- //
- // btnEditInclude
- //
- this.btnEditInclude.Location = new System.Drawing.Point(405, 49);
- this.btnEditInclude.Name = "btnEditInclude";
- this.btnEditInclude.Size = new System.Drawing.Size(75, 23);
- this.btnEditInclude.TabIndex = 13;
- this.btnEditInclude.Text = "Edit";
- this.btnEditInclude.UseVisualStyleBackColor = true;
- this.btnEditInclude.Click += new System.EventHandler(this.btnEdit_Click);
- //
- // includeInfo
- //
- this.includeInfo.AutoSize = true;
- this.includeInfo.Location = new System.Drawing.Point(7, 149);
- this.includeInfo.Name = "includeInfo";
- this.includeInfo.Size = new System.Drawing.Size(315, 13);
- this.includeInfo.TabIndex = 12;
- this.includeInfo.Text = "Select checkboxes for absolute paths, deselect for relative paths.";
- //
- // btnMoveIncludeDown
- //
- this.btnMoveIncludeDown.Location = new System.Drawing.Point(405, 139);
- this.btnMoveIncludeDown.Name = "btnMoveIncludeDown";
- this.btnMoveIncludeDown.Size = new System.Drawing.Size(75, 23);
- this.btnMoveIncludeDown.TabIndex = 11;
- this.btnMoveIncludeDown.Text = "Down";
- this.btnMoveIncludeDown.UseVisualStyleBackColor = true;
- this.btnMoveIncludeDown.Click += new System.EventHandler(this.btnMoveIncludeDown_Click);
- //
- // btnMoveIncludeUp
- //
- this.btnMoveIncludeUp.Location = new System.Drawing.Point(405, 109);
- this.btnMoveIncludeUp.Name = "btnMoveIncludeUp";
- this.btnMoveIncludeUp.Size = new System.Drawing.Size(75, 23);
- this.btnMoveIncludeUp.TabIndex = 10;
- this.btnMoveIncludeUp.Text = "Up";
- this.btnMoveIncludeUp.UseVisualStyleBackColor = true;
- this.btnMoveIncludeUp.Click += new System.EventHandler(this.btnMoveIncludeUp_Click);
- //
- // btnRemoveInclude
- //
- this.btnRemoveInclude.Location = new System.Drawing.Point(405, 79);
- this.btnRemoveInclude.Name = "btnRemoveInclude";
- this.btnRemoveInclude.Size = new System.Drawing.Size(75, 23);
- this.btnRemoveInclude.TabIndex = 9;
- this.btnRemoveInclude.Text = "Remove";
- this.btnRemoveInclude.UseVisualStyleBackColor = true;
- this.btnRemoveInclude.Click += new System.EventHandler(this.btnRemoveInclude_Click);
- //
- // btnAddInclude
- //
- this.btnAddInclude.Location = new System.Drawing.Point(405, 19);
- this.btnAddInclude.Name = "btnAddInclude";
- this.btnAddInclude.Size = new System.Drawing.Size(75, 23);
- this.btnAddInclude.TabIndex = 8;
- this.btnAddInclude.Text = "Add";
- this.btnAddInclude.UseVisualStyleBackColor = true;
- this.btnAddInclude.Click += new System.EventHandler(this.btnAddInclude_Click);
- //
- // includeDirList
- //
- this.includeDirList.FormattingEnabled = true;
- this.includeDirList.Location = new System.Drawing.Point(6, 22);
- this.includeDirList.Name = "includeDirList";
- this.includeDirList.Size = new System.Drawing.Size(390, 124);
- this.includeDirList.TabIndex = 7;
- this.includeDirList.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.includeDirList_ItemCheck);
- this.includeDirList.SelectedIndexChanged += new System.EventHandler(this.includeDirList_SelectedIndexChanged);
- //
- // groupBox2
- //
- this.groupBox2.Controls.Add(this.txtExtraOptions);
- this.groupBox2.Location = new System.Drawing.Point(12, 138);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(487, 66);
- this.groupBox2.TabIndex = 2;
- this.groupBox2.TabStop = false;
- this.groupBox2.Text = "Extra Compiler Options";
- //
- // txtExtraOptions
- //
- this.txtExtraOptions.Location = new System.Drawing.Point(6, 19);
- this.txtExtraOptions.Multiline = true;
- this.txtExtraOptions.Name = "txtExtraOptions";
- this.txtExtraOptions.Size = new System.Drawing.Size(474, 40);
- this.txtExtraOptions.TabIndex = 6;
- this.txtExtraOptions.Enter += new System.EventHandler(this.txtExtraOptions_Focus);
- this.txtExtraOptions.LostFocus += new System.EventHandler(this.txtExtraOptions_LostFocus);
- //
- // groupBox3
- //
- this.groupBox3.Controls.Add(this.chkIceSl);
- this.groupBox3.Location = new System.Drawing.Point(12, 385);
- this.groupBox3.Name = "groupBox3";
- this.groupBox3.Size = new System.Drawing.Size(487, 47);
- this.groupBox3.TabIndex = 3;
- this.groupBox3.TabStop = false;
- this.groupBox3.Text = "Ice Components";
- //
- // chkIceSl
- //
- this.chkIceSl.AutoSize = true;
- this.chkIceSl.Location = new System.Drawing.Point(10, 19);
- this.chkIceSl.Name = "chkIceSl";
- this.chkIceSl.Size = new System.Drawing.Size(50, 17);
- this.chkIceSl.TabIndex = 1;
- this.chkIceSl.TabStop = false;
- this.chkIceSl.Text = "IceSl";
- this.chkIceSl.UseVisualStyleBackColor = true;
- this.chkIceSl.CheckedChanged += new System.EventHandler(this.chkIce_CheckedChanged);
- //
- // groupBox4
- //
- this.groupBox4.Controls.Add(this.label1);
- this.groupBox4.Controls.Add(this.comboBoxVerboseLevel);
- this.groupBox4.Controls.Add(this.chkIcePrefix);
- this.groupBox4.Location = new System.Drawing.Point(12, 88);
- this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(487, 44);
- this.groupBox4.TabIndex = 4;
- this.groupBox4.TabStop = false;
- this.groupBox4.Text = "Slice Compiler Options";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(279, 20);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(75, 13);
- this.label1.TabIndex = 4;
- this.label1.Text = "Tracing Level:";
- //
- // comboBoxVerboseLevel
- //
- this.comboBoxVerboseLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxVerboseLevel.FormattingEnabled = true;
- this.comboBoxVerboseLevel.Items.AddRange(new object[] {
- "Errors",
- "Info",
- "Debug"});
- this.comboBoxVerboseLevel.Location = new System.Drawing.Point(360, 15);
- this.comboBoxVerboseLevel.Name = "comboBoxVerboseLevel";
- this.comboBoxVerboseLevel.Size = new System.Drawing.Size(121, 21);
- this.comboBoxVerboseLevel.TabIndex = 3;
- this.comboBoxVerboseLevel.SelectedIndexChanged += new System.EventHandler(this.comboBoxVerboseLevel_SelectedIndexChanged);
-
- //
- // chkIcePrefix
- //
- this.chkIcePrefix.AutoSize = true;
- this.chkIcePrefix.Location = new System.Drawing.Point(10, 19);
- this.chkIcePrefix.Name = "chkIcePrefix";
- this.chkIcePrefix.Size = new System.Drawing.Size(41, 17);
- this.chkIcePrefix.TabIndex = 2;
- this.chkIcePrefix.Text = "Ice";
- this.chkIcePrefix.UseVisualStyleBackColor = true;
- this.chkIcePrefix.CheckedChanged += new System.EventHandler(this.chkIcePrefix_CheckedChanged);
- //
- // btnClose
- //
- this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.btnClose.Location = new System.Drawing.Point(423, 438);
- this.btnClose.Name = "btnClose";
- this.btnClose.Size = new System.Drawing.Size(75, 23);
- this.btnClose.TabIndex = 5;
- this.btnClose.Text = "Close";
- this.btnClose.UseVisualStyleBackColor = true;
- this.btnClose.Click += new System.EventHandler(this.btnCancel_Click);
- //
- // groupBox5
- //
- this.groupBox5.Controls.Add(this.btnSelectIceHome);
- this.groupBox5.Controls.Add(this.txtIceHome);
- this.groupBox5.Location = new System.Drawing.Point(12, 37);
- this.groupBox5.Name = "groupBox5";
- this.groupBox5.Size = new System.Drawing.Size(486, 45);
- this.groupBox5.TabIndex = 6;
- this.groupBox5.TabStop = false;
- this.groupBox5.Text = "Ice Home";
- //
- // btnSelectIceHome
- //
- this.btnSelectIceHome.Location = new System.Drawing.Point(405, 16);
- this.btnSelectIceHome.Name = "btnSelectIceHome";
- this.btnSelectIceHome.Size = new System.Drawing.Size(75, 23);
- this.btnSelectIceHome.TabIndex = 1;
- this.btnSelectIceHome.Text = "....";
- this.btnSelectIceHome.UseVisualStyleBackColor = true;
- this.btnSelectIceHome.Click += new System.EventHandler(this.btnSelectIceHome_Click);
- //
- // txtIceHome
- //
- this.txtIceHome.Location = new System.Drawing.Point(10, 20);
- this.txtIceHome.Name = "txtIceHome";
- this.txtIceHome.Size = new System.Drawing.Size(386, 20);
- this.txtIceHome.TabIndex = 0;
- this.txtIceHome.Enter += new System.EventHandler(this.txtIceHome_Focus);
- this.txtIceHome.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtIceHome_KeyPress);
- this.txtIceHome.LostFocus += new System.EventHandler(this.txtIceHome_LostFocus);
- //
- // IceSilverlightConfigurationDialog
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.CancelButton = this.btnClose;
- this.ClientSize = new System.Drawing.Size(515, 472);
- this.Controls.Add(this.groupBox5);
- this.Controls.Add(this.btnClose);
- this.Controls.Add(this.groupBox4);
- this.Controls.Add(this.groupBox3);
- this.Controls.Add(this.groupBox2);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.chkEnableBuilder);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
- this.MaximizeBox = false;
- this.Name = "IceSilverlightConfigurationDialog";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Ice Configuration";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing);
- this.groupBox1.ResumeLayout(false);
- this.groupBox1.PerformLayout();
- this.groupBox2.ResumeLayout(false);
- this.groupBox2.PerformLayout();
- this.groupBox3.ResumeLayout(false);
- this.groupBox3.PerformLayout();
- this.groupBox4.ResumeLayout(false);
- this.groupBox4.PerformLayout();
- this.groupBox5.ResumeLayout(false);
- this.groupBox5.PerformLayout();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.CheckBox chkEnableBuilder;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Button btnMoveIncludeDown;
- private System.Windows.Forms.Button btnMoveIncludeUp;
- private System.Windows.Forms.Button btnRemoveInclude;
- private System.Windows.Forms.Button btnAddInclude;
- private System.Windows.Forms.CheckedListBox includeDirList;
- private System.Windows.Forms.GroupBox groupBox2;
- private System.Windows.Forms.TextBox txtExtraOptions;
- private System.Windows.Forms.GroupBox groupBox3;
- private System.Windows.Forms.CheckBox chkIceSl;
- private System.Windows.Forms.GroupBox groupBox4;
- private System.Windows.Forms.CheckBox chkIcePrefix;
- private System.Windows.Forms.Button btnClose;
- private System.Windows.Forms.GroupBox groupBox5;
- private System.Windows.Forms.Button btnSelectIceHome;
- private System.Windows.Forms.TextBox txtIceHome;
- private System.Windows.Forms.ToolTip toolTip;
- private System.Windows.Forms.Label includeInfo;
- private System.Windows.Forms.Button btnEditInclude;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.ComboBox comboBoxVerboseLevel;
- }
-}
diff --git a/vsplugin/src/IceSilverlightConfigurationDialog.cs b/vsplugin/src/IceSilverlightConfigurationDialog.cs
deleted file mode 100644
index 2b2cd796e89..00000000000
--- a/vsplugin/src/IceSilverlightConfigurationDialog.cs
+++ /dev/null
@@ -1,625 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.IO;
-using System.Text;
-using System.Windows.Forms;
-
-using EnvDTE;
-
-namespace Ice.VisualStudio
-{
- public partial class IceSilverlightConfigurationDialog : Form
- {
- public IceSilverlightConfigurationDialog(Project project)
- {
- InitializeComponent();
- _project = project;
-
- //
- // Set the toolTip messages.
- //
- toolTip.SetToolTip(txtIceHome, "Ice Installation Directory.");
- toolTip.SetToolTip(btnSelectIceHome, "Ice Installation Directory.");
- toolTip.SetToolTip(chkIcePrefix, "Allow Ice prefix (--ice).");
-
- if(_project != null)
- {
- this.Text = "Ice Configuration - Project: " + _project.Name;
- bool enabled = Util.isSliceBuilderEnabled(project);
- setEnabled(enabled);
- chkEnableBuilder.Checked = enabled;
- load();
- _initialized = true;
- }
- }
-
- private void load()
- {
- Cursor = Cursors.WaitCursor;
- if(_project != null)
- {
- includeDirList.Items.Clear();
- txtIceHome.Text = Util.getIceHomeRaw(_project, false);
- txtExtraOptions.Text = Util.getProjectProperty(_project, Util.PropertyIceExtraOptions);
-
- chkIcePrefix.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix);
- try
- {
- comboBoxVerboseLevel.SelectedIndex = Int32.Parse(Util.getProjectProperty(_project, Util.PropertyVerboseLevel, "0"));
- }
- catch
- {
- comboBoxVerboseLevel.SelectedIndex = 0;
- }
-
- IncludePathList list =
- new IncludePathList(Util.getProjectProperty(_project, Util.PropertyIceIncludePath));
- foreach(String s in list)
- {
- includeDirList.Items.Add(s.Trim());
- if(Path.IsPathRooted(s.Trim()))
- {
- includeDirList.SetItemCheckState(includeDirList.Items.Count - 1, CheckState.Checked);
- }
- }
-
- ComponentList selectedComponents = Util.getIceSilverlightComponents(_project);
- foreach(String s in Util.getSilverlightNames())
- {
- if(selectedComponents.Contains(s))
- {
- checkComponent(s, true);
- }
- else
- {
- checkComponent(s, false);
- }
- }
- }
- Cursor = Cursors.Default;
- }
-
- private void checkComponent(String component, bool check)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- switch (component)
- {
- case "IceSL":
- {
- chkIceSl.Checked = check;
- break;
- }
- default:
- {
- break;
- }
- }
- }
- private void chkEnableBuilder_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- if(_initialized)
- {
- _initialized = false;
- setEnabled(false);
- chkEnableBuilder.Enabled = false;
- Builder builder = Connect.getBuilder();
- if(chkEnableBuilder.Checked)
- {
- builder.addBuilderToProject(_project);
- }
- else
- {
- builder.removeBuilderFromProject(_project);
- }
- load();
- chkEnableBuilder.Enabled = true;
- setEnabled(chkEnableBuilder.Checked);
- _initialized = true;
- }
- Cursor = Cursors.Default;
- }
-
- private void setEnabled(bool enabled)
- {
- txtIceHome.Enabled = enabled;
- btnSelectIceHome.Enabled = enabled;
-
- chkIcePrefix.Enabled = enabled;
- comboBoxVerboseLevel.Enabled = enabled;
-
- includeDirList.Enabled = enabled;
- btnAddInclude.Enabled = enabled;
- btnEditInclude.Enabled = enabled;
- btnRemoveInclude.Enabled = enabled;
- btnMoveIncludeUp.Enabled = enabled;
- btnMoveIncludeDown.Enabled = enabled;
-
- txtExtraOptions.Enabled = enabled;
-
-
- chkIceSl.Enabled = enabled;
- }
-
- private void formClosing(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- if(!_changed)
- {
- if(txtExtraOptions.Modified)
- {
- _changed = true;
- }
- else if(txtIceHome.Modified)
- {
- _changed = true;
- }
- }
-
- if(_changed && Util.isSliceBuilderEnabled(_project))
- {
- Builder builder = Connect.getBuilder();
- builder.cleanProject(_project);
- builder.buildProject(_project, true, vsBuildScope.vsBuildScopeProject);
- }
- Cursor = Cursors.Default;
- }
-
- private void btnCancel_Click(object sender, EventArgs e)
- {
- Close();
- }
-
- private void btnSelectIceHome_Click(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- FolderBrowserDialog dialog = new FolderBrowserDialog();
- dialog.SelectedPath = Util.absolutePath(_project, Util.getIceHome(_project));
- dialog.Description = "Select Ice Home Installation Directory";
- DialogResult result = dialog.ShowDialog();
- if(result == DialogResult.OK)
- {
- Util.updateIceHome(_project, dialog.SelectedPath, false);
- load();
- _changed = true;
- }
- }
-
- private void txtIceHome_KeyPress(object sender, KeyPressEventArgs e)
- {
- if(e.KeyChar == (char)Keys.Return)
- {
- updateIceHome();
- e.Handled = true;
- }
- }
-
- private void txtIceHome_Focus(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- }
-
- private void txtIceHome_LostFocus(object sender, EventArgs e)
- {
- updateIceHome();
- }
-
- private void updateIceHome()
- {
- if(!_iceHomeUpdating)
- {
- _iceHomeUpdating = true;
- if(!txtIceHome.Text.Equals(Util.getProjectProperty(_project, Util.PropertyIceHome),
- StringComparison.CurrentCultureIgnoreCase))
- {
- Util.updateIceHome(_project, txtIceHome.Text, false);
- load();
- _changed = true;
- txtIceHome.Modified = false;
- }
- _iceHomeUpdating = false;
- }
- }
-
- private void chkIcePrefix_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- Util.setProjectProperty(_project, Util.PropertyIcePrefix, chkIcePrefix.Checked.ToString());
- _changed = true;
- Cursor = Cursors.Default;
- }
-
- private void saveSliceIncludes()
- {
- IncludePathList paths = new IncludePathList();
- foreach(String s in includeDirList.Items)
- {
- paths.Add(s.Trim());
- }
- String p = paths.ToString();
- Util.setProjectProperty(_project, Util.PropertyIceIncludePath, p);
- _changed = true;
- }
-
- private void btnAddInclude_Click(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- includeDirList.Items.Add("");
- includeDirList.SelectedIndex = includeDirList.Items.Count - 1;
- _editingIndex = includeDirList.SelectedIndex;
- beginEditIncludeDir();
- }
-
- private void btnRemoveInclude_Click(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- int index = includeDirList.SelectedIndex;
- if(_editingIncludes)
- {
- index = _editingIndex;
- endEditIncludeDir(true);
- }
- if(index > -1 && index < includeDirList.Items.Count)
- {
- int selected = index;
- includeDirList.Items.RemoveAt(selected);
- if (includeDirList.Items.Count > 0)
- {
- if (selected > 0)
- {
- selected -= 1;
- }
- includeDirList.SelectedIndex = selected;
- }
- saveSliceIncludes();
- }
- Cursor = Cursors.Default;
- }
-
- private void btnMoveIncludeUp_Click(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- int index = includeDirList.SelectedIndex;
- if(index > 0)
- {
- string current = includeDirList.SelectedItem.ToString();
- includeDirList.Items.RemoveAt(index);
- includeDirList.Items.Insert(index - 1, current);
- includeDirList.SelectedIndex = index - 1;
- saveSliceIncludes();
- }
- resetIncludeDirChecks();
- Cursor = Cursors.Default;
- }
-
- private void btnMoveIncludeDown_Click(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- int index = includeDirList.SelectedIndex;
- if(index < includeDirList.Items.Count - 1 && index > -1)
- {
- string current = includeDirList.SelectedItem.ToString();
- includeDirList.Items.RemoveAt(index);
- includeDirList.Items.Insert(index + 1, current);
- includeDirList.SelectedIndex = index + 1;
- saveSliceIncludes();
- resetIncludeDirChecks();
- }
- Cursor = Cursors.Default;
- }
-
- private void includeDirList_ItemCheck(object sender, ItemCheckEventArgs e)
- {
- if(_editingIncludes)
- {
- return;
- }
- string path = includeDirList.Items[e.Index].ToString();
- if(!Util.containsEnvironmentVars(path))
- {
- if(e.NewValue == CheckState.Unchecked)
- {
- path = Util.relativePath(_project, path);
- }
- else if(e.NewValue == CheckState.Checked)
- {
- if(!Path.IsPathRooted(path))
- {
- path = Util.absolutePath(_project, path);
- }
- }
- }
- includeDirList.Items[e.Index] = path;
- if(_initialized)
- {
- saveSliceIncludes();
- }
- }
-
- private void txtExtraOptions_Focus(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- }
-
- private void txtExtraOptions_LostFocus(object sender, EventArgs e)
- {
- if(txtExtraOptions.Modified)
- {
- Util.setProjectProperty(_project, Util.PropertyIceExtraOptions, txtExtraOptions.Text);
- _changed = true;
- }
- }
-
-
- private void chkIce_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- if(_initialized)
- {
- if(chkIceSl.Checked)
- {
- Util.addDotNetReference(_project, "IceSL", Util.getIceHome(_project));
- }
- else
- {
- Util.removeDotNetReference(_project, "IceSL");
- }
- _changed = true;
- }
- Cursor = Cursors.Default;
- }
-
- private void btnEdit_Click(object sender, EventArgs e)
- {
- if(includeDirList.SelectedIndex != -1)
- {
- _editingIndex = includeDirList.SelectedIndex;
- beginEditIncludeDir();
- }
- }
-
- private void includeDirList_SelectedIndexChanged(object sender, EventArgs e)
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- }
-
- private void beginEditIncludeDir()
- {
- if(_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- _editingIncludes = true;
- CancelButton = null;
- if(_editingIndex != -1)
- {
- _txtIncludeDir = new TextBox();
- _txtIncludeDir.Text = includeDirList.Items[includeDirList.SelectedIndex].ToString();
-
- includeDirList.SelectionMode = SelectionMode.One;
-
- Rectangle rect = includeDirList.GetItemRectangle(includeDirList.SelectedIndex);
- _txtIncludeDir.Location = new Point(includeDirList.Location.X + 2,
- includeDirList.Location.Y + rect.Y);
- _txtIncludeDir.Width = includeDirList.Width - 50;
- _txtIncludeDir.Parent = includeDirList;
- _txtIncludeDir.KeyDown += new KeyEventHandler(includeDirKeyDown);
- groupBox1.Controls.Add(_txtIncludeDir);
-
- _btnSelectInclude = new Button();
- _btnSelectInclude.Text = "...";
- _btnSelectInclude.Location = new Point(includeDirList.Location.X + _txtIncludeDir.Width,
- includeDirList.Location.Y + rect.Y);
- _btnSelectInclude.Width = 49;
- _btnSelectInclude.Height = _txtIncludeDir.Height;
- _btnSelectInclude.Click += new EventHandler(selectIncludeClicked);
- groupBox1.Controls.Add(_btnSelectInclude);
-
-
- _txtIncludeDir.Show();
- _txtIncludeDir.BringToFront();
- _txtIncludeDir.Focus();
-
- _btnSelectInclude.Show();
- _btnSelectInclude.BringToFront();
- }
- }
-
- private void endEditIncludeDir(bool saveChanges)
- {
- _initialized = false;
- if(!_editingIncludes)
- {
- _initialized = true;
- return;
- }
- _editingIncludes = false;
- String path = null;
- if(_editingIndex > -1 && _editingIndex < includeDirList.Items.Count)
- {
- path = includeDirList.Items[_editingIndex].ToString();
- }
-
- lock(this)
- {
- CancelButton = btnClose;
- if(_txtIncludeDir == null || _btnSelectInclude == null)
- {
- _initialized = true;
- return;
- }
- if(saveChanges)
- {
- path = _txtIncludeDir.Text;
- if(path != null)
- {
- path = path.Trim();
- }
- }
-
- this.groupBox1.Controls.Remove(_txtIncludeDir);
- _txtIncludeDir = null;
-
- this.groupBox1.Controls.Remove(_btnSelectInclude);
- _btnSelectInclude = null;
- }
-
- if(String.IsNullOrEmpty(path))
- {
- if(_editingIndex != -1)
- {
- includeDirList.Items.RemoveAt(_editingIndex);
- includeDirList.SelectedIndex = includeDirList.Items.Count - 1;
- _editingIndex = -1;
- saveSliceIncludes();
- }
- }
- else if(_editingIndex != -1 && saveChanges)
- {
- if(!path.Equals(includeDirList.Items[_editingIndex].ToString(),
- StringComparison.CurrentCultureIgnoreCase))
- {
- includeDirList.Items[_editingIndex] = path;
- if(Path.IsPathRooted(path))
- {
- includeDirList.SetItemCheckState(_editingIndex, CheckState.Checked);
- }
- else
- {
- includeDirList.SetItemCheckState(_editingIndex, CheckState.Unchecked);
- }
- saveSliceIncludes();
- }
- }
- resetIncludeDirChecks();
- }
-
- private void resetIncludeDirChecks()
- {
- _initialized = false;
- for(int i = 0; i < includeDirList.Items.Count; ++i)
- {
- String path = includeDirList.Items[i].ToString();
- if(String.IsNullOrEmpty(path))
- {
- continue;
- }
-
- if(Path.IsPathRooted(path))
- {
- includeDirList.SetItemCheckState(i, CheckState.Checked);
- }
- else
- {
- includeDirList.SetItemCheckState(i, CheckState.Unchecked);
- }
- }
- _initialized = true;
- }
-
- private void includeDirKeyDown(object sender, KeyEventArgs e)
- {
- if(e.KeyCode.Equals(Keys.Escape))
- {
- endEditIncludeDir(false);
- }
- if(e.KeyCode.Equals(Keys.Enter))
- {
- endEditIncludeDir(true);
- }
- }
-
- private void selectIncludeClicked(object sender, EventArgs e)
- {
- FolderBrowserDialog dialog = new FolderBrowserDialog();
- string projectDir = Path.GetFullPath(Path.GetDirectoryName(_project.FileName));
- dialog.SelectedPath = projectDir;
- dialog.Description = "Slice Include Directory";
- DialogResult result = dialog.ShowDialog();
- if(result == DialogResult.OK)
- {
- string path = dialog.SelectedPath;
- if(!Util.containsEnvironmentVars(path))
- {
- path = Util.relativePath(_project, Path.GetFullPath(path));
- }
- _txtIncludeDir.Text = path;
- }
- endEditIncludeDir(true);
- }
-
- private int _editingIndex = -1;
- private bool _editingIncludes;
- private bool _initialized;
- private bool _changed;
- private Project _project;
- private bool _iceHomeUpdating;
- private TextBox _txtIncludeDir;
- private Button _btnSelectInclude;
-
- private void comboBoxVerboseLevel_SelectedIndexChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if (_editingIncludes)
- {
- endEditIncludeDir(true);
- }
- Util.setProjectProperty(_project, Util.PropertyVerboseLevel, comboBoxVerboseLevel.SelectedIndex.ToString());
- Cursor = Cursors.Default;
- }
- }
-}
diff --git a/vsplugin/src/IceVBConfigurationDialog.cs b/vsplugin/src/IceVBConfigurationDialog.cs
deleted file mode 100755
index 50f2a037c24..00000000000
--- a/vsplugin/src/IceVBConfigurationDialog.cs
+++ /dev/null
@@ -1,258 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.IO;
-using System.Text;
-using System.Windows.Forms;
-
-using EnvDTE;
-
-namespace Ice.VisualStudio
-{
- public partial class IceVBConfigurationDialog : Form
- {
- public IceVBConfigurationDialog(Project project)
- {
- InitializeComponent();
- _project = project;
-
- //
- // Set the toolTip messages.
- //
- toolTip.SetToolTip(txtIceHome, "Ice installation directory.");
- toolTip.SetToolTip(btnSelectIceHome, "Ice installation directory.");
-
- if(_project != null)
- {
- this.Text = "Ice Configuration - Project: " + _project.Name;
- bool enabled = Util.isSliceBuilderEnabled(project);
- setEnabled(enabled);
- chkEnableBuilder.Checked = enabled;
- load();
- _initialized = true;
- }
- }
-
- private void load()
- {
- Cursor = Cursors.WaitCursor;
- if(_project != null)
- {
- txtIceHome.Text = Util.getIceHomeRaw(_project, false);
-
- ComponentList selectedComponents = Util.getIceDotNetComponents(_project);
- foreach(String s in Util.getDotNetNames())
- {
- if(selectedComponents.Contains(s))
- {
- checkComponent(s, true);
- }
- else
- {
- checkComponent(s, false);
- }
- }
- }
- Cursor = Cursors.Default;
- }
-
- private void checkComponent(String component, bool check)
- {
- switch (component)
- {
- case "Glacier2":
- {
- chkGlacier2.Checked = check;
- break;
- }
- case "Ice":
- {
- chkIce.Checked = check;
- break;
- }
- case "IceBox":
- {
- chkIceBox.Checked = check;
- break;
- }
- case "IceGrid":
- {
- chkIceGrid.Checked = check;
- break;
- }
- case "IcePatch2":
- {
- chkIcePatch2.Checked = check;
- break;
- }
- case "IceSSL":
- {
- chkIceSSL.Checked = check;
- break;
- }
- case "IceStorm":
- {
- chkIceStorm.Checked = check;
- break;
- }
- default:
- {
- break;
- }
- }
- }
- private void chkEnableBuilder_CheckedChanged(object sender, EventArgs e)
- {
- Cursor = Cursors.WaitCursor;
- if(_initialized)
- {
- _initialized = false;
- setEnabled(false);
- chkEnableBuilder.Enabled = false;
- Builder builder = Connect.getBuilder();
- if(chkEnableBuilder.Checked)
- {
- builder.addBuilderToProject(_project);
- }
- else
- {
- builder.removeBuilderFromProject(_project);
- }
- load();
- setEnabled(chkEnableBuilder.Checked);
- chkEnableBuilder.Enabled = true;
- _initialized = true;
- }
- Cursor = Cursors.Default;
- }
-
- private void setEnabled(bool enabled)
- {
- txtIceHome.Enabled = enabled;
- btnSelectIceHome.Enabled = enabled;
-
- chkGlacier2.Enabled = enabled;
- chkIce.Enabled = enabled;
- chkIceBox.Enabled = enabled;
- chkIceGrid.Enabled = enabled;
- chkIcePatch2.Enabled = enabled;
- chkIceSSL.Enabled = enabled;
- chkIceStorm.Enabled = enabled;
- }
-
- private void btnCancel_Click(object sender, EventArgs e)
- {
- Close();
- }
-
- private void btnSelectIceHome_Click(object sender, EventArgs e)
- {
- FolderBrowserDialog dialog = new FolderBrowserDialog();
- dialog.SelectedPath = Util.absolutePath(_project, Util.getIceHome(_project));
- dialog.Description = "Select Ice Home Installation Directory";
- DialogResult result = dialog.ShowDialog();
- if(result == DialogResult.OK)
- {
- Util.updateIceHome(_project, dialog.SelectedPath, false);
- load();
- }
- }
-
- private void txtIceHome_KeyPress(object sender, KeyPressEventArgs e)
- {
- if(e.KeyChar == (char)Keys.Return)
- {
- updateIceHome();
- e.Handled = true;
- }
- }
-
- private void txtIceHome_LostFocus(object sender, EventArgs e)
- {
- updateIceHome();
- }
-
- private void updateIceHome()
- {
- if(!_iceHomeUpdating)
- {
- _iceHomeUpdating = true;
- if(!txtIceHome.Text.Equals(Util.getProjectProperty(_project, Util.PropertyIceHome),
- StringComparison.CurrentCultureIgnoreCase))
- {
- Util.updateIceHome(_project, txtIceHome.Text, false);
- load();
- txtIceHome.Modified = false;
- }
- _iceHomeUpdating = false;
- }
- }
-
- private void componentChanged(string name, bool value)
- {
- Cursor = Cursors.WaitCursor;
- if(_initialized)
- {
- if(value)
- {
- Util.addDotNetReference(_project, name, Util.getIceHome(_project));
- }
- else
- {
- Util.removeDotNetReference(_project, name);
- }
- }
- Cursor = Cursors.Default;
- }
-
- private void chkGlacier2_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("Glacier2", chkGlacier2.Checked);
- }
-
- private void chkIce_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("Ice", chkIce.Checked);
- }
-
- private void chkIceBox_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceBox", chkIceBox.Checked);
- }
-
- private void chkIceGrid_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceGrid", chkIceGrid.Checked);
- }
-
- private void chkIcePatch2_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IcePatch2", chkIcePatch2.Checked);
- }
-
- private void chkIceSSL_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceSSL", chkIceSSL.Checked);
- }
-
- private void chkIceStorm_CheckedChanged(object sender, EventArgs e)
- {
- componentChanged("IceStorm", chkIceStorm.Checked);
- }
-
- private bool _initialized;
- private Project _project;
- private bool _iceHomeUpdating;
- }
-}
diff --git a/vsplugin/src/Util.cs b/vsplugin/src/Util.cs
deleted file mode 100755
index b8eb14bc15a..00000000000
--- a/vsplugin/src/Util.cs
+++ /dev/null
@@ -1,1760 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-using System;
-using System.Text;
-using System.Collections.Generic;
-using System.ComponentModel;
-using EnvDTE;
-using System.Windows.Forms;
-using System.Runtime.InteropServices;
-using System.IO;
-using System.Diagnostics;
-using Extensibility;
-using EnvDTE80;
-using Microsoft.VisualStudio.CommandBars;
-using Microsoft.VisualStudio.VCProjectEngine;
-using Microsoft.VisualStudio.VCProject;
-using Microsoft.VisualStudio.Shell;
-using System.Resources;
-using System.Reflection;
-using VSLangProj;
-using System.Globalization;
-
-using System.Collections;
-using System.Runtime.InteropServices.ComTypes;
-using Microsoft.CSharp;
-
-namespace Ice.VisualStudio
-{
- public class ComponentList : List<string>
- {
- public ComponentList()
- {
- }
-
- public ComponentList(string[] values)
- {
- foreach(string s in values)
- {
- string trimmed = s.Trim();
- if (trimmed.Length > 0)
- {
- Add(trimmed);
- }
- }
- }
-
- public new void Add(string value)
- {
- value = value.Trim();
- if(!base.Contains(value))
- {
- base.Add(value);
- }
- }
-
- public new bool Contains(string value)
- {
- string found = base.Find(delegate(string s)
- {
- return s.Equals(value.Trim(), StringComparison.CurrentCultureIgnoreCase);
- });
- return !String.IsNullOrEmpty(found);
- }
-
- public new void Remove(string value)
- {
- string found = base.Find(delegate(string s)
- {
- return s.Equals(value.Trim(), StringComparison.CurrentCultureIgnoreCase);
- });
-
- if(!String.IsNullOrEmpty(found))
- {
- base.Remove(found);
- }
- }
-
- public ComponentList(string value)
- {
- init(value, ';');
- }
-
- public ComponentList(string value, char separator)
- {
- init(value, separator);
- }
-
- private void init(string value, char separator)
- {
- Array items = value.Split(separator);
- foreach(string s in items)
- {
- string trimmed = s.Trim();
- if(trimmed.Length > 0)
- {
- Add(trimmed);
- }
- }
- }
-
- public override string ToString()
- {
- return ToString(';');
- }
-
- public string ToString(char separator)
- {
- StringBuilder sb = new StringBuilder();
- for(int cont = 0; cont < this.Count; ++cont)
- {
- sb.Append(this[cont]);
- if(cont < this.Count - 1)
- {
- if(!separator.Equals(' '))
- {
- sb.Append(' ');
- }
- sb.Append(separator);
- if(!separator.Equals(' '))
- {
- sb.Append(' ');
- }
- }
- }
- return sb.ToString();
- }
- }
-
- public class IncludePathList : ComponentList
- {
- public IncludePathList()
- : base()
- {
- }
-
- public IncludePathList(string[] values)
- : base(values)
- {
- }
-
- public IncludePathList(string value)
- : base(value, '|')
- {
- }
-
- public override string ToString()
- {
- return base.ToString('|');
- }
- }
-
- public static class Util
- {
- public enum msgLevel { msgError, msgInfo, msgDebug };
-
- public const string slice2cs = "slice2cs.exe";
- public const string slice2cpp = "slice2cpp.exe";
- public const string slice2sl = "slice2sl.exe";
-
- //
- // Property names used to persist project configuration.
- //
- public const string PropertyIce = "ZerocIce_Enabled";
- public const string PropertyIceHome = "ZerocIce_Home";
- public const string PropertyIceComponents = "ZerocIce_Components";
- public const string PropertyIceExtraOptions = "ZerocIce_ExtraOptions";
- public const string PropertyIceIncludePath = "ZerocIce_IncludePath";
- public const string PropertyIceStreaming = "ZerocIce_Streaming";
- public const string PropertyIceChecksum = "ZerocIce_Checksum";
- public const string PropertyIceTie = "ZerocIce_Tie";
- public const string PropertyIcePrefix = "ZerocIce_Prefix";
- public const string PropertyIceDllExport = "ZerocIce_DllExport";
- public const string PropertyVerboseLevel = "ZerocIce_VerboseLevel";
- public const string EnvIceHome = "Zeroc_VS_IceHome";
-
- private static readonly string[] silverlightNames =
- {
- "IceSL"
- };
-
- public static string[] getSilverlightNames()
- {
- return (string[])silverlightNames.Clone();
- }
-
- private static readonly string[] cppNames =
- {
- "Freeze", "Glacier2", "Ice", "IceBox", "IceGrid", "IcePatch2",
- "IceSSL", "IceStorm", "IceUtil"
- };
-
- public static string[] getCppNames()
- {
- return (string[])cppNames.Clone();
- }
-
- private static readonly string[] dotNetNames =
- {
- "Glacier2", "Ice", "IceBox", "IceGrid", "IcePatch2",
- "IceSSL", "IceStorm"
- };
-
- public static string[] getDotNetNames()
- {
- return (string[])dotNetNames.Clone();
- }
-
- // Silverlight handled separately because it is not part of the normal product install. It is a separate add-in.
- const string iceSilverlightHome = "C:\\IceSL-0.3.3";
-
- private static string getIceHomeDefault()
- {
- string defaultIceHome = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
- if (defaultIceHome.EndsWith("\\bin", StringComparison.CurrentCultureIgnoreCase))
- {
- defaultIceHome = defaultIceHome.Substring(0, defaultIceHome.Length - "\\bin".Length);
- }
- return defaultIceHome;
- }
-
- public static string getIceHomeRaw(Project project, bool update)
- {
- if (Util.isSilverlightProject(project))
- {
- return Util.getProjectProperty(project, Util.PropertyIceHome, iceSilverlightHome, update);
- }
-
- string iceHome = Util.getProjectProperty(project, Util.PropertyIceHome, "", update);
- if (String.IsNullOrEmpty(iceHome))
- {
- iceHome = getIceHomeDefault();
- }
- return iceHome;
- }
-
-#if VS2010
- public static VCPropertySheet findPropertySheet(IVCCollection propertySheets, string sheetName)
- {
- foreach (VCPropertySheet sheet in propertySheets)
- {
- if (sheet.Name == sheetName)
- {
- return sheet;
- }
- }
- return null;
- }
-
- public static void addPropertySheet(Project project, string sheetName)
- {
- VCProject vcProj = (VCProject)project.Object;
- string propSheetFileName = vcProj.ProjectDirectory + sheetName + ".props";
- if (!File.Exists(propSheetFileName))
- {
- StreamWriter sw = new StreamWriter(propSheetFileName);
- sw.WriteLine(@"<?xml version=""1.0"" encoding=""utf-8""?>");
- sw.WriteLine(@"<Project ToolsVersion=""4.0"" xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">");
- sw.WriteLine(@"<ImportGroup Label=""PropertySheets"" />");
- sw.WriteLine(@"<PropertyGroup Label=""UserMacros"" />");
- sw.WriteLine(@"<PropertyGroup />");
- sw.WriteLine(@"<ItemDefinitionGroup />");
- sw.WriteLine(@"<ItemGroup />");
- sw.WriteLine(@"</Project>");
- sw.Close();
- }
-
- foreach (VCConfiguration vcConfig in vcProj.Configurations as IVCCollection)
- {
- VCPropertySheet newSheet = findPropertySheet(vcConfig.PropertySheets as IVCCollection, sheetName);
- if (newSheet == null)
- {
- try
- {
- newSheet = vcConfig.AddPropertySheet(propSheetFileName);
- }
- catch (Exception ex)
- {
- System.Windows.Forms.MessageBox.Show("Cannnot create property sheet. Exception: " + ex.Message,
- "Ice Visual Studio Extension",
- System.Windows.Forms.MessageBoxButtons.OK,
- System.Windows.Forms.MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
- }
- }
- }
- }
-
- public static VCUserMacro findUserMacro(IVCCollection macros, string macroName)
- {
- foreach (VCUserMacro macro in macros)
- {
- if (macro.Name == macroName)
- {
- return macro;
- }
- }
- return null;
- }
-
- public static void updateIceHomePropertySheet(Project project, string iceHome)
- {
- addPropertySheet(project, "ice");
-
- VCProject vcProj = (VCProject)project.Object;
-
- foreach (VCConfiguration vcConfig in vcProj.Configurations as IVCCollection)
- {
- VCPropertySheet iceHomePropertySheet = findPropertySheet(vcConfig.PropertySheets as IVCCollection, "ice");
- VCUserMacro iceHomeMacro = findUserMacro(iceHomePropertySheet.UserMacros, EnvIceHome);
-
- if (iceHomeMacro == null)
- {
- iceHomeMacro = iceHomePropertySheet.AddUserMacro(EnvIceHome, iceHome);
- iceHomeMacro.PerformEnvironmentSet = true;
- iceHomePropertySheet.Save();
- }
- else if (iceHomeMacro.Value != iceHome)
- {
- iceHomeMacro.Value = iceHome;
- iceHomeMacro.PerformEnvironmentSet = true;
- iceHomePropertySheet.Save();
- }
- }
- }
-#endif
-
- public static string getIceHome(Project project)
- {
- string iceHome = subEnvironmentVars(getIceHomeRaw(project, true));
-#if VS2008
- Environment.SetEnvironmentVariable(EnvIceHome, iceHome);
-#endif
-#if VS2010
- if (isCppProject(project))
- {
- updateIceHomePropertySheet(project, iceHome);
- }
-#endif
- return iceHome;
- }
-
- public static string getPathRelativeToProject(ProjectItem item)
- {
- StringBuilder path = new StringBuilder();
- if (item != null)
- {
- path.Append(Util.getPathRelativeToProject(item, item.ContainingProject.ProjectItems));
- }
- return Util.normalizePath(path.ToString());
- }
-
- public static string getPathRelativeToProject(ProjectItem item, ProjectItems items)
- {
- StringBuilder path = new StringBuilder();
- foreach (ProjectItem i in items)
- {
- if (i == item)
- {
- if (path.Length > 0)
- {
- path.Append("\\");
- }
- path.Append(i.Name);
- break;
- }
- else if (Util.isProjectItemFilter(i) || Util.isProjectItemFolder(i))
- {
- string token = Util.getPathRelativeToProject(item, i.ProjectItems);
- if (!String.IsNullOrEmpty(token))
- {
- path.Append(i.Name);
- path.Append("\\");
- path.Append(token);
- break;
- }
- }
- }
- return path.ToString();
- }
-
- public static void addCppIncludes(VCCLCompilerTool tool, Project project, string iceHomeRaw)
- {
- if (tool == null || project == null)
- {
- return;
- }
-
- string iceIncludeDir = iceHomeRaw;
- if (Directory.Exists(Path.Combine(Util.absolutePath(project, iceIncludeDir), "cpp\\include")))
- {
- iceIncludeDir = Path.Combine(iceIncludeDir, "cpp");
- }
- iceIncludeDir = Path.Combine(iceIncludeDir, "include");
-
- string additionalIncludeDirectories = tool.AdditionalIncludeDirectories;
- if (String.IsNullOrEmpty(additionalIncludeDirectories))
- {
- tool.AdditionalIncludeDirectories = iceIncludeDir + Path.PathSeparator + ".";
- return;
- }
-
- ComponentList includes = new ComponentList(additionalIncludeDirectories);
- bool changed = false;
- if (!includes.Contains(iceIncludeDir) && !includes.Contains(quote(iceIncludeDir)))
- {
-
- changed = true;
- includes.Add(quote(iceIncludeDir));
- }
-
- if (!includes.Contains("."))
- {
- changed = true;
- includes.Add(".");
- }
-
- if (changed)
- {
- tool.AdditionalIncludeDirectories = includes.ToString();
- }
- }
-
- public static void removeCppIncludes(VCCLCompilerTool tool, string iceHomeRaw)
- {
- if (tool == null || String.IsNullOrEmpty(tool.AdditionalIncludeDirectories))
- {
- return;
- }
-
- string[] _cppIncludeDirs =
- {
- "include",
- "cpp\\include",
- };
-
- ComponentList includes = new ComponentList(tool.AdditionalIncludeDirectories);
- foreach (string dir in _cppIncludeDirs)
- {
- includes.Remove(quote(Path.Combine(iceHomeRaw, dir)));
- includes.Remove(Path.Combine(iceHomeRaw, dir));
- }
- tool.AdditionalIncludeDirectories = includes.ToString();
- }
-
- private static readonly string[] _csBinDirs =
- {
- "\\bin\\",
- "\\cs\\bin\\",
- "\\sl\\bin\\",
- };
-
- public static void addDotNetReference(Project project, string component, string iceHomeRel)
- {
- if (project == null || String.IsNullOrEmpty(component))
- {
- return;
- }
-
- string iceHome = Util.absolutePath(project, iceHomeRel);
- foreach (string dir in _csBinDirs)
- {
- if (Directory.Exists(iceHome + dir))
- {
- string reference = iceHome + dir + component + ".dll";
- if (File.Exists(reference))
- {
- VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;
- try
- {
- vsProject.References.Add(reference);
- return;
- }
- catch (COMException ex)
- {
- Console.WriteLine(ex);
- }
- }
- }
- }
-
- System.Windows.Forms.MessageBox.Show("Could not locate '" + component +
- ".dll'. Review your 'Ice Home' setting.",
- "Ice Visual Studio Extension", MessageBoxButtons.OK,
- MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
- }
-
- public static bool removeDotNetReference(Project project, string component)
- {
- if (project == null || String.IsNullOrEmpty(component))
- {
- return false;
- }
-
- foreach (Reference r in ((VSProject)project.Object).References)
- {
- if (r.Identity.Equals(component, StringComparison.OrdinalIgnoreCase))
- {
- r.Remove();
- return true;
- }
- }
- return false;
- }
-
- public static void addCppLib(VCLinkerTool tool, string component, bool debug)
- {
- if (tool == null || String.IsNullOrEmpty(component))
- {
- return;
- }
-
- if (Array.BinarySearch(Util.getCppNames(), component) < 0)
- {
- return;
- }
-
- string libName = component;
- if (debug)
- {
- libName += "d";
- }
- libName += ".lib";
-
- string additionalDependencies = tool.AdditionalDependencies;
- if (String.IsNullOrEmpty(additionalDependencies))
- {
- additionalDependencies = "";
- }
-
- ComponentList components = new ComponentList(additionalDependencies.Split(' '));
- if (!components.Contains(libName))
- {
- components.Add(libName);
- additionalDependencies = components.ToString(' ');
- tool.AdditionalDependencies = additionalDependencies;
- }
- }
-
- public static bool removeCppLib(VCLinkerTool tool, string component, bool debug)
- {
- if (tool == null || String.IsNullOrEmpty(tool.AdditionalDependencies))
- {
- return false;
- }
-
- string libName = component;
- if (debug)
- {
- libName += "d";
- }
- libName += ".lib";
-
- ComponentList components = new ComponentList(tool.AdditionalDependencies.Split(' '));
- if (components.Contains(libName))
- {
- components.Remove(libName);
- tool.AdditionalDependencies = components.ToString(' ');
- return true;
- }
- return false;
- }
-
- public static string buildPathEnvCmd(string dir)
- {
- return "PATH=" + dir + Path.PathSeparator + "$(PATH)";
- }
-
- /* Add the Ice bin path to the debug environment.
- *
- * This is more complicated to do than you'd think because of the way Studio parses the
- * debug envirnment settings. It does not execute the env settings in order as listed
- * as you might expect. Rather, it only executes the last one in the list for a particular
- * variable. I suspect this mean it does not execute them in order either, but I have not
- * confirmed that.
- */
- public static void addIceCppEnviroment(VCDebugSettings debugSettings, Project project, string iceHomeRaw,
- bool x64)
- {
- if (debugSettings == null || project == null)
- {
- return;
- }
-
- string path = "PATH=$(PATH)";
- if (debugSettings.Environment == null)
- {
- debugSettings.Environment = "PATH=" + prependToPath(assignmentValue(path).Trim(), buildBinDir(project, iceHomeRaw, x64));
- return;
- }
-
- /* Find the last in the list that begins: "PATH=" accounting for case and whitespace. */
- ComponentList envs = new ComponentList(debugSettings.Environment, '\n');
- foreach (string s in envs)
- {
- if (s.StartsWith("PATH", StringComparison.CurrentCultureIgnoreCase))
- {
- if (s.Substring("PATH".Length).Trim().StartsWith("=", StringComparison.CurrentCultureIgnoreCase))
- {
- path = s;
- }
- }
- }
-
- envs.Remove(path);
- envs.Add("PATH=" + prependToPath(assignmentValue(path).Trim(), buildBinDir(project, iceHomeRaw, x64)));
-
- debugSettings.Environment = envs.ToString('\n');
- return;
- }
-
- private static string removeFromPath(string path, string dir)
- {
- string result = "";
- string[] pieces = path.Split(Path.PathSeparator);
- foreach (string s in pieces)
- {
- if (!equalPath(s.Trim(), dir))
- {
- result += s + Path.PathSeparator;
- }
- }
-
- return result.Trim(Path.PathSeparator);
- }
-
- private static string assignmentValue(string expr)
- {
- try
- {
- return expr.Substring(expr.IndexOf('=')).Substring(1);
- }
- catch
- {
- return "";
- }
- }
-
- private static string prependToPath(string path, string dir)
- {
- path = removeFromPath(path, dir);
- return dir + Path.PathSeparator + path;
- }
-
- private static string buildBinDir(Project project, string iceHomeRaw, bool x64)
- {
- string iceBinDir = iceHomeRaw;
- if (Directory.Exists(Path.Combine(Util.absolutePath(project, iceBinDir), "cpp\\bin")))
- {
- iceBinDir = Path.Combine(iceBinDir, "cpp\\bin");
- }
- else
- {
- iceBinDir = Path.Combine(iceBinDir, "bin");
-#if VS2010
- iceBinDir = Path.Combine(iceBinDir, "vc100");
-#endif
- if (x64)
- {
- iceBinDir = Path.Combine(iceBinDir, "x64");
- }
- }
- return iceBinDir;
- }
-
- public static void removeIceCppEnviroment(VCDebugSettings debugSettings, string iceHomeRaw)
- {
- if (debugSettings == null || String.IsNullOrEmpty(debugSettings.Environment))
- {
- return;
- }
-
- string[] _cppBinDirs =
- {
- "bin",
- "bin\\x64",
- "bin\\vc100",
- "bin\\vc100\\x64",
- "cpp\\bin",
- };
-
- ComponentList envs = new ComponentList(debugSettings.Environment, '\n');
-
- /* Find the last in the list that begins: "PATH=" accounting for case and whitespace. */
- string path = "PATH=$(PATH)";
- foreach (string s in envs)
- {
- if (s.StartsWith("PATH", StringComparison.CurrentCultureIgnoreCase))
- {
- if (s.Substring("PATH".Length).Trim().StartsWith("=", StringComparison.CurrentCultureIgnoreCase))
- {
- path = s;
- }
- }
- }
- envs.Remove(path);
-
- foreach (string dir in _cppBinDirs)
- {
- path = "PATH=" + removeFromPath(assignmentValue(path).Trim(), Path.Combine(iceHomeRaw, dir));
- }
- if (path != "PATH=$(PATH)")
- {
- envs.Add(path);
- }
-
- debugSettings.Environment = envs.ToString('\n');
-
- return;
-
- }
-
- public static void addIceCppLibraryDir(VCLinkerTool tool, Project project, string iceHomeRaw, bool x64)
- {
- if (tool == null || project == null)
- {
- return;
- }
-
- string iceLibDir = iceHomeRaw;
-
- if (Directory.Exists(Path.Combine(Util.absolutePath(project, iceLibDir), "cpp\\lib")))
- {
- // Source distribution can only build one target at a time.
- iceLibDir = Path.Combine(iceLibDir, "cpp\\lib");
- }
- else
- {
- iceLibDir += "\\lib";
-#if VS2010
- iceLibDir += "\\vc100";
-#endif
- if (x64)
- {
- iceLibDir += "\\x64";
- }
- }
-
- string additionalLibraryDirectories = tool.AdditionalLibraryDirectories;
- if (String.IsNullOrEmpty(additionalLibraryDirectories))
- {
- tool.AdditionalLibraryDirectories = quote(iceLibDir);
- return;
- }
-
- ComponentList libs = new ComponentList(additionalLibraryDirectories);
- if (!libs.Contains(iceLibDir) && !libs.Contains(quote(iceLibDir)))
- {
- libs.Add(quote(iceLibDir));
- tool.AdditionalLibraryDirectories = libs.ToString();
- return;
- }
- }
-
- public static void removeIceCppLibraryDir(VCLinkerTool tool, string iceHomeRaw)
- {
- if (tool == null || String.IsNullOrEmpty(tool.AdditionalLibraryDirectories))
- {
- return;
- }
-
- string[] _cppLibDirs =
- {
- "lib",
- "lib\\x64",
- "lib\\vc100",
- "lib\\vc100\\x64",
- "cpp\\lib",
- };
-
- ComponentList libs = new ComponentList(tool.AdditionalLibraryDirectories);
- foreach (string dir in _cppLibDirs)
- {
- libs.Remove(quote(Path.Combine(iceHomeRaw, dir)));
- libs.Remove(Path.Combine(iceHomeRaw, dir));
- }
- tool.AdditionalLibraryDirectories = libs.ToString();
- }
-
- public static bool isSliceFilename(string s)
- {
- return s != null && s.EndsWith(".ice", StringComparison.CurrentCultureIgnoreCase);
- }
-
- public static bool equalPath(string p1, string p2)
- {
- return 0 == String.Compare(
- Path.GetFullPath(p1).TrimEnd(Path.DirectorySeparatorChar),
- Path.GetFullPath(p2).TrimEnd(Path.DirectorySeparatorChar),
- StringComparison.CurrentCultureIgnoreCase);
- }
-
- public static bool isSliceBuilderEnabled(Project project)
- {
- return Util.getProjectPropertyAsBool(project, Util.PropertyIce);
- }
-
- public static bool isCSharpProject(Project project)
- {
- if (project == null)
- {
- return false;
- }
-
- if (String.IsNullOrEmpty(project.Kind))
- {
- return false;
- }
-
- return project.Kind == VSLangProj.PrjKind.prjKindCSharpProject;
- }
-
- public static bool isVBProject(Project project)
- {
- if (project == null)
- {
- return false;
- }
-
- if (String.IsNullOrEmpty(project.Kind))
- {
- return false;
- }
-
- return project.Kind == VSLangProj.PrjKind.prjKindVBProject;
- }
-
- public static bool isSilverlightProject(Project project)
- {
- if (!Util.isCSharpProject(project))
- {
- return false;
- }
-
- Array extenders = (Array)project.ExtenderNames;
- foreach (string s in extenders)
- {
- if (String.IsNullOrEmpty(s))
- {
- continue;
- }
- if (s.Equals("SilverlightProject"))
- {
- return true;
- }
- }
- return false;
- }
-
- public static bool isCppProject(Project project)
- {
- if (project == null)
- {
- return false;
- }
-
- if (String.IsNullOrEmpty(project.Kind))
- {
- return false;
- }
- return project.Kind == vcContextGuids.vcContextGuidVCProject;
- }
-
- public static bool isProjectItemFolder(ProjectItem item)
- {
- if (item == null)
- {
- return false;
- }
-
- if (String.IsNullOrEmpty(item.Kind))
- {
- return false;
- }
- return item.Kind == "{6BB5F8EF-4483-11D3-8BCF-00C04F8EC28C}";
- }
-
- public static bool isProjectItemFilter(ProjectItem item)
- {
- if (item == null)
- {
- return false;
- }
-
- if (String.IsNullOrEmpty(item.Kind))
- {
- return false;
- }
- return item.Kind == "{6BB5F8F0-4483-11D3-8BCF-00C04F8EC28C}";
- }
-
- public static bool isProjectItemFile(ProjectItem item)
- {
- if (item == null)
- {
- return false;
- }
-
- if (String.IsNullOrEmpty(item.Kind))
- {
- return false;
- }
- return item.Kind == "{6BB5F8EE-4483-11D3-8BCF-00C04F8EC28C}";
- }
-
- public static bool hasItemNamed(ProjectItems items, string name)
- {
- bool found = false;
- foreach (ProjectItem item in items)
- {
- if (item == null)
- {
- continue;
- }
-
- if (item.Name == null)
- {
- continue;
- }
-
- if (item.Name.Equals(name, StringComparison.OrdinalIgnoreCase))
- {
- found = true;
- break;
- }
- }
- return found;
- }
-
- public static ProjectItem findItem(string path, ProjectItems items)
- {
- if (String.IsNullOrEmpty(path))
- {
- return null;
- }
- ProjectItem item = null;
- foreach (ProjectItem i in items)
- {
- if (i == null)
- {
- continue;
- }
- else if (Util.isProjectItemFile(i))
- {
- string fullPath = i.Properties.Item("FullPath").Value.ToString();
- if (Util.equalPath(fullPath, path))
- {
- item = i;
- break;
- }
- }
- else if (Util.isProjectItemFolder(i))
- {
- string p = Path.GetDirectoryName(i.Properties.Item("FullPath").Value.ToString());
- if (Util.equalPath(p, path))
- {
- item = i;
- break;
- }
-
- item = findItem(path, i.ProjectItems);
- if (item != null)
- {
- break;
- }
- }
- else if (Util.isProjectItemFilter(i))
- {
- string p = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(i.ContainingProject.FileName),
- Util.getPathRelativeToProject(i)));
-
- if (Util.equalPath(p, path))
- {
- item = i;
- break;
- }
-
- item = findItem(path, i.ProjectItems);
- if (item != null)
- {
- break;
- }
- }
- }
- return item;
- }
-
- public static VCFile findVCFile(IVCCollection files, string name, string fullPath)
- {
- VCFile vcFile = null;
- foreach (VCFile file in files)
- {
- if (file.ItemName == name)
- {
- if (!Util.equalPath(file.FullPath, fullPath))
- {
- file.Remove();
- break;
- }
- vcFile = file;
- break;
- }
- }
- return vcFile;
- }
-
- // TODO: what is the point of this?
- public static string normalizePath(string path)
- {
- path = path.Replace('/', '\\');
- path = path.Replace(".\\", "");
- if (path.IndexOf("\\", StringComparison.Ordinal) == 0)
- {
- path = path.Substring("\\".Length, path.Length - "\\".Length);
- }
- if (path.EndsWith("\\.", StringComparison.Ordinal))
- {
- path = path.Substring(0, path.Length - "\\.".Length);
- }
- return path;
- }
-
- public static string relativePath(Project project, string absoluteFilePath)
- {
- if (project == null || absoluteFilePath == null)
- {
- return "";
- }
-
- string mainDirPath = Path.GetFullPath(Path.GetDirectoryName(project.FileName)).
- Trim(Path.DirectorySeparatorChar);
- absoluteFilePath = Path.GetFullPath(absoluteFilePath).Trim(Path.DirectorySeparatorChar);
-
- string[] firstPathParts = mainDirPath.Split(Path.DirectorySeparatorChar);
- string[] secondPathParts = absoluteFilePath.Split(Path.DirectorySeparatorChar);
-
- int sameCounter = 0;
- while (sameCounter < Math.Min(firstPathParts.Length, secondPathParts.Length) &&
- String.Equals(firstPathParts[sameCounter], secondPathParts[sameCounter],
- StringComparison.CurrentCultureIgnoreCase))
- {
- ++sameCounter;
- }
-
- // Different volumes, relative path not possible.
- if (sameCounter == 0)
- {
- return absoluteFilePath;
- }
-
- // Pop back up to the common point.
- string newPath = "." + Path.DirectorySeparatorChar;
- for (int i = sameCounter; i < firstPathParts.Length; ++i)
- {
- newPath += ".." + Path.DirectorySeparatorChar;
- }
-
- // Descend to the target.
- for (int i = sameCounter; i < secondPathParts.Length; ++i)
- {
- newPath += secondPathParts[i] + Path.DirectorySeparatorChar;
- }
- return newPath.TrimEnd(Path.DirectorySeparatorChar);
- }
-
- // Relative paths are relative to project.
- // Inverse of Util.relativePath().
- public static string absolutePath(Project p, string f)
- {
- return Path.GetFullPath(Path.Combine(Path.GetDirectoryName(p.FileName), f));
- }
-
- public static ProjectItem getSelectedProjectItem(_DTE dte)
- {
- UIHierarchyItem uiItem = getSelectedUIHierearchyItem(dte);
- if (uiItem == null)
- {
- return null;
- }
- return uiItem.Object as ProjectItem;
- }
-
- public static Project getSelectedProject()
- {
- return Util.getSelectedProject(Util.getCurrentDTE());
- }
-
- public static Project getSelectedProject(_DTE dte)
- {
- UIHierarchyItem uiItem = getSelectedUIHierearchyItem(dte);
- if (uiItem == null)
- {
- return null;
- }
- return uiItem.Object as Project;
- }
-
- public static UIHierarchyItem getSelectedUIHierearchyItem(_DTE dte)
- {
- if (dte == null)
- {
- return null;
- }
-
- UIHierarchy uiHierarchy =
- (EnvDTE.UIHierarchy)dte.Windows.Item(EnvDTE.Constants.vsWindowKindSolutionExplorer).Object;
- if (uiHierarchy == null)
- {
- return null;
- }
-
- if (uiHierarchy.SelectedItems == null)
- {
- return null;
- }
-
- if (((Array)uiHierarchy.SelectedItems).Length <= 0)
- {
- return null;
- }
- return (UIHierarchyItem)((Array)uiHierarchy.SelectedItems).GetValue(0);
- }
-
- public static void updateIceHome(Project project, string iceHomeRaw, bool force)
- {
- if (project == null || String.IsNullOrEmpty(iceHomeRaw))
- {
- return;
- }
-
- // TODO: is this optimization required?
- if (!force)
- {
- // TODO: should be path comparison
- if (String.Equals(Util.getIceHomeRaw(project, true), iceHomeRaw,
- StringComparison.CurrentCultureIgnoreCase))
- {
- return;
- }
- }
-
- if (Util.isCSharpProject(project) || Util.isVBProject(project))
- {
- updateIceHomeDotNetProject(project, iceHomeRaw);
- }
- else if (Util.isCppProject(project))
- {
- updateIceHomeCppProject(project, iceHomeRaw);
- }
- }
-
- private static void updateIceHomeCppProject(Project project, string iceHomeRawNew)
- {
- Util.removeIceCppConfigurations(project, getIceHomeRaw(project, true));
- Util.setIceHome(project, iceHomeRawNew);
- Util.addIceCppConfigurations(project, getIceHomeRaw(project, true));
- }
-
- private static bool getCopyLocal(Project project, string name)
- {
- VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;
- foreach (Reference r in vsProject.References)
- {
- if (r.Name.Equals(name))
- {
- return r.CopyLocal;
- }
- }
- return true;
- }
-
- private static void setCopyLocal(Project project, string name, bool copyLocal)
- {
- VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;
- foreach (Reference r in vsProject.References)
- {
- if (r.Name.Equals(name))
- {
- r.CopyLocal = copyLocal;
- break;
- }
- }
- }
-
- private static void updateIceHomeDotNetProject(Project project, string iceHomeRaw)
- {
- Util.setIceHome(project, iceHomeRaw);
- string iceHomeRel = getIceHome(project);
-
- ComponentList components = Util.getIceDotNetComponents(project);
- foreach (string s in components)
- {
- if (String.IsNullOrEmpty(s))
- {
- continue;
- }
-
- bool copyLocal = getCopyLocal(project, s);
- Util.removeDotNetReference(project, s);
-
- Util.addDotNetReference(project, s, iceHomeRel);
- setCopyLocal(project, s, copyLocal);
- }
- }
-
- public static void setIceHome(Project project, string value)
- {
- string expanded = subEnvironmentVars(value);
- string fullPath = Util.absolutePath(project, expanded);
-
- if (Util.isSilverlightProject(project))
- {
- if (!File.Exists(fullPath + "\\bin\\slice2sl.exe") || !Directory.Exists(fullPath + "\\slice\\Ice"))
- {
- if (!File.Exists(fullPath + "\\cpp\\bin\\slice2sl.exe") ||
- !Directory.Exists(fullPath + "\\sl\\slice\\Ice"))
- {
- System.Windows.Forms.MessageBox.Show("Could not locate Ice for Silverlight installation in '"
- + expanded + "' directory.\n",
- "Ice Visual Studio Extension", MessageBoxButtons.OK,
- MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
- return;
- }
- }
- }
- else if (Util.isCppProject(project))
- {
- if (!Directory.Exists(fullPath + "\\slice\\Ice") ||
- (!File.Exists(fullPath + "\\bin\\slice2cpp.exe") &&
- !File.Exists(fullPath + "\\cpp\\bin\\slice2cpp.exe")))
- {
- System.Windows.Forms.MessageBox.Show("Could not locate Ice installation in '"
- + expanded + "' directory.\n",
- "Ice Visual Studio Extension", MessageBoxButtons.OK,
- MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
-
- return;
- }
- }
- else if (Util.isCSharpProject(project))
- {
- if (!Directory.Exists(fullPath + "\\slice\\Ice") ||
- (!File.Exists(fullPath + "\\bin\\slice2cs.exe") &&
- !File.Exists(fullPath + "\\cpp\\bin\\slice2cs.exe")))
- {
- System.Windows.Forms.MessageBox.Show("Could not locate Ice installation in '"
- + expanded + "' directory.\n",
- "Ice Visual Studio Extension", MessageBoxButtons.OK,
- MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
-
- return;
- }
- }
- else if (Util.isVBProject(project))
- {
- if (!File.Exists(fullPath + "\\bin\\Ice.dll") && !File.Exists(fullPath + "\\cs\\bin\\Ice.dll"))
- {
- System.Windows.Forms.MessageBox.Show("Could not locate Ice installation in '"
- + expanded + "' directory.\n",
- "Ice Visual Studio Extension", MessageBoxButtons.OK,
- MessageBoxIcon.Error,
- System.Windows.Forms.MessageBoxDefaultButton.Button1,
- System.Windows.Forms.MessageBoxOptions.RightAlign);
-
- return;
- }
- }
-
- setProjectProperty(project, Util.PropertyIceHome, value);
- }
-
- public static bool getProjectPropertyAsBool(Project project, string name)
- {
- return Util.getProjectProperty(project, name).Equals(
- true.ToString(), StringComparison.CurrentCultureIgnoreCase);
- }
-
- public static string getProjectProperty(Project project, string name)
- {
- return Util.getProjectProperty(project, name, "", true);
- }
-
- public static string getProjectProperty(Project project, string name, string defaultValue)
- {
- return Util.getProjectProperty(project, name, defaultValue, true);
- }
-
- public static string getProjectProperty(Project project, string name, string defaultValue, bool update)
- {
- if (project == null || String.IsNullOrEmpty(name) || project.Globals == null)
- {
- return defaultValue;
- }
-
- if (project.Globals.get_VariableExists(name))
- {
- return project.Globals[name].ToString();
- }
-
- if (update && !String.IsNullOrEmpty(defaultValue))
- {
- project.Globals[name] = defaultValue;
- if (!project.Globals.get_VariablePersists(name))
- {
- project.Globals.set_VariablePersists(name, true);
- }
- }
- return defaultValue;
- }
-
- public static void setProjectProperty(Project project, string name, string value)
- {
- if (project == null || String.IsNullOrEmpty(name) || project.Globals == null)
- {
- return;
- }
- if (!project.Globals.get_VariableExists(name) || (string)project.Globals[name] != value)
- {
- project.Globals[name] = value;
- if (!project.Globals.get_VariablePersists(name))
- {
- project.Globals.set_VariablePersists(name, true);
- }
- }
- }
-
- // As the add-in evolves the code changes, but users still have project files
- // created by previous versions. This method is called when projects are opened
- // to account for old project files and to move them to the current requirements.
- public static void fix(Project p)
- {
- // This variable was removed for 3.4.2.
- if (p.Globals.get_VariableExists("ZerocIce_HomeExpanded"))
- {
- p.Globals.set_VariablePersists("ZerocIce_HomeExpanded", false);
- }
-
- // This feature was made more general for 3.4.2.
- if (p.Globals.get_VariableExists("ZerocIce_ConsoleOutput"))
- {
- if (!p.Globals.get_VariableExists(PropertyVerboseLevel))
- {
- setProjectProperty(p, PropertyVerboseLevel, "0");
- if (getProjectPropertyAsBool(p, "ZerocIce_ConsoleOutput"))
- {
- setProjectProperty(p, PropertyVerboseLevel, "1");
- }
- }
- p.Globals.set_VariablePersists("ZerocIce_ConsoleOutput", false);
- }
- }
-
- public static String getPrecompileHeader(Project project)
- {
- if (!Util.isCppProject(project))
- {
- return "";
- }
- ConfigurationManager configManager = project.ConfigurationManager;
- Configuration activeConfig = (Configuration)configManager.ActiveConfiguration;
-
- VCProject vcProject = (VCProject)project.Object;
- IVCCollection configurations = (IVCCollection)vcProject.Configurations;
- String preCompiledHeader = "";
- foreach (VCConfiguration conf in configurations)
- {
- if (conf.Name != (activeConfig.ConfigurationName + "|" + activeConfig.PlatformName))
- {
- continue;
- }
- VCCLCompilerTool compilerTool =
- (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
- if (compilerTool == null)
- {
- break;
- }
- if (compilerTool.UsePrecompiledHeader == pchOption.pchCreateUsingSpecific ||
- compilerTool.UsePrecompiledHeader == pchOption.pchUseUsingSpecific)
- {
- preCompiledHeader = compilerTool.PrecompiledHeaderThrough;
- }
- }
- return preCompiledHeader;
- }
-
- public static ComponentList getIceCppComponents(Project project)
- {
- ComponentList components = new ComponentList();
- ConfigurationManager configManager = project.ConfigurationManager;
- Configuration activeConfig = (Configuration)configManager.ActiveConfiguration;
-
- VCProject vcProject = (VCProject)project.Object;
- IVCCollection configurations = (IVCCollection)vcProject.Configurations;
- foreach (VCConfiguration conf in configurations)
- {
- if (conf.Name != (activeConfig.ConfigurationName + "|" + activeConfig.PlatformName))
- {
- continue;
- }
-
- VCCLCompilerTool compilerTool =
- (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
- VCLinkerTool linkerTool = (VCLinkerTool)(((IVCCollection)conf.Tools).Item("VCLinkerTool"));
- if (linkerTool == null || compilerTool == null)
- {
- break;
- }
-
- if (String.IsNullOrEmpty(linkerTool.AdditionalDependencies))
- {
- break;
- }
-
- bool debug = false;
- if (!String.IsNullOrEmpty(compilerTool.PreprocessorDefinitions))
- {
- debug = (compilerTool.PreprocessorDefinitions.Contains("DEBUG") &&
- !compilerTool.PreprocessorDefinitions.Contains("NDEBUG"));
- }
-
- if (!debug)
- {
- debug = conf.Name.Contains("Debug");
- }
-
- List<string> componentNames = new List<string>(linkerTool.AdditionalDependencies.Split(' '));
- foreach (string s in componentNames)
- {
- if (String.IsNullOrEmpty(s))
- {
- continue;
- }
-
- int index = s.LastIndexOf('.');
- if (index <= 0)
- {
- continue;
- }
-
- string libName = s.Substring(0, index);
- if (debug)
- {
- libName = libName.Substring(0, libName.Length - 1);
- }
- if (String.IsNullOrEmpty(libName))
- {
- continue;
- }
-
- if (Array.BinarySearch(Util.getCppNames(), libName) < 0)
- {
- continue;
- }
- components.Add(libName.Trim());
- }
- }
- return components;
- }
-
- public static ComponentList getIceSilverlightComponents(Project project)
- {
- ComponentList components = new ComponentList();
- if (project == null)
- {
- return components;
- }
-
- VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;
- foreach (Reference r in vsProject.References)
- {
- if (Array.BinarySearch(Util.getSilverlightNames(), r.Name) < 0)
- {
- continue;
- }
-
- components.Add(r.Name);
- }
- return components;
- }
-
- public static ComponentList getIceDotNetComponents(Project project)
- {
- ComponentList components = new ComponentList();
- if (project == null)
- {
- return components;
- }
-
- VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;
- foreach (Reference r in vsProject.References)
- {
- if (Array.BinarySearch(Util.getDotNetNames(), r.Name) < 0)
- {
- continue;
- }
-
- components.Add(r.Name);
- }
- return components;
- }
-
- public static void addIceCppConfigurations(Project project, string iceHomeRaw)
- {
- if (!isCppProject(project))
- {
- return;
- }
-
- VCProject vcProject = (VCProject)project.Object;
- IVCCollection configurations = (IVCCollection)vcProject.Configurations;
- foreach (VCConfiguration conf in configurations)
- {
- if (conf != null)
- {
- bool x64 = false;
- VCPlatform platform = (VCPlatform)conf.Platform;
- String platformName = platform.Name;
- if (platformName.Equals("x64", StringComparison.CurrentCultureIgnoreCase) ||
- platformName.Equals("Itanium", StringComparison.CurrentCultureIgnoreCase))
- {
- x64 = true;
- }
- VCCLCompilerTool compilerTool =
- (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
- VCLinkerTool linkerTool = (VCLinkerTool)(((IVCCollection)conf.Tools).Item("VCLinkerTool"));
-
- Util.addIceCppEnviroment((VCDebugSettings)conf.DebugSettings, project, iceHomeRaw, x64);
- Util.addIceCppLibraryDir(linkerTool, project, iceHomeRaw, x64);
- Util.addCppIncludes(compilerTool, project, iceHomeRaw);
- }
- }
- }
-
- public static void removeIceCppConfigurations(Project project, string iceHomeRaw)
- {
- if (!isCppProject(project))
- {
- return;
- }
-
- VCProject vcProject = (VCProject)project.Object;
- IVCCollection configurations = (IVCCollection)vcProject.Configurations;
- foreach (VCConfiguration conf in configurations)
- {
- if (conf != null)
- {
- VCCLCompilerTool compilerTool =
- (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
- VCLinkerTool linkerTool = (VCLinkerTool)(((IVCCollection)conf.Tools).Item("VCLinkerTool"));
-
- Util.removeIceCppEnviroment((VCDebugSettings)conf.DebugSettings, iceHomeRaw);
- Util.removeIceCppLibraryDir(linkerTool, iceHomeRaw);
- Util.removeCppIncludes(compilerTool, iceHomeRaw);
- }
- }
- }
-
- public static void addIceCppLibs(Project project, ComponentList components)
- {
- if (!isCppProject(project))
- {
- return;
- }
-
- VCProject vcProject = (VCProject)project.Object;
- IVCCollection configurations = (IVCCollection)vcProject.Configurations;
-
- foreach (VCConfiguration conf in configurations)
- {
- if (conf != null)
- {
- VCCLCompilerTool compilerTool =
- (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
- VCLinkerTool linkerTool = (VCLinkerTool)(((IVCCollection)conf.Tools).Item("VCLinkerTool"));
-
- if (compilerTool == null || linkerTool == null)
- {
- continue;
- }
-
- bool debug = false;
- if (!String.IsNullOrEmpty(compilerTool.PreprocessorDefinitions))
- {
- debug = (compilerTool.PreprocessorDefinitions.Contains("DEBUG") &&
- !compilerTool.PreprocessorDefinitions.Contains("NDEBUG"));
- }
- if (!debug)
- {
- debug = conf.Name.Contains("Debug");
- }
- foreach (string component in components)
- {
- if (String.IsNullOrEmpty(component))
- {
- continue;
- }
- Util.addCppLib(linkerTool, component, debug);
- }
- }
- }
- }
-
- public static ComponentList removeIceCppLibs(Project project)
- {
- return Util.removeIceCppLibs(project, new ComponentList(Util.getCppNames()));
- }
-
- public static ComponentList removeIceCppLibs(Project project, ComponentList components)
- {
- ComponentList removed = new ComponentList();
- if (!isCppProject(project))
- {
- return removed;
- }
-
- VCProject vcProject = (VCProject)project.Object;
- IVCCollection configurations = (IVCCollection)vcProject.Configurations;
-
- foreach (VCConfiguration conf in configurations)
- {
- if (conf != null)
- {
- VCCLCompilerTool compilerTool =
- (VCCLCompilerTool)(((IVCCollection)conf.Tools).Item("VCCLCompilerTool"));
- VCLinkerTool linkerTool = (VCLinkerTool)(((IVCCollection)conf.Tools).Item("VCLinkerTool"));
-
- if (compilerTool == null || linkerTool == null)
- {
- continue;
- }
-
- bool debug = false;
- if (!String.IsNullOrEmpty(compilerTool.PreprocessorDefinitions))
- {
- debug = (compilerTool.PreprocessorDefinitions.Contains("DEBUG") &&
- !compilerTool.PreprocessorDefinitions.Contains("NDEBUG"));
- }
- if (!debug)
- {
- debug = conf.Name.Contains("Debug");
- }
-
- foreach (string s in components)
- {
- if (s != null)
- {
- if (Util.removeCppLib(linkerTool, s, debug) && !removed.Contains(s))
- {
- removed.Add(s);
- }
- }
- }
- }
- }
- return removed;
- }
-
- public static DTE getCurrentDTE()
- {
- return Connect.getCurrentDTE();
- }
-
- public static string subEnvironmentVars(string s)
- {
- string result = s;
- int beg = 0;
- int end = 0;
- while (beg < result.Length && (beg = result.IndexOf("$(", beg)) != -1 &&
- (end = result.IndexOf(")", beg)) != -1)
- {
- string variable = result.Substring(beg + "$(".Length, end - (beg + "$(".Length));
- string value = System.Environment.GetEnvironmentVariable(variable);
- if (value == null)
- {
- // Skip undefined vars.
- beg += "$(".Length + variable.Length + ")".Length;
- continue;
- }
- result = result.Replace("$(" + variable + ")", value);
- beg += value.Length;
- }
- return result;
- }
-
- public static bool containsEnvironmentVars(string s)
- {
- return s.Contains("$(");
- }
-
- public static string quote(string arg)
- {
- return "\"" + arg + "\"";
- }
-
- public static void verifyProjectSettings(Project project)
- {
- if (isCppProject(project))
- {
- addIceCppConfigurations(project, getIceHomeRaw(project, false));
- }
- else
- {
- string iceHome = getIceHome(project);
-
- string binDir = iceHome;
- foreach (string dir in _csBinDirs)
- {
- if (Directory.Exists(binDir + dir))
- {
- binDir += dir;
- break;
- }
- }
-
- ComponentList components = Util.getIceDotNetComponents(project);
- foreach (string component in components)
- {
- if (String.IsNullOrEmpty(component))
- {
- continue;
- }
-
-
- string reference = binDir + component + ".dll";
-
- foreach (Reference r in ((VSProject)project.Object).References)
- {
- if (r.Name.Equals(component, StringComparison.OrdinalIgnoreCase))
- {
- if(!r.Path.Equals(reference, StringComparison.OrdinalIgnoreCase))
- {
- bool copyLocal = getCopyLocal(project, component);
- Util.removeDotNetReference(project, component);
-
- Util.addDotNetReference(project, component, iceHome);
- setCopyLocal(project, component, copyLocal);
- }
- break;
- }
- }
- }
- }
- }
- }
-}