With release 1.3.0 of giws (fixes some various issues) 98/4998/8
Sylvestre Ledru [Wed, 21 Sep 2011 12:46:07 +0000 (14:46 +0200)]
Use only one GiwsException declaration stored into the commons module

Change-Id: I9f8991e06f432219a1a11944e9c7b657938e6e5d

306 files changed:
scilab/Makefile.incl.am
scilab/libs/MALLOC/Makefile.in
scilab/libs/doublylinkedlist/Makefile.in
scilab/libs/dynamiclibrary/Makefile.in
scilab/libs/hashtable/Makefile.in
scilab/libs/libst/Makefile.in
scilab/modules/action_binding/Makefile.am
scilab/modules/action_binding/Makefile.in
scilab/modules/action_binding/sci_gateway/cpp/sci_notify.cpp
scilab/modules/action_binding/src/c/action_binding.vcxproj
scilab/modules/action_binding/src/c/action_binding.vcxproj.filters
scilab/modules/action_binding/src/jni/GiwsException.cpp [deleted file]
scilab/modules/action_binding/src/jni/GiwsException.hxx [deleted file]
scilab/modules/action_binding/src/jni/Signal.cpp
scilab/modules/action_binding/src/jni/Signal.hxx
scilab/modules/api_scilab/Makefile.in
scilab/modules/arnoldi/Makefile.in
scilab/modules/atoms/Makefile.in
scilab/modules/boolean/Makefile.in
scilab/modules/cacsd/Makefile.in
scilab/modules/call_scilab/Makefile.in
scilab/modules/commons/Makefile.am
scilab/modules/commons/Makefile.in
scilab/modules/commons/src/c/commons.vcxproj
scilab/modules/commons/src/c/commons.vcxproj.filters
scilab/modules/commons/src/jni/GiwsException.cpp [moved from scilab/modules/history_browser/src/jni/GiwsException.cpp with 67% similarity]
scilab/modules/commons/src/jni/GiwsException.hxx [moved from scilab/modules/history_browser/src/jni/GiwsException.hxx with 86% similarity]
scilab/modules/compatibility_functions/Makefile.in
scilab/modules/completion/Makefile.in
scilab/modules/console/Makefile.am
scilab/modules/console/Makefile.in
scilab/modules/console/src/c/console.vcxproj
scilab/modules/console/src/c/console.vcxproj.filters
scilab/modules/console/src/jni/CallScilabBridge.cpp
scilab/modules/console/src/jni/CallScilabBridge.hxx
scilab/modules/console/src/jni/GiwsException.cpp [deleted file]
scilab/modules/console/src/jni/GiwsException.hxx [deleted file]
scilab/modules/core/Makefile.in
scilab/modules/data_structures/Makefile.in
scilab/modules/demo_tools/Makefile.in
scilab/modules/development_tools/Makefile.in
scilab/modules/differential_equations/Makefile.in
scilab/modules/double/Makefile.in
scilab/modules/dynamic_link/Makefile.in
scilab/modules/elementary_functions/Makefile.in
scilab/modules/fftw/Makefile.in
scilab/modules/fileio/Makefile.in
scilab/modules/functions/Makefile.in
scilab/modules/genetic_algorithms/Makefile.in
scilab/modules/graph/Makefile.in
scilab/modules/graphic_export/Makefile.am
scilab/modules/graphic_export/Makefile.in
scilab/modules/graphic_export/graphic_export.vcxproj
scilab/modules/graphic_export/graphic_export.vcxproj.filters
scilab/modules/graphic_export/src/jni/FileExporter.cpp
scilab/modules/graphic_export/src/jni/FileExporter.hxx
scilab/modules/graphic_export/src/jni/GL2PSToJOGL.cpp
scilab/modules/graphic_export/src/jni/GL2PSToJOGL.hxx
scilab/modules/graphic_export/src/jni/GiwsException.cpp [deleted file]
scilab/modules/graphic_export/src/jni/GiwsException.hxx [deleted file]
scilab/modules/graphic_export/src/jni/JOGLConstant.cpp
scilab/modules/graphic_export/src/jni/JOGLConstant.hxx
scilab/modules/graphics/Makefile.in
scilab/modules/gui/Makefile.am
scilab/modules/gui/Makefile.in
scilab/modules/gui/sci_gateway/cpp/sci_about.cpp
scilab/modules/gui/sci_gateway/cpp/sci_displaytree.cpp
scilab/modules/gui/sci_gateway/cpp/sci_getinstalledlookandfeels.cpp
scilab/modules/gui/sci_gateway/cpp/sci_getlookandfeel.cpp
scilab/modules/gui/sci_gateway/cpp/sci_printfigure.cpp
scilab/modules/gui/sci_gateway/cpp/sci_printsetupbox.cpp
scilab/modules/gui/sci_gateway/cpp/sci_raise_window.cpp
scilab/modules/gui/sci_gateway/cpp/sci_setlookandfeel.cpp
scilab/modules/gui/sci_gateway/cpp/sci_uigetdir.cpp
scilab/modules/gui/sci_gateway/cpp/sci_uigetfile.cpp
scilab/modules/gui/sci_gateway/cpp/sci_uiputfile.cpp
scilab/modules/gui/sci_gateway/cpp/sci_usecanvas.cpp
scilab/modules/gui/src/c/gui.vcxproj
scilab/modules/gui/src/c/gui.vcxproj.filters
scilab/modules/gui/src/jni/CallScilabBridge.cpp
scilab/modules/gui/src/jni/CallScilabBridge.hxx
scilab/modules/gui/src/jni/GiwsException.cpp [deleted file]
scilab/modules/gui/src/jni/GiwsException.hxx [deleted file]
scilab/modules/gui/src/jni/Juigetfile.cpp
scilab/modules/gui/src/jni/Juigetfile.hxx
scilab/modules/gui/src/jni/Jxclick.cpp
scilab/modules/gui/src/jni/Jxclick.hxx
scilab/modules/gui/src/jni/Jxgetmouse.cpp
scilab/modules/gui/src/jni/Jxgetmouse.hxx
scilab/modules/gui/src/jni/LookAndFeelManager.cpp
scilab/modules/gui/src/jni/LookAndFeelManager.hxx
scilab/modules/gui/src/jni/ScilabDisplayTree.cpp
scilab/modules/gui/src/jni/ScilabDisplayTree.hxx
scilab/modules/gui/src/jni/UIElementMapper.cpp
scilab/modules/gui/src/jni/UIElementMapper.hxx
scilab/modules/hdf5/Makefile.am
scilab/modules/hdf5/Makefile.in
scilab/modules/hdf5/src/c/hdf5.vcxproj
scilab/modules/hdf5/src/c/hdf5.vcxproj.filters
scilab/modules/hdf5/src/jni/GiwsException.cpp [deleted file]
scilab/modules/hdf5/src/jni/GiwsException.hxx [deleted file]
scilab/modules/hdf5/src/jni/jhdf5load.cpp
scilab/modules/hdf5/src/jni/jhdf5load.hxx
scilab/modules/helptools/Makefile.am
scilab/modules/helptools/Makefile.in
scilab/modules/helptools/src/c/helptools.vcxproj
scilab/modules/helptools/src/c/helptools.vcxproj.filters
scilab/modules/helptools/src/jni/BuildDocObject.cpp
scilab/modules/helptools/src/jni/BuildDocObject.hxx
scilab/modules/helptools/src/jni/GiwsException.cpp [deleted file]
scilab/modules/helptools/src/jni/GiwsException.hxx [deleted file]
scilab/modules/helptools/src/jni/SciDocMain.cpp
scilab/modules/helptools/src/jni/SciDocMain.hxx
scilab/modules/history_browser/Makefile.am
scilab/modules/history_browser/Makefile.in
scilab/modules/history_browser/src/c/history_browser.vcxproj
scilab/modules/history_browser/src/c/history_browser.vcxproj.filters
scilab/modules/history_browser/src/jni/CommandHistory.cpp
scilab/modules/history_browser/src/jni/CommandHistory.hxx
scilab/modules/history_manager/Makefile.in
scilab/modules/integer/Makefile.in
scilab/modules/interpolation/Makefile.in
scilab/modules/intersci/Makefile.in
scilab/modules/io/Makefile.in
scilab/modules/javasci/Makefile.in
scilab/modules/jvm/Makefile.in
scilab/modules/linear_algebra/Makefile.in
scilab/modules/localization/Makefile.in
scilab/modules/m2sci/Makefile.in
scilab/modules/maple2scilab/Makefile.in
scilab/modules/matio/Makefile.in
scilab/modules/mexlib/Makefile.in
scilab/modules/modules_manager/Makefile.in
scilab/modules/optimization/Makefile.in
scilab/modules/output_stream/Makefile.in
scilab/modules/overloading/Makefile.in
scilab/modules/parallel/Makefile.in
scilab/modules/parameters/Makefile.in
scilab/modules/polynomials/Makefile.in
scilab/modules/randlib/Makefile.in
scilab/modules/renderer/Makefile.am
scilab/modules/renderer/Makefile.in
scilab/modules/renderer/renderer.vcxproj
scilab/modules/renderer/renderer.vcxproj.filters
scilab/modules/renderer/src/cpp/SetJavaProperty.cpp
scilab/modules/renderer/src/cpp/figureDrawing/FigureScilabCall.cpp
scilab/modules/renderer/src/cpp/rendererBasicAlgos.cpp
scilab/modules/renderer/src/jni/ArcFillDrawerGL.cpp
scilab/modules/renderer/src/jni/ArcFillDrawerGL.hxx
scilab/modules/renderer/src/jni/ArcLineDrawerGL.cpp
scilab/modules/renderer/src/jni/ArcLineDrawerGL.hxx
scilab/modules/renderer/src/jni/BackTrihedronDrawerGL.cpp
scilab/modules/renderer/src/jni/BackTrihedronDrawerGL.hxx
scilab/modules/renderer/src/jni/CenteredTextDrawerGL.cpp
scilab/modules/renderer/src/jni/CenteredTextDrawerGL.hxx
scilab/modules/renderer/src/jni/DrawableArcGL.cpp
scilab/modules/renderer/src/jni/DrawableArcGL.hxx
scilab/modules/renderer/src/jni/DrawableAxesGL.cpp
scilab/modules/renderer/src/jni/DrawableAxesGL.hxx
scilab/modules/renderer/src/jni/DrawableFecGL.cpp
scilab/modules/renderer/src/jni/DrawableFecGL.hxx
scilab/modules/renderer/src/jni/DrawableFigureGL.cpp
scilab/modules/renderer/src/jni/DrawableFigureGL.hxx
scilab/modules/renderer/src/jni/DrawableGrayplotGL.cpp
scilab/modules/renderer/src/jni/DrawableGrayplotGL.hxx
scilab/modules/renderer/src/jni/DrawablePolylineGL.cpp
scilab/modules/renderer/src/jni/DrawablePolylineGL.hxx
scilab/modules/renderer/src/jni/DrawableRectangleGL.cpp
scilab/modules/renderer/src/jni/DrawableRectangleGL.hxx
scilab/modules/renderer/src/jni/DrawableSegsGL.cpp
scilab/modules/renderer/src/jni/DrawableSegsGL.hxx
scilab/modules/renderer/src/jni/DrawableSubwinGL.cpp
scilab/modules/renderer/src/jni/DrawableSubwinGL.hxx
scilab/modules/renderer/src/jni/DrawableSurfaceGL.cpp
scilab/modules/renderer/src/jni/DrawableSurfaceGL.hxx
scilab/modules/renderer/src/jni/DrawableTextGL.cpp
scilab/modules/renderer/src/jni/DrawableTextGL.hxx
scilab/modules/renderer/src/jni/FecFacetDrawerGL.cpp
scilab/modules/renderer/src/jni/FecFacetDrawerGL.hxx
scilab/modules/renderer/src/jni/FecLineDrawerGL.cpp
scilab/modules/renderer/src/jni/FecLineDrawerGL.hxx
scilab/modules/renderer/src/jni/FilledTextDrawerGL.cpp
scilab/modules/renderer/src/jni/FilledTextDrawerGL.hxx
scilab/modules/renderer/src/jni/FullBoxDrawerGL.cpp
scilab/modules/renderer/src/jni/FullBoxDrawerGL.hxx
scilab/modules/renderer/src/jni/GiwsException.cpp [deleted file]
scilab/modules/renderer/src/jni/GiwsException.hxx [deleted file]
scilab/modules/renderer/src/jni/GraphicSynchronizerJava.cpp
scilab/modules/renderer/src/jni/GraphicSynchronizerJava.hxx
scilab/modules/renderer/src/jni/GridDrawerGL.cpp
scilab/modules/renderer/src/jni/GridDrawerGL.hxx
scilab/modules/renderer/src/jni/HalfBoxDrawerGL.cpp
scilab/modules/renderer/src/jni/HalfBoxDrawerGL.hxx
scilab/modules/renderer/src/jni/IsoViewCameraGL.cpp
scilab/modules/renderer/src/jni/IsoViewCameraGL.hxx
scilab/modules/renderer/src/jni/IsometricCameraGL.cpp
scilab/modules/renderer/src/jni/IsometricCameraGL.hxx
scilab/modules/renderer/src/jni/PolylineArrowDrawerGL.cpp
scilab/modules/renderer/src/jni/PolylineArrowDrawerGL.hxx
scilab/modules/renderer/src/jni/PolylineBarDrawerGL.cpp
scilab/modules/renderer/src/jni/PolylineBarDrawerGL.hxx
scilab/modules/renderer/src/jni/PolylineFillDrawerGL.cpp
scilab/modules/renderer/src/jni/PolylineFillDrawerGL.hxx
scilab/modules/renderer/src/jni/PolylineInterpColorDrawerGL.cpp
scilab/modules/renderer/src/jni/PolylineInterpColorDrawerGL.hxx
scilab/modules/renderer/src/jni/PolylineLineDrawerGL.cpp
scilab/modules/renderer/src/jni/PolylineLineDrawerGL.hxx
scilab/modules/renderer/src/jni/PolylineMarkDrawerGL.cpp
scilab/modules/renderer/src/jni/PolylineMarkDrawerGL.hxx
scilab/modules/renderer/src/jni/RectangleFillDrawerGL.cpp
scilab/modules/renderer/src/jni/RectangleFillDrawerGL.hxx
scilab/modules/renderer/src/jni/RectangleLineDrawerGL.cpp
scilab/modules/renderer/src/jni/RectangleLineDrawerGL.hxx
scilab/modules/renderer/src/jni/RectangleMarkDrawerGL.cpp
scilab/modules/renderer/src/jni/RectangleMarkDrawerGL.hxx
scilab/modules/renderer/src/jni/RenderingChecker.cpp
scilab/modules/renderer/src/jni/RenderingChecker.hxx
scilab/modules/renderer/src/jni/SegsArrowDrawerGL.cpp
scilab/modules/renderer/src/jni/SegsArrowDrawerGL.hxx
scilab/modules/renderer/src/jni/SegsLineDrawerGL.cpp
scilab/modules/renderer/src/jni/SegsLineDrawerGL.hxx
scilab/modules/renderer/src/jni/SegsMarkDrawerGL.cpp
scilab/modules/renderer/src/jni/SegsMarkDrawerGL.hxx
scilab/modules/renderer/src/jni/StandardTextDrawerGL.cpp
scilab/modules/renderer/src/jni/StandardTextDrawerGL.hxx
scilab/modules/renderer/src/jni/SubwinBackgroundDrawerGL.cpp
scilab/modules/renderer/src/jni/SubwinBackgroundDrawerGL.hxx
scilab/modules/renderer/src/jni/SurfaceFacetDrawerGL.cpp
scilab/modules/renderer/src/jni/SurfaceFacetDrawerGL.hxx
scilab/modules/renderer/src/jni/SurfaceLineDrawerGL.cpp
scilab/modules/renderer/src/jni/SurfaceLineDrawerGL.hxx
scilab/modules/renderer/src/jni/SurfaceMarkDrawerGL.cpp
scilab/modules/renderer/src/jni/SurfaceMarkDrawerGL.hxx
scilab/modules/renderer/src/jni/TicksDrawerGL.cpp
scilab/modules/renderer/src/jni/TicksDrawerGL.hxx
scilab/modules/renderer/src/jni/XlFontManager.cpp
scilab/modules/renderer/src/jni/XlFontManager.hxx
scilab/modules/scicos/Makefile.in
scilab/modules/scicos_blocks/Makefile.am
scilab/modules/scicos_blocks/Makefile.in
scilab/modules/scicos_blocks/src/c/scicos_blocks.vcxproj
scilab/modules/scicos_blocks/src/c/scicos_blocks.vcxproj.filters
scilab/modules/scicos_blocks/src/cpp/affich2.cpp
scilab/modules/scicos_blocks/src/jni/AfficheBlock.cpp
scilab/modules/scicos_blocks/src/jni/AfficheBlock.hxx
scilab/modules/scicos_blocks/src/jni/GiwsException.cpp [deleted file]
scilab/modules/scicos_blocks/src/jni/GiwsException.hxx [deleted file]
scilab/modules/scinotes/Makefile.am
scilab/modules/scinotes/Makefile.in
scilab/modules/scinotes/sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
scilab/modules/scinotes/sci_gateway/cpp/sci_scinotes.cpp
scilab/modules/scinotes/src/c/scinotes.vcxproj
scilab/modules/scinotes/src/c/scinotes.vcxproj.filters
scilab/modules/scinotes/src/jni/GiwsException.cpp [deleted file]
scilab/modules/scinotes/src/jni/GiwsException.hxx [deleted file]
scilab/modules/scinotes/src/jni/SciNotes.cpp
scilab/modules/scinotes/src/jni/SciNotes.hxx
scilab/modules/signal_processing/Makefile.in
scilab/modules/simulated_annealing/Makefile.in
scilab/modules/sound/Makefile.in
scilab/modules/sparse/Makefile.in
scilab/modules/special_functions/Makefile.in
scilab/modules/spreadsheet/Makefile.in
scilab/modules/statistics/Makefile.in
scilab/modules/string/Makefile.in
scilab/modules/symbolic/Makefile.in
scilab/modules/tclsci/Makefile.in
scilab/modules/texmacs/Makefile.in
scilab/modules/time/Makefile.in
scilab/modules/types/Makefile.in
scilab/modules/ui_data/Makefile.am
scilab/modules/ui_data/Makefile.in
scilab/modules/ui_data/src/c/ui_data.vcxproj
scilab/modules/ui_data/src/c/ui_data.vcxproj.filters
scilab/modules/ui_data/src/jni/BrowseVar.cpp
scilab/modules/ui_data/src/jni/BrowseVar.hxx
scilab/modules/ui_data/src/jni/EditVar.cpp
scilab/modules/ui_data/src/jni/EditVar.hxx
scilab/modules/ui_data/src/jni/GiwsException.cpp [deleted file]
scilab/modules/ui_data/src/jni/GiwsException.hxx [deleted file]
scilab/modules/umfpack/Makefile.in
scilab/modules/windows_tools/Makefile.in
scilab/modules/xcos/Makefile.am
scilab/modules/xcos/Makefile.in
scilab/modules/xcos/sci_gateway/cpp/sci_closeXcosFromScilab.cpp
scilab/modules/xcos/sci_gateway/cpp/sci_xcosConfigureXmlFile.cpp
scilab/modules/xcos/sci_gateway/cpp/sci_xcosDiagramToHDF5.cpp
scilab/modules/xcos/sci_gateway/cpp/sci_xcosPalCategoryAdd.cpp
scilab/modules/xcos/sci_gateway/cpp/sci_xcosPalDelete.cpp
scilab/modules/xcos/sci_gateway/cpp/sci_xcosPalDisable.cpp
scilab/modules/xcos/sci_gateway/cpp/sci_xcosPalEnable.cpp
scilab/modules/xcos/sci_gateway/cpp/sci_xcosPalGenerateIcon.cpp
scilab/modules/xcos/sci_gateway/cpp/sci_xcosPalLoad.cpp
scilab/modules/xcos/sci_gateway/cpp/sci_xcosPalMove.cpp
scilab/modules/xcos/src/c/xcos.vcxproj
scilab/modules/xcos/src/c/xcos.vcxproj.filters
scilab/modules/xcos/src/cpp/callxcos.cpp
scilab/modules/xcos/src/jni/GiwsException.cpp [deleted file]
scilab/modules/xcos/src/jni/GiwsException.hxx [deleted file]
scilab/modules/xcos/src/jni/Modelica.cpp
scilab/modules/xcos/src/jni/Modelica.hxx
scilab/modules/xcos/src/jni/Palette.cpp
scilab/modules/xcos/src/jni/Palette.hxx
scilab/modules/xcos/src/jni/Xcos.cpp
scilab/modules/xcos/src/jni/Xcos.hxx
scilab/modules/xml/Makefile.in

index 00aea38..a6e47c5 100644 (file)
@@ -79,7 +79,6 @@ swig: $(SWIG_WRAPPERS)
 endif
 
 if GIWS
-
 # If the user request for the SWIG generation of the wrappers Java => C/C++ 
 # We call the target swig-build on the variable SWIG_WRAPPERS
 
@@ -93,6 +92,12 @@ giws: $(GIWS_WRAPPERS)
                done; \
        fi
 
+## build GIWS Exception
+giws-exception:
+       @GIWS_OUTPUTDIR=src/jni/;\
+       echo "GIWS: Generation of exception class ..."; \
+       $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 endif
 
 
index c682378..440c05f 100644 (file)
@@ -872,6 +872,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 259c3b2..8e31180 100644 (file)
@@ -855,6 +855,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index c614c3b..5442330 100644 (file)
@@ -857,6 +857,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index e515c84..556e1eb 100644 (file)
@@ -852,6 +852,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index cba01f3..22dbb15 100644 (file)
@@ -814,6 +814,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 3fb836d..b8eccc9 100644 (file)
@@ -17,8 +17,7 @@ ACTION_BINDING_C_SOURCES = src/c/InterpreterManagement.c
 
 # List of the c++ file
 ACTION_BINDING_CPP_SOURCES = src/jni/Signal.cpp \
-src/jni/Signal.hxx \
-src/jni/GiwsException.cpp
+src/jni/Signal.hxx
 
 # List of the gateway c files
 CONSOLE_C_JNI_SOURCES = src/jni/InterpreterManagement_wrap.c
@@ -63,6 +62,7 @@ libsciaction_binding_la_CPPFLAGS=     $(JAVA_JNI_INCLUDE) \
 -I$(top_srcdir)/libs/MALLOC/includes/ \
 -I$(top_srcdir)/modules/jvm/includes/ \
 -I$(top_srcdir)/modules/api_scilab/includes \
+-I$(top_srcdir)/modules/commons/src/jni/ \
 -I$(top_srcdir)/modules/output_stream/includes
 
 # Name of the future library (.la will be replace by .so, .a, etc regarding
index 012b354..9ffe655 100644 (file)
@@ -118,11 +118,9 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
 libsciaction_binding_algo_la_LIBADD =
 am__libsciaction_binding_algo_la_SOURCES_DIST =  \
        src/c/InterpreterManagement.c src/jni/Signal.cpp \
-       src/jni/Signal.hxx src/jni/GiwsException.cpp \
-       src/jni/InterpreterManagement_wrap.c
+       src/jni/Signal.hxx src/jni/InterpreterManagement_wrap.c
 @GUI_TRUE@am__objects_1 = libsciaction_binding_algo_la-InterpreterManagement.lo
-@GUI_TRUE@am__objects_2 = libsciaction_binding_algo_la-Signal.lo \
-@GUI_TRUE@     libsciaction_binding_algo_la-GiwsException.lo
+@GUI_TRUE@am__objects_2 = libsciaction_binding_algo_la-Signal.lo
 @GUI_TRUE@am__objects_3 = libsciaction_binding_algo_la-InterpreterManagement_wrap.lo
 am_libsciaction_binding_algo_la_OBJECTS = $(am__objects_1) \
        $(am__objects_2) $(am__objects_3)
@@ -442,8 +440,7 @@ top_srcdir = @top_srcdir@
 
 # List of the c++ file
 @GUI_TRUE@ACTION_BINDING_CPP_SOURCES = src/jni/Signal.cpp \
-@GUI_TRUE@src/jni/Signal.hxx \
-@GUI_TRUE@src/jni/GiwsException.cpp
+@GUI_TRUE@src/jni/Signal.hxx
 
 
 # List of the gateway c files
@@ -480,6 +477,7 @@ libsciaction_binding_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
 -I$(top_srcdir)/libs/MALLOC/includes/ \
 -I$(top_srcdir)/modules/jvm/includes/ \
 -I$(top_srcdir)/modules/api_scilab/includes \
+-I$(top_srcdir)/modules/commons/src/jni/ \
 -I$(top_srcdir)/modules/output_stream/includes
 
 
@@ -665,7 +663,6 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciaction_binding_algo_la-GiwsException.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciaction_binding_algo_la-InterpreterManagement.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciaction_binding_algo_la-InterpreterManagement_wrap.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciaction_binding_algo_la-Signal.Plo@am__quote@
@@ -750,13 +747,6 @@ libsciaction_binding_algo_la-Signal.lo: src/jni/Signal.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciaction_binding_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libsciaction_binding_algo_la-Signal.lo `test -f 'src/jni/Signal.cpp' || echo '$(srcdir)/'`src/jni/Signal.cpp
 
-libsciaction_binding_algo_la-GiwsException.lo: src/jni/GiwsException.cpp
-@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciaction_binding_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libsciaction_binding_algo_la-GiwsException.lo -MD -MP -MF $(DEPDIR)/libsciaction_binding_algo_la-GiwsException.Tpo -c -o libsciaction_binding_algo_la-GiwsException.lo `test -f 'src/jni/GiwsException.cpp' || echo '$(srcdir)/'`src/jni/GiwsException.cpp
-@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libsciaction_binding_algo_la-GiwsException.Tpo $(DEPDIR)/libsciaction_binding_algo_la-GiwsException.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/jni/GiwsException.cpp' object='libsciaction_binding_algo_la-GiwsException.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciaction_binding_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libsciaction_binding_algo_la-GiwsException.lo `test -f 'src/jni/GiwsException.cpp' || echo '$(srcdir)/'`src/jni/GiwsException.cpp
-
 libsciaction_binding_la-sci_notify.lo: sci_gateway/cpp/sci_notify.cpp
 @am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciaction_binding_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libsciaction_binding_la-sci_notify.lo -MD -MP -MF $(DEPDIR)/libsciaction_binding_la-sci_notify.Tpo -c -o libsciaction_binding_la-sci_notify.lo `test -f 'sci_gateway/cpp/sci_notify.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_notify.cpp
 @am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libsciaction_binding_la-sci_notify.Tpo $(DEPDIR)/libsciaction_binding_la-sci_notify.Plo
@@ -1104,6 +1094,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index ba29205..4ee33fb 100644 (file)
@@ -27,99 +27,101 @@ extern "C"
 }
 /*--------------------------------------------------------------------------*/
 using namespace org_scilab_modules_action_binding_utils;
+
 /*--------------------------------------------------------------------------*/
-int sci_notify(char *fname,unsigned long fname_len)
+int sci_notify(char *fname, unsigned long fname_len)
 {
-       CheckRhs(1,1);
-       CheckLhs(0,1);
-
-       int m1 = 0, n1 = 0;
-       int *piAddressVarOne = NULL;
-       char **pStVarOne = NULL;
-       int *lenStVarOne = NULL;
-       int iType = 0;
-       SciErr sciErr;
-
-       sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
-       if(sciErr.iErr)
-       {
-               printError(&sciErr, 0);
-               return 0;
-       }
-
-       sciErr = getVarType(pvApiCtx, piAddressVarOne, &iType);
-       if(sciErr.iErr)
-       {
-               printError(&sciErr, 0);
-               return 0;
-       }
-
-       if ( iType != sci_strings )
-       {
-               Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 1);
-               return 0;
-       }
-
-       /* get dimensions */
-       sciErr = getMatrixOfString(pvApiCtx, piAddressVarOne, &m1, &n1, lenStVarOne, pStVarOne);
-       if(sciErr.iErr)
-       {
-               printError(&sciErr, 0);
-               return 0;
-       }
-
-       if ( m1 * n1 != 1 )
-       {
-               Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 1);
-               return 0;
-       }
-
-       lenStVarOne = (int*)MALLOC(sizeof(int));
-       if (lenStVarOne == NULL)
-       {
-               Scierror(999, _("%s: No more memory.\n"), fname);
-               return 0;
-       }
-
-       /* get lengths */
-       sciErr = getMatrixOfString(pvApiCtx, piAddressVarOne, &m1, &n1, lenStVarOne, pStVarOne);
-       if(sciErr.iErr)
-       {
-               printError(&sciErr, 0);
-               return 0;
-       }
-
-       pStVarOne = (char **)MALLOC(sizeof(char*));
-       if (pStVarOne == NULL)
-       {
-               Scierror(999, _("%s: No more memory.\n"), fname);
-               return 0;
-       }
-
-       pStVarOne[0] = (char*)MALLOC(sizeof(char*) * (lenStVarOne[0] + 1));
-
-       /* get strings */
-       sciErr = getMatrixOfString(pvApiCtx, piAddressVarOne, &m1, &n1, lenStVarOne, pStVarOne);
-       if (sciErr.iErr)
-       {
-               printError(&sciErr, 0);
-               return 0;
-       }
-
-       try
-       {
-           Signal::notify(getScilabJavaVM(), pStVarOne[0]);
-       }
-       catch (const GiwsException::JniException & e)
-       {
-           Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
-           return 0;
-       }
-
-       freeArrayOfString(pStVarOne, 1);
-
-       LhsVar(1) = 0;
-       PutLhsVar();
-       return 0;
+    CheckRhs(1, 1);
+    CheckLhs(0, 1);
+
+    int m1 = 0, n1 = 0;
+    int *piAddressVarOne = NULL;
+    char **pStVarOne = NULL;
+    int *lenStVarOne = NULL;
+    int iType = 0;
+    SciErr sciErr;
+
+    sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddressVarOne);
+    if (sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    }
+
+    sciErr = getVarType(pvApiCtx, piAddressVarOne, &iType);
+    if (sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    }
+
+    if (iType != sci_strings)
+    {
+        Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 1);
+        return 0;
+    }
+
+    /* get dimensions */
+    sciErr = getMatrixOfString(pvApiCtx, piAddressVarOne, &m1, &n1, lenStVarOne, pStVarOne);
+    if (sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    }
+
+    if (m1 * n1 != 1)
+    {
+        Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 1);
+        return 0;
+    }
+
+    lenStVarOne = (int *)MALLOC(sizeof(int));
+    if (lenStVarOne == NULL)
+    {
+        Scierror(999, _("%s: No more memory.\n"), fname);
+        return 0;
+    }
+
+    /* get lengths */
+    sciErr = getMatrixOfString(pvApiCtx, piAddressVarOne, &m1, &n1, lenStVarOne, pStVarOne);
+    if (sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    }
+
+    pStVarOne = (char **)MALLOC(sizeof(char *));
+    if (pStVarOne == NULL)
+    {
+        Scierror(999, _("%s: No more memory.\n"), fname);
+        return 0;
+    }
+
+    pStVarOne[0] = (char *)MALLOC(sizeof(char *) * (lenStVarOne[0] + 1));
+
+    /* get strings */
+    sciErr = getMatrixOfString(pvApiCtx, piAddressVarOne, &m1, &n1, lenStVarOne, pStVarOne);
+    if (sciErr.iErr)
+    {
+        printError(&sciErr, 0);
+        return 0;
+    }
+
+    try
+    {
+        Signal::notify(getScilabJavaVM(), pStVarOne[0]);
+    }
+    catch(const GiwsException::JniException & e)
+    {
+        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
+        return 0;
+    }
+
+    freeArrayOfString(pStVarOne, 1);
+
+    LhsVar(1) = 0;
+    PutLhsVar();
+    return 0;
 }
+
 /*--------------------------------------------------------------------------*/
index c6051b9..a433428 100644 (file)
@@ -81,7 +81,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../../commons/src/jni/;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;ACTION_BINDING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -90,6 +90,7 @@
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -124,7 +125,7 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../../commons/src/jni/;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;ACTION_BINDING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -133,6 +134,7 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -167,7 +169,7 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../../commons/src/jni/;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;ACTION_BINDING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -177,6 +179,7 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -217,7 +220,7 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../../commons/src/jni/;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;ACTION_BINDING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -227,6 +230,7 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -261,7 +265,6 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
   </ItemDefinitionGroup>
   <ItemGroup>
     <ClCompile Include="DllmainAction_Binding.c" />
-    <ClCompile Include="..\jni\GiwsException.cpp" />
     <ClCompile Include="..\..\sci_gateway\c\gw_action_binding.c" />
     <ClCompile Include="InterpreterManagement.c" />
     <ClCompile Include="..\jni\InterpreterManagement_wrap.c" />
@@ -270,7 +273,6 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\includes\dynlib_action_binding.h" />
-    <ClInclude Include="..\jni\GiwsException.hxx" />
     <ClInclude Include="InterpreterManagement.h" />
     <ClInclude Include="..\jni\Signal.hxx" />
   </ItemGroup>
@@ -304,6 +306,9 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
       <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
+    <ProjectReference Include="..\..\..\commons\src\c\commons.vcxproj">
+      <Project>{eca09a1e-6d12-4a47-92e1-a671c181df77}</Project>
+    </ProjectReference>
     <ProjectReference Include="..\..\..\jvm\libjvm.vcxproj">
       <Project>{8ba2dda8-bd04-4d4d-8ee6-6caa955f7470}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
index 2d00de4..6af6754 100644 (file)
@@ -29,9 +29,6 @@
     <ClCompile Include="DllmainAction_Binding.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\jni\GiwsException.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\sci_gateway\c\gw_action_binding.c">
       <Filter>Source Files</Filter>
     </ClCompile>
@@ -52,9 +49,6 @@
     <ClInclude Include="..\..\includes\dynlib_action_binding.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\jni\GiwsException.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="InterpreterManagement.h">
       <Filter>Header Files</Filter>
     </ClInclude>
diff --git a/scilab/modules/action_binding/src/jni/GiwsException.cpp b/scilab/modules/action_binding/src/jni/GiwsException.cpp
deleted file mode 100644 (file)
index 7355cce..0000000
+++ /dev/null
@@ -1,354 +0,0 @@
-/* Generated by GIWS (version 1.0.4) */
-/*
-
-Copyright 2007-2008 INRIA
-
-Author : Sylvestre Ledru & others
-
-This software is a computer program whose purpose is to hide the complexity
-of accessing Java objects/methods from C++ code.
-
-This software is governed by the CeCILL-B license under French law and
-abiding by the rules of distribution of free software.  You can  use, 
-modify and/ or redistribute the software under the terms of the CeCILL-B
-license as circulated by CEA, CNRS and INRIA at the following URL
-"http://www.cecill.info". 
-
-As a counterpart to the access to the source code and  rights to copy,
-modify and redistribute granted by the license, users are provided only
-with a limited warranty  and the software's author,  the holder of the
-economic rights,  and the successive licensors  have only  limited
-liability. 
-
-In this respect, the user's attention is drawn to the risks associated
-with loading,  using,  modifying and/or developing or reproducing the
-software by the user in light of its specific status of free software,
-that may mean  that it is complicated to manipulate,  and  that  also
-therefore means  that it is reserved for developers  and  experienced
-professionals having in-depth computer knowledge. Users are therefore
-encouraged to load and test the software's suitability as regards their
-requirements in conditions enabling the security of their systems and/or 
-data to be ensured and,  more generally, to use and operate it in the 
-same conditions as regards security. 
-
-The fact that you are presently reading this means that you have had
-knowledge of the CeCILL-B license and that you accept its terms.
-*/
-
-#include "GiwsException.hxx" 
-namespace GiwsException {
-
-
-
-/**
-* Each subclass of JniExcpetion should call the super constructor
-* and the setErrorMessage function to set the message.
-* @param curEnv java envirnonment where the exception occured.
-*/
-JniException::JniException(JNIEnv * curEnv) throw() : exception()
-{
-// retrieve information about the exception
-javaException = curEnv->ExceptionOccurred();
-/* Clear the Java Exception to avoid calling it again & again */
-curEnv->ExceptionClear();
-m_oJavaMessage = this->retrieveExceptionMessage(curEnv);
-m_oJavaStackTrace = this->retrieveStackTrace(curEnv);
-m_oJavaExceptionName = this->retrieveExceptionName(curEnv);
-
-// by default JniExceptions display teh stack trace
-setErrorMessage(m_oJavaMessage + "\n" + m_oJavaStackTrace);
-curEnv->DeleteLocalRef(javaException);
-closeException(curEnv);
-}
-
-JniException::~JniException(void) throw()
-{
-m_oErrorMessage.clear();
-}
-
-/**
-* @return a description of the exception
-*/
-const char * JniException::what(void) const throw()
-{
-return m_oErrorMessage.c_str();
-}
-
-/**
-* @return Java description of the exception.
-*/
-std::string JniException::getJavaDescription(void) const throw()
-{
-return m_oJavaMessage;
-}
-
-/**
-* @return Java stack trace where the exception occured.
-*/
-std::string JniException::getJavaStackTrace(void) const throw()
-{
-return m_oJavaStackTrace;
-}
-
-/**
-* Get the name of the exception (ie its class name).
-*/
-std::string JniException::getJavaExceptionName(void) const throw()
-{
-return m_oJavaExceptionName;
-}
-
-
-/**
-* Set the error message that the exception should print.
-*/
-void JniException::setErrorMessage(const std::string & errorMessage)
-{
-m_oErrorMessage = errorMessage;
-}
-
-/**
-* Get the message that the exception will print.
-*/
-std::string JniException::getErrorMessage(void) const
-{
-return m_oErrorMessage;
-}
-
-/**
-* @return error message of the exception.
-*/
-std::string JniException::retrieveExceptionMessage(JNIEnv * curEnv)
-{
-// return the result of the getLocalizedMessage method
-
-// retrieve information from the exception.
-// get method id
-jmethodID getLocalizedMessageId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException),
-                                               "getLocalizedMessage",
-                                               "()Ljava/lang/String;");
-
-// call getLocalizedMessage
-jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocalizedMessageId);
-
-    if (description == NULL)
-    {
-      return "";
-    }
-
-    std::string res = convertJavaString(curEnv, description);
-
-    // release java ressources
-    curEnv->DeleteLocalRef(description);
-
-    return res;
-  }
-
-  /**
-   * @return full stack trace when the exception occured.
-   */
-  std::string JniException::retrieveStackTrace(JNIEnv * curEnv)
-  {
-
-
-    // return the result of the getStackTrace method
-
-    // retrieve information from the exception.
-    // get method id
-    // getStackTrace returns an array of StackTraceElement
-    jmethodID getStackTraceId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException),
-                                                    "getStackTrace",
-                                                    "()[Ljava/lang/StackTraceElement;");
-
-    // call getStackTrace
-    jobjectArray stackTrace = (jobjectArray) curEnv->CallObjectMethod(javaException, getStackTraceId);
-
-    if (stackTrace == NULL)
-    {
-      return "";
-    }
-
-    // get length of the array
-    jsize stackTraceLength = curEnv->GetArrayLength(stackTrace);
-    std::string res = "";
-
-    // get toString methodId of StackTraceElement class
-    jclass stackTraceElementClass = curEnv->FindClass("java/lang/StackTraceElement");
-    jmethodID toStringId = curEnv->GetMethodID(stackTraceElementClass, "toString", "()Ljava/lang/String;");
-
-    for (jsize i = 0; i < stackTraceLength; i++)
-    {
-      // add the result of toString method of each element in the result
-      jobject curStackTraceElement = curEnv->GetObjectArrayElement(stackTrace, i);
-
-      // call to string on the object
-      jstring stackElementString = (jstring) curEnv->CallObjectMethod(curStackTraceElement, toStringId);
-
-      if (stackElementString == NULL)
-      {
-        curEnv->DeleteLocalRef(stackTraceElementClass);
-        curEnv->DeleteLocalRef(stackTrace);
-        curEnv->DeleteLocalRef(curStackTraceElement);
-        return res;
-      }
-
-      // add a line to res
-      res += " at " + convertJavaString(curEnv, stackElementString) + "\n";
-
-      curEnv->DeleteLocalRef(curStackTraceElement);
-      curEnv->DeleteLocalRef(stackElementString);
-    }
-
-    // release java ressources
-    curEnv->DeleteLocalRef(stackTraceElementClass);
-    curEnv->DeleteLocalRef(stackTrace);
-
-
-    return res;
-  }
-
-  /**
-   * @return string containing the name of the exception (ie its class name).
-   */
-  std::string JniException::retrieveExceptionName(JNIEnv * curEnv)
-  {
-
-    // then get its class
-    jclass exceptionClass = curEnv->GetObjectClass(javaException);
-
-    // get the Class class
-    // we could also use curEnv->FindClass("Class");
-    jclass classClass = curEnv->GetObjectClass(exceptionClass);
-
-    // get the getName method
-    jmethodID getNameId = curEnv->GetMethodID(classClass, "getName", "()Ljava/lang/String;");
-
-    // call the getName function
-    jstring javaName = (jstring) curEnv->CallObjectMethod(exceptionClass, getNameId);
-
-    if (javaName == NULL)
-    {
-      return "";
-    }
-
-    std::string res = convertJavaString(curEnv, javaName);
-
-    // release java ressources
-    curEnv->DeleteLocalRef(exceptionClass);
-    curEnv->DeleteLocalRef(classClass);
-    curEnv->DeleteLocalRef(javaName);
-
-    return res;
-  }
-
-  /**
-   * To be called when all the information about the exceptions have been
-   * retrived.
-   * Remove the exception from the environment.
-   */
-  void JniException::closeException(JNIEnv * curEnv)
-  {
-    // remove the exception from the environment
-    // Beware, the exception is no longer reachable
-    curEnv->ExceptionClear();
-  }
-
-  /**
-   * Convert a Java string (jstring) into a C++ string
-   */
-  std::string JniException::convertJavaString(JNIEnv * curEnv, jstring javaString)
-  {
-    // get a pointer on a C string
-    const char * tempString = curEnv->GetStringUTFChars(javaString, 0);
-
-    // convert the C string into a C++ string
-    std::string res(tempString);
-
-    // release pointer
-    curEnv->ReleaseStringUTFChars(javaString, tempString);
-
-    return res;
-  }
-
-
-  /**
-  * Exception that should be thrown when allocation of Java ressources from C++
-  * code fails (sur as NewDoubleArray or NewStringUTF).
-  */
-  
-  JniBadAllocException::JniBadAllocException(JNIEnv * curEnv) throw() : JniException(curEnv)
-  {
-  std::string message = "Error no more memory.";
-  setErrorMessage(message);
-  }
-  
-  JniBadAllocException::~JniBadAllocException(void) throw() {}
-
-
-  /**
-  * Exception that should be thrown when a call to a Java method
-  * using Jni throw an exception.
-  * If possible, user should try to avoid this sitution because of the loss
-  * of information.
-  */
-  
-  /**
-  * @param curEnv java environment where the exception occured.
-  */
-  JniCallMethodException::JniCallMethodException(JNIEnv * curEnv) throw() : JniException(curEnv)
-  {
-  std::string errorMessage = "Exception when calling Java method : ";
-  errorMessage += getJavaDescription() + "\n" + getJavaStackTrace();
-  errorMessage += what();
-  setErrorMessage(errorMessage);
-  }
-  
-  JniCallMethodException::~JniCallMethodException(void) throw() {}
-  /**
-  * @param className name of the class which haven't been found
-  */
-  JniClassNotFoundException::JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Could not get the Class " + className + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniClassNotFoundException::~JniClassNotFoundException(void) throw() {}
-
-  /**
-   * @param className name of the method which haven't been found
-   */
-  JniMethodNotFoundException::JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Could not access to the method " + methodName + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniMethodNotFoundException::~JniMethodNotFoundException(void) throw() {}
-  
-  /**
-   * @param curEnv java envirnonment where the exception occured.
-   */
-  JniObjectCreationException::JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Could not instantiate the object " + className + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniObjectCreationException::~JniObjectCreationException(void) throw() {}
-
-  /**
-   * @param curEnv java envirnonment where the exception occured.
-   */
-  JniMonitorException::JniMonitorException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Error in the access (Enter or exit) or a Java env monitor of class " + className + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniMonitorException::~JniMonitorException(void) throw() {}
-
-
-
-}
-
diff --git a/scilab/modules/action_binding/src/jni/GiwsException.hxx b/scilab/modules/action_binding/src/jni/GiwsException.hxx
deleted file mode 100644 (file)
index cdde15a..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/* Generated by GIWS (version 1.0.4) */
-/*
-
-Copyright 2007-2008 INRIA
-
-Author : Sylvestre Ledru & others
-
-This software is a computer program whose purpose is to hide the complexity
-of accessing Java objects/methods from C++ code.
-
-This software is governed by the CeCILL-B license under French law and
-abiding by the rules of distribution of free software.  You can  use, 
-modify and/ or redistribute the software under the terms of the CeCILL-B
-license as circulated by CEA, CNRS and INRIA at the following URL
-"http://www.cecill.info". 
-
-As a counterpart to the access to the source code and  rights to copy,
-modify and redistribute granted by the license, users are provided only
-with a limited warranty  and the software's author,  the holder of the
-economic rights,  and the successive licensors  have only  limited
-liability. 
-
-In this respect, the user's attention is drawn to the risks associated
-with loading,  using,  modifying and/or developing or reproducing the
-software by the user in light of its specific status of free software,
-that may mean  that it is complicated to manipulate,  and  that  also
-therefore means  that it is reserved for developers  and  experienced
-professionals having in-depth computer knowledge. Users are therefore
-encouraged to load and test the software's suitability as regards their
-requirements in conditions enabling the security of their systems and/or 
-data to be ensured and,  more generally, to use and operate it in the 
-same conditions as regards security. 
-
-The fact that you are presently reading this means that you have had
-knowledge of the CeCILL-B license and that you accept its terms.
-*/
-
-
-#ifndef __GIWSEXCEPTION__
-#define __GIWSEXCEPTION__
-#include <iostream>
-#include <string>
-#include <string.h>
-#include <stdlib.h>
-#include <jni.h>
-#include <exception>
-
-namespace GiwsException {
-
-
-/**
-* Parent class for exceptions which may occure in JNI code.
-*/
-class JniException : public std::exception
-{
-
-/** Error message to display */
-std::string m_oErrorMessage;
-
-/** Java description of the exception*/
-std::string m_oJavaMessage;
-
-/** Java stackTrace when the exception occured */
-std::string m_oJavaStackTrace;
-
-/** Name of the exception (ie class name).*/
-std::string m_oJavaExceptionName;
-
-/** The exception itself ... we store as a member otherwise JNI
-complains about 'WARNING in native method: JNI call made with
-exception pending' */
-jthrowable javaException;
-
-public:
-
-/**
-* Each subclass of JniExcpetion should call the super constructor
-* and the setErrorMessage function to set the message.
-* @param curEnv java environment where the exception occured.
-*/
-JniException(JNIEnv * curEnv) throw() ;
-
-virtual ~JniException(void) throw();
-
-/**
-* @return a description of the exception
-*/
-virtual const char * what(void) const throw();
-
-/**
-* @return Java description of the exception.
-*/
-std::string getJavaDescription(void) const throw();
-
-/**
-* @return Java stack trace where the exception occured.
-*/
-std::string getJavaStackTrace(void) const throw();
-
-/**
-* Get the name of the exception (ie its class name).
-*/
-std::string getJavaExceptionName(void) const throw();
-
-protected:
-
-/**
-* Set the error message that the exception should print.
-*/
-void setErrorMessage(const std::string & errorMessage);
-
-/**
-* Get the message that the exception will print.
-*/
-std::string getErrorMessage(void) const;
-
-private:
-  /**
-* @return error message of the exception.
-*/
-std::string retrieveExceptionMessage(JNIEnv * curEnv);
-/**
-* @return full stack trace when the exception occured.
-*/
-std::string retrieveStackTrace(JNIEnv * curEnv);
-
-/**
-* @return string containing the name of the exception (ie its class name).
-*/
-std::string retrieveExceptionName(JNIEnv * curEnv);
-/**
-* To be called when all the information about the exceptions have been
-* retrived.
-* Remove the exception from the environment.
-*/
-void closeException(JNIEnv * curEnv);
-
-/**
-* Convert a Java string (jstring) into a C++ string
-*/
-std::string convertJavaString(JNIEnv * curEnv, jstring javaString);
-};
-
-/**
-* Exception that should be thrown when allocation of Java ressources from C++
-* code fails (sur as NewDoubleArray or NewStringUTF).
-*/
-class JniBadAllocException : public JniException
-{
-public:
-
-JniBadAllocException(JNIEnv * curEnv) throw();
-virtual ~JniBadAllocException(void) throw();
-};
-
-/**
-* Exception that should be thrown when a call to a Java method
-* using Jni throw an exception.
-* If possible, user should try to avoid this sitution because of the loss
-* of information.
-*/
-class JniCallMethodException : public JniException
-{
-public:
-
-  /**
-   * @param curEnv java envirnonment where the exception occured.
-   */
-  JniCallMethodException(JNIEnv * curEnv) throw();
-
-  virtual ~JniCallMethodException(void) throw();
-};
-
-/**
-* Exception that should be thrown when Jni code could not find a Java class
-*/
-class JniClassNotFoundException : public JniException
-{
-public:
-
-/**
-* @param className name of the class which haven't been found
-*/
-JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw();
-
-virtual ~JniClassNotFoundException(void) throw();
-
-};
-
-/**
-* Exception that should be thrown when Jni code could not find a Java method
-*/
-class JniMethodNotFoundException : public JniException
-{
-public:
-
-/**
-* @param className name of the method which haven't been found
-*/
-JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw();
-virtual ~JniMethodNotFoundException(void) throw();
-
-};
-
-/**
-* Exception that should be thrown when a call to a Java method
-* using Jni throw an exception.
-* If possible, user should try to avoid this sitution because of the loss
-* of information.
-*/
-class JniObjectCreationException : public JniException
-{
-public:
-
-/**
-* @param curEnv java envirnonment where the exception occured.
-*/
-JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw();
-virtual ~JniObjectCreationException(void) throw();
-
-};
-
-
-/**
-* Exception that should be thrown when a call to the Java monitor
-* failed
-*/
-class JniMonitorException : public JniException
-{
-public:
-
-/**
-* @param curEnv java envirnonment where the exception occured.
-*/
-JniMonitorException(JNIEnv * curEnv, const std::string & className) throw();
-virtual ~JniMonitorException(void) throw();
-
-};
-
-
-}
-#endif
-
index c5f31b3..751ce68 100644 (file)
@@ -1,5 +1,5 @@
 #include "Signal.hxx"
-/* Generated by GIWS (version 1.2.4) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
@@ -104,7 +104,7 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 curEnv->DeleteLocalRef(localInstance);
 
                 /* Methods ID set to NULL */
-voidnotifyjstringID=NULL; 
+voidnotifyjstringjava_lang_StringID=NULL;
 
 
 }
@@ -127,7 +127,7 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 throw GiwsException::JniObjectCreationException(curEnv, this->className());
         }
         /* Methods ID set to NULL */
-        voidnotifyjstringID=NULL; 
+        voidnotifyjstringjava_lang_StringID=NULL;
 
 
 }
@@ -153,19 +153,19 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID voidnotifyjstringID = curEnv->GetStaticMethodID(cls, "notify", "(Ljava/lang/String;)V" ) ;
-if (voidnotifyjstringID == NULL) {
+jmethodID voidnotifyjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "notify", "(Ljava/lang/String;)V" ) ;
+if (voidnotifyjstringjava_lang_StringID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "notify");
 }
 
 jstring ID_ = curEnv->NewStringUTF( ID );
-if (ID_ == NULL)
+if (ID != NULL && ID_ == NULL)
 {
 throw GiwsException::JniBadAllocException(curEnv);
 }
 
 
-                         curEnv->CallStaticVoidMethod(cls, voidnotifyjstringID ,ID_);
+                         curEnv->CallStaticVoidMethod(cls, voidnotifyjstringjava_lang_StringID ,ID_);
                         curEnv->DeleteLocalRef(ID_);
 curEnv->DeleteLocalRef(cls);
 if (curEnv->ExceptionCheck()) {
index 847c695..b4ac9dd 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by GIWS (version 1.2.4) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
@@ -57,14 +57,27 @@ typedef signed char byte;
 #endif
 #endif
 
+
+#ifndef GIWSEXPORT
+# if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define GIWSEXPORT
+#   else
+#     define GIWSEXPORT __declspec(dllexport)
+#   endif
+# else
+#     define GIWSEXPORT
+# endif
+#endif
+
 namespace org_scilab_modules_action_binding_utils {
-class Signal {
+class GIWSEXPORT Signal {
 
 private:
 JavaVM * jvm;
 
 protected:
-jmethodID voidnotifyjstringID; // cache method id
+jmethodID voidnotifyjstringjava_lang_StringID; // cache method id
 
 
 
index cd4b4f4..29bdbe6 100644 (file)
@@ -1047,6 +1047,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index a056c90..99fc8fc 100644 (file)
@@ -1219,6 +1219,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 9ee3c25..1909f52 100644 (file)
@@ -766,6 +766,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index d2d0e75..a8c3dea 100644 (file)
@@ -1037,6 +1037,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index e36dd47..aa3a885 100644 (file)
@@ -1846,6 +1846,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index af068b5..bb56730 100644 (file)
@@ -1047,6 +1047,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index ad108ff..c649ef6 100644 (file)
@@ -27,9 +27,15 @@ include $(top_srcdir)/Makefile.incl.am
 
 COMMONS_C_SOURCES =  src/jni/ScilabCommons_wrap.c
 
+COMMONS_CPP_SOURCES = 
+if NEED_JAVA
+COMMONS_CPP_SOURCES +=  src/jni/GiwsException.cpp
+endif
+
 COMMONS_FORTRAN_SOURCES = src/fortran/empty.f
 
 libscicommons_la_CFLAGS= $(JAVA_JNI_INCLUDE)
+libscicommons_la_CPPFLAGS= $(JAVA_JNI_INCLUDE) -Isrc/jni/
 
 libscicommons_disable_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)
 
@@ -53,8 +59,13 @@ INCLUDE_FLAGS = $(libscicommons_la_CFLAGS)
 #### SWIG Declaration ####
 SWIG_WRAPPERS = src/jni/ScilabCommons.i
 
+BUILT_SOURCES =
 if SWIG
-BUILT_SOURCES=swig
+BUILT_SOURCES += swig
+endif
+
+if GIWS
+BUILT_SOURCES += giws-exception
 endif
 
 
index 92257d4..1e48b80 100644 (file)
@@ -65,14 +65,16 @@ host_triplet = @host@
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
        $(top_srcdir)/Makefile.incl.am
 @NEED_JAVA_TRUE@am__append_1 = java
-@GUI_TRUE@am__append_2 = libscicommons.la 
+@NEED_JAVA_TRUE@am__append_2 = src/jni/GiwsException.cpp
+@GUI_TRUE@am__append_3 = libscicommons.la 
+@SWIG_TRUE@am__append_4 = swig
+@GIWS_TRUE@am__append_5 = giws-exception
 subdir = modules/commons
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/backtrace.m4 \
-       $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/docbook.m4 \
-       $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
-       $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
-       $(top_srcdir)/m4/intel_compiler.m4 \
+       $(top_srcdir)/m4/docbook.m4 $(top_srcdir)/m4/fftw.m4 \
+       $(top_srcdir)/m4/fortran.m4 $(top_srcdir)/m4/giws.m4 \
+       $(top_srcdir)/m4/hdf5.m4 $(top_srcdir)/m4/intel_compiler.m4 \
        $(top_srcdir)/m4/java-thirdparty.m4 $(top_srcdir)/m4/java.m4 \
        $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
        $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -123,14 +125,22 @@ libscicommons_disable_la_OBJECTS =  \
 libscicommons_disable_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(libscicommons_disable_la_LDFLAGS) $(LDFLAGS) -o $@
-libscicommons_la_LIBADD =
+libscicommons_la_DEPENDENCIES =  \
+       $(top_builddir)/libs/MALLOC/libscimalloc.la \
+       $(top_builddir)/modules/output_stream/libscioutput_stream.la \
+       $(top_builddir)/modules/fileio/libscifileio.la
+am__libscicommons_la_SOURCES_DIST = src/jni/ScilabCommons_wrap.c \
+       src/fortran/empty.f src/jni/GiwsException.cpp
 am__objects_1 = libscicommons_la-ScilabCommons_wrap.lo
 am__objects_2 = empty.lo
-am_libscicommons_la_OBJECTS = $(am__objects_1) $(am__objects_2)
+@NEED_JAVA_TRUE@am__objects_3 = libscicommons_la-GiwsException.lo
+am__objects_4 = $(am__objects_3)
+am_libscicommons_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
+       $(am__objects_4)
 libscicommons_la_OBJECTS = $(am_libscicommons_la_OBJECTS)
-libscicommons_la_LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) \
-       $(libscicommons_la_LDFLAGS) $(LDFLAGS) -o $@
+libscicommons_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+       $(CXXFLAGS) $(libscicommons_la_LDFLAGS) $(LDFLAGS) -o $@
 @GUI_TRUE@am_libscicommons_la_rpath = -rpath $(pkglibdir)
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/modules/core/includes
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
@@ -145,6 +155,15 @@ CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
 F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
 LTF77COMPILE = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS)
@@ -155,7 +174,7 @@ F77LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 SOURCES = $(libscicommons_disable_la_SOURCES) \
        $(libscicommons_la_SOURCES)
 DIST_SOURCES = $(libscicommons_disable_la_SOURCES) \
-       $(libscicommons_la_SOURCES)
+       $(am__libscicommons_la_SOURCES_DIST)
 DATA = $(libscicommons_la_etc_DATA) $(libscicommons_la_root_DATA) \
        $(libscicommons_la_sci_gateway_DATA)
 ETAGS = etags
@@ -486,11 +505,13 @@ HELP_CHAPTERDIR = help/
 HELP_CHAPTERFILE = addchapter.sce
 HELP_CHAPTERLANG = en_US fr_FR pt_BR
 COMMONS_C_SOURCES = src/jni/ScilabCommons_wrap.c
+COMMONS_CPP_SOURCES = $(am__append_2)
 COMMONS_FORTRAN_SOURCES = src/fortran/empty.f
 libscicommons_la_CFLAGS = $(JAVA_JNI_INCLUDE)
+libscicommons_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) -Isrc/jni/
 libscicommons_disable_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)
 libscicommons_disable_la_SOURCES = $(COMMONS_DISABLE_C_SOURCES)
-pkglib_LTLIBRARIES = libscicommons-disable.la $(am__append_2)
+pkglib_LTLIBRARIES = libscicommons-disable.la $(am__append_3)
 libscicommons_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)  $(X_LIBS) $(X_EXTRA_LIBS)
 libscicommons_la_SOURCES = $(COMMONS_C_SOURCES) $(COMMONS_FORTRAN_SOURCES) $(COMMONS_JNI_SOURCES) $(COMMONS_CPP_SOURCES)
 
@@ -500,7 +521,11 @@ INCLUDE_FLAGS = $(libscicommons_la_CFLAGS)
 
 #### SWIG Declaration ####
 SWIG_WRAPPERS = src/jni/ScilabCommons.i
-@SWIG_TRUE@BUILT_SOURCES = swig
+BUILT_SOURCES = $(am__append_4) $(am__append_5)
+libscicommons_la_LIBADD = $(top_builddir)/libs/MALLOC/libscimalloc.la \
+$(top_builddir)/modules/output_stream/libscioutput_stream.la \
+$(top_builddir)/modules/fileio/libscifileio.la
+
 
 #### commons : gateway declaration ####
 libscicommons_la_sci_gatewaydir = $(mydatadir)/sci_gateway
@@ -510,7 +535,7 @@ all: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
-.SUFFIXES: .sci .bin .c .f .lo .o .obj
+.SUFFIXES: .sci .bin .c .cpp .f .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
@@ -583,6 +608,7 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicommons_la-GiwsException.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscicommons_la-ScilabCommons_wrap.Plo@am__quote@
 
 .c.o:
@@ -607,11 +633,39 @@ distclean-compile:
 @am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
 
 libscicommons_la-ScilabCommons_wrap.lo: src/jni/ScilabCommons_wrap.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscicommons_la_CFLAGS) $(CFLAGS) -MT libscicommons_la-ScilabCommons_wrap.lo -MD -MP -MF $(DEPDIR)/libscicommons_la-ScilabCommons_wrap.Tpo -c -o libscicommons_la-ScilabCommons_wrap.lo `test -f 'src/jni/ScilabCommons_wrap.c' || echo '$(srcdir)/'`src/jni/ScilabCommons_wrap.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicommons_la_CPPFLAGS) $(CPPFLAGS) $(libscicommons_la_CFLAGS) $(CFLAGS) -MT libscicommons_la-ScilabCommons_wrap.lo -MD -MP -MF $(DEPDIR)/libscicommons_la-ScilabCommons_wrap.Tpo -c -o libscicommons_la-ScilabCommons_wrap.lo `test -f 'src/jni/ScilabCommons_wrap.c' || echo '$(srcdir)/'`src/jni/ScilabCommons_wrap.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscicommons_la-ScilabCommons_wrap.Tpo $(DEPDIR)/libscicommons_la-ScilabCommons_wrap.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/jni/ScilabCommons_wrap.c' object='libscicommons_la-ScilabCommons_wrap.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscicommons_la_CFLAGS) $(CFLAGS) -c -o libscicommons_la-ScilabCommons_wrap.lo `test -f 'src/jni/ScilabCommons_wrap.c' || echo '$(srcdir)/'`src/jni/ScilabCommons_wrap.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicommons_la_CPPFLAGS) $(CPPFLAGS) $(libscicommons_la_CFLAGS) $(CFLAGS) -c -o libscicommons_la-ScilabCommons_wrap.lo `test -f 'src/jni/ScilabCommons_wrap.c' || echo '$(srcdir)/'`src/jni/ScilabCommons_wrap.c
+
+.cpp.o:
+@am__fastdepCXX_TRUE@  $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@  $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@  $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+libscicommons_la-GiwsException.lo: src/jni/GiwsException.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicommons_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscicommons_la-GiwsException.lo -MD -MP -MF $(DEPDIR)/libscicommons_la-GiwsException.Tpo -c -o libscicommons_la-GiwsException.lo `test -f 'src/jni/GiwsException.cpp' || echo '$(srcdir)/'`src/jni/GiwsException.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscicommons_la-GiwsException.Tpo $(DEPDIR)/libscicommons_la-GiwsException.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/jni/GiwsException.cpp' object='libscicommons_la-GiwsException.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscicommons_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscicommons_la-GiwsException.lo `test -f 'src/jni/GiwsException.cpp' || echo '$(srcdir)/'`src/jni/GiwsException.cpp
 
 .f.o:
        $(F77COMPILE) -c -o $@ $<
@@ -963,6 +1017,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 0f6f4e0..6203fa8 100644 (file)
@@ -236,11 +236,13 @@ lib /DEF:"$(ProjectDir)commons_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platf
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
+    <ClCompile Include="..\jni\GiwsException.cpp" />
     <ClCompile Include="DllmainCommons.c" />
     <ClCompile Include="..\jni\ScilabCommons_wrap.c" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\includes\dynlib_commons.h" />
+    <ClInclude Include="..\jni\GiwsException.hxx" />
   </ItemGroup>
   <ItemGroup>
     <None Include="commons_f_Import.def" />
index 762d94b..686f457 100644 (file)
     <ClCompile Include="..\jni\ScilabCommons_wrap.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\jni\GiwsException.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\includes\dynlib_commons.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\jni\GiwsException.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="commons_f_Import.def">
@@ -1,8 +1,8 @@
-/* Generated by GIWS (version 1.1.1) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
-Copyright 2008-2010 DIGITEO
+Copyright 2008-2011 DIGITEO
 
 Author : Sylvestre Ledru & others
 
@@ -71,6 +71,7 @@ m_oErrorMessage.clear();
 
 /**
 * @return a description of the exception
+* @deprecated This function could lead to side effect error. Please use whatStr
 */
 const char * JniException::what(void) const throw()
 {
@@ -78,6 +79,14 @@ return m_oErrorMessage.c_str();
 }
 
 /**
+* @return a description of the exception
+*/
+std::string JniException::whatStr(void) const throw()
+{
+return m_oErrorMessage;
+}
+
+/**
 * @return Java description of the exception.
 */
 std::string JniException::getJavaDescription(void) const throw()
@@ -128,23 +137,23 @@ std::string JniException::retrieveExceptionMessage(JNIEnv * curEnv)
 // retrieve information from the exception.
 // get method id
 jmethodID getLocalizedMessageId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException),
-                                               "getLocalizedMessage",
-                                               "()Ljava/lang/String;");
+   "getLocalizedMessage",
+   "()Ljava/lang/String;");
 
 // call getLocalizedMessage
 jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocalizedMessageId);
 
-    if (description == NULL)
-    {
-      return "";
-    }
+if (description == NULL)
+{
+  return "";
+}
 
-    std::string res = convertJavaString(curEnv, description);
+std::string res = convertJavaString(curEnv, description);
 
-    // release java resources
-    curEnv->DeleteLocalRef(description);
+// release java resources
+curEnv->DeleteLocalRef(description);
 
-    return res;
+return res;
   }
 
   /**
@@ -154,60 +163,60 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal
   {
 
 
-    // return the result of the getStackTrace method
+// return the result of the getStackTrace method
 
-    // retrieve information from the exception.
-    // get method id
-    // getStackTrace returns an array of StackTraceElement
-    jmethodID getStackTraceId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException),
-                                                    "getStackTrace",
-                                                    "()[Ljava/lang/StackTraceElement;");
+// retrieve information from the exception.
+// get method id
+// getStackTrace returns an array of StackTraceElement
+jmethodID getStackTraceId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException),
+"getStackTrace",
+"()[Ljava/lang/StackTraceElement;");
 
-    // call getStackTrace
-    jobjectArray stackTrace = (jobjectArray) curEnv->CallObjectMethod(javaException, getStackTraceId);
+// call getStackTrace
+jobjectArray stackTrace = (jobjectArray) curEnv->CallObjectMethod(javaException, getStackTraceId);
 
-    if (stackTrace == NULL)
-    {
-      return "";
-    }
+if (stackTrace == NULL)
+{
+  return "";
+}
 
-    // get length of the array
-    jsize stackTraceLength = curEnv->GetArrayLength(stackTrace);
-    std::string res = "";
+// get length of the array
+jsize stackTraceLength = curEnv->GetArrayLength(stackTrace);
+std::string res = "";
 
-    // get toString methodId of StackTraceElement class
-    jclass stackTraceElementClass = curEnv->FindClass("java/lang/StackTraceElement");
-    jmethodID toStringId = curEnv->GetMethodID(stackTraceElementClass, "toString", "()Ljava/lang/String;");
+// get toString methodId of StackTraceElement class
+jclass stackTraceElementClass = curEnv->FindClass("java/lang/StackTraceElement");
+jmethodID toStringId = curEnv->GetMethodID(stackTraceElementClass, "toString", "()Ljava/lang/String;");
 
-    for (jsize i = 0; i < stackTraceLength; i++)
-    {
-      // add the result of toString method of each element in the result
-      jobject curStackTraceElement = curEnv->GetObjectArrayElement(stackTrace, i);
+for (jsize i = 0; i < stackTraceLength; i++)
+{
+  // add the result of toString method of each element in the result
+  jobject curStackTraceElement = curEnv->GetObjectArrayElement(stackTrace, i);
 
-      // call to string on the object
-      jstring stackElementString = (jstring) curEnv->CallObjectMethod(curStackTraceElement, toStringId);
+  // call to string on the object
+  jstring stackElementString = (jstring) curEnv->CallObjectMethod(curStackTraceElement, toStringId);
 
-      if (stackElementString == NULL)
-      {
-        curEnv->DeleteLocalRef(stackTraceElementClass);
-        curEnv->DeleteLocalRef(stackTrace);
-        curEnv->DeleteLocalRef(curStackTraceElement);
-        return res;
-      }
+  if (stackElementString == NULL)
+  {
+curEnv->DeleteLocalRef(stackTraceElementClass);
+curEnv->DeleteLocalRef(stackTrace);
+curEnv->DeleteLocalRef(curStackTraceElement);
+return res;
+  }
 
-      // add a line to res
-      res += " at " + convertJavaString(curEnv, stackElementString) + "\n";
+  // add a line to res
+  res += " at " + convertJavaString(curEnv, stackElementString) + "\n";
 
-      curEnv->DeleteLocalRef(curStackTraceElement);
-      curEnv->DeleteLocalRef(stackElementString);
-    }
+  curEnv->DeleteLocalRef(curStackTraceElement);
+  curEnv->DeleteLocalRef(stackElementString);
+}
 
-    // release java resources
-    curEnv->DeleteLocalRef(stackTraceElementClass);
-    curEnv->DeleteLocalRef(stackTrace);
+// release java resources
+curEnv->DeleteLocalRef(stackTraceElementClass);
+curEnv->DeleteLocalRef(stackTrace);
 
 
-    return res;
+return res;
   }
 
   /**
@@ -216,32 +225,32 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal
   std::string JniException::retrieveExceptionName(JNIEnv * curEnv)
   {
 
-    // then get its class
-    jclass exceptionClass = curEnv->GetObjectClass(javaException);
+// then get its class
+jclass exceptionClass = curEnv->GetObjectClass(javaException);
 
-    // get the Class class
-    // we could also use curEnv->FindClass("Class");
-    jclass classClass = curEnv->GetObjectClass(exceptionClass);
+// get the Class class
+// we could also use curEnv->FindClass("Class");
+jclass classClass = curEnv->GetObjectClass(exceptionClass);
 
-    // get the getName method
-    jmethodID getNameId = curEnv->GetMethodID(classClass, "getName", "()Ljava/lang/String;");
+// get the getName method
+jmethodID getNameId = curEnv->GetMethodID(classClass, "getName", "()Ljava/lang/String;");
 
-    // call the getName function
-    jstring javaName = (jstring) curEnv->CallObjectMethod(exceptionClass, getNameId);
+// call the getName function
+jstring javaName = (jstring) curEnv->CallObjectMethod(exceptionClass, getNameId);
 
-    if (javaName == NULL)
-    {
-      return "";
-    }
+if (javaName == NULL)
+{
+  return "";
+}
 
-    std::string res = convertJavaString(curEnv, javaName);
+std::string res = convertJavaString(curEnv, javaName);
 
-    // release java resources
-    curEnv->DeleteLocalRef(exceptionClass);
-    curEnv->DeleteLocalRef(classClass);
-    curEnv->DeleteLocalRef(javaName);
+// release java resources
+curEnv->DeleteLocalRef(exceptionClass);
+curEnv->DeleteLocalRef(classClass);
+curEnv->DeleteLocalRef(javaName);
 
-    return res;
+return res;
   }
 
   /**
@@ -251,9 +260,9 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal
    */
   void JniException::closeException(JNIEnv * curEnv)
   {
-    // remove the exception from the environment
-    // Beware, the exception is no longer reachable
-    curEnv->ExceptionClear();
+// remove the exception from the environment
+// Beware, the exception is no longer reachable
+curEnv->ExceptionClear();
   }
 
   /**
@@ -261,16 +270,16 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal
    */
   std::string JniException::convertJavaString(JNIEnv * curEnv, jstring javaString)
   {
-    // get a pointer on a C string
-    const char * tempString = curEnv->GetStringUTFChars(javaString, 0);
+// get a pointer on a C string
+const char * tempString = curEnv->GetStringUTFChars(javaString, 0);
 
-    // convert the C string into a C++ string
-    std::string res(tempString);
+// convert the C string into a C++ string
+std::string res(tempString);
 
-    // release pointer
-    curEnv->ReleaseStringUTFChars(javaString, tempString);
+// release pointer
+curEnv->ReleaseStringUTFChars(javaString, tempString);
 
-    return res;
+return res;
   }
 
 
@@ -279,7 +288,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal
   * code fails (sur as NewDoubleArray or NewStringUTF).
   */
   
-  JniBadAllocException::JniBadAllocException(JNIEnv * curEnv) throw() : JniException(curEnv)
+  JniBadAllocException::JniBadAllocException(JNIEnv * curEnv) throw() : JniException()
   {
   std::string message = "Error no more memory.";
   setErrorMessage(message);
@@ -1,8 +1,8 @@
-/* Generated by GIWS (version 1.1.1) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
-Copyright 2008-2010 DIGITEO
+Copyright 2008-2011 DIGITEO
 
 Author : Sylvestre Ledru & others
 
@@ -56,13 +56,28 @@ typedef signed char byte;
 #endif
 #include <exception>
 
+
+#ifndef GIWSEXPORT
+# if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define GIWSEXPORT
+#   else
+#     define GIWSEXPORT __declspec(dllexport)
+#   endif
+# else
+#     define GIWSEXPORT
+# endif
+#endif
+
+
 namespace GiwsException {
 
 
+
 /**
 * Parent class for exceptions which may occure in JNI code.
 */
-class JniException : public std::exception
+class GIWSEXPORT JniException : public std::exception
 {
 
 /** Error message to display */
@@ -90,15 +105,23 @@ public:
 * @param curEnv java environment where the exception occured.
 */
 JniException(JNIEnv * curEnv) throw() ;
+JniException() throw() : exception() { };
+
 
 virtual ~JniException(void) throw();
 
 /**
 * @return a description of the exception
+* @deprecated This function could lead to side effect error. Please use whatStr
 */
 virtual const char * what(void) const throw();
 
 /**
+* @return a description of the exception
+*/
+virtual std::string whatStr(void) const throw();
+
+/**
 * @return Java description of the exception.
 */
 std::string getJavaDescription(void) const throw();
@@ -156,7 +179,7 @@ std::string convertJavaString(JNIEnv * curEnv, jstring javaString);
 * Exception that should be thrown when allocation of Java resources from C++
 * code fails (sur as NewDoubleArray or NewStringUTF).
 */
-class JniBadAllocException : public JniException
+class GIWSEXPORT JniBadAllocException : public JniException
 {
 public:
 
@@ -170,7 +193,7 @@ virtual ~JniBadAllocException(void) throw();
 * If possible, user should try to avoid this sitution because of the loss
 * of information.
 */
-class JniCallMethodException : public JniException
+class GIWSEXPORT JniCallMethodException : public JniException
 {
 public:
 
@@ -185,7 +208,7 @@ public:
 /**
 * Exception that should be thrown when Jni code could not find a Java class
 */
-class JniClassNotFoundException : public JniException
+class GIWSEXPORT JniClassNotFoundException : public JniException
 {
 public:
 
@@ -201,7 +224,7 @@ virtual ~JniClassNotFoundException(void) throw();
 /**
 * Exception that should be thrown when Jni code could not find a Java method
 */
-class JniMethodNotFoundException : public JniException
+class GIWSEXPORT JniMethodNotFoundException : public JniException
 {
 public:
 
@@ -219,7 +242,7 @@ virtual ~JniMethodNotFoundException(void) throw();
 * If possible, user should try to avoid this sitution because of the loss
 * of information.
 */
-class JniObjectCreationException : public JniException
+class GIWSEXPORT JniObjectCreationException : public JniException
 {
 public:
 
@@ -236,7 +259,7 @@ virtual ~JniObjectCreationException(void) throw();
 * Exception that should be thrown when a call to the Java monitor
 * failed
 */
-class JniMonitorException : public JniException
+class GIWSEXPORT JniMonitorException : public JniException
 {
 public:
 
index 82e4e5b..8eb3cc7 100644 (file)
@@ -727,6 +727,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 107a986..edc12e1 100644 (file)
@@ -1187,6 +1187,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index bc3b539..6c5a0b9 100644 (file)
@@ -27,8 +27,7 @@ libsciconsole_la_etc_DATA = etc/console.quit etc/console.start etc/configuration
 
 
 #### console : List of the cpp files ####
-CONSOLE_CPP_JNI_SOURCES = src/jni/CallScilabBridge.cpp \
-src/jni/GiwsException.cpp
+CONSOLE_CPP_JNI_SOURCES = src/jni/CallScilabBridge.cpp
 
 CONSOLE_CPP_SOURCES =  src/cpp/ClearConsole.cpp \
 src/cpp/ClearConsolePart.cpp \
@@ -125,7 +124,7 @@ libsciconsole_disable_la_CFLAGS = -I$(srcdir)/includes/ \
 
 
 # Includes need for the compilation
-libsciconsole_la_CPPFLAGS =  $(JAVA_JNI_INCLUDE) -I$(top_srcdir)/modules/api_scilab/includes -I$(srcdir)/includes/ -I$(srcdir)/src/cpp/ -I$(srcdir)/src/c/ -I$(srcdir)/src/jni/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/jvm/includes/ -I$(top_srcdir)/modules/action_binding/includes
+libsciconsole_la_CPPFLAGS =  $(JAVA_JNI_INCLUDE) -I$(top_srcdir)/modules/api_scilab/includes -I$(srcdir)/includes/ -I$(srcdir)/src/cpp/ -I$(srcdir)/src/c/ -I$(srcdir)/src/jni/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/jvm/includes/ -I$(top_srcdir)/modules/action_binding/includes -I$(top_srcdir)/modules/commons/src/jni/
 
 # Includes need for the compilation
 libsciconsole_la_CFLAGS=       $(JAVA_JNI_INCLUDE) \
index a288fa3..87f47ea 100644 (file)
@@ -169,10 +169,9 @@ am__libsciconsole_la_SOURCES_DIST = src/jni/GuiManagement_wrap.c \
        src/c/GetCommandLine.c src/c/others/zzledt.c \
        src/c/others/gotoxy_nw.c src/c/others/clrscr_nw.c \
        src/c/prompt.c src/c/promptecho.c src/c/others/initMacOSXEnv.c \
-       src/jni/CallScilabBridge.cpp src/jni/GiwsException.cpp \
-       src/cpp/ClearConsole.cpp src/cpp/ClearConsolePart.cpp \
-       src/cpp/ConsolePrintf.cpp src/cpp/ConsoleRead.cpp \
-       src/cpp/ConsoleIsWaitingForInput.cpp \
+       src/jni/CallScilabBridge.cpp src/cpp/ClearConsole.cpp \
+       src/cpp/ClearConsolePart.cpp src/cpp/ConsolePrintf.cpp \
+       src/cpp/ConsoleRead.cpp src/cpp/ConsoleIsWaitingForInput.cpp \
        src/cpp/GetCharWithoutOutput.cpp src/cpp/PromptToHome.cpp \
        src/cpp/ScilabLinesUpdate.cpp src/cpp/SetConsolePrompt.cpp \
        sci_gateway/c/gw_console.c sci_gateway/c/sci_clc.c \
@@ -191,8 +190,7 @@ am__objects_4 = libsciconsole_la-InitializeConsole.lo \
        libsciconsole_la-gotoxy_nw.lo libsciconsole_la-clrscr_nw.lo \
        libsciconsole_la-prompt.lo libsciconsole_la-promptecho.lo \
        $(am__objects_3)
-am__objects_5 = libsciconsole_la-CallScilabBridge.lo \
-       libsciconsole_la-GiwsException.lo
+am__objects_5 = libsciconsole_la-CallScilabBridge.lo
 am__objects_6 = libsciconsole_la-ClearConsole.lo \
        libsciconsole_la-ClearConsolePart.lo \
        libsciconsole_la-ConsolePrintf.lo \
@@ -505,9 +503,7 @@ libsciconsole_la_etcdir = $(mydatadir)/etc
 libsciconsole_la_etc_DATA = etc/console.quit etc/console.start etc/configuration.xml
 
 #### console : List of the cpp files ####
-CONSOLE_CPP_JNI_SOURCES = src/jni/CallScilabBridge.cpp \
-src/jni/GiwsException.cpp
-
+CONSOLE_CPP_JNI_SOURCES = src/jni/CallScilabBridge.cpp
 CONSOLE_CPP_SOURCES = src/cpp/ClearConsole.cpp \
 src/cpp/ClearConsolePart.cpp \
 src/cpp/ConsolePrintf.cpp \
@@ -568,7 +564,7 @@ libsciconsole_disable_la_CFLAGS = -I$(srcdir)/includes/ \
 
 
 # Includes need for the compilation
-libsciconsole_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) -I$(top_srcdir)/modules/api_scilab/includes -I$(srcdir)/includes/ -I$(srcdir)/src/cpp/ -I$(srcdir)/src/c/ -I$(srcdir)/src/jni/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/jvm/includes/ -I$(top_srcdir)/modules/action_binding/includes
+libsciconsole_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) -I$(top_srcdir)/modules/api_scilab/includes -I$(srcdir)/includes/ -I$(srcdir)/src/cpp/ -I$(srcdir)/src/c/ -I$(srcdir)/src/jni/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/jvm/includes/ -I$(top_srcdir)/modules/action_binding/includes -I$(top_srcdir)/modules/commons/src/jni/
 
 # Includes need for the compilation
 libsciconsole_la_CFLAGS = $(JAVA_JNI_INCLUDE) -I$(srcdir)/includes/ \
@@ -776,7 +772,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciconsole_la-DropFiles_wrap.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciconsole_la-GetCharWithoutOutput.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciconsole_la-GetCommandLine.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciconsole_la-GiwsException.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciconsole_la-GuiManagement.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciconsole_la-GuiManagement_wrap.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciconsole_la-InitializeConsole.Plo@am__quote@
@@ -1130,13 +1125,6 @@ libsciconsole_la-CallScilabBridge.lo: src/jni/CallScilabBridge.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciconsole_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libsciconsole_la-CallScilabBridge.lo `test -f 'src/jni/CallScilabBridge.cpp' || echo '$(srcdir)/'`src/jni/CallScilabBridge.cpp
 
-libsciconsole_la-GiwsException.lo: src/jni/GiwsException.cpp
-@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciconsole_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libsciconsole_la-GiwsException.lo -MD -MP -MF $(DEPDIR)/libsciconsole_la-GiwsException.Tpo -c -o libsciconsole_la-GiwsException.lo `test -f 'src/jni/GiwsException.cpp' || echo '$(srcdir)/'`src/jni/GiwsException.cpp
-@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libsciconsole_la-GiwsException.Tpo $(DEPDIR)/libsciconsole_la-GiwsException.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/jni/GiwsException.cpp' object='libsciconsole_la-GiwsException.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciconsole_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libsciconsole_la-GiwsException.lo `test -f 'src/jni/GiwsException.cpp' || echo '$(srcdir)/'`src/jni/GiwsException.cpp
-
 libsciconsole_la-ClearConsole.lo: src/cpp/ClearConsole.cpp
 @am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciconsole_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libsciconsole_la-ClearConsole.lo -MD -MP -MF $(DEPDIR)/libsciconsole_la-ClearConsole.Tpo -c -o libsciconsole_la-ClearConsole.lo `test -f 'src/cpp/ClearConsole.cpp' || echo '$(srcdir)/'`src/cpp/ClearConsole.cpp
 @am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libsciconsole_la-ClearConsole.Tpo $(DEPDIR)/libsciconsole_la-ClearConsole.Plo
@@ -1538,6 +1526,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index b6f4792..3ffad88 100644 (file)
@@ -81,7 +81,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../core/includes;../../../jvm/includes;../../../fileio/includes;../../../localization/includes;../../../windows_tools/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../../output_stream/includes;../../../completion/includes;../../../history_manager/includes;../../../ui_data/includes;../../../windows_tools/src/c/scilab_windows;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../core/includes;../../../jvm/includes;../../../fileio/includes;../../../localization/includes;../../../windows_tools/includes;../../../commons/src/jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../../output_stream/includes;../../../completion/includes;../../../history_manager/includes;../../../ui_data/includes;../../../windows_tools/src/c/scilab_windows;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;CONSOLE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -90,6 +90,7 @@
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -122,7 +123,7 @@ lib /DEF:"$(ProjectDir)libjvm_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../core/includes;../../../jvm/includes;../../../fileio/includes;../../../localization/includes;../../../windows_tools/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../../output_stream/includes;../../../completion/includes;../../../history_manager/includes;../../../ui_data/includes;../../../windows_tools/src/c/scilab_windows;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../core/includes;../../../jvm/includes;../../../fileio/includes;../../../localization/includes;../../../windows_tools/includes;../../../commons/src/jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../../output_stream/includes;../../../completion/includes;../../../history_manager/includes;../../../ui_data/includes;../../../windows_tools/src/c/scilab_windows;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;CONSOLE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -131,6 +132,7 @@ lib /DEF:"$(ProjectDir)libjvm_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -163,7 +165,7 @@ lib /DEF:"$(ProjectDir)libjvm_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../core/includes;../../../jvm/includes;../../../fileio/includes;../../../localization/includes;../../../windows_tools/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../../output_stream/includes;../../../completion/includes;../../../history_manager/includes;../../../ui_data/includes;../../../windows_tools/src/c/scilab_windows;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../core/includes;../../../jvm/includes;../../../fileio/includes;../../../localization/includes;../../../windows_tools/includes;../../../commons/src/jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../../output_stream/includes;../../../completion/includes;../../../history_manager/includes;../../../ui_data/includes;../../../windows_tools/src/c/scilab_windows;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;CONSOLE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -173,6 +175,7 @@ lib /DEF:"$(ProjectDir)libjvm_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -211,7 +214,7 @@ lib /DEF:"$(ProjectDir)libjvm_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../core/includes;../../../jvm/includes;../../../fileio/includes;../../../localization/includes;../../../windows_tools/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../../output_stream/includes;../../../completion/includes;../../../history_manager/includes;../../../ui_data/includes;../../../windows_tools/src/c/scilab_windows;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../core/includes;../../../jvm/includes;../../../fileio/includes;../../../localization/includes;../../../windows_tools/includes;../../../commons/src/jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../../output_stream/includes;../../../completion/includes;../../../history_manager/includes;../../../ui_data/includes;../../../windows_tools/src/c/scilab_windows;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;CONSOLE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -221,6 +224,7 @@ lib /DEF:"$(ProjectDir)libjvm_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -270,7 +274,6 @@ lib /DEF:"$(ProjectDir)libjvm_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform
     <ClCompile Include="dropFiles.c" />
     <ClCompile Include="..\jni\DropFiles_wrap.c" />
     <ClCompile Include="..\cpp\GetCharWithoutOutput.cpp" />
-    <ClCompile Include="..\jni\GiwsException.cpp" />
     <ClCompile Include="GetCommandLine.c" />
     <ClCompile Include="GuiManagement.c" />
     <ClCompile Include="..\jni\GuiManagement_wrap.c" />
@@ -318,6 +321,9 @@ lib /DEF:"$(ProjectDir)libjvm_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform
     <ProjectReference Include="..\..\..\api_scilab\api_scilab.vcxproj">
       <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>
     </ProjectReference>
+    <ProjectReference Include="..\..\..\commons\src\c\commons.vcxproj">
+      <Project>{eca09a1e-6d12-4a47-92e1-a671c181df77}</Project>
+    </ProjectReference>
     <ProjectReference Include="..\..\..\completion\src\c\completion.vcxproj">
       <Project>{ccce1ead-8e62-4dc0-ab17-972c06ef0c89}</Project>
     </ProjectReference>
index 84a2f79..7dbbf9b 100644 (file)
@@ -56,9 +56,6 @@
     <ClCompile Include="..\cpp\GetCharWithoutOutput.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\jni\GiwsException.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="GuiManagement.c">
       <Filter>Source Files</Filter>
     </ClCompile>
index e670547..9c8f2e5 100644 (file)
@@ -1,5 +1,5 @@
 #include "CallScilabBridge.hxx"
-/* Generated by GIWS (version 1.2.4) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
@@ -104,15 +104,15 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 curEnv->DeleteLocalRef(localInstance);
 
                 /* Methods ID set to NULL */
-voiddisplayjstringID=NULL; 
-jstringreadLineID=NULL; 
-voidclearID=NULL; 
-voidclearjintID=NULL; 
-jintgetCharWithoutOutputID=NULL; 
-voidtoHomeID=NULL; 
-voidscilabLinesUpdateID=NULL; 
-voidsetPromptjstringID=NULL; 
-jbooleanisWaitingForInputID=NULL; 
+voiddisplayjstringjava_lang_StringID=NULL;
+jstringreadLineID=NULL;
+voidclearID=NULL;
+voidclearjintintID=NULL;
+jintgetCharWithoutOutputID=NULL;
+voidtoHomeID=NULL;
+voidscilabLinesUpdateID=NULL;
+voidsetPromptjstringjava_lang_StringID=NULL;
+jbooleanisWaitingForInputID=NULL;
 
 
 }
@@ -135,15 +135,15 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 throw GiwsException::JniObjectCreationException(curEnv, this->className());
         }
         /* Methods ID set to NULL */
-        voiddisplayjstringID=NULL; 
-jstringreadLineID=NULL; 
-voidclearID=NULL; 
-voidclearjintID=NULL; 
-jintgetCharWithoutOutputID=NULL; 
-voidtoHomeID=NULL; 
-voidscilabLinesUpdateID=NULL; 
-voidsetPromptjstringID=NULL; 
-jbooleanisWaitingForInputID=NULL; 
+        voiddisplayjstringjava_lang_StringID=NULL;
+jstringreadLineID=NULL;
+voidclearID=NULL;
+voidclearjintintID=NULL;
+jintgetCharWithoutOutputID=NULL;
+voidtoHomeID=NULL;
+voidscilabLinesUpdateID=NULL;
+voidsetPromptjstringjava_lang_StringID=NULL;
+jbooleanisWaitingForInputID=NULL;
 
 
 }
@@ -169,19 +169,19 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID voiddisplayjstringID = curEnv->GetStaticMethodID(cls, "display", "(Ljava/lang/String;)V" ) ;
-if (voiddisplayjstringID == NULL) {
+jmethodID voiddisplayjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "display", "(Ljava/lang/String;)V" ) ;
+if (voiddisplayjstringjava_lang_StringID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "display");
 }
 
 jstring dataToDisplay_ = curEnv->NewStringUTF( dataToDisplay );
-if (dataToDisplay_ == NULL)
+if (dataToDisplay != NULL && dataToDisplay_ == NULL)
 {
 throw GiwsException::JniBadAllocException(curEnv);
 }
 
 
-                         curEnv->CallStaticVoidMethod(cls, voiddisplayjstringID ,dataToDisplay_);
+                         curEnv->CallStaticVoidMethod(cls, voiddisplayjstringjava_lang_StringID ,dataToDisplay_);
                         curEnv->DeleteLocalRef(dataToDisplay_);
 curEnv->DeleteLocalRef(cls);
 if (curEnv->ExceptionCheck()) {
@@ -251,12 +251,12 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID voidclearjintID = curEnv->GetStaticMethodID(cls, "clear", "(I)V" ) ;
-if (voidclearjintID == NULL) {
+jmethodID voidclearjintintID = curEnv->GetStaticMethodID(cls, "clear", "(I)V" ) ;
+if (voidclearjintintID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "clear");
 }
 
-                         curEnv->CallStaticVoidMethod(cls, voidclearjintID ,nbLines);
+                         curEnv->CallStaticVoidMethod(cls, voidclearjintintID ,nbLines);
                         curEnv->DeleteLocalRef(cls);
 if (curEnv->ExceptionCheck()) {
 throw GiwsException::JniCallMethodException(curEnv);
@@ -325,19 +325,19 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID voidsetPromptjstringID = curEnv->GetStaticMethodID(cls, "setPrompt", "(Ljava/lang/String;)V" ) ;
-if (voidsetPromptjstringID == NULL) {
+jmethodID voidsetPromptjstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "setPrompt", "(Ljava/lang/String;)V" ) ;
+if (voidsetPromptjstringjava_lang_StringID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "setPrompt");
 }
 
 jstring promptToSet_ = curEnv->NewStringUTF( promptToSet );
-if (promptToSet_ == NULL)
+if (promptToSet != NULL && promptToSet_ == NULL)
 {
 throw GiwsException::JniBadAllocException(curEnv);
 }
 
 
-                         curEnv->CallStaticVoidMethod(cls, voidsetPromptjstringID ,promptToSet_);
+                         curEnv->CallStaticVoidMethod(cls, voidsetPromptjstringjava_lang_StringID ,promptToSet_);
                         curEnv->DeleteLocalRef(promptToSet_);
 curEnv->DeleteLocalRef(cls);
 if (curEnv->ExceptionCheck()) {
index 4835b68..e8080b9 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by GIWS (version 1.2.4) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
@@ -57,21 +57,34 @@ typedef signed char byte;
 #endif
 #endif
 
+
+#ifndef GIWSEXPORT
+# if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define GIWSEXPORT
+#   else
+#     define GIWSEXPORT __declspec(dllexport)
+#   endif
+# else
+#     define GIWSEXPORT
+# endif
+#endif
+
 namespace org_scilab_modules_gui_bridge {
-class CallScilabBridge {
+class GIWSEXPORT CallScilabBridge {
 
 private:
 JavaVM * jvm;
 
 protected:
-jmethodID voiddisplayjstringID; // cache method id
+jmethodID voiddisplayjstringjava_lang_StringID; // cache method id
 jmethodID jstringreadLineID; // cache method id
 jmethodID voidclearID; // cache method id
-jmethodID voidclearjintID; // cache method id
+jmethodID voidclearjintintID; // cache method id
 jmethodID jintgetCharWithoutOutputID; // cache method id
 jmethodID voidtoHomeID; // cache method id
 jmethodID voidscilabLinesUpdateID; // cache method id
-jmethodID voidsetPromptjstringID; // cache method id
+jmethodID voidsetPromptjstringjava_lang_StringID; // cache method id
 jmethodID jbooleanisWaitingForInputID; // cache method id
 
 
diff --git a/scilab/modules/console/src/jni/GiwsException.cpp b/scilab/modules/console/src/jni/GiwsException.cpp
deleted file mode 100644 (file)
index 234e52b..0000000
+++ /dev/null
@@ -1,354 +0,0 @@
-/* Generated by GIWS (version 1.0.2) */
-/*
-
-Copyright 2007-2008 INRIA
-
-Author : Sylvestre Ledru & others
-
-This software is a computer program whose purpose is to hide the complexity
-of accessing Java objects/methods from C++ code.
-
-This software is governed by the CeCILL-B license under French law and
-abiding by the rules of distribution of free software.  You can  use, 
-modify and/ or redistribute the software under the terms of the CeCILL-B
-license as circulated by CEA, CNRS and INRIA at the following URL
-"http://www.cecill.info". 
-
-As a counterpart to the access to the source code and  rights to copy,
-modify and redistribute granted by the license, users are provided only
-with a limited warranty  and the software's author,  the holder of the
-economic rights,  and the successive licensors  have only  limited
-liability. 
-
-In this respect, the user's attention is drawn to the risks associated
-with loading,  using,  modifying and/or developing or reproducing the
-software by the user in light of its specific status of free software,
-that may mean  that it is complicated to manipulate,  and  that  also
-therefore means  that it is reserved for developers  and  experienced
-professionals having in-depth computer knowledge. Users are therefore
-encouraged to load and test the software's suitability as regards their
-requirements in conditions enabling the security of their systems and/or 
-data to be ensured and,  more generally, to use and operate it in the 
-same conditions as regards security. 
-
-The fact that you are presently reading this means that you have had
-knowledge of the CeCILL-B license and that you accept its terms.
-*/
-
-#include "GiwsException.hxx" 
-namespace GiwsException {
-
-
-
-/**
-* Each subclass of JniExcpetion should call the super constructor
-* and the setErrorMessage function to set the message.
-* @param curEnv java envirnonment where the exception occured.
-*/
-JniException::JniException(JNIEnv * curEnv) throw() : exception()
-{
-// retrieve information about the exception
-javaException = curEnv->ExceptionOccurred();
-/* Clear the Java Exception to avoid calling it again & again */
-curEnv->ExceptionClear();
-m_oJavaMessage = this->retrieveExceptionMessage(curEnv);
-m_oJavaStackTrace = this->retrieveStackTrace(curEnv);
-m_oJavaExceptionName = this->retrieveExceptionName(curEnv);
-
-// by default JniExceptions display teh stack trace
-setErrorMessage(m_oJavaMessage + "\n" + m_oJavaStackTrace);
-curEnv->DeleteLocalRef(javaException);
-closeException(curEnv);
-}
-
-JniException::~JniException(void) throw()
-{
-m_oErrorMessage.clear();
-}
-
-/**
-* @return a description of the exception
-*/
-const char * JniException::what(void) const throw()
-{
-return m_oErrorMessage.c_str();
-}
-
-/**
-* @return Java description of the exception.
-*/
-std::string JniException::getJavaDescription(void) const throw()
-{
-return m_oJavaMessage;
-}
-
-/**
-* @return Java stack trace where the exception occured.
-*/
-std::string JniException::getJavaStackTrace(void) const throw()
-{
-return m_oJavaStackTrace;
-}
-
-/**
-* Get the name of the exception (ie its class name).
-*/
-std::string JniException::getJavaExceptionName(void) const throw()
-{
-return m_oJavaExceptionName;
-}
-
-
-/**
-* Set the error message that the exception should print.
-*/
-void JniException::setErrorMessage(const std::string & errorMessage)
-{
-m_oErrorMessage = errorMessage;
-}
-
-/**
-* Get the message that the exception will print.
-*/
-std::string JniException::getErrorMessage(void) const
-{
-return m_oErrorMessage;
-}
-
-/**
-* @return error message of the exception.
-*/
-std::string JniException::retrieveExceptionMessage(JNIEnv * curEnv)
-{
-// return the result of the getLocalizedMessage method
-
-// retrieve information from the exception.
-// get method id
-jmethodID getLocalizedMessageId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException),
-                                               "getLocalizedMessage",
-                                               "()Ljava/lang/String;");
-
-// call getLocalizedMessage
-jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocalizedMessageId);
-
-    if (description == NULL)
-    {
-      return "";
-    }
-
-    std::string res = convertJavaString(curEnv, description);
-
-    // release java ressources
-    curEnv->DeleteLocalRef(description);
-
-    return res;
-  }
-
-  /**
-   * @return full stack trace when the exception occured.
-   */
-  std::string JniException::retrieveStackTrace(JNIEnv * curEnv)
-  {
-
-
-    // return the result of the getStackTrace method
-
-    // retrieve information from the exception.
-    // get method id
-    // getStackTrace returns an array of StackTraceElement
-    jmethodID getStackTraceId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException),
-                                                    "getStackTrace",
-                                                    "()[Ljava/lang/StackTraceElement;");
-
-    // call getStackTrace
-    jobjectArray stackTrace = (jobjectArray) curEnv->CallObjectMethod(javaException, getStackTraceId);
-
-    if (stackTrace == NULL)
-    {
-      return "";
-    }
-
-    // get length of the array
-    jsize stackTraceLength = curEnv->GetArrayLength(stackTrace);
-    std::string res = "";
-
-    // get toString methodId of StackTraceElement class
-    jclass stackTraceElementClass = curEnv->FindClass("java/lang/StackTraceElement");
-    jmethodID toStringId = curEnv->GetMethodID(stackTraceElementClass, "toString", "()Ljava/lang/String;");
-
-    for (jsize i = 0; i < stackTraceLength; i++)
-    {
-      // add the result of toString method of each element in the result
-      jobject curStackTraceElement = curEnv->GetObjectArrayElement(stackTrace, i);
-
-      // call to string on the object
-      jstring stackElementString = (jstring) curEnv->CallObjectMethod(curStackTraceElement, toStringId);
-
-      if (stackElementString == NULL)
-      {
-        curEnv->DeleteLocalRef(stackTraceElementClass);
-        curEnv->DeleteLocalRef(stackTrace);
-        curEnv->DeleteLocalRef(curStackTraceElement);
-        return res;
-      }
-
-      // add a line to res
-      res += " at " + convertJavaString(curEnv, stackElementString) + "\n";
-
-      curEnv->DeleteLocalRef(curStackTraceElement);
-      curEnv->DeleteLocalRef(stackElementString);
-    }
-
-    // release java ressources
-    curEnv->DeleteLocalRef(stackTraceElementClass);
-    curEnv->DeleteLocalRef(stackTrace);
-
-
-    return res;
-  }
-
-  /**
-   * @return string containing the name of the exception (ie its class name).
-   */
-  std::string JniException::retrieveExceptionName(JNIEnv * curEnv)
-  {
-
-    // then get its class
-    jclass exceptionClass = curEnv->GetObjectClass(javaException);
-
-    // get the Class class
-    // we could also use curEnv->FindClass("Class");
-    jclass classClass = curEnv->GetObjectClass(exceptionClass);
-
-    // get the getName method
-    jmethodID getNameId = curEnv->GetMethodID(classClass, "getName", "()Ljava/lang/String;");
-
-    // call the getName function
-    jstring javaName = (jstring) curEnv->CallObjectMethod(exceptionClass, getNameId);
-
-    if (javaName == NULL)
-    {
-      return "";
-    }
-
-    std::string res = convertJavaString(curEnv, javaName);
-
-    // release java ressources
-    curEnv->DeleteLocalRef(exceptionClass);
-    curEnv->DeleteLocalRef(classClass);
-    curEnv->DeleteLocalRef(javaName);
-
-    return res;
-  }
-
-  /**
-   * To be called when all the information about the exceptions have been
-   * retrived.
-   * Remove the exception from the environment.
-   */
-  void JniException::closeException(JNIEnv * curEnv)
-  {
-    // remove the exception from the environment
-    // Beware, the exception is no longer reachable
-    curEnv->ExceptionClear();
-  }
-
-  /**
-   * Convert a Java string (jstring) into a C++ string
-   */
-  std::string JniException::convertJavaString(JNIEnv * curEnv, jstring javaString)
-  {
-    // get a pointer on a C string
-    const char * tempString = curEnv->GetStringUTFChars(javaString, 0);
-
-    // convert the C string into a C++ string
-    std::string res(tempString);
-
-    // release pointer
-    curEnv->ReleaseStringUTFChars(javaString, tempString);
-
-    return res;
-  }
-
-
-  /**
-  * Exception that should be thrown when allocation of Java ressources from C++
-  * code fails (sur as NewDoubleArray or NewStringUTF).
-  */
-  
-  JniBadAllocException::JniBadAllocException(JNIEnv * curEnv) throw() : JniException(curEnv)
-  {
-  std::string message = "Error no more memory.";
-  setErrorMessage(message);
-  }
-  
-  JniBadAllocException::~JniBadAllocException(void) throw() {}
-
-
-  /**
-  * Exception that should be thrown when a call to a Java method
-  * using Jni throw an exception.
-  * If possible, user should try to avoid this sitution because of the loss
-  * of information.
-  */
-  
-  /**
-  * @param curEnv java environment where the exception occured.
-  */
-  JniCallMethodException::JniCallMethodException(JNIEnv * curEnv) throw() : JniException(curEnv)
-  {
-  std::string errorMessage = "Exception when calling Java method : ";
-  errorMessage += getJavaDescription() + "\n" + getJavaStackTrace();
-  errorMessage += what();
-  setErrorMessage(errorMessage);
-  }
-  
-  JniCallMethodException::~JniCallMethodException(void) throw() {}
-  /**
-  * @param className name of the class which haven't been found
-  */
-  JniClassNotFoundException::JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Could not get the Class " + className + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniClassNotFoundException::~JniClassNotFoundException(void) throw() {}
-
-  /**
-   * @param className name of the method which haven't been found
-   */
-  JniMethodNotFoundException::JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Could not access to the method " + methodName + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniMethodNotFoundException::~JniMethodNotFoundException(void) throw() {}
-  
-  /**
-   * @param curEnv java envirnonment where the exception occured.
-   */
-  JniObjectCreationException::JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Could not instantiate the object " + className + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniObjectCreationException::~JniObjectCreationException(void) throw() {}
-
-  /**
-   * @param curEnv java envirnonment where the exception occured.
-   */
-  JniMonitorException::JniMonitorException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Error in the access (Enter or exit) or a Java env monitor of class " + className + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniMonitorException::~JniMonitorException(void) throw() {}
-
-
-
-}
-
diff --git a/scilab/modules/console/src/jni/GiwsException.hxx b/scilab/modules/console/src/jni/GiwsException.hxx
deleted file mode 100644 (file)
index 73f8175..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/* Generated by GIWS (version 1.0.2) */
-/*
-
-Copyright 2007-2008 INRIA
-
-Author : Sylvestre Ledru & others
-
-This software is a computer program whose purpose is to hide the complexity
-of accessing Java objects/methods from C++ code.
-
-This software is governed by the CeCILL-B license under French law and
-abiding by the rules of distribution of free software.  You can  use, 
-modify and/ or redistribute the software under the terms of the CeCILL-B
-license as circulated by CEA, CNRS and INRIA at the following URL
-"http://www.cecill.info". 
-
-As a counterpart to the access to the source code and  rights to copy,
-modify and redistribute granted by the license, users are provided only
-with a limited warranty  and the software's author,  the holder of the
-economic rights,  and the successive licensors  have only  limited
-liability. 
-
-In this respect, the user's attention is drawn to the risks associated
-with loading,  using,  modifying and/or developing or reproducing the
-software by the user in light of its specific status of free software,
-that may mean  that it is complicated to manipulate,  and  that  also
-therefore means  that it is reserved for developers  and  experienced
-professionals having in-depth computer knowledge. Users are therefore
-encouraged to load and test the software's suitability as regards their
-requirements in conditions enabling the security of their systems and/or 
-data to be ensured and,  more generally, to use and operate it in the 
-same conditions as regards security. 
-
-The fact that you are presently reading this means that you have had
-knowledge of the CeCILL-B license and that you accept its terms.
-*/
-
-
-#ifndef __GIWSEXCEPTION__
-#define __GIWSEXCEPTION__
-#include <iostream>
-#include <string>
-#include <string.h>
-#include <stdlib.h>
-#include <jni.h>
-#include <exception>
-
-namespace GiwsException {
-
-
-/**
-* Parent class for exceptions which may occure in JNI code.
-*/
-class JniException : public std::exception
-{
-
-/** Error message to display */
-std::string m_oErrorMessage;
-
-/** Java description of the exception*/
-std::string m_oJavaMessage;
-
-/** Java stackTrace when the exception occured */
-std::string m_oJavaStackTrace;
-
-/** Name of the exception (ie class name).*/
-std::string m_oJavaExceptionName;
-
-/** The exception itself ... we store as a member otherwise JNI
-complains about 'WARNING in native method: JNI call made with
-exception pending' */
-jthrowable javaException;
-
-public:
-
-/**
-* Each subclass of JniExcpetion should call the super constructor
-* and the setErrorMessage function to set the message.
-* @param curEnv java environment where the exception occured.
-*/
-JniException(JNIEnv * curEnv) throw() ;
-
-virtual ~JniException(void) throw();
-
-/**
-* @return a description of the exception
-*/
-virtual const char * what(void) const throw();
-
-/**
-* @return Java description of the exception.
-*/
-std::string getJavaDescription(void) const throw();
-
-/**
-* @return Java stack trace where the exception occured.
-*/
-std::string getJavaStackTrace(void) const throw();
-
-/**
-* Get the name of the exception (ie its class name).
-*/
-std::string getJavaExceptionName(void) const throw();
-
-protected:
-
-/**
-* Set the error message that the exception should print.
-*/
-void setErrorMessage(const std::string & errorMessage);
-
-/**
-* Get the message that the exception will print.
-*/
-std::string getErrorMessage(void) const;
-
-private:
-  /**
-* @return error message of the exception.
-*/
-std::string retrieveExceptionMessage(JNIEnv * curEnv);
-/**
-* @return full stack trace when the exception occured.
-*/
-std::string retrieveStackTrace(JNIEnv * curEnv);
-
-/**
-* @return string containing the name of the exception (ie its class name).
-*/
-std::string retrieveExceptionName(JNIEnv * curEnv);
-/**
-* To be called when all the information about the exceptions have been
-* retrived.
-* Remove the exception from the environment.
-*/
-void closeException(JNIEnv * curEnv);
-
-/**
-* Convert a Java string (jstring) into a C++ string
-*/
-std::string convertJavaString(JNIEnv * curEnv, jstring javaString);
-};
-
-/**
-* Exception that should be thrown when allocation of Java ressources from C++
-* code fails (sur as NewDoubleArray or NewStringUTF).
-*/
-class JniBadAllocException : public JniException
-{
-public:
-
-JniBadAllocException(JNIEnv * curEnv) throw();
-virtual ~JniBadAllocException(void) throw();
-};
-
-/**
-* Exception that should be thrown when a call to a Java method
-* using Jni throw an exception.
-* If possible, user should try to avoid this sitution because of the loss
-* of information.
-*/
-class JniCallMethodException : public JniException
-{
-public:
-
-  /**
-   * @param curEnv java envirnonment where the exception occured.
-   */
-  JniCallMethodException(JNIEnv * curEnv) throw();
-
-  virtual ~JniCallMethodException(void) throw();
-};
-
-/**
-* Exception that should be thrown when Jni code could not find a Java class
-*/
-class JniClassNotFoundException : public JniException
-{
-public:
-
-/**
-* @param className name of the class which haven't been found
-*/
-JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw();
-
-virtual ~JniClassNotFoundException(void) throw();
-
-};
-
-/**
-* Exception that should be thrown when Jni code could not find a Java method
-*/
-class JniMethodNotFoundException : public JniException
-{
-public:
-
-/**
-* @param className name of the method which haven't been found
-*/
-JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw();
-virtual ~JniMethodNotFoundException(void) throw();
-
-};
-
-/**
-* Exception that should be thrown when a call to a Java method
-* using Jni throw an exception.
-* If possible, user should try to avoid this sitution because of the loss
-* of information.
-*/
-class JniObjectCreationException : public JniException
-{
-public:
-
-/**
-* @param curEnv java envirnonment where the exception occured.
-*/
-JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw();
-virtual ~JniObjectCreationException(void) throw();
-
-};
-
-
-/**
-* Exception that should be thrown when a call to the Java monitor
-* failed
-*/
-class JniMonitorException : public JniException
-{
-public:
-
-/**
-* @param curEnv java envirnonment where the exception occured.
-*/
-JniMonitorException(JNIEnv * curEnv, const std::string & className) throw();
-virtual ~JniMonitorException(void) throw();
-
-};
-
-
-}
-#endif
-
index 0b48cbc..3351525 100644 (file)
@@ -2905,6 +2905,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 0579830..dfe33c8 100644 (file)
@@ -1209,6 +1209,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index e2f2c33..1f16255 100644 (file)
@@ -751,6 +751,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index a4425a7..a4a822f 100644 (file)
@@ -724,6 +724,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 709a6c6..fb80eea 100644 (file)
@@ -1588,6 +1588,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 86642c4..6dd7d79 100644 (file)
@@ -985,6 +985,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 7b8aa97..e6bda0f 100644 (file)
@@ -1183,6 +1183,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 4f310e7..65f916e 100644 (file)
@@ -2909,6 +2909,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 3da6843..2284c4f 100644 (file)
@@ -1143,6 +1143,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 7eeecc8..f8254d0 100644 (file)
@@ -1934,6 +1934,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index ef32311..4a3bd8d 100644 (file)
@@ -1104,6 +1104,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index c2375e6..85461e5 100644 (file)
@@ -728,6 +728,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 25b56c9..4602e79 100644 (file)
@@ -730,6 +730,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 7e957dd..36e8c41 100644 (file)
@@ -30,8 +30,7 @@ src/cpp/GL2PSConstant.cpp \
 src/cpp/GL2PSWrapping.cpp \
 src/cpp/JoGLInterface.cpp  \
 src/jni/GL2PSToJOGL.cpp \
-src/jni/JOGLConstant.cpp \
-src/jni/GiwsException.cpp
+src/jni/JOGLConstant.cpp
 
 GRAPHIC_EXPORT_C_SOURCES = src/c/xs2file.c \
 src/jni/GL2PSConstant_wrap.c \
@@ -63,6 +62,7 @@ libscigraphic_export_la_CPPFLAGS =    $(JAVA_JNI_INCLUDE) \
                                -I$(top_srcdir)/modules/output_stream/includes \
                                -I$(top_srcdir)/modules/fileio/includes \
                                -I$(top_srcdir)/modules/api_scilab/includes \
+                               -I$(top_srcdir)/modules/commons/src/jni \
                                -I$(top_srcdir)/libs/doublylinkedlist/includes
 
 # All the sources needed by libscigraphic_export.la
index b8bb7dd..7cb410e 100644 (file)
@@ -128,8 +128,7 @@ am__objects_2 = libscigraphic_export_algo_la-exportToFile.lo \
        libscigraphic_export_algo_la-GL2PSWrapping.lo \
        libscigraphic_export_algo_la-JoGLInterface.lo \
        libscigraphic_export_algo_la-GL2PSToJOGL.lo \
-       libscigraphic_export_algo_la-JOGLConstant.lo \
-       libscigraphic_export_algo_la-GiwsException.lo
+       libscigraphic_export_algo_la-JOGLConstant.lo
 am_libscigraphic_export_algo_la_OBJECTS = $(am__objects_1) \
        $(am__objects_2)
 libscigraphic_export_algo_la_OBJECTS =  \
@@ -459,8 +458,7 @@ src/cpp/GL2PSConstant.cpp \
 src/cpp/GL2PSWrapping.cpp \
 src/cpp/JoGLInterface.cpp  \
 src/jni/GL2PSToJOGL.cpp \
-src/jni/JOGLConstant.cpp \
-src/jni/GiwsException.cpp
+src/jni/JOGLConstant.cpp
 
 GRAPHIC_EXPORT_C_SOURCES = src/c/xs2file.c \
 src/jni/GL2PSConstant_wrap.c \
@@ -493,6 +491,7 @@ libscigraphic_export_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
                                -I$(top_srcdir)/modules/output_stream/includes \
                                -I$(top_srcdir)/modules/fileio/includes \
                                -I$(top_srcdir)/modules/api_scilab/includes \
+                               -I$(top_srcdir)/modules/commons/src/jni \
                                -I$(top_srcdir)/libs/doublylinkedlist/includes
 
 
@@ -695,7 +694,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_export_algo_la-GL2PSToJOGL.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_export_algo_la-GL2PSWrapping.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_export_algo_la-GL2PSWrapping_wrap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_export_algo_la-GiwsException.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_export_algo_la-JOGLConstant.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_export_algo_la-JoGLInterface.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphic_export_algo_la-exportToFile.Plo@am__quote@
@@ -909,13 +907,6 @@ libscigraphic_export_algo_la-JOGLConstant.lo: src/jni/JOGLConstant.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_export_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigraphic_export_algo_la-JOGLConstant.lo `test -f 'src/jni/JOGLConstant.cpp' || echo '$(srcdir)/'`src/jni/JOGLConstant.cpp
 
-libscigraphic_export_algo_la-GiwsException.lo: src/jni/GiwsException.cpp
-@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_export_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigraphic_export_algo_la-GiwsException.lo -MD -MP -MF $(DEPDIR)/libscigraphic_export_algo_la-GiwsException.Tpo -c -o libscigraphic_export_algo_la-GiwsException.lo `test -f 'src/jni/GiwsException.cpp' || echo '$(srcdir)/'`src/jni/GiwsException.cpp
-@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscigraphic_export_algo_la-GiwsException.Tpo $(DEPDIR)/libscigraphic_export_algo_la-GiwsException.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/jni/GiwsException.cpp' object='libscigraphic_export_algo_la-GiwsException.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphic_export_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigraphic_export_algo_la-GiwsException.lo `test -f 'src/jni/GiwsException.cpp' || echo '$(srcdir)/'`src/jni/GiwsException.cpp
-
 mostlyclean-libtool:
        -rm -f *.lo
 
@@ -1256,6 +1247,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 02c98dc..a09909c 100644 (file)
@@ -81,7 +81,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;GRAPHIC_EXPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -90,6 +90,7 @@
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -120,7 +121,7 @@ lib /DEF:"$(ProjectDir)renderer_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;GRAPHIC_EXPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -129,6 +130,7 @@ lib /DEF:"$(ProjectDir)renderer_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -159,7 +161,7 @@ lib /DEF:"$(ProjectDir)renderer_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;GRAPHIC_EXPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -169,6 +171,7 @@ lib /DEF:"$(ProjectDir)renderer_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -204,7 +207,7 @@ lib /DEF:"$(ProjectDir)renderer_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;GRAPHIC_EXPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -214,6 +217,7 @@ lib /DEF:"$(ProjectDir)renderer_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
@@ -242,7 +246,6 @@ lib /DEF:"$(ProjectDir)renderer_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClCompile Include="src\jni\GiwsException.cpp" />
     <ClCompile Include="src\cpp\exportToFile.cpp" />
     <ClCompile Include="src\jni\FileExporter.cpp" />
     <ClCompile Include="src\cpp\GL2PSConstant.cpp" />
@@ -267,7 +270,6 @@ lib /DEF:"$(ProjectDir)renderer_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
     <ClCompile Include="src\c\xs2file.c" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="src\jni\GiwsException.hxx" />
     <ClInclude Include="includes\dynlib_graphic_export.h" />
     <ClInclude Include="src\c\gl2ps\gl2ps.h" />
     <ClInclude Include="includes\gw_graphic_export.h" />
@@ -299,6 +301,9 @@ lib /DEF:"$(ProjectDir)renderer_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
       <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
+    <ProjectReference Include="..\commons\src\c\commons.vcxproj">
+      <Project>{eca09a1e-6d12-4a47-92e1-a671c181df77}</Project>
+    </ProjectReference>
     <ProjectReference Include="..\fileio\fileio.vcxproj">
       <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
index 53358bd..1e24f14 100644 (file)
@@ -39,9 +39,6 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="src\jni\GiwsException.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="src\cpp\exportToFile.cpp">
       <Filter>Source Files\cpp</Filter>
     </ClCompile>
     </ClCompile>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="src\jni\GiwsException.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="includes\dynlib_graphic_export.h">
       <Filter>Header Files\h</Filter>
     </ClInclude>
index 97dc96f..3213736 100644 (file)
@@ -1,5 +1,5 @@
 #include "FileExporter.hxx"
-/* Generated by GIWS (version 1.2.4) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
@@ -104,7 +104,7 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 curEnv->DeleteLocalRef(localInstance);
 
                 /* Methods ID set to NULL */
-jstringfileExportjintjstringjintjfloatjintID=NULL; 
+jstringfileExportjintintjstringjava_lang_StringjintintjfloatfloatjintintID=NULL;
 
 
 }
@@ -127,7 +127,7 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 throw GiwsException::JniObjectCreationException(curEnv, this->className());
         }
         /* Methods ID set to NULL */
-        jstringfileExportjintjstringjintjfloatjintID=NULL; 
+        jstringfileExportjintintjstringjava_lang_StringjintintjfloatfloatjintintID=NULL;
 
 
 }
@@ -153,19 +153,19 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID jstringfileExportjintjstringjintjfloatjintID = curEnv->GetStaticMethodID(cls, "fileExport", "(ILjava/lang/String;IFI)Ljava/lang/String;" ) ;
-if (jstringfileExportjintjstringjintjfloatjintID == NULL) {
+jmethodID jstringfileExportjintintjstringjava_lang_StringjintintjfloatfloatjintintID = curEnv->GetStaticMethodID(cls, "fileExport", "(ILjava/lang/String;IFI)Ljava/lang/String;" ) ;
+if (jstringfileExportjintintjstringjava_lang_StringjintintjfloatfloatjintintID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "fileExport");
 }
 
 jstring fileName_ = curEnv->NewStringUTF( fileName );
-if (fileName_ == NULL)
+if (fileName != NULL && fileName_ == NULL)
 {
 throw GiwsException::JniBadAllocException(curEnv);
 }
 
 
-                        jstring res =  static_cast<jstring>( curEnv->CallStaticObjectMethod(cls, jstringfileExportjintjstringjintjfloatjintID ,figureIndex, fileName_, fileType, jpegCompressionQuality, orientation));
+                        jstring res =  static_cast<jstring>( curEnv->CallStaticObjectMethod(cls, jstringfileExportjintintjstringjava_lang_StringjintintjfloatfloatjintintID ,figureIndex, fileName_, fileType, jpegCompressionQuality, orientation));
                         if (curEnv->ExceptionCheck()) {
 throw GiwsException::JniCallMethodException(curEnv);
 }
index 8bed854..9cfdccc 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by GIWS (version 1.2.4) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
@@ -57,14 +57,27 @@ typedef signed char byte;
 #endif
 #endif
 
+
+#ifndef GIWSEXPORT
+# if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define GIWSEXPORT
+#   else
+#     define GIWSEXPORT __declspec(dllexport)
+#   endif
+# else
+#     define GIWSEXPORT
+# endif
+#endif
+
 namespace org_scilab_modules_graphic_export {
-class FileExporter {
+class GIWSEXPORT FileExporter {
 
 private:
 JavaVM * jvm;
 
 protected:
-jmethodID jstringfileExportjintjstringjintjfloatjintID; // cache method id
+jmethodID jstringfileExportjintintjstringjava_lang_StringjintintjfloatfloatjintintID; // cache method id
 
 
 
index aa1d30b..47b54c3 100644 (file)
@@ -1,5 +1,5 @@
 #include "GL2PSToJOGL.hxx"
-/* Generated by GIWS (version 1.2.4) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
@@ -104,26 +104,26 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 curEnv->DeleteLocalRef(localInstance);
 
                 /* Methods ID set to NULL */
-voidglFeedbackBufferjintjintID=NULL; 
-jfloatArray_readFeedbackBufferjintID=NULL; 
-jbooleanglIsEnabledjintID=NULL; 
-voidglBeginjintID=NULL; 
-voidglVertex3fjfloatjfloatjfloatID=NULL; 
-voidglEndID=NULL; 
-jbooleanglGetCurrentRasterPositionValidID=NULL; 
-jintglRenderModejintID=NULL; 
-jintglGetLineStipplePatternID=NULL; 
-jintglGetLineStippleRepeatID=NULL; 
-jintglGetIndexClearValueID=NULL; 
-jintArray_glGetViewportID=NULL; 
-jintglGetBlendSrcID=NULL; 
-jintglGetBlendDstID=NULL; 
-jfloatArray_glGetColorClearValueID=NULL; 
-jfloatglGetPolygonOffsetFactorID=NULL; 
-jfloatglGetPolygonOffsetUnitsID=NULL; 
-jfloatArray_glGetCurrentRasterPositionID=NULL; 
-jfloatArray_glGetCurrentRasterColorID=NULL; 
-voidglPassThroughjfloatID=NULL; 
+voidglFeedbackBufferjintintjintintID=NULL;
+jfloatArray_readFeedbackBufferjintintID=NULL;
+jbooleanglIsEnabledjintintID=NULL;
+voidglBeginjintintID=NULL;
+voidglVertex3fjfloatfloatjfloatfloatjfloatfloatID=NULL;
+voidglEndID=NULL;
+jbooleanglGetCurrentRasterPositionValidID=NULL;
+jintglRenderModejintintID=NULL;
+jintglGetLineStipplePatternID=NULL;
+jintglGetLineStippleRepeatID=NULL;
+jintglGetIndexClearValueID=NULL;
+jintArray_glGetViewportID=NULL;
+jintglGetBlendSrcID=NULL;
+jintglGetBlendDstID=NULL;
+jfloatArray_glGetColorClearValueID=NULL;
+jfloatglGetPolygonOffsetFactorID=NULL;
+jfloatglGetPolygonOffsetUnitsID=NULL;
+jfloatArray_glGetCurrentRasterPositionID=NULL;
+jfloatArray_glGetCurrentRasterColorID=NULL;
+voidglPassThroughjfloatfloatID=NULL;
 
 
 }
@@ -146,26 +146,26 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 throw GiwsException::JniObjectCreationException(curEnv, this->className());
         }
         /* Methods ID set to NULL */
-        voidglFeedbackBufferjintjintID=NULL; 
-jfloatArray_readFeedbackBufferjintID=NULL; 
-jbooleanglIsEnabledjintID=NULL; 
-voidglBeginjintID=NULL; 
-voidglVertex3fjfloatjfloatjfloatID=NULL; 
-voidglEndID=NULL; 
-jbooleanglGetCurrentRasterPositionValidID=NULL; 
-jintglRenderModejintID=NULL; 
-jintglGetLineStipplePatternID=NULL; 
-jintglGetLineStippleRepeatID=NULL; 
-jintglGetIndexClearValueID=NULL; 
-jintArray_glGetViewportID=NULL; 
-jintglGetBlendSrcID=NULL; 
-jintglGetBlendDstID=NULL; 
-jfloatArray_glGetColorClearValueID=NULL; 
-jfloatglGetPolygonOffsetFactorID=NULL; 
-jfloatglGetPolygonOffsetUnitsID=NULL; 
-jfloatArray_glGetCurrentRasterPositionID=NULL; 
-jfloatArray_glGetCurrentRasterColorID=NULL; 
-voidglPassThroughjfloatID=NULL; 
+        voidglFeedbackBufferjintintjintintID=NULL;
+jfloatArray_readFeedbackBufferjintintID=NULL;
+jbooleanglIsEnabledjintintID=NULL;
+voidglBeginjintintID=NULL;
+voidglVertex3fjfloatfloatjfloatfloatjfloatfloatID=NULL;
+voidglEndID=NULL;
+jbooleanglGetCurrentRasterPositionValidID=NULL;
+jintglRenderModejintintID=NULL;
+jintglGetLineStipplePatternID=NULL;
+jintglGetLineStippleRepeatID=NULL;
+jintglGetIndexClearValueID=NULL;
+jintArray_glGetViewportID=NULL;
+jintglGetBlendSrcID=NULL;
+jintglGetBlendDstID=NULL;
+jfloatArray_glGetColorClearValueID=NULL;
+jfloatglGetPolygonOffsetFactorID=NULL;
+jfloatglGetPolygonOffsetUnitsID=NULL;
+jfloatArray_glGetCurrentRasterPositionID=NULL;
+jfloatArray_glGetCurrentRasterColorID=NULL;
+voidglPassThroughjfloatfloatID=NULL;
 
 
 }
@@ -191,12 +191,12 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID voidglFeedbackBufferjintjintID = curEnv->GetStaticMethodID(cls, "glFeedbackBuffer", "(II)V" ) ;
-if (voidglFeedbackBufferjintjintID == NULL) {
+jmethodID voidglFeedbackBufferjintintjintintID = curEnv->GetStaticMethodID(cls, "glFeedbackBuffer", "(II)V" ) ;
+if (voidglFeedbackBufferjintintjintintID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "glFeedbackBuffer");
 }
 
-                         curEnv->CallStaticVoidMethod(cls, voidglFeedbackBufferjintjintID ,arg0, arg1);
+                         curEnv->CallStaticVoidMethod(cls, voidglFeedbackBufferjintintjintintID ,arg0, arg1);
                         curEnv->DeleteLocalRef(cls);
 if (curEnv->ExceptionCheck()) {
 throw GiwsException::JniCallMethodException(curEnv);
@@ -209,12 +209,12 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID jfloatArray_readFeedbackBufferjintID = curEnv->GetStaticMethodID(cls, "readFeedbackBuffer", "(I)[F" ) ;
-if (jfloatArray_readFeedbackBufferjintID == NULL) {
+jmethodID jfloatArray_readFeedbackBufferjintintID = curEnv->GetStaticMethodID(cls, "readFeedbackBuffer", "(I)[F" ) ;
+if (jfloatArray_readFeedbackBufferjintintID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "readFeedbackBuffer");
 }
 
-                        jfloatArray res =  static_cast<jfloatArray>( curEnv->CallStaticObjectMethod(cls, jfloatArray_readFeedbackBufferjintID ,size));
+                        jfloatArray res =  static_cast<jfloatArray>( curEnv->CallStaticObjectMethod(cls, jfloatArray_readFeedbackBufferjintintID ,size));
                         if (res == NULL) { return NULL; }
                         if (curEnv->ExceptionCheck()) {
 throw GiwsException::JniCallMethodException(curEnv);
@@ -247,12 +247,12 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID jbooleanglIsEnabledjintID = curEnv->GetStaticMethodID(cls, "glIsEnabled", "(I)Z" ) ;
-if (jbooleanglIsEnabledjintID == NULL) {
+jmethodID jbooleanglIsEnabledjintintID = curEnv->GetStaticMethodID(cls, "glIsEnabled", "(I)Z" ) ;
+if (jbooleanglIsEnabledjintintID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "glIsEnabled");
 }
 
-                        jboolean res =  static_cast<jboolean>( curEnv->CallStaticBooleanMethod(cls, jbooleanglIsEnabledjintID ,arg0));
+                        jboolean res =  static_cast<jboolean>( curEnv->CallStaticBooleanMethod(cls, jbooleanglIsEnabledjintintID ,arg0));
                         curEnv->DeleteLocalRef(cls);
 if (curEnv->ExceptionCheck()) {
 throw GiwsException::JniCallMethodException(curEnv);
@@ -267,12 +267,12 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID voidglBeginjintID = curEnv->GetStaticMethodID(cls, "glBegin", "(I)V" ) ;
-if (voidglBeginjintID == NULL) {
+jmethodID voidglBeginjintintID = curEnv->GetStaticMethodID(cls, "glBegin", "(I)V" ) ;
+if (voidglBeginjintintID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "glBegin");
 }
 
-                         curEnv->CallStaticVoidMethod(cls, voidglBeginjintID ,arg0);
+                         curEnv->CallStaticVoidMethod(cls, voidglBeginjintintID ,arg0);
                         curEnv->DeleteLocalRef(cls);
 if (curEnv->ExceptionCheck()) {
 throw GiwsException::JniCallMethodException(curEnv);
@@ -285,12 +285,12 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID voidglVertex3fjfloatjfloatjfloatID = curEnv->GetStaticMethodID(cls, "glVertex3f", "(FFF)V" ) ;
-if (voidglVertex3fjfloatjfloatjfloatID == NULL) {
+jmethodID voidglVertex3fjfloatfloatjfloatfloatjfloatfloatID = curEnv->GetStaticMethodID(cls, "glVertex3f", "(FFF)V" ) ;
+if (voidglVertex3fjfloatfloatjfloatfloatjfloatfloatID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "glVertex3f");
 }
 
-                         curEnv->CallStaticVoidMethod(cls, voidglVertex3fjfloatjfloatjfloatID ,arg0, arg1, arg2);
+                         curEnv->CallStaticVoidMethod(cls, voidglVertex3fjfloatfloatjfloatfloatjfloatfloatID ,arg0, arg1, arg2);
                         curEnv->DeleteLocalRef(cls);
 if (curEnv->ExceptionCheck()) {
 throw GiwsException::JniCallMethodException(curEnv);
@@ -341,12 +341,12 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID jintglRenderModejintID = curEnv->GetStaticMethodID(cls, "glRenderMode", "(I)I" ) ;
-if (jintglRenderModejintID == NULL) {
+jmethodID jintglRenderModejintintID = curEnv->GetStaticMethodID(cls, "glRenderMode", "(I)I" ) ;
+if (jintglRenderModejintintID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "glRenderMode");
 }
 
-                        jint res =  static_cast<jint>( curEnv->CallStaticIntMethod(cls, jintglRenderModejintID ,arg0));
+                        jint res =  static_cast<jint>( curEnv->CallStaticIntMethod(cls, jintglRenderModejintintID ,arg0));
                         curEnv->DeleteLocalRef(cls);
 if (curEnv->ExceptionCheck()) {
 throw GiwsException::JniCallMethodException(curEnv);
@@ -653,12 +653,12 @@ JNIEnv * curEnv = NULL;
 jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 jclass cls = curEnv->FindClass( className().c_str() );
 
-jmethodID voidglPassThroughjfloatID = curEnv->GetStaticMethodID(cls, "glPassThrough", "(F)V" ) ;
-if (voidglPassThroughjfloatID == NULL) {
+jmethodID voidglPassThroughjfloatfloatID = curEnv->GetStaticMethodID(cls, "glPassThrough", "(F)V" ) ;
+if (voidglPassThroughjfloatfloatID == NULL) {
 throw GiwsException::JniMethodNotFoundException(curEnv, "glPassThrough");
 }
 
-                         curEnv->CallStaticVoidMethod(cls, voidglPassThroughjfloatID ,arg0);
+                         curEnv->CallStaticVoidMethod(cls, voidglPassThroughjfloatfloatID ,arg0);
                         curEnv->DeleteLocalRef(cls);
 if (curEnv->ExceptionCheck()) {
 throw GiwsException::JniCallMethodException(curEnv);
index 078b14f..01dade4 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by GIWS (version 1.2.4) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
@@ -57,21 +57,34 @@ typedef signed char byte;
 #endif
 #endif
 
+
+#ifndef GIWSEXPORT
+# if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define GIWSEXPORT
+#   else
+#     define GIWSEXPORT __declspec(dllexport)
+#   endif
+# else
+#     define GIWSEXPORT
+# endif
+#endif
+
 namespace org_scilab_modules_graphic_export {
-class GL2PSToJOGL {
+class GIWSEXPORT GL2PSToJOGL {
 
 private:
 JavaVM * jvm;
 
 protected:
-jmethodID voidglFeedbackBufferjintjintID; // cache method id
-jmethodID jfloatArray_readFeedbackBufferjintID; // cache method id
-jmethodID jbooleanglIsEnabledjintID; // cache method id
-jmethodID voidglBeginjintID; // cache method id
-jmethodID voidglVertex3fjfloatjfloatjfloatID; // cache method id
+jmethodID voidglFeedbackBufferjintintjintintID; // cache method id
+jmethodID jfloatArray_readFeedbackBufferjintintID; // cache method id
+jmethodID jbooleanglIsEnabledjintintID; // cache method id
+jmethodID voidglBeginjintintID; // cache method id
+jmethodID voidglVertex3fjfloatfloatjfloatfloatjfloatfloatID; // cache method id
 jmethodID voidglEndID; // cache method id
 jmethodID jbooleanglGetCurrentRasterPositionValidID; // cache method id
-jmethodID jintglRenderModejintID; // cache method id
+jmethodID jintglRenderModejintintID; // cache method id
 jmethodID jintglGetLineStipplePatternID; // cache method id
 jmethodID jintglGetLineStippleRepeatID; // cache method id
 jmethodID jintglGetIndexClearValueID; // cache method id
@@ -83,7 +96,7 @@ jmethodID jfloatglGetPolygonOffsetFactorID; // cache method id
 jmethodID jfloatglGetPolygonOffsetUnitsID; // cache method id
 jmethodID jfloatArray_glGetCurrentRasterPositionID; // cache method id
 jmethodID jfloatArray_glGetCurrentRasterColorID; // cache method id
-jmethodID voidglPassThroughjfloatID; // cache method id
+jmethodID voidglPassThroughjfloatfloatID; // cache method id
 
 
 
diff --git a/scilab/modules/graphic_export/src/jni/GiwsException.cpp b/scilab/modules/graphic_export/src/jni/GiwsException.cpp
deleted file mode 100644 (file)
index 234e52b..0000000
+++ /dev/null
@@ -1,354 +0,0 @@
-/* Generated by GIWS (version 1.0.2) */
-/*
-
-Copyright 2007-2008 INRIA
-
-Author : Sylvestre Ledru & others
-
-This software is a computer program whose purpose is to hide the complexity
-of accessing Java objects/methods from C++ code.
-
-This software is governed by the CeCILL-B license under French law and
-abiding by the rules of distribution of free software.  You can  use, 
-modify and/ or redistribute the software under the terms of the CeCILL-B
-license as circulated by CEA, CNRS and INRIA at the following URL
-"http://www.cecill.info". 
-
-As a counterpart to the access to the source code and  rights to copy,
-modify and redistribute granted by the license, users are provided only
-with a limited warranty  and the software's author,  the holder of the
-economic rights,  and the successive licensors  have only  limited
-liability. 
-
-In this respect, the user's attention is drawn to the risks associated
-with loading,  using,  modifying and/or developing or reproducing the
-software by the user in light of its specific status of free software,
-that may mean  that it is complicated to manipulate,  and  that  also
-therefore means  that it is reserved for developers  and  experienced
-professionals having in-depth computer knowledge. Users are therefore
-encouraged to load and test the software's suitability as regards their
-requirements in conditions enabling the security of their systems and/or 
-data to be ensured and,  more generally, to use and operate it in the 
-same conditions as regards security. 
-
-The fact that you are presently reading this means that you have had
-knowledge of the CeCILL-B license and that you accept its terms.
-*/
-
-#include "GiwsException.hxx" 
-namespace GiwsException {
-
-
-
-/**
-* Each subclass of JniExcpetion should call the super constructor
-* and the setErrorMessage function to set the message.
-* @param curEnv java envirnonment where the exception occured.
-*/
-JniException::JniException(JNIEnv * curEnv) throw() : exception()
-{
-// retrieve information about the exception
-javaException = curEnv->ExceptionOccurred();
-/* Clear the Java Exception to avoid calling it again & again */
-curEnv->ExceptionClear();
-m_oJavaMessage = this->retrieveExceptionMessage(curEnv);
-m_oJavaStackTrace = this->retrieveStackTrace(curEnv);
-m_oJavaExceptionName = this->retrieveExceptionName(curEnv);
-
-// by default JniExceptions display teh stack trace
-setErrorMessage(m_oJavaMessage + "\n" + m_oJavaStackTrace);
-curEnv->DeleteLocalRef(javaException);
-closeException(curEnv);
-}
-
-JniException::~JniException(void) throw()
-{
-m_oErrorMessage.clear();
-}
-
-/**
-* @return a description of the exception
-*/
-const char * JniException::what(void) const throw()
-{
-return m_oErrorMessage.c_str();
-}
-
-/**
-* @return Java description of the exception.
-*/
-std::string JniException::getJavaDescription(void) const throw()
-{
-return m_oJavaMessage;
-}
-
-/**
-* @return Java stack trace where the exception occured.
-*/
-std::string JniException::getJavaStackTrace(void) const throw()
-{
-return m_oJavaStackTrace;
-}
-
-/**
-* Get the name of the exception (ie its class name).
-*/
-std::string JniException::getJavaExceptionName(void) const throw()
-{
-return m_oJavaExceptionName;
-}
-
-
-/**
-* Set the error message that the exception should print.
-*/
-void JniException::setErrorMessage(const std::string & errorMessage)
-{
-m_oErrorMessage = errorMessage;
-}
-
-/**
-* Get the message that the exception will print.
-*/
-std::string JniException::getErrorMessage(void) const
-{
-return m_oErrorMessage;
-}
-
-/**
-* @return error message of the exception.
-*/
-std::string JniException::retrieveExceptionMessage(JNIEnv * curEnv)
-{
-// return the result of the getLocalizedMessage method
-
-// retrieve information from the exception.
-// get method id
-jmethodID getLocalizedMessageId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException),
-                                               "getLocalizedMessage",
-                                               "()Ljava/lang/String;");
-
-// call getLocalizedMessage
-jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocalizedMessageId);
-
-    if (description == NULL)
-    {
-      return "";
-    }
-
-    std::string res = convertJavaString(curEnv, description);
-
-    // release java ressources
-    curEnv->DeleteLocalRef(description);
-
-    return res;
-  }
-
-  /**
-   * @return full stack trace when the exception occured.
-   */
-  std::string JniException::retrieveStackTrace(JNIEnv * curEnv)
-  {
-
-
-    // return the result of the getStackTrace method
-
-    // retrieve information from the exception.
-    // get method id
-    // getStackTrace returns an array of StackTraceElement
-    jmethodID getStackTraceId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException),
-                                                    "getStackTrace",
-                                                    "()[Ljava/lang/StackTraceElement;");
-
-    // call getStackTrace
-    jobjectArray stackTrace = (jobjectArray) curEnv->CallObjectMethod(javaException, getStackTraceId);
-
-    if (stackTrace == NULL)
-    {
-      return "";
-    }
-
-    // get length of the array
-    jsize stackTraceLength = curEnv->GetArrayLength(stackTrace);
-    std::string res = "";
-
-    // get toString methodId of StackTraceElement class
-    jclass stackTraceElementClass = curEnv->FindClass("java/lang/StackTraceElement");
-    jmethodID toStringId = curEnv->GetMethodID(stackTraceElementClass, "toString", "()Ljava/lang/String;");
-
-    for (jsize i = 0; i < stackTraceLength; i++)
-    {
-      // add the result of toString method of each element in the result
-      jobject curStackTraceElement = curEnv->GetObjectArrayElement(stackTrace, i);
-
-      // call to string on the object
-      jstring stackElementString = (jstring) curEnv->CallObjectMethod(curStackTraceElement, toStringId);
-
-      if (stackElementString == NULL)
-      {
-        curEnv->DeleteLocalRef(stackTraceElementClass);
-        curEnv->DeleteLocalRef(stackTrace);
-        curEnv->DeleteLocalRef(curStackTraceElement);
-        return res;
-      }
-
-      // add a line to res
-      res += " at " + convertJavaString(curEnv, stackElementString) + "\n";
-
-      curEnv->DeleteLocalRef(curStackTraceElement);
-      curEnv->DeleteLocalRef(stackElementString);
-    }
-
-    // release java ressources
-    curEnv->DeleteLocalRef(stackTraceElementClass);
-    curEnv->DeleteLocalRef(stackTrace);
-
-
-    return res;
-  }
-
-  /**
-   * @return string containing the name of the exception (ie its class name).
-   */
-  std::string JniException::retrieveExceptionName(JNIEnv * curEnv)
-  {
-
-    // then get its class
-    jclass exceptionClass = curEnv->GetObjectClass(javaException);
-
-    // get the Class class
-    // we could also use curEnv->FindClass("Class");
-    jclass classClass = curEnv->GetObjectClass(exceptionClass);
-
-    // get the getName method
-    jmethodID getNameId = curEnv->GetMethodID(classClass, "getName", "()Ljava/lang/String;");
-
-    // call the getName function
-    jstring javaName = (jstring) curEnv->CallObjectMethod(exceptionClass, getNameId);
-
-    if (javaName == NULL)
-    {
-      return "";
-    }
-
-    std::string res = convertJavaString(curEnv, javaName);
-
-    // release java ressources
-    curEnv->DeleteLocalRef(exceptionClass);
-    curEnv->DeleteLocalRef(classClass);
-    curEnv->DeleteLocalRef(javaName);
-
-    return res;
-  }
-
-  /**
-   * To be called when all the information about the exceptions have been
-   * retrived.
-   * Remove the exception from the environment.
-   */
-  void JniException::closeException(JNIEnv * curEnv)
-  {
-    // remove the exception from the environment
-    // Beware, the exception is no longer reachable
-    curEnv->ExceptionClear();
-  }
-
-  /**
-   * Convert a Java string (jstring) into a C++ string
-   */
-  std::string JniException::convertJavaString(JNIEnv * curEnv, jstring javaString)
-  {
-    // get a pointer on a C string
-    const char * tempString = curEnv->GetStringUTFChars(javaString, 0);
-
-    // convert the C string into a C++ string
-    std::string res(tempString);
-
-    // release pointer
-    curEnv->ReleaseStringUTFChars(javaString, tempString);
-
-    return res;
-  }
-
-
-  /**
-  * Exception that should be thrown when allocation of Java ressources from C++
-  * code fails (sur as NewDoubleArray or NewStringUTF).
-  */
-  
-  JniBadAllocException::JniBadAllocException(JNIEnv * curEnv) throw() : JniException(curEnv)
-  {
-  std::string message = "Error no more memory.";
-  setErrorMessage(message);
-  }
-  
-  JniBadAllocException::~JniBadAllocException(void) throw() {}
-
-
-  /**
-  * Exception that should be thrown when a call to a Java method
-  * using Jni throw an exception.
-  * If possible, user should try to avoid this sitution because of the loss
-  * of information.
-  */
-  
-  /**
-  * @param curEnv java environment where the exception occured.
-  */
-  JniCallMethodException::JniCallMethodException(JNIEnv * curEnv) throw() : JniException(curEnv)
-  {
-  std::string errorMessage = "Exception when calling Java method : ";
-  errorMessage += getJavaDescription() + "\n" + getJavaStackTrace();
-  errorMessage += what();
-  setErrorMessage(errorMessage);
-  }
-  
-  JniCallMethodException::~JniCallMethodException(void) throw() {}
-  /**
-  * @param className name of the class which haven't been found
-  */
-  JniClassNotFoundException::JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Could not get the Class " + className + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniClassNotFoundException::~JniClassNotFoundException(void) throw() {}
-
-  /**
-   * @param className name of the method which haven't been found
-   */
-  JniMethodNotFoundException::JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Could not access to the method " + methodName + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniMethodNotFoundException::~JniMethodNotFoundException(void) throw() {}
-  
-  /**
-   * @param curEnv java envirnonment where the exception occured.
-   */
-  JniObjectCreationException::JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Could not instantiate the object " + className + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniObjectCreationException::~JniObjectCreationException(void) throw() {}
-
-  /**
-   * @param curEnv java envirnonment where the exception occured.
-   */
-  JniMonitorException::JniMonitorException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv)
-  {
-std::string errorMessage = "Error in the access (Enter or exit) or a Java env monitor of class " + className + ".";
-setErrorMessage(errorMessage);
-  }
-
-  JniMonitorException::~JniMonitorException(void) throw() {}
-
-
-
-}
-
diff --git a/scilab/modules/graphic_export/src/jni/GiwsException.hxx b/scilab/modules/graphic_export/src/jni/GiwsException.hxx
deleted file mode 100644 (file)
index 73f8175..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/* Generated by GIWS (version 1.0.2) */
-/*
-
-Copyright 2007-2008 INRIA
-
-Author : Sylvestre Ledru & others
-
-This software is a computer program whose purpose is to hide the complexity
-of accessing Java objects/methods from C++ code.
-
-This software is governed by the CeCILL-B license under French law and
-abiding by the rules of distribution of free software.  You can  use, 
-modify and/ or redistribute the software under the terms of the CeCILL-B
-license as circulated by CEA, CNRS and INRIA at the following URL
-"http://www.cecill.info". 
-
-As a counterpart to the access to the source code and  rights to copy,
-modify and redistribute granted by the license, users are provided only
-with a limited warranty  and the software's author,  the holder of the
-economic rights,  and the successive licensors  have only  limited
-liability. 
-
-In this respect, the user's attention is drawn to the risks associated
-with loading,  using,  modifying and/or developing or reproducing the
-software by the user in light of its specific status of free software,
-that may mean  that it is complicated to manipulate,  and  that  also
-therefore means  that it is reserved for developers  and  experienced
-professionals having in-depth computer knowledge. Users are therefore
-encouraged to load and test the software's suitability as regards their
-requirements in conditions enabling the security of their systems and/or 
-data to be ensured and,  more generally, to use and operate it in the 
-same conditions as regards security. 
-
-The fact that you are presently reading this means that you have had
-knowledge of the CeCILL-B license and that you accept its terms.
-*/
-
-
-#ifndef __GIWSEXCEPTION__
-#define __GIWSEXCEPTION__
-#include <iostream>
-#include <string>
-#include <string.h>
-#include <stdlib.h>
-#include <jni.h>
-#include <exception>
-
-namespace GiwsException {
-
-
-/**
-* Parent class for exceptions which may occure in JNI code.
-*/
-class JniException : public std::exception
-{
-
-/** Error message to display */
-std::string m_oErrorMessage;
-
-/** Java description of the exception*/
-std::string m_oJavaMessage;
-
-/** Java stackTrace when the exception occured */
-std::string m_oJavaStackTrace;
-
-/** Name of the exception (ie class name).*/
-std::string m_oJavaExceptionName;
-
-/** The exception itself ... we store as a member otherwise JNI
-complains about 'WARNING in native method: JNI call made with
-exception pending' */
-jthrowable javaException;
-
-public:
-
-/**
-* Each subclass of JniExcpetion should call the super constructor
-* and the setErrorMessage function to set the message.
-* @param curEnv java environment where the exception occured.
-*/
-JniException(JNIEnv * curEnv) throw() ;
-
-virtual ~JniException(void) throw();
-
-/**
-* @return a description of the exception
-*/
-virtual const char * what(void) const throw();
-
-/**
-* @return Java description of the exception.
-*/
-std::string getJavaDescription(void) const throw();
-
-/**
-* @return Java stack trace where the exception occured.
-*/
-std::string getJavaStackTrace(void) const throw();
-
-/**
-* Get the name of the exception (ie its class name).
-*/
-std::string getJavaExceptionName(void) const throw();
-
-protected:
-
-/**
-* Set the error message that the exception should print.
-*/
-void setErrorMessage(const std::string & errorMessage);
-
-/**
-* Get the message that the exception will print.
-*/
-std::string getErrorMessage(void) const;
-
-private:
-  /**
-* @return error message of the exception.
-*/
-std::string retrieveExceptionMessage(JNIEnv * curEnv);
-/**
-* @return full stack trace when the exception occured.
-*/
-std::string retrieveStackTrace(JNIEnv * curEnv);
-
-/**
-* @return string containing the name of the exception (ie its class name).
-*/
-std::string retrieveExceptionName(JNIEnv * curEnv);
-/**
-* To be called when all the information about the exceptions have been
-* retrived.
-* Remove the exception from the environment.
-*/
-void closeException(JNIEnv * curEnv);
-
-/**
-* Convert a Java string (jstring) into a C++ string
-*/
-std::string convertJavaString(JNIEnv * curEnv, jstring javaString);
-};
-
-/**
-* Exception that should be thrown when allocation of Java ressources from C++
-* code fails (sur as NewDoubleArray or NewStringUTF).
-*/
-class JniBadAllocException : public JniException
-{
-public:
-
-JniBadAllocException(JNIEnv * curEnv) throw();
-virtual ~JniBadAllocException(void) throw();
-};
-
-/**
-* Exception that should be thrown when a call to a Java method
-* using Jni throw an exception.
-* If possible, user should try to avoid this sitution because of the loss
-* of information.
-*/
-class JniCallMethodException : public JniException
-{
-public:
-
-  /**
-   * @param curEnv java envirnonment where the exception occured.
-   */
-  JniCallMethodException(JNIEnv * curEnv) throw();
-
-  virtual ~JniCallMethodException(void) throw();
-};
-
-/**
-* Exception that should be thrown when Jni code could not find a Java class
-*/
-class JniClassNotFoundException : public JniException
-{
-public:
-
-/**
-* @param className name of the class which haven't been found
-*/
-JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw();
-
-virtual ~JniClassNotFoundException(void) throw();
-
-};
-
-/**
-* Exception that should be thrown when Jni code could not find a Java method
-*/
-class JniMethodNotFoundException : public JniException
-{
-public:
-
-/**
-* @param className name of the method which haven't been found
-*/
-JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw();
-virtual ~JniMethodNotFoundException(void) throw();
-
-};
-
-/**
-* Exception that should be thrown when a call to a Java method
-* using Jni throw an exception.
-* If possible, user should try to avoid this sitution because of the loss
-* of information.
-*/
-class JniObjectCreationException : public JniException
-{
-public:
-
-/**
-* @param curEnv java envirnonment where the exception occured.
-*/
-JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw();
-virtual ~JniObjectCreationException(void) throw();
-
-};
-
-
-/**
-* Exception that should be thrown when a call to the Java monitor
-* failed
-*/
-class JniMonitorException : public JniException
-{
-public:
-
-/**
-* @param curEnv java envirnonment where the exception occured.
-*/
-JniMonitorException(JNIEnv * curEnv, const std::string & className) throw();
-virtual ~JniMonitorException(void) throw();
-
-};
-
-
-}
-#endif
-
index c765936..48352af 100644 (file)
@@ -1,5 +1,5 @@
 #include "JOGLConstant.hxx"
-/* Generated by GIWS (version 1.2.4) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
@@ -104,40 +104,40 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 curEnv->DeleteLocalRef(localInstance);
 
                 /* Methods ID set to NULL */
-jintget_GL_RGBAID=NULL; 
-jintget_GL_RGBID=NULL; 
-jintget_GL_CURRENT_RASTER_POSITION_VALIDID=NULL; 
-jintget_GL_CURRENT_RASTER_POSITIONID=NULL; 
-jintget_GL_CURRENT_RASTER_COLORID=NULL; 
-jintget_GL_SRC_ALPHAID=NULL; 
-jintget_GL_ONE_MINUS_SRC_ALPHAID=NULL; 
-jintget_GL_ONEID=NULL; 
-jintget_GL_ZEROID=NULL; 
-jintget_GL_COLOR_INDEXID=NULL; 
-jintget_GL_POINT_TOKENID=NULL; 
-jintget_GL_LINE_TOKENID=NULL; 
-jintget_GL_LINE_RESET_TOKENID=NULL; 
-jintget_GL_POLYGON_TOKENID=NULL; 
-jintget_GL_BITMAP_TOKENID=NULL; 
-jintget_GL_DRAW_PIXEL_TOKENID=NULL; 
-jintget_GL_COPY_PIXEL_TOKENID=NULL; 
-jintget_GL_PASS_THROUGH_TOKENID=NULL; 
-jintget_GL_FEEDBACKID=NULL; 
-jintget_GL_COLOR_CLEAR_VALUEID=NULL; 
-jintget_GL_INDEX_CLEAR_VALUEID=NULL; 
-jintget_GL_RENDERID=NULL; 
-jintget_GL_VIEWPORTID=NULL; 
-jintget_GL_BLENDID=NULL; 
-jintget_GL_BLEND_SRCID=NULL; 
-jintget_GL_BLEND_DSTID=NULL; 
-jintget_GL_3D_COLORID=NULL; 
-jintget_GL_FLOATID=NULL; 
-jintget_GL_UNSIGNED_BYTEID=NULL; 
-jintget_GL_POINTSID=NULL; 
-jintget_GL_POLYGON_OFFSET_FACTORID=NULL; 
-jintget_GL_POLYGON_OFFSET_UNITSID=NULL; 
-jintget_GL_LINE_STIPPLE_PATTERNID=NULL; 
-jintget_GL_LINE_STIPPLE_REPEATID=NULL; 
+jintget_GL_RGBAID=NULL;
+jintget_GL_RGBID=NULL;
+jintget_GL_CURRENT_RASTER_POSITION_VALIDID=NULL;
+jintget_GL_CURRENT_RASTER_POSITIONID=NULL;
+jintget_GL_CURRENT_RASTER_COLORID=NULL;
+jintget_GL_SRC_ALPHAID=NULL;
+jintget_GL_ONE_MINUS_SRC_ALPHAID=NULL;
+jintget_GL_ONEID=NULL;
+jintget_GL_ZEROID=NULL;
+jintget_GL_COLOR_INDEXID=NULL;
+jintget_GL_POINT_TOKENID=NULL;
+jintget_GL_LINE_TOKENID=NULL;
+jintget_GL_LINE_RESET_TOKENID=NULL;
+jintget_GL_POLYGON_TOKENID=NULL;
+jintget_GL_BITMAP_TOKENID=NULL;
+jintget_GL_DRAW_PIXEL_TOKENID=NULL;
+jintget_GL_COPY_PIXEL_TOKENID=NULL;
+jintget_GL_PASS_THROUGH_TOKENID=NULL;
+jintget_GL_FEEDBACKID=NULL;
+jintget_GL_COLOR_CLEAR_VALUEID=NULL;
+jintget_GL_INDEX_CLEAR_VALUEID=NULL;
+jintget_GL_RENDERID=NULL;
+jintget_GL_VIEWPORTID=NULL;
+jintget_GL_BLENDID=NULL;
+jintget_GL_BLEND_SRCID=NULL;
+jintget_GL_BLEND_DSTID=NULL;
+jintget_GL_3D_COLORID=NULL;
+jintget_GL_FLOATID=NULL;
+jintget_GL_UNSIGNED_BYTEID=NULL;
+jintget_GL_POINTSID=NULL;
+jintget_GL_POLYGON_OFFSET_FACTORID=NULL;
+jintget_GL_POLYGON_OFFSET_UNITSID=NULL;
+jintget_GL_LINE_STIPPLE_PATTERNID=NULL;
+jintget_GL_LINE_STIPPLE_REPEATID=NULL;
 
 
 }
@@ -160,40 +160,40 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 throw GiwsException::JniObjectCreationException(curEnv, this->className());
         }
         /* Methods ID set to NULL */
-        jintget_GL_RGBAID=NULL; 
-jintget_GL_RGBID=NULL; 
-jintget_GL_CURRENT_RASTER_POSITION_VALIDID=NULL; 
-jintget_GL_CURRENT_RASTER_POSITIONID=NULL; 
-jintget_GL_CURRENT_RASTER_COLORID=NULL; 
-jintget_GL_SRC_ALPHAID=NULL; 
-jintget_GL_ONE_MINUS_SRC_ALPHAID=NULL; 
-jintget_GL_ONEID=NULL; 
-jintget_GL_ZEROID=NULL; 
-jintget_GL_COLOR_INDEXID=NULL; 
-jintget_GL_POINT_TOKENID=NULL; 
-jintget_GL_LINE_TOKENID=NULL; 
-jintget_GL_LINE_RESET_TOKENID=NULL; 
-jintget_GL_POLYGON_TOKENID=NULL; 
-jintget_GL_BITMAP_TOKENID=NULL; 
-jintget_GL_DRAW_PIXEL_TOKENID=NULL; 
-jintget_GL_COPY_PIXEL_TOKENID=NULL; 
-jintget_GL_PASS_THROUGH_TOKENID=NULL; 
-jintget_GL_FEEDBACKID=NULL; 
-jintget_GL_COLOR_CLEAR_VALUEID=NULL; 
-jintget_GL_INDEX_CLEAR_VALUEID=NULL; 
-jintget_GL_RENDERID=NULL; 
-jintget_GL_VIEWPORTID=NULL; 
-jintget_GL_BLENDID=NULL; 
-jintget_GL_BLEND_SRCID=NULL; 
-jintget_GL_BLEND_DSTID=NULL; 
-jintget_GL_3D_COLORID=NULL; 
-jintget_GL_FLOATID=NULL; 
-jintget_GL_UNSIGNED_BYTEID=NULL; 
-jintget_GL_POINTSID=NULL; 
-jintget_GL_POLYGON_OFFSET_FACTORID=NULL; 
-jintget_GL_POLYGON_OFFSET_UNITSID=NULL; 
-jintget_GL_LINE_STIPPLE_PATTERNID=NULL; 
-jintget_GL_LINE_STIPPLE_REPEATID=NULL; 
+        jintget_GL_RGBAID=NULL;
+jintget_GL_RGBID=NULL;
+jintget_GL_CURRENT_RASTER_POSITION_VALIDID=NULL;
+jintget_GL_CURRENT_RASTER_POSITIONID=NULL;
+jintget_GL_CURRENT_RASTER_COLORID=NULL;
+jintget_GL_SRC_ALPHAID=NULL;
+jintget_GL_ONE_MINUS_SRC_ALPHAID=NULL;
+jintget_GL_ONEID=NULL;
+jintget_GL_ZEROID=NULL;
+jintget_GL_COLOR_INDEXID=NULL;
+jintget_GL_POINT_TOKENID=NULL;
+jintget_GL_LINE_TOKENID=NULL;
+jintget_GL_LINE_RESET_TOKENID=NULL;
+jintget_GL_POLYGON_TOKENID=NULL;
+jintget_GL_BITMAP_TOKENID=NULL;
+jintget_GL_DRAW_PIXEL_TOKENID=NULL;
+jintget_GL_COPY_PIXEL_TOKENID=NULL;
+jintget_GL_PASS_THROUGH_TOKENID=NULL;
+jintget_GL_FEEDBACKID=NULL;
+jintget_GL_COLOR_CLEAR_VALUEID=NULL;
+jintget_GL_INDEX_CLEAR_VALUEID=NULL;
+jintget_GL_RENDERID=NULL;
+jintget_GL_VIEWPORTID=NULL;
+jintget_GL_BLENDID=NULL;
+jintget_GL_BLEND_SRCID=NULL;
+jintget_GL_BLEND_DSTID=NULL;
+jintget_GL_3D_COLORID=NULL;
+jintget_GL_FLOATID=NULL;
+jintget_GL_UNSIGNED_BYTEID=NULL;
+jintget_GL_POINTSID=NULL;
+jintget_GL_POLYGON_OFFSET_FACTORID=NULL;
+jintget_GL_POLYGON_OFFSET_UNITSID=NULL;
+jintget_GL_LINE_STIPPLE_PATTERNID=NULL;
+jintget_GL_LINE_STIPPLE_REPEATID=NULL;
 
 
 }
index 92142e7..0b7fba8 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by GIWS (version 1.2.4) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
@@ -57,8 +57,21 @@ typedef signed char byte;
 #endif
 #endif
 
+
+#ifndef GIWSEXPORT
+# if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__)
+#   if defined(STATIC_LINKED)
+#     define GIWSEXPORT
+#   else
+#     define GIWSEXPORT __declspec(dllexport)
+#   endif
+# else
+#     define GIWSEXPORT
+# endif
+#endif
+
 namespace org_scilab_modules_graphic_export {
-class JOGLConstant {
+class GIWSEXPORT JOGLConstant {
 
 private:
 JavaVM * jvm;
index 590914f..f2a5585 100644 (file)
@@ -4800,6 +4800,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index 4a36a70..2d2d548 100644 (file)
@@ -138,7 +138,6 @@ src/cpp/GetScreenProperty.cpp \
 src/cpp/CallClipboard.cpp \
 src/cpp/exportUserInterface.cpp \
 src/jni/LookAndFeelManager.cpp \
-src/jni/GiwsException.cpp \
 src/jni/Juigetfile.cpp \
 src/cpp/CallJuigetfile.cpp \
 src/cpp/displaytree.cpp \
@@ -233,6 +232,7 @@ libscigui_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
                        -I$(srcdir)/src/jni/ \
                        -I$(top_srcdir)/modules/jvm/includes/ \
                        -I$(top_srcdir)/modules/fileio/includes/ \
+                       -I$(top_srcdir)/modules/commons/src/jni/ \
                        -I$(top_srcdir)/modules/renderer/src/jni/ \
                        -I$(top_srcdir)/modules/renderer/includes/ \
                        -I$(top_srcdir)/modules/renderer/src/cpp/ \
index 3f25839..de06d08 100644 (file)
@@ -215,7 +215,6 @@ am__objects_2 = libscigui_algo_la-InitUIMenu.lo \
        libscigui_algo_la-CallClipboard.lo \
        libscigui_algo_la-exportUserInterface.lo \
        libscigui_algo_la-LookAndFeelManager.lo \
-       libscigui_algo_la-GiwsException.lo \
        libscigui_algo_la-Juigetfile.lo \
        libscigui_algo_la-CallJuigetfile.lo \
        libscigui_algo_la-displaytree.lo \
@@ -727,7 +726,6 @@ src/cpp/GetScreenProperty.cpp \
 src/cpp/CallClipboard.cpp \
 src/cpp/exportUserInterface.cpp \
 src/jni/LookAndFeelManager.cpp \
-src/jni/GiwsException.cpp \
 src/jni/Juigetfile.cpp \
 src/cpp/CallJuigetfile.cpp \
 src/cpp/displaytree.cpp \
@@ -810,6 +808,7 @@ libscigui_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
                        -I$(srcdir)/src/jni/ \
                        -I$(top_srcdir)/modules/jvm/includes/ \
                        -I$(top_srcdir)/modules/fileio/includes/ \
+                       -I$(top_srcdir)/modules/commons/src/jni/ \
                        -I$(top_srcdir)/modules/renderer/src/jni/ \
                        -I$(top_srcdir)/modules/renderer/includes/ \
                        -I$(top_srcdir)/modules/renderer/src/cpp/ \
@@ -1054,7 +1053,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigui_algo_la-GetUiobjectForegroundColor.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigui_algo_la-GetUiobjectTag.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigui_algo_la-GetUiobjectVisible.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigui_algo_la-GiwsException.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigui_algo_la-InitProgressionBar.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigui_algo_la-InitUIMenu.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigui_algo_la-InitWaitBar.Plo@am__quote@
@@ -2050,13 +2048,6 @@ libscigui_algo_la-LookAndFeelManager.lo: src/jni/LookAndFeelManager.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigui_algo_la-LookAndFeelManager.lo `test -f 'src/jni/LookAndFeelManager.cpp' || echo '$(srcdir)/'`src/jni/LookAndFeelManager.cpp
 
-libscigui_algo_la-GiwsException.lo: src/jni/GiwsException.cpp
-@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigui_algo_la-GiwsException.lo -MD -MP -MF $(DEPDIR)/libscigui_algo_la-GiwsException.Tpo -c -o libscigui_algo_la-GiwsException.lo `test -f 'src/jni/GiwsException.cpp' || echo '$(srcdir)/'`src/jni/GiwsException.cpp
-@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscigui_algo_la-GiwsException.Tpo $(DEPDIR)/libscigui_algo_la-GiwsException.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/jni/GiwsException.cpp' object='libscigui_algo_la-GiwsException.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libscigui_algo_la-GiwsException.lo `test -f 'src/jni/GiwsException.cpp' || echo '$(srcdir)/'`src/jni/GiwsException.cpp
-
 libscigui_algo_la-Juigetfile.lo: src/jni/Juigetfile.cpp
 @am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libscigui_algo_la-Juigetfile.lo -MD -MP -MF $(DEPDIR)/libscigui_algo_la-Juigetfile.Tpo -c -o libscigui_algo_la-Juigetfile.lo `test -f 'src/jni/Juigetfile.cpp' || echo '$(srcdir)/'`src/jni/Juigetfile.cpp
 @am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libscigui_algo_la-Juigetfile.Tpo $(DEPDIR)/libscigui_algo_la-Juigetfile.Plo
@@ -2541,6 +2532,11 @@ check-code:
 @GIWS_TRUE@            done; \
 @GIWS_TRUE@    fi
 
+@GIWS_TRUE@giws-exception:
+@GIWS_TRUE@    @GIWS_OUTPUTDIR=src/jni/;\
+@GIWS_TRUE@    echo "GIWS: Generation of exception class ..."; \
+@GIWS_TRUE@    $(GIWS_BIN) --generate-exception-class --output-dir $$GIWS_OUTPUTDIR 
+
 macros:
        -@( if test ! -x $(top_builddir)/scilab-bin; then \
                echo "Error : Cannot build $< : Scilab has not been built"; \
index f91c3b4..aff4e15 100644 (file)
@@ -25,17 +25,18 @@ extern "C"
 }
 /*--------------------------------------------------------------------------*/
 using namespace org_scilab_modules_gui_bridge;
+
 /*--------------------------------------------------------------------------*/
-int sci_about( char * fname, unsigned long fname_len )
+int sci_about(char *fname, unsigned long fname_len)
 {
 
     try
     {
         CallScilabBridge::scilabAboutBox(getScilabJavaVM());
     }
-    catch (const GiwsException::JniException & e)
+    catch(const GiwsException::JniException & e)
     {
-        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
+        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
         return FALSE;
     }
 
@@ -45,4 +46,5 @@ int sci_about( char * fname, unsigned long fname_len )
     return TRUE;
 
 }
+
 /*--------------------------------------------------------------------------*/
index 856e561..192b09a 100644 (file)
@@ -11,7 +11,6 @@
  */
 /*--------------------------------------------------------------------------*/
 
-
 #include <vector>
 #include <sstream>
 #include <iostream>
@@ -36,30 +35,31 @@ extern "C"
 #include "GiwsException.hxx"
 
 using namespace std;
+
 /*--------------------------------------------------------------------------*/
-int sci_displaytree(char *fname,unsigned long fname_len)
+int sci_displaytree(char *fname, unsigned long fname_len)
 {
     int iItemCount = 0;
 
-    CheckRhs(1,1);
-    CheckLhs(1,1);
+    CheckRhs(1, 1);
+    CheckLhs(1, 1);
 
     vector < string > StructList;
     int *piCurrentItem = NULL;
     string szCurLevel = "";
 
-
     iGetListItemType(1, piCurrentItem, &iItemCount, NULL);
-    int *piItemType = (int*)MALLOC(iItemCount * sizeof(int));
+    int *piItemType = (int *)MALLOC(iItemCount * sizeof(int));
+
     iGetListItemType(1, piCurrentItem, &iItemCount, piItemType);
 
-    if(iItemCount < 2)
+    if (iItemCount < 2)
     {
         sciprint("Invalid size");
         return 1;
     }
 
-    if(piItemType[0] != sci_strings && piItemType[1] != sci_mlist) //type
+    if (piItemType[0] != sci_strings && piItemType[1] != sci_mlist) //type
     {
         sciprint("Invalid tree");
         FREE(piItemType);
@@ -67,14 +67,14 @@ int sci_displaytree(char *fname,unsigned long fname_len)
     }
 
     FREE(piItemType);
-    /*check tree structure*/
-    if(bIsTreeStructure(1, piCurrentItem, 1) == false)
+    /*check tree structure */
+    if (bIsTreeStructure(1, piCurrentItem, 1) == false)
     {
         sciprint("Invalid structure");
         return 1;
     }
     //Add node level
-    if(szCurLevel != "")
+    if (szCurLevel != "")
     {
         szCurLevel + ".";
     }
@@ -83,59 +83,61 @@ int sci_displaytree(char *fname,unsigned long fname_len)
 
     //get label name
     char *szLabel = NULL;
-    int iRet    = iGetNodeLabel(1, piCurrentItem, szLabel);
-    if(iRet == -1)
+    int iRet = iGetNodeLabel(1, piCurrentItem, szLabel);
+
+    if (iRet == -1)
     {
         return false;
     }
 
-    szLabel             = (char*)MALLOC((iRet + 1) * sizeof(char));
-    iRet                        = iGetNodeLabel(1, piCurrentItem, szLabel);
+    szLabel = (char *)MALLOC((iRet + 1) * sizeof(char));
+    iRet = iGetNodeLabel(1, piCurrentItem, szLabel);
     StructList.push_back(szLabel);
     FREE(szLabel);
 
     //get Icon name
     char *szIcon = NULL;
-    iRet                                        = iGetNodeIcon(1, piCurrentItem, szIcon);
-    if(iRet == -1)
+
+    iRet = iGetNodeIcon(1, piCurrentItem, szIcon);
+    if (iRet == -1)
     {
         return false;
     }
 
-    szIcon              = (char*)MALLOC((iRet + 1) * sizeof(char));
-    iRet                        = iGetNodeIcon(1, piCurrentItem, szIcon);
+    szIcon = (char *)MALLOC((iRet + 1) * sizeof(char));
+    iRet = iGetNodeIcon(1, piCurrentItem, szIcon);
     StructList.push_back(szIcon);
     FREE(szIcon);
 
     //get callback name
-    char *szCallBack    = NULL;
-    iRet                                                        = iGetNodeCallBack(1, piCurrentItem, szCallBack);
-    if(iRet == -1)
+    char *szCallBack = NULL;
+
+    iRet = iGetNodeCallBack(1, piCurrentItem, szCallBack);
+    if (iRet == -1)
     {
         return false;
     }
 
-    szCallBack          = (char*)MALLOC((iRet + 1) * sizeof(char)); //new char[iRet + 1]; replace later
-    iRet                        = iGetNodeCallBack(1, piCurrentItem, szCallBack);
+    szCallBack = (char *)MALLOC((iRet + 1) * sizeof(char)); //new char[iRet + 1]; replace later
+    iRet = iGetNodeCallBack(1, piCurrentItem, szCallBack);
     StructList.push_back(szCallBack);
-    FREE(szCallBack); //delete[] szCallBack; replace later
+    FREE(szCallBack);           //delete[] szCallBack; replace later
 
-    if(iRet == -1)
+    if (iRet == -1)
     {
         return false;
     }
 
     bParseListItem(1, piCurrentItem, &StructList, szCurLevel);
 
-
     // Conversion Vector<string> to char **
     char **tab = NULL;
     size_t i = 0;
 
     size_t struct_size = StructList.size();
-    tab = new char*[struct_size];
+    tab = new char *[struct_size];
 
-    for(i = 0; i < struct_size; ++i)
+    for (i = 0; i < struct_size; ++i)
     {
         tab[i] = strdup(StructList.at(i).c_str());
     }
@@ -145,19 +147,19 @@ int sci_displaytree(char *fname,unsigned long fname_len)
         //Java
         org_scilab_modules_gui_tree::ScilabDisplayTree::scilabDisplayTree(getScilabJavaVM(), tab, (int)struct_size);
     }
-    catch (const GiwsException::JniException & e)
+    catch(const GiwsException::JniException & e)
     {
-        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
+        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
         return FALSE;
     }
 
     //Free
-    for(i = 0; i < struct_size; ++i)
+    for (i = 0; i < struct_size; ++i)
     {
         FREE(tab[i]);
     }
 
-    delete [] tab;
+    delete[]tab;
     tab = NULL;
 
     return 0;
index fc934e9..5338795 100644 (file)
@@ -9,7 +9,7 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
+
 #include "LookAndFeelManager.hxx"
 
 extern "C"
@@ -22,61 +22,61 @@ extern "C"
 #include "localization.h"
 #include "GiwsException.hxx"
 /*--------------------------------------------------------------------------*/
-int sci_getinstalledlookandfeels(char *fname,unsigned long fname_len)
-{
-       CheckRhs(0,0);
-       CheckLhs(1,1);
-       
-       org_scilab_modules_gui_utils::LookAndFeelManager *lnf = 0;
-       try
-       {
-           lnf = new org_scilab_modules_gui_utils::LookAndFeelManager(getScilabJavaVM());
-       }
-       catch (const GiwsException::JniException & e)
-       {
-           Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
-           return 0;
-       }
+    int sci_getinstalledlookandfeels(char *fname, unsigned long fname_len)
+    {
+        CheckRhs(0, 0);
+        CheckLhs(1, 1);
 
-       if (lnf)
-       {
-               char **lookandfeels = NULL;
-               int nbElems = 0;
-               int nbCol = 0;
+        org_scilab_modules_gui_utils::LookAndFeelManager * lnf = 0;
+        try
+        {
+            lnf = new org_scilab_modules_gui_utils::LookAndFeelManager(getScilabJavaVM());
+        }
+        catch(const GiwsException::JniException & e)
+        {
+            Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
+            return 0;
+        }
 
-               lookandfeels = lnf->getInstalledLookAndFeels();
-               nbElems = lnf->numbersOfInstalledLookAndFeels();
+        if (lnf)
+        {
+            char **lookandfeels = NULL;
+            int nbElems = 0;
+            int nbCol = 0;
 
-               nbCol = 1;
-               CreateVarFromPtr( Rhs+1,MATRIX_OF_STRING_DATATYPE, &nbElems, &nbCol,lookandfeels );
+            lookandfeels = lnf->getInstalledLookAndFeels();
+            nbElems = lnf->numbersOfInstalledLookAndFeels();
 
-               if (lookandfeels)
-               {
-                       int i = 0;
-                       for (i = 0;i<nbElems;i++)
-                       {
-                               if (lookandfeels[i])
-                               {
-                                       delete [] lookandfeels[i];
-                               }
-                       }
-                       delete [] lookandfeels;
-                       lookandfeels = NULL;
-               }
-               delete lnf;
+            nbCol = 1;
+            CreateVarFromPtr(Rhs + 1, MATRIX_OF_STRING_DATATYPE, &nbElems, &nbCol, lookandfeels);
 
-               LhsVar(1)=Rhs+1;
-               PutLhsVar();
-       }
-       else
-       {
-               Scierror(999,_("%s: No more memory.\n"),fname);
-       }
-       return 0;
-}
+            if (lookandfeels)
+            {
+                int i = 0;
+
+                for (i = 0; i < nbElems; i++)
+                {
+                    if (lookandfeels[i])
+                    {
+                        delete[]lookandfeels[i];
+                    }
+                }
+                delete[]lookandfeels;
+                lookandfeels = NULL;
+            }
+            delete lnf;
+
+            LhsVar(1) = Rhs + 1;
+            PutLhsVar();
+        }
+        else
+        {
+            Scierror(999, _("%s: No more memory.\n"), fname);
+        }
+        return 0;
+    }
 /*--------------------------------------------------------------------------*/
 }
+
 /* END OF extern "C" */
 /*--------------------------------------------------------------------------*/
-
-
index 5e3a457..1d888fb 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "LookAndFeelManager.hxx"
 
-
 extern "C"
 {
 #include <stdlib.h>
@@ -23,52 +22,59 @@ extern "C"
 #include "localization.h"
 #include "GiwsException.hxx"
 /*--------------------------------------------------------------------------*/
-int sci_getlookandfeel(char *fname,unsigned long fname_len)
-{
-       CheckRhs(0, 0);
-       CheckLhs(1, 1);
+    int sci_getlookandfeel(char *fname, unsigned long fname_len)
+    {
+        CheckRhs(0, 0);
+        CheckLhs(1, 1);
 
-       org_scilab_modules_gui_utils::LookAndFeelManager *lnf = 0;
-       try
-       {
-            lnf = new org_scilab_modules_gui_utils::LookAndFeelManager(getScilabJavaVM());
-       }
-       catch (const GiwsException::JniException & e)
-       {
-           Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
-           return 0;
-       }
+        org_scilab_modules_gui_utils::LookAndFeelManager * lnf = 0;
+        try
+        {
+            lnf = new org_scilab_modules_gui_utils::LookAndFeelManager(getScilabJavaVM());
+        }
+        catch(const GiwsException::JniException & e)
+        {
+            Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
+            return 0;
+        }
 
-       if (lnf)
-       {
-               static int n1 = 0,m1 = 0;
+        if (lnf)
+        {
+            static int n1 = 0, m1 = 0;
 
-               char *look = lnf->getCurrentLookAndFeel();
-               if (look)
-               {       
-                       m1 = (int)strlen(look);
-                       n1 = 1;
-                       CreateVarFromPtr(Rhs + 1, STRING_DATATYPE, &m1, &n1, &look);
-                       if (look) {delete [] look; look = NULL;}
-                       delete lnf;
-                       LhsVar(1) = Rhs + 1;
-                       PutLhsVar();
-               }
-               else
-               {
-                       delete lnf;
-                       Scierror(999, _("%s: An error occurred: %s.\n"), fname, _("Impossible to get current look and feel"));
-               }
-       }
-       else
-       {
-               Scierror(999, _("%s: No more memory.\n"), fname);
-       }
+            char *look = lnf->getCurrentLookAndFeel();
 
-       return 0;
-}
-/*--------------------------------------------------------------------------*/
+            if (look)
+            {
+                m1 = (int)strlen(look);
+                n1 = 1;
+                CreateVarFromPtr(Rhs + 1, STRING_DATATYPE, &m1, &n1, &look);
+                if (look)
+                {
+                    delete[]look;
+                    look = NULL;
+                }
+                delete lnf;
+
+                LhsVar(1) = Rhs + 1;
+                PutLhsVar();
+            }
+            else
+            {
+                delete lnf;
 
-} /* END OF extern "C" */
+                Scierror(999, _("%s: An error occurred: %s.\n"), fname, _("Impossible to get current look and feel"));
+            }
+        }
+        else
+        {
+            Scierror(999, _("%s: No more memory.\n"), fname);
+        }
+
+        return 0;
+    }
 /*--------------------------------------------------------------------------*/
 
+}                               /* END OF extern "C" */
+
+/*--------------------------------------------------------------------------*/
index f9210f2..1a1aa45 100644 (file)
@@ -25,69 +25,72 @@ extern "C"
 }
 /*--------------------------------------------------------------------------*/
 using namespace org_scilab_modules_gui_bridge;
+
 /*--------------------------------------------------------------------------*/
-int sci_printfigure(char *fname,unsigned long l)
+int sci_printfigure(char *fname, unsigned long l)
 {
-    static int l1,n1,m1;
+    static int l1, n1, m1;
     int num_win = -2;
     int *status = NULL;
 
-    Rhs=Max(0,Rhs);
-    CheckRhs(1,1);
-    CheckLhs(0,1);
+    Rhs = Max(0, Rhs);
+    CheckRhs(1, 1);
+    CheckLhs(0, 1);
 
-    if ( getScilabMode() != SCILAB_NWNI )
+    if (getScilabMode() != SCILAB_NWNI)
     {
         if (Rhs == 1)
         {
-            GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);
+            GetRhsVar(1, MATRIX_OF_DOUBLE_DATATYPE, &m1, &n1, &l1);
 
             if (!IsAScalar(1))
             {
                 Scierror(999, _("%s: Wrong size for input argument #%d: A real expected.\n"), fname, 1);
                 return FALSE;
             }
-            num_win=(int)(*stk(l1));
+            num_win = (int)(*stk(l1));
 
-            if (num_win>=0)
+            if (num_win >= 0)
             {
                 /* Call Java */
                 status = new int[1];
+
                 try
                 {
                     status[0] = (int)CallScilabBridge::printFigure(getScilabJavaVM(), num_win, true, true); /* postscript mode and display dialog */
                 }
-                catch (const GiwsException::JniException & e)
+                catch(const GiwsException::JniException & e)
                 {
-                    Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
+                    Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
                     return FALSE;
                 }
 
-                m1=1;
-                n1=1;
-                CreateVarFromPtr(Rhs+1,MATRIX_OF_BOOLEAN_DATATYPE,  &m1, &n1, &status);
-                LhsVar(1)=Rhs+1;
-                delete[] status;
+                m1 = 1;
+                n1 = 1;
+                CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &m1, &n1, &status);
+                LhsVar(1) = Rhs + 1;
+                delete[]status;
                 PutLhsVar();
                 return TRUE;
             }
             else
             {
-                Scierror(999,_("%s: Wrong value for input argument #%d: Must be >= %d expected.\n"), fname, 1, 0);
+                Scierror(999, _("%s: Wrong value for input argument #%d: Must be >= %d expected.\n"), fname, 1, 0);
                 return FALSE;
             }
         }
         else
         {
-            Scierror(999,_("%s: Wrong type for input argument #%d: A real expected.\n"), fname, 2);
+            Scierror(999, _("%s: Wrong type for input argument #%d: A real expected.\n"), fname, 2);
             return FALSE;
         }
     }
     else
     {
-        Scierror(999,_("%s: Function not available in NWNI mode.\n"), fname);
+        Scierror(999, _("%s: Function not available in NWNI mode.\n"), fname);
         return FALSE;
     }
     return TRUE;
 }
+
 /*--------------------------------------------------------------------------*/
index 7fe834f..f17b8b5 100644 (file)
@@ -15,7 +15,7 @@
 #include "CallScilabBridge.hxx"
 #include "GiwsException.hxx"
 
-extern "C" 
+extern "C"
 {
 #include "MALLOC.h"
 #include "stack-c.h"
@@ -26,31 +26,33 @@ extern "C"
 }
 /*--------------------------------------------------------------------------*/
 using namespace org_scilab_modules_gui_bridge;
+
 /*--------------------------------------------------------------------------*/
 int sci_printsetupbox(char *fname, unsigned long l)
 {
-       static int n1;
-       int* paramoutINT = new int[1];
-
-       CheckRhs(0, 0);
-       CheckLhs(0, 1);
-       
-       try
-       {
-           paramoutINT[0] = (int)CallScilabBridge::pageSetup(getScilabJavaVM());
-       }
-       catch (const GiwsException::JniException & e)
-       {
-           Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
-           return FALSE;
-       }
-       
-       n1 = 1;
-       CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &n1, &n1, &paramoutINT);
-       LhsVar(1) = Rhs + 1;
-       delete[] paramoutINT;
-       PutLhsVar();
-
-       return TRUE;
+    static int n1;
+    int *paramoutINT = new int[1];
+
+    CheckRhs(0, 0);
+    CheckLhs(0, 1);
+
+    try
+    {
+        paramoutINT[0] = (int)CallScilabBridge::pageSetup(getScilabJavaVM());
+    }
+    catch(const GiwsException::JniException & e)
+    {
+        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
+        return FALSE;
+    }
+
+    n1 = 1;
+    CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &n1, &n1, &paramoutINT);
+    LhsVar(1) = Rhs + 1;
+    delete[]paramoutINT;
+    PutLhsVar();
+
+    return TRUE;
 }
+
 /*--------------------------------------------------------------------------*/
index 1c0eeb9..b3e68e7 100644 (file)
@@ -25,8 +25,9 @@ extern "C"
 }
 /*--------------------------------------------------------------------------*/
 using namespace org_scilab_modules_gui_bridge;
+
 /*--------------------------------------------------------------------------*/
-int sci_raise_window( char * fname, unsigned long fname_len )
+int sci_raise_window(char *fname, unsigned long fname_len)
 {
     int m1 = 0, n1 = 0, l1 = 0;
 
@@ -38,9 +39,9 @@ int sci_raise_window( char * fname, unsigned long fname_len )
     {
         CallScilabBridge::raiseWindow(getScilabJavaVM(), (int)(*stk(l1)));
     }
-    catch (const GiwsException::JniException & e)
+    catch(const GiwsException::JniException & e)
     {
-        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
+        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
         return FALSE;
     }
 
@@ -49,4 +50,5 @@ int sci_raise_window( char * fname, unsigned long fname_len )
 
     return TRUE;
 }
+
 /*--------------------------------------------------------------------------*/
index 73ad0ae..0afc35c 100644 (file)
@@ -23,91 +23,100 @@ extern "C"
 #include "BOOL.h"
 #include "MALLOC.h"
 /*--------------------------------------------------------------------------*/
-int sci_setlookandfeel(char *fname,unsigned long fname_len)
-{
-       CheckRhs(0,1);
-       CheckLhs(0,1);
-
-       org_scilab_modules_gui_utils::LookAndFeelManager *lnf = 0;
-
-       if (Rhs == 0)
-       {
-           try
-           {
-               lnf = new org_scilab_modules_gui_utils::LookAndFeelManager(getScilabJavaVM());
-           }
-           catch (const GiwsException::JniException & e)
-           {
-               Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
-               return FALSE;
-           }
-
-           if (lnf)
-           {
-               int n1 = 1;
-               int *paramoutINT = (int*)MALLOC(sizeof(int));
-               
-               *paramoutINT = (int) booltoBOOL(lnf->setSystemLookAndFeel());
-               delete lnf;
-               
-               n1 = 1;
-               CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &n1, &n1, &paramoutINT);
-               LhsVar(1) = Rhs + 1;
-               
-               if (paramoutINT) {FREE(paramoutINT);paramoutINT = NULL;}
-               PutLhsVar();
-           }
-           else
-           {
-               Scierror(999, _("%s: No more memory.\n"), fname);
-           }
-       }
-       else if (GetType(1) == sci_strings)
-       {
-           int m1, n1 = 0, l1 = 0;
-           
-           char *looknfeel = NULL;
-           
-           GetRhsVar(1, STRING_DATATYPE, &m1, &n1, &l1);
-           looknfeel = cstk(l1);
-           
-           try
-           {
-               lnf = new org_scilab_modules_gui_utils::LookAndFeelManager(getScilabJavaVM());
-           }
-           catch (const GiwsException::JniException & e)
-           {
-               Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
-               return FALSE;
-           }
-           
-           if (lnf)
-           {
-               int *paramoutINT = (int*)MALLOC(sizeof(int));
-               *paramoutINT = (int)booltoBOOL(lnf->setLookAndFeel(looknfeel));
-               delete lnf;
-               
-               n1 = 1;
-               CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &n1, &n1, &paramoutINT);
-               LhsVar(1) = Rhs + 1;
-               
-               if (paramoutINT) {FREE(paramoutINT);paramoutINT = NULL;}
-               PutLhsVar();
-           }
-           else
-           {
-               Scierror(999, _("%s: No more memory.\n"), fname);
-           }
-       }
-       else
-       {
-           Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 1);
-       }
-       return 0;
-}
+    int sci_setlookandfeel(char *fname, unsigned long fname_len)
+    {
+        CheckRhs(0, 1);
+        CheckLhs(0, 1);
+
+        org_scilab_modules_gui_utils::LookAndFeelManager * lnf = 0;
+
+        if (Rhs == 0)
+        {
+            try
+            {
+                lnf = new org_scilab_modules_gui_utils::LookAndFeelManager(getScilabJavaVM());
+            }
+            catch(const GiwsException::JniException & e)
+            {
+                Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
+                return FALSE;
+            }
+
+            if (lnf)
+            {
+                int n1 = 1;
+                int *paramoutINT = (int *)MALLOC(sizeof(int));
+
+                *paramoutINT = (int)booltoBOOL(lnf->setSystemLookAndFeel());
+                delete lnf;
+
+                n1 = 1;
+                CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &n1, &n1, &paramoutINT);
+                LhsVar(1) = Rhs + 1;
+
+                if (paramoutINT)
+                {
+                    FREE(paramoutINT);
+                    paramoutINT = NULL;
+                }
+                PutLhsVar();
+            }
+            else
+            {
+                Scierror(999, _("%s: No more memory.\n"), fname);
+            }
+        }
+        else if (GetType(1) == sci_strings)
+        {
+            int m1, n1 = 0, l1 = 0;
+
+            char *looknfeel = NULL;
+
+            GetRhsVar(1, STRING_DATATYPE, &m1, &n1, &l1);
+            looknfeel = cstk(l1);
+
+            try
+            {
+                lnf = new org_scilab_modules_gui_utils::LookAndFeelManager(getScilabJavaVM());
+            }
+            catch(const GiwsException::JniException & e)
+            {
+                Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
+                return FALSE;
+            }
+
+            if (lnf)
+            {
+                int *paramoutINT = (int *)MALLOC(sizeof(int));
+
+                *paramoutINT = (int)booltoBOOL(lnf->setLookAndFeel(looknfeel));
+                delete lnf;
+
+                n1 = 1;
+                CreateVarFromPtr(Rhs + 1, MATRIX_OF_BOOLEAN_DATATYPE, &n1, &n1, &paramoutINT);
+                LhsVar(1) = Rhs + 1;
+
+                if (paramoutINT)
+                {
+                    FREE(paramoutINT);
+                    paramoutINT = NULL;
+                }
+                PutLhsVar();
+            }
+            else
+            {
+                Scierror(999, _("%s: No more memory.\n"), fname);
+            }
+        }
+        else
+        {
+            Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 1);
+        }
+        return 0;
+    }
 /*--------------------------------------------------------------------------*/
 
 }
+
 /* END OF extern "C" */
 /*--------------------------------------------------------------------------*/
-
index b144a44..5359e97 100644 (file)
@@ -28,8 +28,9 @@ extern "C"
 }
 
 using namespace org_scilab_modules_gui_filechooser;
+
 /*--------------------------------------------------------------------------*/
-int sci_uigetdir(char *fname,unsigned long l)
+int sci_uigetdir(char *fname, unsigned long l)
 {
     int nbRow = 0, nbCol = 0;
 
@@ -42,8 +43,8 @@ int sci_uigetdir(char *fname,unsigned long l)
 
     char *expandedpath = NULL;
 
-    CheckRhs(0,2);
-    CheckLhs(1,1);
+    CheckRhs(0, 2);
+    CheckLhs(1, 1);
 
     if (Rhs >= 1)
     {
@@ -51,7 +52,7 @@ int sci_uigetdir(char *fname,unsigned long l)
         if (VarType(1) == sci_strings)
         {
             GetRhsVar(1, STRING_DATATYPE, &nbRow, &nbCol, &initialDirectoryAdr);
-            if (nbCol !=1)
+            if (nbCol != 1)
             {
                 Scierror(999, _("%s: Wrong size for input argument #%d: A string expected.\n"), fname, 1);
                 FREE(expandedpath);
@@ -64,7 +65,11 @@ int sci_uigetdir(char *fname,unsigned long l)
         else
         {
             Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 1);
-            if (expandedpath) {FREE(expandedpath); expandedpath = NULL;}
+            if (expandedpath)
+            {
+                FREE(expandedpath);
+                expandedpath = NULL;
+            }
             return FALSE;
         }
 
@@ -76,10 +81,14 @@ int sci_uigetdir(char *fname,unsigned long l)
         if (VarType(2) == sci_strings)
         {
             GetRhsVar(2, STRING_DATATYPE, &nbRow, &nbCol, &titleAdr);
-            if (nbCol !=1)
+            if (nbCol != 1)
             {
                 Scierror(999, _("%s: Wrong size for input argument #%d: A string expected.\n"), fname, 2);
-                if (expandedpath) {FREE(expandedpath); expandedpath = NULL;}
+                if (expandedpath)
+                {
+                    FREE(expandedpath);
+                    expandedpath = NULL;
+                }
                 return FALSE;
             }
             title = cstk(titleAdr);
@@ -87,7 +96,11 @@ int sci_uigetdir(char *fname,unsigned long l)
         else
         {
             Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 2);
-            if (expandedpath) {FREE(expandedpath); expandedpath = NULL;}
+            if (expandedpath)
+            {
+                FREE(expandedpath);
+                expandedpath = NULL;
+            }
             return FALSE;
         }
     }
@@ -115,29 +128,30 @@ int sci_uigetdir(char *fname,unsigned long l)
         /* Read the selection */
         userSelection = getJuigetfileSelection();
     }
-    catch (const GiwsException::JniException & e)
+    catch(const GiwsException::JniException & e)
     {
-        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
+        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
         return FALSE;
     }
 
-    if (nbRow !=0 )
+    if (nbRow != 0)
     {
         /* The user selected a file --> returns the files names */
         nbCol = 1;
 
-        CreateVarFromPtr(Rhs+1, MATRIX_OF_STRING_DATATYPE, &nbRow, &nbCol, userSelection);
+        CreateVarFromPtr(Rhs + 1, MATRIX_OF_STRING_DATATYPE, &nbRow, &nbCol, userSelection);
         if (userSelection)
         {
-            for(int i = 0; i < nbRow;i++)
+            for (int i = 0; i < nbRow; i++)
             {
                 if (userSelection[i])
                 {
                     delete userSelection[i];
+
                     userSelection[i] = NULL;
                 }
             }
-            delete [] userSelection;
+            delete[]userSelection;
             userSelection = NULL;
         }
     }
@@ -146,13 +160,18 @@ int sci_uigetdir(char *fname,unsigned long l)
         /* The user canceled the selection --> returns an empty matrix */
         nbRow = 1;
         nbCol = 1;
-        CreateVarFromPtr(Rhs+1, MATRIX_OF_STRING_DATATYPE, &nbRow, &nbCol, NULL);
+        CreateVarFromPtr(Rhs + 1, MATRIX_OF_STRING_DATATYPE, &nbRow, &nbCol, NULL);
     }
 
-    LhsVar(1)=Rhs+1;
+    LhsVar(1) = Rhs + 1;
 
-    if (expandedpath) {FREE(expandedpath); expandedpath = NULL;}
+    if (expandedpath)
+    {
+        FREE(expandedpath);
+        expandedpath = NULL;
+    }
     PutLhsVar();
     return TRUE;
 }
+
 /*--------------------------------------------------------------------------*/
index 9e1b7d9..30461de 100644 (file)
@@ -76,6 +76,7 @@ extern "C"
     }
 /*--------------------------------------------------------------------------*/
 using namespace org_scilab_modules_gui_filechooser;
+
 /*--------------------------------------------------------------------------*/
 
 int sci_uigetfile(char *fname, unsigned long fname_len)
@@ -92,11 +93,11 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
     char *optName = NULL;
 
     char **mask = NULL;
-    char ** description = NULL;
+    char **description = NULL;
     char **titleBox = NULL, *selectionPathName = NULL;
-    char ** initialDirectory = NULL;
+    char **initialDirectory = NULL;
     int multipleSelection = 0;
-    int multipleSelectionAdr  = NULL;
+    int multipleSelectionAdr = NULL;
 
     char **selection = NULL;
     char **selectionFileNames = NULL;
@@ -105,10 +106,10 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
 
     char *menuCallback = NULL;
 
-    CheckRhs(0,4);
-    CheckLhs(1,3);
+    CheckRhs(0, 4);
+    CheckLhs(1, 3);
 
-    if ((optName = (char*)MALLOC(sizeof(char*)*(strlen("title")+1))) == NULL)
+    if ((optName = (char *)MALLOC(sizeof(char *) * (strlen("title") + 1))) == NULL)
     {
         Scierror(999, _("%s: No more memory.\n"), fname);
         return 0;
@@ -120,7 +121,7 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
     {
         if (VarType(1) != sci_strings)
         {
-            Scierror(999, _("%s: Wrong type for input argument #%d: A string matrix expected.\n"),fname, 1);
+            Scierror(999, _("%s: Wrong type for input argument #%d: A string matrix expected.\n"), fname, 1);
             FREE(optName);
             return 0;
         }
@@ -137,15 +138,15 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
             // mask contains both the masks for files and the description of each mask
             // in the sequence [m1, m2,..., mn, d1, d2,...,dn].
             // So description is at the middle of the array.
-            description = (char**)MALLOC( sizeof(char*) * nbRow);
-            for (int i = 0;i < nbRow; i++)
+            description = (char **)MALLOC(sizeof(char *) * nbRow);
+            for (int i = 0; i < nbRow; i++)
             {
-                description[i] = strdup(mask[nbRow+i]);
+                description[i] = strdup(mask[nbRow + i]);
             }
         }
         else
         {
-            Scierror(999, _("%s: Wrong size for input argument #%d: A string matrix expected.\n"),fname, 1);
+            Scierror(999, _("%s: Wrong size for input argument #%d: A string matrix expected.\n"), fname, 1);
             FREE(optName);
             return 0;
         }
@@ -158,7 +159,7 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
 
         if (VarType(2) != sci_strings)
         {
-            Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"),fname, 2);
+            Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 2);
             FREE(optName);
             return 0;
         }
@@ -167,7 +168,7 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
 
         if (nbCol2 != 1 || nbRow2 != 1)
         {
-            Scierror(999, _("%s: Wrong size for input argument #%d: A string  expected.\n"),fname, 2);
+            Scierror(999, _("%s: Wrong size for input argument #%d: A string  expected.\n"), fname, 2);
             FREE(optName);
             return 0;
         }
@@ -182,7 +183,7 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
     {
         if (VarType(3) != sci_strings)
         {
-            Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"),fname, 3);
+            Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 3);
             FREE(optName);
             return 0;
         }
@@ -191,7 +192,7 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
 
         if (nbCol3 != 1 || nbRow3 != 1)
         {
-            Scierror(999, _("%s: Wrong size for input argument #%d: A string  expected.\n"),fname, 3);
+            Scierror(999, _("%s: Wrong size for input argument #%d: A string  expected.\n"), fname, 3);
             FREE(optName);
             return 0;
         }
@@ -219,27 +220,27 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
             break;
 
         case 4:
-        {
-            if (VarType(4) != sci_boolean)
-            {
-                Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"),fname, 4);
-                FREE(optName);
-                return 0;
-            }
-
-            GetRhsVar(4, MATRIX_OF_BOOLEAN_DATATYPE, &nbRow4, &nbCol4, &multipleSelectionAdr);
-
-            if (nbCol4 != 1 || nbRow4 != 1)
             {
-                Scierror(999, _("%s: Wrong size for input argument #%d: A boolean matrix expected.\n"),fname, 4);
-                FREE(optName);
-                return 0;
+                if (VarType(4) != sci_boolean)
+                {
+                    Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 4);
+                    FREE(optName);
+                    return 0;
+                }
+
+                GetRhsVar(4, MATRIX_OF_BOOLEAN_DATATYPE, &nbRow4, &nbCol4, &multipleSelectionAdr);
+
+                if (nbCol4 != 1 || nbRow4 != 1)
+                {
+                    Scierror(999, _("%s: Wrong size for input argument #%d: A boolean matrix expected.\n"), fname, 4);
+                    FREE(optName);
+                    return 0;
+                }
+                multipleSelection = istk(multipleSelectionAdr)[0];
+
+                CallJuigetfile(mask, description, nbRow, initialDirectory[0], titleBox[0], BOOLtobool(multipleSelection));
             }
-            multipleSelection = istk(multipleSelectionAdr)[0];
-
-            CallJuigetfile(mask, description, nbRow, initialDirectory[0], titleBox[0], BOOLtobool(multipleSelection));
-        }
-        break;
+            break;
 
         default:
             // never here
@@ -248,9 +249,9 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
 
         // free pointer
         freeArrayOfString(description, nbRow);
-        freeArrayOfString(mask,nbRow * nbCol);
-        freeArrayOfString(initialDirectory,nbRow2 * nbCol2);
-        freeArrayOfString(titleBox,nbRow3 * nbCol3);
+        freeArrayOfString(mask, nbRow * nbCol);
+        freeArrayOfString(initialDirectory, nbRow2 * nbCol2);
+        freeArrayOfString(titleBox, nbRow3 * nbCol3);
 
         // Get return values
         selection = getJuigetfileSelection();
@@ -261,9 +262,9 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
         filterIndex = getJuigetfileFilterIndex();
         menuCallback = getJuigetfileMenuCallback();
     }
-    catch (const GiwsException::JniException & e)
+    catch(const GiwsException::JniException & e)
     {
-        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
+        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
         return 0;
     }
 
@@ -277,20 +278,21 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
         nbColOutSelection = 1;
 
         // "" is returned as filename
-        CreateVarFromPtr(Rhs+1, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selection);
-        LhsVar(1) = Rhs + 1 ;
+        CreateVarFromPtr(Rhs + 1, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selection);
+        LhsVar(1) = Rhs + 1;
 
         if (Lhs > 1)
         {
             // "" is returned as pathname
-            CreateVarFromPtr(Rhs+2, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selection);
-            LhsVar(2) = Rhs + 2 ;
+            CreateVarFromPtr(Rhs + 2, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selection);
+            LhsVar(2) = Rhs + 2;
         }
 
         if (Lhs > 2)
         {
             // 0 is returned as pathname
-            double *tmp = (double*)MALLOC(sizeof(double));
+            double *tmp = (double *)MALLOC(sizeof(double));
+
             if (tmp == NULL)
             {
                 freePointersUigetfile();
@@ -298,9 +300,10 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
                 return 0;
             }
             tmp[0] = 0;
-            CreateVarFromPtr(Rhs+3, MATRIX_OF_DOUBLE_DATATYPE, &nbRowOutSelection, &nbColOutSelection, &tmp);
-            FREE(tmp); tmp = NULL;
-            LhsVar(3) = Rhs + 3 ;
+            CreateVarFromPtr(Rhs + 3, MATRIX_OF_DOUBLE_DATATYPE, &nbRowOutSelection, &nbColOutSelection, &tmp);
+            FREE(tmp);
+            tmp = NULL;
+            LhsVar(3) = Rhs + 3;
         }
 
         freePointersUigetfile();
@@ -311,8 +314,8 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
     // Only one output then it contains path+filenames
     if (Lhs == 1)
     {
-        CreateVarFromPtr(Rhs+1, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selection);
-        LhsVar(1) = Rhs + 1 ;
+        CreateVarFromPtr(Rhs + 1, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selection);
+        LhsVar(1) = Rhs + 1;
 
         freePointersUigetfile();
         PutLhsVar();
@@ -320,16 +323,17 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
     }
 
     // More than one output
-    CreateVarFromPtr(Rhs+1, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selectionFileNames);
+    CreateVarFromPtr(Rhs + 1, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selectionFileNames);
 
     nbColOutPath = (int)strlen(selectionPathName);
-    CreateVarFromPtr(Rhs+2, STRING_DATATYPE, &nbColOutPath,&nbRowOutPath, &selectionPathName);
+    CreateVarFromPtr(Rhs + 2, STRING_DATATYPE, &nbColOutPath, &nbRowOutPath, &selectionPathName);
 
-    LhsVar(1) = Rhs + 1 ;
-    LhsVar(2) = Rhs + 2 ;
+    LhsVar(1) = Rhs + 1;
+    LhsVar(2) = Rhs + 2;
     if (Lhs > 2)
     {
-        double *tmp = (double*)MALLOC(sizeof(double));
+        double *tmp = (double *)MALLOC(sizeof(double));
+
         if (tmp == NULL)
         {
             Scierror(999, _("%s: No more memory.\n"), fname);
@@ -337,15 +341,16 @@ int sci_uigetfile(char *fname, unsigned long fname_len)
             return 0;
         }
         tmp[0] = filterIndex;
-        CreateVarFromPtr(Rhs+3, MATRIX_OF_DOUBLE_DATATYPE, &nbRowOutFilterIndex, &nbColOutFilterIndex, &tmp);
-        FREE(tmp); tmp = NULL;
-        LhsVar(3) = Rhs + 3 ;
+        CreateVarFromPtr(Rhs + 3, MATRIX_OF_DOUBLE_DATATYPE, &nbRowOutFilterIndex, &nbColOutFilterIndex, &tmp);
+        FREE(tmp);
+        tmp = NULL;
+        LhsVar(3) = Rhs + 3;
     }
 
-
     freePointersUigetfile();
     PutLhsVar();
 
     return 0;
 }
+
 /*--------------------------------------------------------------------------*/
index 05c199d..93130f7 100644 (file)
@@ -35,6 +35,7 @@ extern "C"
 #include "BOOL.h"
 }
 using namespace org_scilab_modules_gui_filechooser;
+
 /*--------------------------------------------------------------------------*/
 
 int sci_uiputfile(char *fname, unsigned long fname_len)
@@ -50,9 +51,9 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
     char *optName = NULL;
 
     char **mask = NULL;
-    char ** description = NULL;
+    char **description = NULL;
     char **titleBox = NULL, *selectionPathName = NULL;
-    char ** initialDirectory = NULL;
+    char **initialDirectory = NULL;
     int multipleSelection = 0;
 
     char **selection = NULL;
@@ -62,10 +63,10 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
 
     char *menuCallback = NULL;
 
-    CheckRhs(0,3);
-    CheckLhs(1,3);
+    CheckRhs(0, 3);
+    CheckLhs(1, 3);
 
-    if ((optName = (char*)MALLOC(sizeof(char*)*(strlen("title") + 1))) == NULL)
+    if ((optName = (char *)MALLOC(sizeof(char *) * (strlen("title") + 1))) == NULL)
     {
         Scierror(999, _("%s: No more memory.\n"), fname);
         return 0;
@@ -77,7 +78,7 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
     {
         if (VarType(1) != sci_strings)
         {
-            Scierror(999, _("%s: Wrong type for input argument #%d: A string matrix expected.\n"),fname, 1);
+            Scierror(999, _("%s: Wrong type for input argument #%d: A string matrix expected.\n"), fname, 1);
             FREE(optName);
             return 0;
         }
@@ -94,15 +95,15 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
             // mask contains both the masks for files and the description of each mask
             // in the sequence [m1, m2,..., mn, d1, d2,...,dn].
             // So description is at the middle of the array.
-            description = (char**)MALLOC( sizeof(char*) * nbRow);
-            for (int i = 0;i < nbRow; i++)
+            description = (char **)MALLOC(sizeof(char *) * nbRow);
+            for (int i = 0; i < nbRow; i++)
             {
                 description[i] = strdup(mask[nbRow + i]);
             }
         }
         else
         {
-            Scierror(999, _("%s: Wrong size for input argument #%d: A string matrix expected.\n"),fname, 1);
+            Scierror(999, _("%s: Wrong size for input argument #%d: A string matrix expected.\n"), fname, 1);
             FREE(optName);
             return 0;
         }
@@ -115,7 +116,7 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
 
         if (VarType(2) != sci_strings)
         {
-            Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"),fname, 2);
+            Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 2);
             FREE(optName);
             return 0;
         }
@@ -124,7 +125,7 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
 
         if (nbCol2 != 1 || nbRow2 != 1)
         {
-            Scierror(999, _("%s: Wrong size for input argument #%d: A string  expected.\n"),fname, 2);
+            Scierror(999, _("%s: Wrong size for input argument #%d: A string  expected.\n"), fname, 2);
             FREE(optName);
             return 0;
         }
@@ -139,7 +140,7 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
     {
         if (VarType(3) != sci_strings)
         {
-            Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"),fname, 3);
+            Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, 3);
             FREE(optName);
             return 0;
         }
@@ -148,7 +149,7 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
 
         if (nbCol3 != 1 || nbRow3 != 1)
         {
-            Scierror(999, _("%s: Wrong size for input argument #%d: A string  expected.\n"),fname, 3);
+            Scierror(999, _("%s: Wrong size for input argument #%d: A string  expected.\n"), fname, 3);
             FREE(optName);
             return 0;
         }
@@ -195,9 +196,9 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
         filterIndex = getJuigetfileFilterIndex();
         menuCallback = getJuigetfileMenuCallback();
     }
-    catch (const GiwsException::JniException & e)
+    catch(const GiwsException::JniException & e)
     {
-        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
+        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
         return 0;
     }
 
@@ -212,19 +213,20 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
 
         // "" is returned as filename
         CreateVarFromPtr(Rhs + 1, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selection);
-        LhsVar(1) = Rhs + 1 ;
+        LhsVar(1) = Rhs + 1;
 
         if (Lhs > 1)
         {
             // "" is returned as pathname
             CreateVarFromPtr(Rhs + 2, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selection);
-            LhsVar(2) = Rhs + 2 ;
+            LhsVar(2) = Rhs + 2;
         }
 
         if (Lhs > 2)
         {
             // 0 is returned as pathname
-            double *tmp = (double*)MALLOC(sizeof(double));
+            double *tmp = (double *)MALLOC(sizeof(double));
+
             if (tmp == NULL)
             {
                 Scierror(999, _("%s: No more memory.\n"), fname);
@@ -232,8 +234,9 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
             }
             tmp[0] = 0;
             CreateVarFromPtr(Rhs + 3, MATRIX_OF_DOUBLE_DATATYPE, &nbRowOutSelection, &nbColOutSelection, &tmp);
-            FREE(tmp); tmp = NULL;
-            LhsVar(3) = Rhs + 3 ;
+            FREE(tmp);
+            tmp = NULL;
+            LhsVar(3) = Rhs + 3;
         }
         PutLhsVar();
         return 0;
@@ -243,7 +246,7 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
     if (Lhs == 1)
     {
         CreateVarFromPtr(Rhs + 1, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selection);
-        LhsVar(1) = Rhs + 1 ;
+        LhsVar(1) = Rhs + 1;
         PutLhsVar();
         return 0;
     }
@@ -252,13 +255,14 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
     CreateVarFromPtr(Rhs + 1, MATRIX_OF_STRING_DATATYPE, &nbRowOutSelection, &nbColOutSelection, selectionFileNames);
 
     nbColOutPath = (int)strlen(selectionPathName);
-    CreateVarFromPtr(Rhs + 2, STRING_DATATYPE, &nbColOutPath,&nbRowOutPath, &selectionPathName);
+    CreateVarFromPtr(Rhs + 2, STRING_DATATYPE, &nbColOutPath, &nbRowOutPath, &selectionPathName);
 
-    LhsVar(1) = Rhs + 1 ;
-    LhsVar(2) = Rhs + 2 ;
+    LhsVar(1) = Rhs + 1;
+    LhsVar(2) = Rhs + 2;
     if (Lhs > 2)
     {
-        double *tmp = (double*)MALLOC(sizeof(double));
+        double *tmp = (double *)MALLOC(sizeof(double));
+
         if (tmp == NULL)
         {
             Scierror(999, _("%s: No more memory.\n"), fname);
@@ -266,11 +270,13 @@ int sci_uiputfile(char *fname, unsigned long fname_len)
         }
         tmp[0] = filterIndex;
         CreateVarFromPtr(Rhs + 3, MATRIX_OF_DOUBLE_DATATYPE, &nbRowOutFilterIndex, &nbColOutFilterIndex, &tmp);
-        FREE(tmp); tmp = NULL;
-        LhsVar(3) = Rhs + 3 ;
+        FREE(tmp);
+        tmp = NULL;
+        LhsVar(3) = Rhs + 3;
     }
 
     PutLhsVar();
     return 0;
 }
+
 /*--------------------------------------------------------------------------*/
index 87990a4..742dd52 100644 (file)
@@ -25,16 +25,17 @@ extern "C"
 }
 /*--------------------------------------------------------------------------*/
 using namespace org_scilab_modules_gui_bridge;
+
 /*--------------------------------------------------------------------------*/
-int sci_usecanvas( char * fname, unsigned long fname_len )
+int sci_usecanvas(char *fname, unsigned long fname_len)
 {
     int m1 = 0, n1 = 0, l1 = 0;
     int *status = NULL;
 
-    CheckLhs(0,1);
-    CheckRhs(0,1);
+    CheckLhs(0, 1);
+    CheckRhs(0, 1);
 
-    if (Rhs == 1) /* Sets the status of usecanvas */
+    if (Rhs == 1)               /* Sets the status of usecanvas */
     {
         if (VarType(1) != sci_boolean)
         {
@@ -42,9 +43,9 @@ int sci_usecanvas( char * fname, unsigned long fname_len )
             return FALSE;
         }
 
-        GetRhsVar(1,MATRIX_OF_BOOLEAN_DATATYPE,&m1,&n1,&l1);
+        GetRhsVar(1, MATRIX_OF_BOOLEAN_DATATYPE, &m1, &n1, &l1);
 
-        if (m1*n1 != 1)
+        if (m1 * n1 != 1)
         {
             Scierror(999, _("%s: Wrong size for input argument #%d: A boolean expected.\n"), fname, 1);
             return FALSE;
@@ -54,15 +55,15 @@ int sci_usecanvas( char * fname, unsigned long fname_len )
         {
             CallScilabBridge::useCanvasForDisplay(getScilabJavaVM(), BOOLtobool(*istk(l1)));
         }
-        catch (const GiwsException::JniException & e)
+        catch(const GiwsException::JniException & e)
         {
-            Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
+            Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
             return FALSE;
         }
     }
 
     /* Returns current status */
-    if ((status = (int*) MALLOC(sizeof(int))) == NULL)
+    if ((status = (int *)MALLOC(sizeof(int))) == NULL)
     {
         Scierror(999, _("%s: No more memory.\n"), fname, 0);
         return FALSE;
@@ -72,15 +73,15 @@ int sci_usecanvas( char * fname, unsigned long fname_len )
     {
         status[0] = booltoBOOL(CallScilabBridge::useCanvasForDisplay(getScilabJavaVM()));
     }
-    catch (const GiwsException::JniException & e)
+    catch(const GiwsException::JniException & e)
     {
-        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.what());
+        Scierror(999, _("%s: A Java exception arised:\n%s"), fname, e.whatStr().c_str());
         return FALSE;
     }
 
     m1 = 1;
     n1 = 1;
-    CreateVarFromPtr(1,MATRIX_OF_BOOLEAN_DATATYPE,&m1,&n1,&status);
+    CreateVarFromPtr(1, MATRIX_OF_BOOLEAN_DATATYPE, &m1, &n1, &status);
 
     FREE(status);
 
@@ -90,4 +91,5 @@ int sci_usecanvas( char * fname, unsigned long fname_len )
     return TRUE;
 
 }
+
 /*--------------------------------------------------------------------------*/
index 6bcefeb..10589bd 100644 (file)
@@ -81,7 +81,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../includes;../../../../libs/MALLOC/includes;../../../../libs/hashtable;../../../core/includes;../../../fileio/includes;../../../graphics/includes;../../../graphic_export/includes;../../../graphics/src/c/getHandleProperty;../../../renderer/src/cpp;../../../renderer/src/jni;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../../libs/intl;../../../../libs/doublylinkedlist/includes;../../../string/includes;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../renderer/includes;../cpp;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../includes;../../../../libs/MALLOC/includes;../../../../libs/hashtable;../../../core/includes;../../../fileio/includes;../../../graphics/includes;../../../graphic_export/includes;../../../graphics/src/c/getHandleProperty;../../../renderer/src/cpp;../../../renderer/src/jni;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../../libs/intl;../../../../libs/doublylinkedlist/includes;../../../string/includes;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../renderer/includes;../cpp;../../../api_scilab/includes;../../../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;GUI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -90,6 +90,7 @@
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../includes;../../../../libs/MALLOC/includes;../../../../libs/hashtable;../../../core/includes;../../../fileio/includes;../../../graphics/includes;../../../graphic_export/includes;../../../graphics/src/c/getHandleProperty;../../../renderer/src/cpp;../../../renderer/src/jni;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../../libs/intl;../../../../libs/doublylinkedlist/includes;../../../string/includes;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../renderer/includes;../cpp;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../includes;../../../../libs/MALLOC/includes;../../../../libs/hashtable;../../../core/includes;../../../fileio/includes;../../../graphics/includes;../../../graphic_export/includes;../../../graphics/src/c/getHandleProperty;../../../renderer/src/cpp;../../../renderer/src/jni;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../../libs/intl;../../../../libs/doublylinkedlist/includes;../../../string/includes;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../renderer/includes;../cpp;../../../api_scilab/includes;../../../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;GUI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../includes;../../../../libs/MALLOC/includes;../../../../libs/hashtable;../../../core/includes;../../../fileio/includes;../../../graphics/includes;../../../graphic_export/includes;../../../graphics/src/c/getHandleProperty;../../../renderer/src/cpp;../../../renderer/src/jni;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../../libs/intl;../../../../libs/doublylinkedlist/includes;../../../string/includes;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../renderer/includes;../cpp;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../includes;../../../../libs/MALLOC/includes;../../../../libs/hashtable;../../../core/includes;../../../fileio/includes;../../../graphics/includes;../../../graphic_export/includes;../../../graphics/src/c/getHandleProperty;../../../renderer/src/cpp;../../../renderer/src/jni;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../../libs/intl;../../../../libs/doublylinkedlist/includes;../../../string/includes;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../renderer/includes;../cpp;../../../api_scilab/includes;../../../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;GUI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../includes;../../../../libs/MALLOC/includes;../../../../libs/hashtable;../../../core/includes;../../../fileio/includes;../../../graphics/includes;../../../graphic_export/includes;../../../graphics/src/c/getHandleProperty;../../../renderer/src/cpp;../../../renderer/src/jni;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../../libs/intl;../../../../libs/doublylinkedlist/includes;../../../string/includes;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../renderer/includes;../cpp;../../../api_scilab/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../includes;../../../../libs/MALLOC/includes;../../../../libs/hashtable;../../../core/includes;../../../fileio/includes;../../../graphics/includes;../../../graphic_export/includes;../../../graphics/src/c/getHandleProperty;../../../renderer/src/cpp;../../../renderer/src/jni;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../../libs/intl;../../../../libs/doublylinkedlist/includes;../../../string/includes;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../renderer/includes;../cpp;../../../api_scilab/includes;../../../commons/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;GUI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
     <ClCompile Include="..\cpp\GetUiobjectForegroundColor.cpp" />
     <ClCompile Include="..\cpp\GetUiobjectTag.cpp" />
     <ClCompile Include="..\cpp\GetUiobjectVisible.cpp" />
-    <ClCompile Include="..\jni\GiwsException.cpp" />
     <ClCompile Include="..\..\sci_gateway\c\gw_gui.c" />
     <ClCompile Include="iconifyMainWindow.c" />
     <ClCompile Include="InitializeGUI.c" />
     <ClInclude Include="..\cpp\GetUiobjectTag.hxx" />
     <ClInclude Include="..\..\includes\GetUiobjectVisible.h" />
     <ClInclude Include="..\cpp\GetUiobjectVisible.hxx" />
-    <ClInclude Include="..\jni\GiwsException.hxx" />
     <ClInclude Include="..\..\includes\GraphicWindow.h" />
     <ClInclude Include="..\..\includes\gw_gui.h" />
     <ClInclude Include="iconifyMainWindow.h" />
     <ProjectReference Include="..\..\..\api_scilab\api_scilab.vcxproj">
       <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>
     </ProjectReference>
+    <ProjectReference Include="..\..\..\commons\src\c\commons.vcxproj">
+      <Project>{eca09a1e-6d12-4a47-92e1-a671c181df77}</Project>
+    </ProjectReference>
     <ProjectReference Include="..\..\..\dynamic_link\src\c\dynamic_link.vcxproj">
       <Project>{eab6c580-22b3-4359-ba1d-dd7499a96163}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
index b8b351b..96a0bfe 100644 (file)
     <ClCompile Include="..\cpp\GetUiobjectVisible.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\jni\GiwsException.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\sci_gateway\c\gw_gui.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClInclude Include="..\cpp\GetUiobjectVisible.hxx">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\jni\GiwsException.hxx">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\includes\GraphicWindow.h">
       <Filter>Header Files</Filter>
     </ClInclude>
index f99d21f..ea6f245 100644 (file)
@@ -1,5 +1,5 @@
 #include "CallScilabBridge.hxx"
-/* Generated by GIWS (version 1.2.4) */
+/* Generated by GIWS (version 1.3.0) */
 /*
 
 Copyright 2007-2008 INRIA
@@ -104,190 +104,190 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 curEnv->DeleteLocalRef(localInstance);
 
                 /* Methods ID set to NULL */
-jintnewWindowID=NULL; 
-jintnewMenuBarID=NULL; 
-jintnewMenuID=NULL; 
-jintnewPushButtonID=NULL; 
-jintnewEditBoxID=NULL; 
-jintnewLabelID=NULL; 
-jintnewCheckBoxID=NULL; 
-jintnewRadioButtonID=NULL; 
-jintnewSliderID=NULL; 
-jintnewPopupMenuID=NULL; 
-jintnewListBoxID=NULL; 
-jintnewFrameID=NULL; 
-jstringnewContextMenujobjectArray_ID=NULL; 
-jintnewContextMenuID=NULL; 
-voiddestroyWidgetjintID=NULL; 
-voiddestroyFramejintID=NULL; 
-jintnewWindowjintID=NULL; 
-voidsetFigureAsParentjintjintID=NULL; 
-voidsetMenuAsParentjintjintID=NULL; 
-voidsetRootAsParentjintID=NULL; 
-voidsetParentjintjintID=NULL; 
-voidsetPushButtonParentjintjintID=NULL; 
-voidremovePushButtonFromParentjintjintID=NULL; 
-voidsetEditBoxParentjintjintID=NULL; 
-voidremoveEditBoxFromParentjintjintID=NULL; 
-voidsetLabelParentjintjintID=NULL; 
-voidremoveLabelFromParentjintjintID=NULL; 
-voidsetCheckBoxParentjintjintID=NULL; 
-voidremoveCheckBoxFromParentjintjintID=NULL; 
-voidsetRadioButtonParentjintjintID=NULL; 
-voidremoveRadioButtonFromParentjintjintID=NULL; 
-voidsetSliderParentjintjintID=NULL; 
-voidremoveSliderFromParentjintjintID=NULL; 
-voidsetPopupMenuParentjintjintID=NULL; 
-voidremovePopupMenuFromParentjintjintID=NULL; 
-voidsetListBoxParentjintjintID=NULL; 
-voidremoveListBoxFromParentjintjintID=NULL; 
-voidsetFrameParentjintjintID=NULL; 
-voidremoveFrameFromParentjintjintID=NULL; 
-voidsetWidgetTextjintjstringID=NULL; 
-jstringgetWidgetTextjintID=NULL; 
-voidsetFrameTextjintjstringID=NULL; 
-jstringgetFrameTextjintID=NULL; 
-voidsetWidgetBackgroundColorjintjintjintjintID=NULL; 
-jintArray_getWidgetBackgroundColorjintID=NULL; 
-voidsetWidgetForegroundColorjintjintjintjintID=NULL; 
-jintArray_getWidgetForegroundColorjintID=NULL; 
-voidsetFrameBackgroundColorjintjintjintjintID=NULL; 
-jintArray_getFrameBackgroundColorjintID=NULL; 
-voidsetFrameForegroundColorjintjintjintjintID=NULL; 
-jintArray_getFrameForegroundColorjintID=NULL; 
-voidsetWidgetFontNamejintjstringID=NULL; 
-jstringgetWidgetFontNamejintID=NULL; 
-voidsetWidgetFontWeightjintjstringID=NULL; 
-voidsetWidgetFontSizejintjintID=NULL; 
-jintgetWidgetFontSizejintID=NULL; 
-voidsetWidgetFontAnglejintjstringID=NULL; 
-voidsetFrameFontNamejintjstringID=NULL; 
-jstringgetFrameFontNamejintID=NULL; 
-voidsetFrameFontWeightjintjstringID=NULL; 
-voidsetFrameFontSizejintjintID=NULL; 
-jintgetFrameFontSizejintID=NULL; 
-voidsetFrameFontAnglejintjstringID=NULL; 
-voidsetWidgetPositionjintjintjintjintjintID=NULL; 
-jintArray_getWidgetPositionjintID=NULL; 
-voidsetFramePositionjintjintjintjintjintID=NULL; 
-jintArray_getFramePositionjintID=NULL; 
-voidsetWidgetCallbackjintjstringjintID=NULL; 
-voidsetFrameCallbackjintjstringjintID=NULL; 
-voidsetWidgetHorizontalAlignmentjintjstringID=NULL; 
-voidsetWidgetVerticalAlignmentjintjstringID=NULL; 
-voidsetSliderMinorTickSpacingjintjintID=NULL; 
-voidsetSliderMajorTickSpacingjintjintID=NULL; 
-voidsetListBoxSelectedIndicesjintjintArray_ID=NULL; 
-jintArray_getListBoxSelectedIndicesjintID=NULL; 
-jintgetListBoxSelectionSizejintID=NULL; 
-voidsetPopupMenuSelectedIndexjintjintID=NULL; 
-jintgetPopupMenuSelectedIndexjintID=NULL; 
-voidsetSliderValuejintjintID=NULL; 
-jintgetSliderValuejintID=NULL; 
-voidsetRadioButtonCheckedjintjbooleanID=NULL; 
-jbooleanisRadioButtonCheckedjintID=NULL; 
-voidsetCheckBoxCheckedjintjbooleanID=NULL; 
-jbooleanisCheckBoxCheckedjintID=NULL; 
-voidsetSliderMinValuejintjintID=NULL; 
-voidsetSliderMaxValuejintjintID=NULL; 
-voidsetSliderVerticaljintID=NULL; 
-voidsetSliderHorizontaljintID=NULL; 
-voidsetListBoxMultipleSelectionEnabledjintjbooleanID=NULL; 
-jobjectArray_getListBoxAllItemsTextjintID=NULL; 
-jintgetListBoxNumberOfItemsjintID=NULL; 
-voidsetListBoxTextjintjobjectArray_ID=NULL; 
-voidsetListBoxListBoxTopjintjintID=NULL; 
-jintgetListBoxListBoxTopjintID=NULL; 
-jobjectArray_getPopupMenuAllItemsTextjintID=NULL; 
-jintgetPopupMenuNumberOfItemsjintID=NULL; 
-voidsetPopupMenuTextjintjobjectArray_ID=NULL; 
-voidsetWidgetReliefjintjstringID=NULL; 
-voidsetFrameReliefjintjstringID=NULL; 
-voidsetRootMenuEnabledjstringjbooleanID=NULL; 
-voidsetRootSubMenuEnabledjstringjintjbooleanID=NULL; 
-voidsetFigureMenuEnabledjintjstringjbooleanID=NULL; 
-voidsetFigureSubMenuEnabledjintjstringjintjbooleanID=NULL; 
-voidsetWidgetEnablejintjbooleanID=NULL; 
-voidsetFrameEnablejintjbooleanID=NULL; 
-jbooleanisWidgetEnablejintID=NULL; 
-jbooleanisFrameEnablejintID=NULL; 
-voidsetMenuCheckedjintjbooleanID=NULL; 
-jbooleanisMenuCheckedjintID=NULL; 
-voidremoveRootMenujstringID=NULL; 
-voidremoveFigureMenujintjstringID=NULL; 
-jstringdisplayAndWaitContextMenujintID=NULL; 
-jintnewMessageBoxID=NULL; 
-voidsetMessageBoxTitlejintjstringID=NULL; 
-voidsetMessageBoxMessagejintjstringID=NULL; 
-voidsetMessageBoxMessagejintjobjectArray_ID=NULL; 
-voidmessageBoxDisplayAndWaitjintID=NULL; 
-jintgetMessageBoxSelectedButtonjintID=NULL; 
-voidsetMessageBoxDefaultSelectedButtonsjintjintArray_ID=NULL; 
-jintArray_getMessageBoxUserSelectedButtonsjintID=NULL; 
-voidsetMessageBoxButtonsLabelsjintjobjectArray_ID=NULL; 
-voidsetMessageBoxInitialValuejintjobjectArray_ID=NULL; 
-jobjectArray_getMessageBoxValuejintID=NULL; 
-jintgetMessageBoxValueSizejintID=NULL; 
-voidsetMessageBoxListBoxItemsjintjobjectArray_ID=NULL; 
-jintgetMessageBoxSelectedItemjintID=NULL; 
-voidsetMessageBoxLineLabelsjintjobjectArray_ID=NULL; 
-voidsetMessageBoxColumnLabelsjintjobjectArray_ID=NULL; 
-voidsetMessageBoxDefaultInputjintjobjectArray_ID=NULL; 
-voidsetMessageBoxModaljintjbooleanID=NULL; 
-voidsetMessageBoxIconjintjstringID=NULL; 
-jbooleanisToolbarVisiblejintID=NULL; 
-voidsetToolbarVisiblejintjbooleanID=NULL; 
-voidsetEventHandlerjintjstringID=NULL; 
-voidsetEventHandlerEnabledjintjbooleanID=NULL; 
-jintnewWaitBarID=NULL; 
-voidsetWaitBarMessagejintjobjectArray_ID=NULL; 
-voidsetWaitBarValuejintjintID=NULL; 
-voiddestroyWaitBarjintID=NULL; 
-voidsetWaitBarIndeterminateModejintjbooleanID=NULL; 
-voidlaunchHelpBrowserjobjectArray_jstringID=NULL; 
-voidsearchKeywordjobjectArray_jstringjstringjbooleanID=NULL; 
-voidsaveMainWindowSettingsID=NULL; 
-voidsaveHelpWindowSettingsID=NULL; 
-jintnewExportFileChooserjintID=NULL; 
-jintnewFontChooserID=NULL; 
-voidfontChooserDisplayAndWaitjintID=NULL; 
-voidsetFontChooserFontNamejintjstringID=NULL; 
-voidsetFontChooserFontSizejintjintID=NULL; 
-voidsetFontChooserBoldjintjbooleanID=NULL; 
-voidsetFontChooserItalicjintjbooleanID=NULL; 
-jstringgetFontChooserFontNamejintID=NULL; 
-jintgetFontChooserFontSizejintID=NULL; 
-jbooleangetFontChooserBoldjintID=NULL; 
-jbooleangetFontChooserItalicjintID=NULL; 
-jintnewColorChooserID=NULL; 
-voidcolorChooserDisplayAndWaitjintID=NULL; 
-voidsetColorChooserDefaultColorjintjintArray_ID=NULL; 
-jintArray_getColorChooserSelectedColorjintID=NULL; 
-voidsetColorChooserTitlejintjstringID=NULL; 
-voidsetWidgetVisiblejintjbooleanID=NULL; 
-voidsetFrameVisiblejintjbooleanID=NULL; 
-jbooleanisWidgetVisiblejintID=NULL; 
-jbooleanisFrameVisiblejintID=NULL; 
-jstringgetClipboardContentsID=NULL; 
-voidpasteClipboardIntoConsoleID=NULL; 
-voidcopyConsoleSelectionID=NULL; 
-voidemptyClipboardID=NULL; 
-voidsetClipboardContentsjstringID=NULL; 
-voidcopyFigureToClipBoardjintID=NULL; 
-jintgetScreenResolutionID=NULL; 
-jdoublegetScreenWidthID=NULL; 
-jdoublegetScreenHeightID=NULL; 
-jintgetScreenDepthID=NULL; 
-jbooleanprintFigurejintjbooleanjbooleanID=NULL; 
-jbooleanprintFilejstringID=NULL; 
-jbooleanprintStringjstringjstringID=NULL; 
-jbooleanpageSetupID=NULL; 
-voidrequestWidgetFocusjintID=NULL; 
-voidrequestFrameFocusjintID=NULL; 
-voidraiseWindowjintID=NULL; 
-voiduseCanvasForDisplayjbooleanID=NULL; 
-jbooleanuseCanvasForDisplayID=NULL; 
-voidscilabAboutBoxID=NULL; 
+jintnewWindowID=NULL;
+jintnewMenuBarID=NULL;
+jintnewMenuID=NULL;
+jintnewPushButtonID=NULL;
+jintnewEditBoxID=NULL;
+jintnewLabelID=NULL;
+jintnewCheckBoxID=NULL;
+jintnewRadioButtonID=NULL;
+jintnewSliderID=NULL;
+jintnewPopupMenuID=NULL;
+jintnewListBoxID=NULL;
+jintnewFrameID=NULL;
+jstringnewContextMenujobjectArray_java_lang_StringID=NULL;
+jintnewContextMenuID=NULL;
+voiddestroyWidgetjintintID=NULL;
+voiddestroyFramejintintID=NULL;
+jintnewWindowjintintID=NULL;
+voidsetFigureAsParentjintintjintintID=NULL;
+voidsetMenuAsParentjintintjintintID=NULL;
+voidsetRootAsParentjintintID=NULL;
+voidsetParentjintintjintintID=NULL;
+voidsetPushButtonParentjintintjintintID=NULL;
+voidremovePushButtonFromParentjintintjintintID=NULL;
+voidsetEditBoxParentjintintjintintID=NULL;
+voidremoveEditBoxFromParentjintintjintintID=NULL;
+voidsetLabelParentjintintjintintID=NULL;
+voidremoveLabelFromParentjintintjintintID=NULL;
+voidsetCheckBoxParentjintintjintintID=NULL;
+voidremoveCheckBoxFromParentjintintjintintID=NULL;
+voidsetRadioButtonParentjintintjintintID=NULL;
+voidremoveRadioButtonFromParentjintintjintintID=NULL;
+voidsetSliderParentjintintjintintID=NULL;
+voidremoveSliderFromParentjintintjintintID=NULL;
+voidsetPopupMenuParentjintintjintintID=NULL;
+voidremovePopupMenuFromParentjintintjintintID=NULL;
+voidsetListBoxParentjintintjintintID=NULL;
+voidremoveListBoxFromParentjintintjintintID=NULL;
+voidsetFrameParentjintintjintintID=NULL;
+voidremoveFrameFromParentjintintjintintID=NULL;
+voidsetWidgetTextjintintjstringjava_lang_StringID=NULL;
+jstringgetWidgetTextjintintID=NULL;
+voidsetFrameTextjintintjstringjava_lang_StringID=NULL;
+jstringgetFrameTextjintintID=NULL;
+voidsetWidgetBackgroundColorjintintjintintjintintjintintID=NULL;
+jintArray_getWidgetBackgroundColorjintintID=NULL;
+voidsetWidgetForegroundColorjintintjintintjintintjintintID=NULL;
+jintArray_getWidgetForegroundColorjintintID=NULL;
+voidsetFrameBackgroundColorjintintjintintjintintjintintID=NULL;
+jintArray_getFrameBackgroundColorjintintID=NULL;
+voidsetFrameForegroundColorjintintjintintjintintjintintID=NULL;
+jintArray_getFrameForegroundColorjintintID=NULL;
+voidsetWidgetFontNamejintintjstringjava_lang_StringID=NULL;
+jstringgetWidgetFontNamejintintID=NULL;
+voidsetWidgetFontWeightjintintjstringjava_lang_StringID=NULL;
+voidsetWidgetFontSizejintintjintintID=NULL;
+jintgetWidgetFontSizejintintID=NULL;
+voidsetWidgetFontAnglejintintjstringjava_lang_StringID=NULL;
+voidsetFrameFontNamejintintjstringjava_lang_StringID=NULL;
+jstringgetFrameFontNamejintintID=NULL;
+voidsetFrameFontWeightjintintjstringjava_lang_StringID=NULL;
+voidsetFrameFontSizejintintjintintID=NULL;
+jintgetFrameFontSizejintintID=NULL;
+voidsetFrameFontAnglejintintjstringjava_lang_StringID=NULL;
+voidsetWidgetPositionjintintjintintjintintjintintjintintID=NULL;
+jintArray_getWidgetPositionjintintID=NULL;
+voidsetFramePositionjintintjintintjintintjintintjintintID=NULL;
+jintArray_getFramePositionjintintID=NULL;
+voidsetWidgetCallbackjintintjstringjava_lang_StringjintintID=NULL;
+voidsetFrameCallbackjintintjstringjava_lang_StringjintintID=NULL;
+voidsetWidgetHorizontalAlignmentjintintjstringjava_lang_StringID=NULL;
+voidsetWidgetVerticalAlignmentjintintjstringjava_lang_StringID=NULL;
+voidsetSliderMinorTickSpacingjintintjintintID=NULL;
+voidsetSliderMajorTickSpacingjintintjintintID=NULL;
+voidsetListBoxSelectedIndicesjintintjintArray_intID=NULL;
+jintArray_getListBoxSelectedIndicesjintintID=NULL;
+jintgetListBoxSelectionSizejintintID=NULL;
+voidsetPopupMenuSelectedIndexjintintjintintID=NULL;
+jintgetPopupMenuSelectedIndexjintintID=NULL;
+voidsetSliderValuejintintjintintID=NULL;
+jintgetSliderValuejintintID=NULL;
+voidsetRadioButtonCheckedjintintjbooleanbooleanID=NULL;
+jbooleanisRadioButtonCheckedjintintID=NULL;
+voidsetCheckBoxCheckedjintintjbooleanbooleanID=NULL;
+jbooleanisCheckBoxCheckedjintintID=NULL;
+voidsetSliderMinValuejintintjintintID=NULL;
+voidsetSliderMaxValuejintintjintintID=NULL;
+voidsetSliderVerticaljintintID=NULL;
+voidsetSliderHorizontaljintintID=NULL;
+voidsetListBoxMultipleSelectionEnabledjintintjbooleanbooleanID=NULL;
+jobjectArray_getListBoxAllItemsTextjintintID=NULL;
+jintgetListBoxNumberOfItemsjintintID=NULL;
+voidsetListBoxTextjintintjobjectArray_java_lang_StringID=NULL;
+voidsetListBoxListBoxTopjintintjintintID=NULL;
+jintgetListBoxListBoxTopjintintID=NULL;
+jobjectArray_getPopupMenuAllItemsTextjintintID=NULL;
+jintgetPopupMenuNumberOfItemsjintintID=NULL;
+voidsetPopupMenuTextjintintjobjectArray_java_lang_StringID=NULL;
+voidsetWidgetReliefjintintjstringjava_lang_StringID=NULL;
+voidsetFrameReliefjintintjstringjava_lang_StringID=NULL;
+voidsetRootMenuEnabledjstringjava_lang_StringjbooleanbooleanID=NULL;
+voidsetRootSubMenuEnabledjstringjava_lang_StringjintintjbooleanbooleanID=NULL;
+voidsetFigureMenuEnabledjintintjstringjava_lang_StringjbooleanbooleanID=NULL;
+voidsetFigureSubMenuEnabledjintintjstringjava_lang_StringjintintjbooleanbooleanID=NULL;
+voidsetWidgetEnablejintintjbooleanbooleanID=NULL;
+voidsetFrameEnablejintintjbooleanbooleanID=NULL;
+jbooleanisWidgetEnablejintintID=NULL;
+jbooleanisFrameEnablejintintID=NULL;
+voidsetMenuCheckedjintintjbooleanbooleanID=NULL;
+jbooleanisMenuCheckedjintintID=NULL;
+voidremoveRootMenujstringjava_lang_StringID=NULL;
+voidremoveFigureMenujintintjstringjava_lang_StringID=NULL;
+jstringdisplayAndWaitContextMenujintintID=NULL;
+jintnewMessageBoxID=NULL;
+voidsetMessageBoxTitlejintintjstringjava_lang_StringID=NULL;
+voidsetMessageBoxMessagejintintjstringjava_lang_StringID=NULL;
+voidsetMessageBoxMessagejintintjobjectArray_java_lang_StringID=NULL;
+voidmessageBoxDisplayAndWaitjintintID=NULL;
+jintgetMessageBoxSelectedButtonjintintID=NULL;
+voidsetMessageBoxDefaultSelectedButtonsjintintjintArray_intID=NULL;
+jintArray_getMessageBoxUserSelectedButtonsjintintID=NULL;
+voidsetMessageBoxButtonsLabelsjintintjobjectArray_java_lang_StringID=NULL;
+voidsetMessageBoxInitialValuejintintjobjectArray_java_lang_StringID=NULL;
+jobjectArray_getMessageBoxValuejintintID=NULL;
+jintgetMessageBoxValueSizejintintID=NULL;
+voidsetMessageBoxListBoxItemsjintintjobjectArray_java_lang_StringID=NULL;
+jintgetMessageBoxSelectedItemjintintID=NULL;
+voidsetMessageBoxLineLabelsjintintjobjectArray_java_lang_StringID=NULL;
+voidsetMessageBoxColumnLabelsjintintjobjectArray_java_lang_StringID=NULL;
+voidsetMessageBoxDefaultInputjintintjobjectArray_java_lang_StringID=NULL;
+voidsetMessageBoxModaljintintjbooleanbooleanID=NULL;
+voidsetMessageBoxIconjintintjstringjava_lang_StringID=NULL;
+jbooleanisToolbarVisiblejintintID=NULL;
+voidsetToolbarVisiblejintintjbooleanbooleanID=NULL;
+voidsetEventHandlerjintintjstringjava_lang_StringID=NULL;
+voidsetEventHandlerEnabledjintintjbooleanbooleanID=NULL;
+jintnewWaitBarID=NULL;
+voidsetWaitBarMessagejintintjobjectArray_java_lang_StringID=NULL;
+voidsetWaitBarValuejintintjintintID=NULL;
+voiddestroyWaitBarjintintID=NULL;
+voidsetWaitBarIndeterminateModejintintjbooleanbooleanID=NULL;
+voidlaunchHelpBrowserjobjectArray_java_lang_Stringjstringjava_lang_StringID=NULL;
+voidsearchKeywordjobjectArray_java_lang_Stringjstringjava_lang_Stringjstringjava_lang_StringjbooleanbooleanID=NULL;
+voidsaveMainWindowSettingsID=NULL;
+voidsaveHelpWindowSettingsID=NULL;
+jintnewExportFileChooserjintintID=NULL;
+jintnewFontChooserID=NULL;
+voidfontChooserDisplayAndWaitjintintID=NULL;
+voidsetFontChooserFontNamejintintjstringjava_lang_StringID=NULL;
+voidsetFontChooserFontSizejintintjintintID=NULL;
+voidsetFontChooserBoldjintintjbooleanbooleanID=NULL;
+voidsetFontChooserItalicjintintjbooleanbooleanID=NULL;
+jstringgetFontChooserFontNamejintintID=NULL;
+jintgetFontChooserFontSizejintintID=NULL;
+jbooleangetFontChooserBoldjintintID=NULL;
+jbooleangetFontChooserItalicjintintID=NULL;
+jintnewColorChooserID=NULL;
+voidcolorChooserDisplayAndWaitjintintID=NULL;
+voidsetColorChooserDefaultColorjintintjintArray_intID=NULL;
+jintArray_getColorChooserSelectedColorjintintID=NULL;
+voidsetColorChooserTitlejintintjstringjava_lang_StringID=NULL;
+voidsetWidgetVisiblejintintjbooleanbooleanID=NULL;
+voidsetFrameVisiblejintintjbooleanbooleanID=NULL;
+jbooleanisWidgetVisiblejintintID=NULL;
+jbooleanisFrameVisiblejintintID=NULL;
+jstringgetClipboardContentsID=NULL;
+voidpasteClipboardIntoConsoleID=NULL;
+voidcopyConsoleSelectionID=NULL;
+voidemptyClipboardID=NULL;
+voidsetClipboardContentsjstringjava_lang_StringID=NULL;
+voidcopyFigureToClipBoardjintintID=NULL;
+jintgetScreenResolutionID=NULL;
+jdoublegetScreenWidthID=NULL;
+jdoublegetScreenHeightID=NULL;
+jintgetScreenDepthID=NULL;
+jbooleanprintFigurejintintjbooleanbooleanjbooleanbooleanID=NULL;
+jbooleanprintFilejstringjava_lang_StringID=NULL;
+jbooleanprintStringjstringjava_lang_Stringjstringjava_lang_StringID=NULL;
+jbooleanpageSetupID=NULL;
+voidrequestWidgetFocusjintintID=NULL;
+voidrequestFrameFocusjintintID=NULL;
+voidraiseWindowjintintID=NULL;
+voiduseCanvasForDisplayjbooleanbooleanID=NULL;
+jbooleanuseCanvasForDisplayID=NULL;
+voidscilabAboutBoxID=NULL;
 
 
 }
@@ -310,190 +310,190 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className());
 throw GiwsException::JniObjectCreationException(curEnv, this->className());
         }
         /* Methods ID set to NULL */
-        jintnewWindowID=NULL; 
-jintnewMenuBarID=NULL; 
-jintnewMenuID=NULL; 
-jintnewPushButtonID=NULL; 
-jintnewEditBoxID=NULL; 
-jintnewLabelID=NULL; 
-jintnewCheckBoxID=NULL; 
-jintnewRadioButtonID=NULL; 
-jintnewSliderID=NULL; 
-jintnewPopupMenuID=NULL; 
-jintnewListBoxID=NULL; 
-jintnewFrameID=NULL; 
-jstringnewContextMenujobjectArray_ID=NULL; 
-jintnewContextMenuID=NULL; 
-voiddestroyWidgetjintID=NULL; 
-voiddestroyFramejintID=NULL; 
-jintnewWindowjintID=NULL; 
-voidsetFigureAsParentjintjintID=NULL; 
-voidsetMenuAsParentjintjintID=NULL; 
-voidsetRootAsParentjintID=NULL; 
-voidsetParentjintjintID=NULL; 
-voidsetPushButtonParentjintjintID=NULL; 
-voidremovePushButtonFromParentjintjintID=NULL; 
-voidsetEditBoxParentjintjintID=NULL; 
-voidremoveEditBoxFromParentjintjintID=NULL; 
-voidsetLabelParentjintjintID=NULL; 
-voidremoveLabelFromParentjintjintID=NULL; 
-voidsetCheckBoxParentjintjintID=NULL; 
-voidremoveCheckBoxFromParentjintjintID=NULL; 
-voidsetRadioButtonParentjintjintID=NULL; 
-voidremoveRadioButtonFromParentjintjintID=NULL; 
-voidsetSliderParentjintjintID=NULL; 
-voidremoveSliderFromParentjintjintID=NULL; 
-voidsetPopupMenuParentjintjintID=NULL; 
-voidremovePopupMenuFromParentjintjintID=NULL; 
-voidsetListBoxParentjintjintID=NULL; 
-voidremoveListBoxFromParentjintjintID=NULL; 
-voidsetFrameParentjintjintID=NULL; 
-voidremoveFrameFromParentjintjintID=NULL; 
-voidsetWidgetTextjintjstringID=NULL; 
-jstringgetWidgetTextjintID=NULL; 
-voidsetFrameTextjintjstringID=NULL; 
-jstringgetFrameTextjintID=NULL; 
-voidsetWidgetBackgroundColorjintjintjintjintID=NULL; 
-jintArray_getWidgetBackgroundColorjintID=NULL; 
-voidsetWidgetForegroundColorjintjintjintjintID=NULL; 
-jintArray_getWidgetForegroundColorjintID=NULL; 
-voidsetFrameBackgroundColorjintjintjintjintID=NULL; 
-jintArray_getFrameBackgroundColorjintID=NULL; 
-voidsetFrameForegroundColorjintjintjintjintID=NULL; 
-jintArray_getFrameForegroundColorjintID=NULL; 
-voidsetWidgetFontNamejintjstringID=NULL; 
-jstringgetWidgetFontNamejintID=NULL; 
-voidsetWidgetFontWeightjintjstringID=NULL; 
-voidsetWidgetFontSizejintjintID=NULL; 
-jintgetWidgetFontSizejintID=NULL; 
-voidsetWidgetFontAnglejintjstringID=NULL; 
-voidsetFrameFontNamejintjstringID=NULL; 
-jstringgetFrameFontNamejintID=NULL; 
-voidsetFrameFontWeightjintjstringID=NULL; 
-voidsetFrameFontSizejintjintID=NULL; 
-jintgetFrameFontSizejintID=NULL; 
-voidsetFrameFontAnglejintjstringID=NULL; 
-voidsetWidgetPositionjintjintjintjintjintID=NULL; 
-jintArray_getWidgetPositionjintID=NULL; 
-voidsetFramePositionjintjintjintjintjintID=NULL; 
-jintArray_getFramePositionjintID=NULL; 
-voidsetWidgetCallbackjintjstringjintID=NULL; 
-voidsetFrameCallbackjintjstringjintID=NULL; 
-voidsetWidgetHorizontalAlignmentjintjstringID=NULL; 
-voidsetWidgetVerticalAlignmentjintjstringID=NULL;