[mapguide-commits] r9794 - in sandbox/jng/vanilla_swig/Bindings: . src/Bindings/DotNet/PlatformBase src/Bindings/Java src/IMake

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Nov 19 04:46:33 PST 2020


Author: jng
Date: 2020-11-19 04:46:33 -0800 (Thu, 19 Nov 2020)
New Revision: 9794

Modified:
   sandbox/jng/vanilla_swig/Bindings/TODO.txt
   sandbox/jng/vanilla_swig/Bindings/src/Bindings/DotNet/PlatformBase/PlatformBaseApi.vcxproj
   sandbox/jng/vanilla_swig/Bindings/src/Bindings/Java/JavaApi.vcxproj
   sandbox/jng/vanilla_swig/Bindings/src/IMake/IMake.cpp
Log:
Update IMake to re-map exception documentation to output MgException with every possible exception code.

Also fix bad pre-build in PlatformBaseApi that caused MgMdfParser.dll to not be copied over, resulting in a nuget package with un-met native dependencies.

Modified: sandbox/jng/vanilla_swig/Bindings/TODO.txt
===================================================================
--- sandbox/jng/vanilla_swig/Bindings/TODO.txt	2020-11-19 11:28:37 UTC (rev 9793)
+++ sandbox/jng/vanilla_swig/Bindings/TODO.txt	2020-11-19 12:46:33 UTC (rev 9794)
@@ -24,11 +24,12 @@
    - [ ] Add SWIG preprocessor that controls whether the class id header should be included
    - [ ] Run SWIG in XML mode to produce an XML of the MapGuide API surface
    - [ ] Update ClassMapGen tool to generate class id files for .net/Java/PHP based on this XML file
- - [ ] Because we've flattened the exception hierarchy, IMake needs to rewrite \exception directives to say in [Java/C#] that it throws MgException with any of the following exception codes
+ - [x] Because we've flattened the exception hierarchy, IMake needs to rewrite \exception directives to say in [Java/C#] that it throws MgException with any of the following exception codes
  - Test Suite
    - [x] Sync up current test data under /UnitTest to match what is in GitHub repo
    - [x] Add test data setup script for .net/Java test suites to copy the synced up test data under /UnitTest to the location the test suite is expecting
- - Java binding are generated)
+ - Java binding
+   - [ ] Running javadoc against the generated sources produces many errors. See if we can fix them
    - [x] Verify test suite still passes (Windows)
    - [ ] Verify test suite still passes (Linux)
  - Migrate to SWIG 4.0.0 (https://github.com/jumpinjackie/mapguide-api-bindings/issues/36)

Modified: sandbox/jng/vanilla_swig/Bindings/src/Bindings/DotNet/PlatformBase/PlatformBaseApi.vcxproj
===================================================================
--- sandbox/jng/vanilla_swig/Bindings/src/Bindings/DotNet/PlatformBase/PlatformBaseApi.vcxproj	2020-11-19 11:28:37 UTC (rev 9793)
+++ sandbox/jng/vanilla_swig/Bindings/src/Bindings/DotNet/PlatformBase/PlatformBaseApi.vcxproj	2020-11-19 12:46:33 UTC (rev 9794)
@@ -63,7 +63,7 @@
 "..\..\..\Tools\swig\install\swig.exe" -c++ -csharp -DDOTNETCORE -DWIN32 -DSWIG_CSHARP_NO_EXCEPTION_HELPER -DSWIG_CSHARP_NO_STRING_HELPER -DSWIG_CSHARP_NO_WSTRING_HELPER -namespace OSGeo.MapGuide -nodefaultctor -nodefaultdtor -module PlatformBaseUnmanagedApi -o "$(ProjectDir)PlatformBaseUnmanagedApi_wrap.cpp" -outdir "$(ProjectDir)..\..\..\Managed\DotNet\OSGeo.MapGuide.PlatformBase" PlatformBaseApi.i
 del /Q ..\..\..\Managed\DotNet\OSGeo.MapGuide.PlatformBase\PlatformBaseUnmanagedApi.cs
 copy /Y "$(ProjectDir)..\..\..\..\..\Common\bin\$(Configuration)64\MgMdfModel*.*" "$(TargetDir)\native\"
-copy /Y "$(ProjectDir)..\..\..\..\..\Common\bin\$(Configuration)64\MgMdfModel*.*" "$(TargetDir)\native\"
+copy /Y "$(ProjectDir)..\..\..\..\..\Common\bin\$(Configuration)64\MgMdfParser*.*" "$(TargetDir)\native\"
 copy /Y "$(ProjectDir)..\..\..\..\..\Common\bin\$(Configuration)64\MgPlatformBase*.*" "$(TargetDir)\native\"
 </Command>
     </PreBuildEvent>
@@ -103,7 +103,7 @@
 "..\..\..\Tools\swig\install\swig.exe" -c++ -csharp -DDOTNETCORE -DWIN32 -DSWIG_CSHARP_NO_EXCEPTION_HELPER -DSWIG_CSHARP_NO_STRING_HELPER -DSWIG_CSHARP_NO_WSTRING_HELPER -namespace OSGeo.MapGuide -nodefaultctor -nodefaultdtor -module PlatformBaseUnmanagedApi -o "$(ProjectDir)PlatformBaseUnmanagedApi_wrap.cpp" -outdir "$(ProjectDir)..\..\..\Managed\DotNet\OSGeo.MapGuide.PlatformBase" PlatformBaseApi.i
 del /Q ..\..\..\Managed\DotNet\OSGeo.MapGuide.PlatformBase\PlatformBaseUnmanagedApi.cs
 copy /Y "$(ProjectDir)..\..\..\..\..\Common\bin\$(Configuration)64\MgMdfModel*.*" "$(TargetDir)\native\"
-copy /Y "$(ProjectDir)..\..\..\..\..\Common\bin\$(Configuration)64\MgMdfModel*.*" "$(TargetDir)\native\"
+copy /Y "$(ProjectDir)..\..\..\..\..\Common\bin\$(Configuration)64\MgMdfParser*.*" "$(TargetDir)\native\"
 copy /Y "$(ProjectDir)..\..\..\..\..\Common\bin\$(Configuration)64\MgPlatformBase*.*" "$(TargetDir)\native\"
 </Command>
     </PreBuildEvent>

Modified: sandbox/jng/vanilla_swig/Bindings/src/Bindings/Java/JavaApi.vcxproj
===================================================================
--- sandbox/jng/vanilla_swig/Bindings/src/Bindings/Java/JavaApi.vcxproj	2020-11-19 11:28:37 UTC (rev 9793)
+++ sandbox/jng/vanilla_swig/Bindings/src/Bindings/Java/JavaApi.vcxproj	2020-11-19 12:46:33 UTC (rev 9794)
@@ -95,6 +95,8 @@
 "$(JAVA_HOME)\bin\jar" cf $(SolutionDir)..\..\packages\Java\Release\x64\MapGuideApi.jar org\osgeo\mapguide\*.class
 echo Building -sources JAR file
 "$(JAVA_HOME)\bin\jar" cf  $(SolutionDir)..\..\packages\Java\Release\x64\MapGuideApi-sources.jar org\osgeo\mapguide\*.java
+rem echo Building javadoc
+rem "$(JAVA_HOME)\bin\javadoc" -d $(SolutionDir)..\..\packages\Java\Release\x64\html org\osgeo\mapguide\*.java
 popd</Command>
     </PostBuildEvent>
   </ItemDefinitionGroup>
@@ -141,6 +143,8 @@
 "$(JAVA_HOME)\bin\jar" cf $(SolutionDir)..\..\packages\Java\Release\x64\MapGuideApi.jar org\osgeo\mapguide\*.class
 echo Building -sources JAR file
 "$(JAVA_HOME)\bin\jar" cf  $(SolutionDir)..\..\packages\Java\Release\x64\MapGuideApi-sources.jar org\osgeo\mapguide\*.java
+rem echo Building javadoc
+rem "$(JAVA_HOME)\bin\javadoc" -d $(SolutionDir)..\..\packages\Java\Release\x64\html org\osgeo\mapguide\*.java
 popd</Command>
     </PostBuildEvent>
   </ItemDefinitionGroup>

Modified: sandbox/jng/vanilla_swig/Bindings/src/IMake/IMake.cpp
===================================================================
--- sandbox/jng/vanilla_swig/Bindings/src/IMake/IMake.cpp	2020-11-19 11:28:37 UTC (rev 9793)
+++ sandbox/jng/vanilla_swig/Bindings/src/IMake/IMake.cpp	2020-11-19 12:46:33 UTC (rev 9794)
@@ -13,7 +13,7 @@
     java
 };
 
-static char version[] = "1.5.2";
+static char version[] = "1.5.3";
 static char EXTERNAL_API_DOCUMENTATION[] = "(NOTE: This API is not officially supported and may be subject to removal in a future release without warning. Use with caution.)";
 
 static string module;
@@ -915,8 +915,8 @@
 
     if (exceptionParts.size() > 0) {
         for (size_t i = 0; i < exceptionParts.size(); i++) {
-            javaDoc.append(" * @exception ");
-            javaDoc.append(exceptionParts[i]);
+            javaDoc.append(" * @exception org.osgeo.mapguide.MgException with code ");
+            javaDoc.append(Trim(exceptionParts[i]));
             javaDoc.append("\n");
         }
     }
@@ -1119,10 +1119,13 @@
                 {
                     csharpDoc.append("///<exception cref=\"");
                     csharpDoc.append(nspace);
-                    csharpDoc.append(".");
+                    csharpDoc.append(".MgException\">");
                     if (eelems.size() > 1) {
+                        csharpDoc.append("with code (<see cref=\"");
+                        csharpDoc.append(nspace);
+                        csharpDoc.append(".MgExceptionCodes.");
                         csharpDoc.append(eelems[0]);
-                        csharpDoc.append("\">");
+                        csharpDoc.append("\" />) ");
                         for (size_t j = 1; j < eelems.size(); j++) {
                             csharpDoc.append(" ");
                             csharpDoc.append(eelems[j]);



More information about the mapguide-commits mailing list