changeset 80:35501da90efe default tip

document OrthancPluginDicomConnection
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Nov 2025 21:08:59 +0100
parents 1a1ee5a8424c
children
files CodeGeneration/ClassDocumentation.json CodeGeneration/JavaCodeGeneration.py JavaSDK/CMakeLists.txt
diffstat 3 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/CodeGeneration/ClassDocumentation.json	Wed Nov 26 21:01:09 2025 +0100
+++ b/CodeGeneration/ClassDocumentation.json	Wed Nov 26 21:08:59 2025 +0100
@@ -1,4 +1,5 @@
 {
+  "OrthancPluginDicomConnection" : "The parameters of a DICOM connection",
   "OrthancPluginDicomInstance" : "DICOM instance managed by the Orthanc core",
   "OrthancPluginDicomWebNode" : "Node visited by DICOMweb conversion",
   "OrthancPluginFindAnswers" : "Answers to a DICOM C-FIND query",
--- a/CodeGeneration/JavaCodeGeneration.py	Wed Nov 26 21:01:09 2025 +0100
+++ b/CodeGeneration/JavaCodeGeneration.py	Wed Nov 26 21:08:59 2025 +0100
@@ -147,10 +147,7 @@
 
             with open(os.path.join(TARGET, '%s.java' % cls['short_name']), 'w') as g:
                 if not cls['name'] in classDocumentation:
-                    print('WARNING: No global documentation for class: %s' % cls['name'])
-                    documentation = ''
-                else:
-                    documentation = classDocumentation[cls['name']]
+                    raise Exception('No global documentation for class: %s' % cls['name'])
 
                 methods = []
                 for method in cls['wrapped_methods']:
@@ -163,5 +160,5 @@
                     'methods' : methods,
                     'constructors' : constructors,
                     'has_documentation' : True,
-                    'documentation' : documentation
+                    'documentation' : classDocumentation[cls['name']],
                 }))
--- a/JavaSDK/CMakeLists.txt	Wed Nov 26 21:01:09 2025 +0100
+++ b/JavaSDK/CMakeLists.txt	Wed Nov 26 21:08:59 2025 +0100
@@ -52,8 +52,12 @@
   --sdk ${ORTHANC_SDK}
   --model ${ORTHANC_CODE_MODEL}
   --target ${AUTOGENERATED_DIR}
+  RESULT_VARIABLE Failure
   )
 
+if (Failure)
+  message(FATAL_ERROR "Cannot auto-generate the Java wrapper")
+endif()
 
 
 #####################################################################