summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine ELIAS <antoine.elias@scilab-enterprises.com>2015-12-01 16:21:42 +0100
committerAntoine ELIAS <antoine.elias@scilab-enterprises.com>2015-12-01 16:22:12 +0100
commitd827f682d2bc074ec741bb7a51af633144fde2f8 (patch)
tree6435bd016b5736c8234f37adb843946a7cfb829c
parent2bc6ffdc70fb15dc2b5ae4be87042ee3c7a8a77f (diff)
parent957ce01c21949a67ddc4bfe17bf5f01d5c6bf53b (diff)
downloadscilab-newsfeed.zip
scilab-newsfeed.tar.gz
Merge remote-tracking branch 'origin/master' into newsfeednewsfeed
Change-Id: I94aa03482db14ef1c81d1e51f957ba3bf6c36a4e
-rw-r--r--scilab/CHANGES_6.0.X13
-rwxr-xr-xscilab/configure12
-rw-r--r--scilab/configure.ac6
-rw-r--r--scilab/etc/classpath.xml.vc4
-rw-r--r--scilab/m4/libsmath.m48
-rw-r--r--scilab/modules/completion/src/c/getCommonPart.c2
-rw-r--r--scilab/modules/completion/src/c/getfilesdictionary.c2
-rw-r--r--scilab/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java2
-rw-r--r--scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java20
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_view_property.c2
-rw-r--r--scilab/modules/gui/sci_gateway/c/sci_uimenu.c2
-rw-r--r--scilab/modules/gui/sci_gateway/cpp/sci_toprint.cpp9
-rw-r--r--scilab/modules/hdf5/src/c/h5_readDataFromFile.c6
-rw-r--r--scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c4
-rw-r--r--scilab/modules/helptools/helptools.iss19
-rw-r--r--scilab/modules/helptools/images/AFFICH_m_Example.zcos.pngbin4098 -> 5306 bytes
-rw-r--r--scilab/modules/helptools/images/ANDBLK_Example.zcos.pngbin7917 -> 8171 bytes
-rw-r--r--scilab/modules/helptools/images/BARXY_Example.zcos.pngbin14288 -> 18114 bytes
-rw-r--r--scilab/modules/helptools/images/BIGSOM_f_Example.zcos.pngbin11514 -> 11904 bytes
-rw-r--r--scilab/modules/helptools/images/BITCLEAR_en_US.zcos.pngbin6066 -> 6283 bytes
-rw-r--r--scilab/modules/helptools/images/BITCLEAR_fr_FR.zcos.pngbin5942 -> 6031 bytes
-rw-r--r--scilab/modules/helptools/images/BITSET_en_US.zcos.pngbin6227 -> 6338 bytes
-rw-r--r--scilab/modules/helptools/images/BITSET_fr_FR.zcos.pngbin6178 -> 6223 bytes
-rw-r--r--scilab/modules/helptools/images/Ball_Platform.zcos.pngbin4088 -> 4492 bytes
-rw-r--r--scilab/modules/helptools/images/BouncingBall_Modelica.zcos.pngbin5466 -> 5528 bytes
-rw-r--r--scilab/modules/helptools/images/CANIMXY_Example.zcos.pngbin8026 -> 8768 bytes
-rw-r--r--scilab/modules/helptools/images/CLKINV_f_en_US.zcos.pngbin6656 -> 5707 bytes
-rw-r--r--scilab/modules/helptools/images/CLKINV_f_fr_FR.zcos.pngbin7040 -> 6067 bytes
-rw-r--r--scilab/modules/helptools/images/CLKOUTV_f_en_US.zcos.pngbin5130 -> 5014 bytes
-rw-r--r--scilab/modules/helptools/images/CLKOUTV_f_fr_FR.zcos.pngbin5130 -> 5014 bytes
-rw-r--r--scilab/modules/helptools/images/CMAT3D_Example.zcos.pngbin14290 -> 15098 bytes
-rw-r--r--scilab/modules/helptools/images/CMATVIEW_Example.zcos.pngbin7089 -> 7668 bytes
-rw-r--r--scilab/modules/helptools/images/CONVERT_en_US.zcos.pngbin5442 -> 5460 bytes
-rw-r--r--scilab/modules/helptools/images/CONVERT_fr_FR.zcos.pngbin5584 -> 5460 bytes
-rw-r--r--scilab/modules/helptools/images/CSCOPE_en_US.zcos.pngbin14242 -> 14556 bytes
-rw-r--r--scilab/modules/helptools/images/Command.zcos.pngbin10058 -> 8636 bytes
-rw-r--r--scilab/modules/helptools/images/Command_bode.zcos.pngbin11989 -> 7335 bytes
-rw-r--r--scilab/modules/helptools/images/Controller.zcos.pngbin18451 -> 24476 bytes
-rw-r--r--scilab/modules/helptools/images/DAE_Example.zcos.pngbin6113 -> 5848 bytes
-rw-r--r--scilab/modules/helptools/images/DELAYV_f_en_US.zcos.pngbin13824 -> 18507 bytes
-rw-r--r--scilab/modules/helptools/images/DELAY_f_1_en_US.zcos.pngbin8373 -> 8466 bytes
-rw-r--r--scilab/modules/helptools/images/DELAY_f_2_en_US.zcos.pngbin14408 -> 15007 bytes
-rw-r--r--scilab/modules/helptools/images/DERIV_Example.zcos.pngbin9876 -> 10658 bytes
-rw-r--r--scilab/modules/helptools/images/DLATCH_en_US.zcos.pngbin10402 -> 10425 bytes
-rw-r--r--scilab/modules/helptools/images/DLATCH_fr_FR.zcos.pngbin11846 -> 11871 bytes
-rw-r--r--scilab/modules/helptools/images/EDGE_TRIGGER_Example.zcos.pngbin9463 -> 10533 bytes
-rw-r--r--scilab/modules/helptools/images/ESELECT_f_Example.zcos.pngbin13839 -> 15175 bytes
-rw-r--r--scilab/modules/helptools/images/EVTDLY_c_Example.zcos.pngbin7801 -> 9098 bytes
-rw-r--r--scilab/modules/helptools/images/EVTGEN_f_Example.zcos.pngbin5721 -> 8004 bytes
-rw-r--r--scilab/modules/helptools/images/EVTVARDLY_Example.zcos.pngbin6517 -> 7536 bytes
-rw-r--r--scilab/modules/helptools/images/EXPRESSION_en_US.zcos.pngbin20218 -> 23783 bytes
-rw-r--r--scilab/modules/helptools/images/EXTRACTBITS_en_US.zcos.pngbin10323 -> 10190 bytes
-rw-r--r--scilab/modules/helptools/images/EXTRACTBITS_fr_FR.zcos.pngbin10607 -> 10192 bytes
-rw-r--r--scilab/modules/helptools/images/EXTRACT_Example.zcos.pngbin10356 -> 11595 bytes
-rw-r--r--scilab/modules/helptools/images/FROMWSB_en_US.zcos.pngbin6883 -> 7706 bytes
-rw-r--r--scilab/modules/helptools/images/GENSQR_f_diagram_en_US.zcos.pngbin12242 -> 12519 bytes
-rw-r--r--scilab/modules/helptools/images/HYSTERESIS_Example.zcos.pngbin9649 -> 10739 bytes
-rw-r--r--scilab/modules/helptools/images/Hydraulics.zcos.pngbin23993 -> 26189 bytes
-rw-r--r--scilab/modules/helptools/images/IFTHEL_f_Example.zcos.pngbin12644 -> 12964 bytes
-rw-r--r--scilab/modules/helptools/images/INIMPL_f_en_US.zcos.pngbin11114 -> 12503 bytes
-rw-r--r--scilab/modules/helptools/images/INIMPL_f_fr_FR.zcos.pngbin11146 -> 12552 bytes
-rw-r--r--scilab/modules/helptools/images/INTEGRAL_m_1_Example.zcos.pngbin12736 -> 14613 bytes
-rw-r--r--scilab/modules/helptools/images/INTEGRAL_m_2_Example.zcos.pngbin9995 -> 10576 bytes
-rw-r--r--scilab/modules/helptools/images/INTMUL_en_US.zcos.pngbin9014 -> 11967 bytes
-rw-r--r--scilab/modules/helptools/images/INTMUL_fr_FR.zcos.pngbin9299 -> 11967 bytes
-rw-r--r--scilab/modules/helptools/images/INTRPLBLK_f_en_US.zcos.pngbin8352 -> 8949 bytes
-rw-r--r--scilab/modules/helptools/images/IN_f_en_US.zcos.pngbin7166 -> 6665 bytes
-rw-r--r--scilab/modules/helptools/images/IN_f_fr_FR.zcos.pngbin7236 -> 6665 bytes
-rw-r--r--scilab/modules/helptools/images/IdealTransformer_Example.zcos.pngbin12163 -> 13758 bytes
-rw-r--r--scilab/modules/helptools/images/JKFLIPFLOP_en_US.zcos.pngbin13911 -> 15671 bytes
-rw-r--r--scilab/modules/helptools/images/JKFLIPFLOP_fr_FR.zcos.pngbin13633 -> 15306 bytes
-rw-r--r--scilab/modules/helptools/images/Kalman.zcos.pngbin18129 -> 20786 bytes
-rw-r--r--scilab/modules/helptools/images/LOGIC_en_US.zcos.pngbin15095 -> 15644 bytes
-rw-r--r--scilab/modules/helptools/images/LOGIC_fr_FR.zcos.pngbin14986 -> 15497 bytes
-rw-r--r--scilab/modules/helptools/images/MCLOCK_f_Example.zcos.pngbin8448 -> 5780 bytes
-rw-r--r--scilab/modules/helptools/images/MFCLCK_f_Example.zcos.pngbin6736 -> 6487 bytes
-rw-r--r--scilab/modules/helptools/images/MIN_f_Example.zcos.pngbin10019 -> 11658 bytes
-rw-r--r--scilab/modules/helptools/images/M_freq_Example.zcos.pngbin12570 -> 8207 bytes
-rw-r--r--scilab/modules/helptools/images/NEGTOPOS_f_Example.zcos.pngbin24145 -> 24750 bytes
-rw-r--r--scilab/modules/helptools/images/OUTIMPL_f_en_US.zcos.pngbin16623 -> 17245 bytes
-rw-r--r--scilab/modules/helptools/images/OUTIMPL_f_fr_FR.zcos.pngbin16623 -> 17245 bytes
-rw-r--r--scilab/modules/helptools/images/PID_1_Example.zcos.pngbin14056 -> 14197 bytes
-rw-r--r--scilab/modules/helptools/images/PID_2_Example.zcos.pngbin18986 -> 19939 bytes
-rw-r--r--scilab/modules/helptools/images/PID_3_Example.zcos.pngbin14045 -> 14265 bytes
-rw-r--r--scilab/modules/helptools/images/PID_internal.zcos.pngbin6105 -> 9142 bytes
-rw-r--r--scilab/modules/helptools/images/QUANT_f_Example.zcos.pngbin8635 -> 9326 bytes
-rw-r--r--scilab/modules/helptools/images/QUANT_f_Example_Quantization_Mode.zcos.pngbin18395 -> 11299 bytes
-rw-r--r--scilab/modules/helptools/images/RAMP_en_US.zcos.pngbin8707 -> 6588 bytes
-rw-r--r--scilab/modules/helptools/images/RATELIMITER_Example.zcos.pngbin7401 -> 8847 bytes
-rw-r--r--scilab/modules/helptools/images/RELAY_f_Example.zcos.pngbin18781 -> 20015 bytes
-rw-r--r--scilab/modules/helptools/images/SAMPHOLD_m_Example.zcos.pngbin13711 -> 14203 bytes
-rw-r--r--scilab/modules/helptools/images/SELECT_m_Example.zcos.pngbin12433 -> 14245 bytes
-rw-r--r--scilab/modules/helptools/images/SHIFT_en_US.zcos.pngbin13690 -> 13072 bytes
-rw-r--r--scilab/modules/helptools/images/SHIFT_fr_FR.zcos.pngbin14293 -> 13900 bytes
-rw-r--r--scilab/modules/helptools/images/SHIFT_internal_en_US.zcos.pngbin6831 -> 8422 bytes
-rw-r--r--scilab/modules/helptools/images/SHIFT_internal_fr_FR.zcos.pngbin6831 -> 8422 bytes
-rw-r--r--scilab/modules/helptools/images/SRFLIPFLOP_en_US.zcos.pngbin9491 -> 10304 bytes
-rw-r--r--scilab/modules/helptools/images/SRFLIPFLOP_fr_FR.zcos.pngbin9491 -> 10304 bytes
-rw-r--r--scilab/modules/helptools/images/SWITCH2_m_Example.zcos.pngbin12876 -> 15554 bytes
-rw-r--r--scilab/modules/helptools/images/TIME_DELAY_Example.zcos.pngbin10201 -> 10416 bytes
-rw-r--r--scilab/modules/helptools/images/TOWS_c_Example.zcos.pngbin12584 -> 10673 bytes
-rw-r--r--scilab/modules/helptools/images/Threshold_ZeroCrossing.zcos.pngbin10353 -> 11426 bytes
-rw-r--r--scilab/modules/helptools/images/VARIABLE_DELAY_en_US.zcos.pngbin11294 -> 13329 bytes
-rw-r--r--scilab/modules/helptools/images/VARIABLE_DELAY_fr_FR.zcos.pngbin11294 -> 13329 bytes
-rw-r--r--scilab/modules/helptools/images/WRITEAU_f_Example.zcos.pngbin8523 -> 9932 bytes
-rw-r--r--scilab/modules/helptools/images/batch_simulation.zcos.pngbin16938 -> 17186 bytes
-rw-r--r--scilab/modules/helptools/images/clock_c_en_US.zcos.pngbin5125 -> 3718 bytes
-rw-r--r--scilab/modules/helptools/images/cmscope.zcos.pngbin12598 -> 13503 bytes
-rw-r--r--scilab/modules/helptools/images/counter_en_US.zcos.pngbin7608 -> 6447 bytes
-rw-r--r--scilab/modules/helptools/images/cscopxy.zcos.pngbin22014 -> 33340 bytes
-rw-r--r--scilab/modules/helptools/images/cscopxy3d.zcos.pngbin8936 -> 9335 bytes
-rw-r--r--scilab/modules/helptools/images/deadband_en_US.zcos.pngbin9728 -> 10534 bytes
-rw-r--r--scilab/modules/helptools/images/deadband_fr_FR.zcos.pngbin9728 -> 10534 bytes
-rw-r--r--scilab/modules/helptools/images/gensin_f_en_US.zcos.pngbin8910 -> 6959 bytes
-rw-r--r--scilab/modules/helptools/images/modulo_count_en_US.zcos.pngbin8530 -> 7517 bytes
-rw-r--r--scilab/modules/helptools/images/rfile_f_en_US.zcos.pngbin7301 -> 4324 bytes
-rw-r--r--scilab/modules/helptools/images/rfile_f_fr_FR.zcos.pngbin6672 -> 4319 bytes
-rw-r--r--scilab/modules/helptools/images/sawtooth_f_en_US.zcos.pngbin7011 -> 5982 bytes
-rw-r--r--scilab/modules/helptools/images/scifunc_block_m_en_US.zcos.pngbin25919 -> 26146 bytes
-rw-r--r--scilab/modules/helptools/images/step_function_1_en_US.zcos.pngbin8529 -> 6556 bytes
-rw-r--r--scilab/modules/helptools/images/step_function_2_en_US.zcos.pngbin5715 -> 4633 bytes
-rw-r--r--scilab/modules/helptools/images/text_f_fr_FR.zcos.pngbin2535 -> 370 bytes
-rw-r--r--scilab/modules/helptools/images/wfile_f_en_US.zcos.pngbin9238 -> 8361 bytes
-rw-r--r--scilab/modules/helptools/images/wfile_f_fr_FR.zcos.pngbin9450 -> 8207 bytes
-rw-r--r--scilab/modules/helptools/images/writec_f_en_US.zcos.pngbin9493 -> 8187 bytes
-rw-r--r--scilab/modules/helptools/images/writec_f_fr_FR.zcos.pngbin9804 -> 8191 bytes
-rw-r--r--scilab/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java4
-rw-r--r--scilab/modules/io/sci_gateway/cpp/sci_genlib.cpp9
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_14041.tst32
-rw-r--r--scilab/modules/localization/help/en_US/getlanguage.xml4
-rw-r--r--scilab/modules/localization/help/en_US/setdefaultlanguage.xml14
-rw-r--r--scilab/modules/localization/help/en_US/setlanguage.xml14
-rw-r--r--scilab/modules/localization/sci_gateway/cpp/sci_setdefaultlanguage.cpp2
-rw-r--r--scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java3
-rw-r--r--scilab/modules/spreadsheet/src/c/ripole/pldstr.c2
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/Xcos.java19
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CompileAction.java146
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/XcosFileType.java42
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/JGraphXHandler.java25
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/RawDataHandler.java11
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/XcosSAXHandler.java32
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/spec/ContentEntry.java30
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/utils/XcosDelegates.java10
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/utils/XcosMessages.java4
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/XcosTest.java8
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/block/SortPortsTest.java167
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/DiagramComparatorTest.java78
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/ScicosParametersTest.java336
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/model/XcosCellFactoryTest.java58
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/command/CommandPortTest.java28
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/control/ControlPortTest.java28
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/input/ExplicitInputPortTest.java30
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/input/ImplicitInputPortTest.java30
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/output/ExplicitOutputPortTest.java30
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/output/ImplicitOutputPortTest.java30
-rw-r--r--scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/utils/FileTypeTest.java22
-rw-r--r--scilab/scilab-lib-doc.properties.vc4
157 files changed, 535 insertions, 828 deletions
diff --git a/scilab/CHANGES_6.0.X b/scilab/CHANGES_6.0.X
index 5f63bf2..3b5ce73 100644
--- a/scilab/CHANGES_6.0.X
+++ b/scilab/CHANGES_6.0.X
@@ -13,12 +13,16 @@ For a high-level overview of the changes in this release, please consult the "Wh
13 Changes between version 6.0.0-alpha-2 and 6.0.0-beta-1 13 Changes between version 6.0.0-alpha-2 and 6.0.0-beta-1
14 ====================================================== 14 ======================================================
15 15
16* Bug #13298 fixed - Static analysis bugs detected by PVS-Studio fixed.
17
16* Bug #13986 fixed - setdefaultlanguage did not set value correctly in Windows registry. 18* Bug #13986 fixed - setdefaultlanguage did not set value correctly in Windows registry.
17 19
18* Bug #13990 fixed - Windows installer did not ship all localization files. 20* Bug #13990 fixed - Windows installer did not ship all localization files.
19 21
20* Bug #14178 fixed - tcl/tk unavailability on MacOS is now documented. 22* Bug #14178 fixed - tcl/tk unavailability on MacOS is now documented.
21 23
24* Bug #14041 fixed - genlib crash when the file is locked by another program.
25
22* Bug #14181 fixed - Calling intg (or integrate) in a function that is being integrated failed. 26* Bug #14181 fixed - Calling intg (or integrate) in a function that is being integrated failed.
23 27
24* Bug #14251 fixed - `spec` leaked some memory. 28* Bug #14251 fixed - `spec` leaked some memory.
@@ -27,6 +31,15 @@ For a high-level overview of the changes in this release, please consult the "Wh
27 31
28* Bug #14257 fixed - English spelling in messages and in comments. 32* Bug #14257 fixed - English spelling in messages and in comments.
29 33
34* Bug #14257 fixed - English spelling in messages and in comments.
35
36Dependencies
37=============
38
39* Apache xmlgraphics stack upgraded to the latest versions :
40 - xmlgraphics-commons 2.0.1
41 - Batik 1.8
42 - FOP 2.0
30 43
31 Changes between version 6.0.0-alpha-1 and 6.0.0-alpha-2 44 Changes between version 6.0.0-alpha-1 and 6.0.0-alpha-2
32 ======================================================= 45 =======================================================
diff --git a/scilab/configure b/scilab/configure
index 9d5fa20..d506f71 100755
--- a/scilab/configure
+++ b/scilab/configure
@@ -18665,7 +18665,7 @@ EOF
18665 18665
18666 CLASSPATH=$ac_java_classpath 18666 CLASSPATH=$ac_java_classpath
18667 export CLASSPATH 18667 export CLASSPATH
18668 cmd="$JAVA conftestSharedChecker batik-all org.apache.batik.Version $jar_resolved getVersion 1.7 " 18668 cmd="$JAVA conftestSharedChecker batik-all org.apache.batik.Version $jar_resolved getVersion 1.8 "
18669 if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then 18669 if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
18670 PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output); 18670 PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
18671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5 18671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
@@ -18884,7 +18884,7 @@ EOF
18884 18884
18885 CLASSPATH=$ac_java_classpath 18885 CLASSPATH=$ac_java_classpath
18886 export CLASSPATH 18886 export CLASSPATH
18887 cmd="$JAVA conftestSharedChecker batik org.apache.batik.Version $jar_resolved getVersion 1.7 " 18887 cmd="$JAVA conftestSharedChecker batik org.apache.batik.Version $jar_resolved getVersion 1.8 "
18888 if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then 18888 if (echo $cmd >&5 ; eval $cmd >conftestSharedChecker.java.output 2>&5); then
18889 PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output); 18889 PACKAGE_JAR_FILE=$(tail -n 1 conftestSharedChecker.java.output);
18890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5 18890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGE_JAR_FILE" >&5
@@ -28582,7 +28582,7 @@ $as_echo "$acx_blas_ok" >&6; }
28582 LIBS="$save_LIBS" 28582 LIBS="$save_LIBS"
28583 elif $WITH_DEVTOOLS; then # Scilab thirdparties 28583 elif $WITH_DEVTOOLS; then # Scilab thirdparties
28584 BLAS_LIBS="-L$DEVTOOLS_LIBDIR -lblas" 28584 BLAS_LIBS="-L$DEVTOOLS_LIBDIR -lblas"
28585 BLAS_TYPE="Generic Blas" 28585 BLAS_TYPE="Generic Blas (thirdparties)"
28586 acx_blas_ok=yes 28586 acx_blas_ok=yes
28587 fi 28587 fi
28588fi 28588fi
@@ -29629,8 +29629,8 @@ $as_echo "$acx_lapack_ok" >&6; }
29629 LAPACK_LIBS="" 29629 LAPACK_LIBS=""
29630 fi 29630 fi
29631elif $WITH_DEVTOOLS; then # Scilab thirdparties 29631elif $WITH_DEVTOOLS; then # Scilab thirdparties
29632 LAPACK_LIBS="-L$DEVTOOLS_LIBDIR -llapack" 29632 LAPACK_LIBS="-L$DEVTOOLS_LIBDIR -llapack -lblas"
29633 LAPACK_TYPE="Library -llapack" 29633 LAPACK_TYPE="Lapack (thirdparties)"
29634 acx_lapack_ok=yes 29634 acx_lapack_ok=yes
29635fi 29635fi
29636 29636
@@ -29756,7 +29756,7 @@ LDFLAGS="$LDFLAGS -L$with_arpack_library"
29756fi 29756fi
29757 29757
29758if $WITH_DEVTOOLS; then # Scilab thirdparties 29758if $WITH_DEVTOOLS; then # Scilab thirdparties
29759 ARPACK_LIBS="-L$DEVTOOLS_LIBDIR -larpack" 29759 ARPACK_LIBS="-L$DEVTOOLS_LIBDIR -larpack -llapack -lblas"
29760 LDFLAGS="$LDFLAGS -L$DEVTOOLS_LIBDIR" 29760 LDFLAGS="$LDFLAGS -L$DEVTOOLS_LIBDIR"
29761 acx_arpack_ok=yes 29761 acx_arpack_ok=yes
29762else 29762else
diff --git a/scilab/configure.ac b/scilab/configure.ac
index be869c4..918e4c0 100644
--- a/scilab/configure.ac
+++ b/scilab/configure.ac
@@ -1054,12 +1054,14 @@ interface for JOGL2 - or libGL (OpenGL library) are installed and if the version
1054 fi 1054 fi
1055 1055
1056 # xml.apache.org SVG Library (under mandriva for example) 1056 # xml.apache.org SVG Library (under mandriva for example)
1057 AC_JAVA_CHECK_JAR([batik-all],[org.apache.batik.Version],[Apache SVG Library],"yes",[getVersion],[1.7]) 1057 AC_JAVA_CHECK_JAR([batik-all],[org.apache.batik.Version],
1058 [Apache SVG Library],"yes",[getVersion],[1.8])
1058 BATIK=$PACKAGE_JAR_FILE 1059 BATIK=$PACKAGE_JAR_FILE
1059 1060
1060 if test -z "$BATIK"; then 1061 if test -z "$BATIK"; then
1061 # Other other distribs 1062 # Other other distribs
1062 AC_JAVA_CHECK_JAR([batik],[org.apache.batik.Version],[Apache SVG Library],[],[getVersion],[1.7]) 1063 AC_JAVA_CHECK_JAR([batik],[org.apache.batik.Version],
1064 [Apache SVG Library],[],[getVersion],[1.8])
1063 BATIK=$PACKAGE_JAR_FILE 1065 BATIK=$PACKAGE_JAR_FILE
1064 fi 1066 fi
1065 AC_SUBST(BATIK) 1067 AC_SUBST(BATIK)
diff --git a/scilab/etc/classpath.xml.vc b/scilab/etc/classpath.xml.vc
index ea3b2dd..78493d6 100644
--- a/scilab/etc/classpath.xml.vc
+++ b/scilab/etc/classpath.xml.vc
@@ -98,7 +98,7 @@ The option is "disableUnderMode" and can be:
98 <path value="$SCILAB/thirdparty/saxon9he.jar" load="onUse"> 98 <path value="$SCILAB/thirdparty/saxon9he.jar" load="onUse">
99 <load on="documentationGeneration"/> 99 <load on="documentationGeneration"/>
100 </path> 100 </path>
101 <path value="$SCILAB/thirdparty/batik-all-1.7.jar" load="onUse"> 101 <path value="$SCILAB/thirdparty/batik-all.jar" load="onUse">
102 <load on="documentationGeneration"/> 102 <load on="documentationGeneration"/>
103 <load on="graphics_mathml_textrendering"/> 103 <load on="graphics_mathml_textrendering"/>
104 <load on="svg_graphic_export"/> 104 <load on="svg_graphic_export"/>
@@ -120,7 +120,7 @@ The option is "disableUnderMode" and can be:
120 </path> 120 </path>
121 121
122 <!-- PDF doc generation (dep of jeuclid) --> 122 <!-- PDF doc generation (dep of jeuclid) -->
123 <path value="$SCILAB/thirdparty/xmlgraphics-commons-1.4.jar" load="onUse"> 123 <path value="$SCILAB/thirdparty/xmlgraphics-commons.jar" load="onUse">
124 <load on="documentationGeneration"/> 124 <load on="documentationGeneration"/>
125 <load on="graphics_mathml_textrendering"/> 125 <load on="graphics_mathml_textrendering"/>
126 <load on="pdf_ps_eps_graphic_export"/> 126 <load on="pdf_ps_eps_graphic_export"/>
diff --git a/scilab/m4/libsmath.m4 b/scilab/m4/libsmath.m4
index 05304b2..4954e0b 100644
--- a/scilab/m4/libsmath.m4
+++ b/scilab/m4/libsmath.m4
@@ -64,7 +64,7 @@ if test $acx_blas_ok = no; then
64 LIBS="$save_LIBS" 64 LIBS="$save_LIBS"
65 elif $WITH_DEVTOOLS; then # Scilab thirdparties 65 elif $WITH_DEVTOOLS; then # Scilab thirdparties
66 BLAS_LIBS="-L$DEVTOOLS_LIBDIR -lblas" 66 BLAS_LIBS="-L$DEVTOOLS_LIBDIR -lblas"
67 BLAS_TYPE="Generic Blas" 67 BLAS_TYPE="Generic Blas (thirdparties)"
68 acx_blas_ok=yes 68 acx_blas_ok=yes
69 fi 69 fi
70fi 70fi
@@ -238,8 +238,8 @@ if test "x$LAPACK_LIBS" != x; then
238 LAPACK_LIBS="" 238 LAPACK_LIBS=""
239 fi 239 fi
240elif $WITH_DEVTOOLS; then # Scilab thirdparties 240elif $WITH_DEVTOOLS; then # Scilab thirdparties
241 LAPACK_LIBS="-L$DEVTOOLS_LIBDIR -llapack" 241 LAPACK_LIBS="-L$DEVTOOLS_LIBDIR -llapack -lblas"
242 LAPACK_TYPE="Library -llapack" 242 LAPACK_TYPE="Lapack (thirdparties)"
243 acx_lapack_ok=yes 243 acx_lapack_ok=yes
244fi 244fi
245 245
@@ -328,7 +328,7 @@ LDFLAGS="$LDFLAGS -L$with_arpack_library"
328fi 328fi
329 329
330if $WITH_DEVTOOLS; then # Scilab thirdparties 330if $WITH_DEVTOOLS; then # Scilab thirdparties
331 ARPACK_LIBS="-L$DEVTOOLS_LIBDIR -larpack" 331 ARPACK_LIBS="-L$DEVTOOLS_LIBDIR -larpack -llapack -lblas"
332 LDFLAGS="$LDFLAGS -L$DEVTOOLS_LIBDIR" 332 LDFLAGS="$LDFLAGS -L$DEVTOOLS_LIBDIR"
333 acx_arpack_ok=yes 333 acx_arpack_ok=yes
334else 334else
diff --git a/scilab/modules/completion/src/c/getCommonPart.c b/scilab/modules/completion/src/c/getCommonPart.c
index 0ec764d..1429067 100644
--- a/scilab/modules/completion/src/c/getCommonPart.c
+++ b/scilab/modules/completion/src/c/getCommonPart.c
@@ -74,7 +74,7 @@ char *getCommonPart(char **dictionary, int sizeDictionary)
74 int i = 0; 74 int i = 0;
75 int r = 0; 75 int r = 0;
76 char *currentstr = dictionary[0]; 76 char *currentstr = dictionary[0];
77 qsort(dictionary, sizeof dictionary / sizeof dictionary[0], sizeof dictionary[0], cmp); 77 qsort(dictionary, sizeDictionary, sizeof dictionary[0], cmp);
78 78
79 r = cmpPos(currentstr, dictionary[1]); 79 r = cmpPos(currentstr, dictionary[1]);
80 for (i = 1; i < sizeDictionary - 1; i++) 80 for (i = 1; i < sizeDictionary - 1; i++)
diff --git a/scilab/modules/completion/src/c/getfilesdictionary.c b/scilab/modules/completion/src/c/getfilesdictionary.c
index 4061f73..8fd9833 100644
--- a/scilab/modules/completion/src/c/getfilesdictionary.c
+++ b/scilab/modules/completion/src/c/getfilesdictionary.c
@@ -102,7 +102,7 @@ char **getfilesdictionary(char *somechars, int *sizearray, BOOL fullpath)
102 { 102 {
103 dictionary = (char**)REALLOC(dictionary, sizeof(char*) * (sizeListReturned + 1)); 103 dictionary = (char**)REALLOC(dictionary, sizeof(char*) * (sizeListReturned + 1));
104 dictionary[sizeListReturned] = NULL; 104 dictionary[sizeListReturned] = NULL;
105 qsort(dictionary, sizeof dictionary / sizeof dictionary[0], sizeof dictionary[0], cmpfiles); 105 qsort(dictionary, *sizearray, sizeof dictionary[0], cmpfiles);
106 } 106 }
107 } 107 }
108 else 108 else
diff --git a/scilab/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java b/scilab/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java
index ddf6d1b..3613193 100644
--- a/scilab/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java
+++ b/scilab/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java
@@ -28,7 +28,7 @@ import org.apache.batik.bridge.DocumentLoader;
28import org.apache.batik.bridge.GVTBuilder; 28import org.apache.batik.bridge.GVTBuilder;
29import org.apache.batik.bridge.UserAgent; 29import org.apache.batik.bridge.UserAgent;
30import org.apache.batik.bridge.UserAgentAdapter; 30import org.apache.batik.bridge.UserAgentAdapter;
31import org.apache.batik.dom.svg.SAXSVGDocumentFactory; 31import org.apache.batik.anim.dom.SAXSVGDocumentFactory;
32import org.apache.batik.gvt.GraphicsNode; 32import org.apache.batik.gvt.GraphicsNode;
33import org.apache.batik.util.XMLResourceDescriptor; 33import org.apache.batik.util.XMLResourceDescriptor;
34import org.scilab.forge.jlatexmath.ParseException; 34import org.scilab.forge.jlatexmath.ParseException;
diff --git a/scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java b/scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java
index 68a1cf9..5c90cee 100644
--- a/scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java
+++ b/scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java
@@ -857,7 +857,7 @@ public class Export {
857 } 857 }
858 858
859 @Override 859 @Override
860 public int processShape(Shape s) throws IOException { 860 public int processShape(Shape s, boolean b) throws IOException {
861 if (s instanceof Ellipse2D.Double) { 861 if (s instanceof Ellipse2D.Double) {
862 Ellipse2D.Double ell = (Ellipse2D.Double) s; 862 Ellipse2D.Double ell = (Ellipse2D.Double) s;
863 if (ell.height == ell.width) { 863 if (ell.height == ell.width) {
@@ -880,10 +880,10 @@ public class Export {
880 buffer.append("[").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1])); 880 buffer.append("[").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
881 it.next(); 881 it.next();
882 } else { 882 } else {
883 return super.processShape(s); 883 return super.processShape(s, b);
884 } 884 }
885 } else { 885 } else {
886 return super.processShape(s); 886 return super.processShape(s, b);
887 } 887 }
888 888
889 for (; !it.isDone(); it.next()) { 889 for (; !it.isDone(); it.next()) {
@@ -891,7 +891,7 @@ public class Export {
891 if (type == PathIterator.SEG_LINETO) { 891 if (type == PathIterator.SEG_LINETO) {
892 buffer.append(" ").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1])); 892 buffer.append(" ").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
893 } else { 893 } else {
894 return super.processShape(s); 894 return super.processShape(s, b);
895 } 895 }
896 } 896 }
897 buffer.append("] DP"); 897 buffer.append("] DP");
@@ -899,7 +899,7 @@ public class Export {
899 return PathIterator.WIND_NON_ZERO; 899 return PathIterator.WIND_NON_ZERO;
900 } 900 }
901 901
902 return super.processShape(s); 902 return super.processShape(s, b);
903 } 903 }
904 }; 904 };
905 g2d.setGraphicContext(new GraphicContext()); 905 g2d.setGraphicContext(new GraphicContext());
@@ -1029,7 +1029,7 @@ public class Export {
1029 } 1029 }
1030 1030
1031 @Override 1031 @Override
1032 public int processShape(Shape s) throws IOException { 1032 public int processShape(Shape s, boolean b) throws IOException {
1033 if (s instanceof Ellipse2D.Double) { 1033 if (s instanceof Ellipse2D.Double) {
1034 Ellipse2D.Double ell = (Ellipse2D.Double) s; 1034 Ellipse2D.Double ell = (Ellipse2D.Double) s;
1035 if (ell.height == ell.width) { 1035 if (ell.height == ell.width) {
@@ -1052,10 +1052,10 @@ public class Export {
1052 buffer.append("[").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1])); 1052 buffer.append("[").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
1053 it.next(); 1053 it.next();
1054 } else { 1054 } else {
1055 return super.processShape(s); 1055 return super.processShape(s, b);
1056 } 1056 }
1057 } else { 1057 } else {
1058 return super.processShape(s); 1058 return super.processShape(s, b);
1059 } 1059 }
1060 1060
1061 for (; !it.isDone(); it.next()) { 1061 for (; !it.isDone(); it.next()) {
@@ -1063,7 +1063,7 @@ public class Export {
1063 if (type == PathIterator.SEG_LINETO) { 1063 if (type == PathIterator.SEG_LINETO) {
1064 buffer.append(" ").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1])); 1064 buffer.append(" ").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1]));
1065 } else { 1065 } else {
1066 return super.processShape(s); 1066 return super.processShape(s, b);
1067 } 1067 }
1068 } 1068 }
1069 buffer.append("] DP"); 1069 buffer.append("] DP");
@@ -1071,7 +1071,7 @@ public class Export {
1071 return PathIterator.WIND_NON_ZERO; 1071 return PathIterator.WIND_NON_ZERO;
1072 } 1072 }
1073 1073
1074 return super.processShape(s); 1074 return super.processShape(s, b);
1075 } 1075 }
1076 1076
1077 }; 1077 };
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_view_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_view_property.c
index 901783e..b10de1a 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_view_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_view_property.c
@@ -59,7 +59,7 @@ int set_view_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType, i
59 59
60 status = setGraphicObjectProperty(iObjUID, __GO_VIEW__, &viewType, jni_int, 1); 60 status = setGraphicObjectProperty(iObjUID, __GO_VIEW__, &viewType, jni_int, 1);
61 61
62 if (status = TRUE) 62 if (status == TRUE)
63 { 63 {
64 return SET_PROPERTY_SUCCEED; 64 return SET_PROPERTY_SUCCEED;
65 } 65 }
diff --git a/scilab/modules/gui/sci_gateway/c/sci_uimenu.c b/scilab/modules/gui/sci_gateway/c/sci_uimenu.c
index 9e20bd9..95e21d6 100644
--- a/scilab/modules/gui/sci_gateway/c/sci_uimenu.c
+++ b/scilab/modules/gui/sci_gateway/c/sci_uimenu.c
@@ -100,7 +100,7 @@ int sci_uimenu(char *fname, void *pvApiCtx)
100 if (iParentUID != 0) 100 if (iParentUID != 0)
101 { 101 {
102 getGraphicObjectProperty(iParentUID, __GO_TYPE__, jni_int, (void **)&piParentType); 102 getGraphicObjectProperty(iParentUID, __GO_TYPE__, jni_int, (void **)&piParentType);
103 if (iParentType == __GO_FIGURE__ && iParentType == __GO_UIMENU__) 103 if (iParentType != __GO_FIGURE__ && iParentType != __GO_UIMENU__)
104 { 104 {
105 Scierror(999, _("%s: Wrong type for input argument #%d: A '%s' or '%s' handle expected.\n"), fname, 1, "Figure", "Uimenu"); 105 Scierror(999, _("%s: Wrong type for input argument #%d: A '%s' or '%s' handle expected.\n"), fname, 1, "Figure", "Uimenu");
106 return FALSE; 106 return FALSE;
diff --git a/scilab/modules/gui/sci_gateway/cpp/sci_toprint.cpp b/scilab/modules/gui/sci_gateway/cpp/sci_toprint.cpp
index 8d186e3..9c064d1 100644
--- a/scilab/modules/gui/sci_gateway/cpp/sci_toprint.cpp
+++ b/scilab/modules/gui/sci_gateway/cpp/sci_toprint.cpp
@@ -303,13 +303,10 @@ static int sci_toprint_two_rhs(void* _pvCtx, const char *fname)
303 return 1; 303 return 1;
304 } 304 }
305 305
306 for (i = 0; i < mnOne; i++) 306 if (mnOne > 0)
307 { 307 {
308 if (i == 0) 308 sprintf(lines, "%s\n", pStVarOne[0]);
309 { 309 for (i = 1; i < mnOne; ++i)
310 sprintf(lines, "%s\n", pStVarOne[i]);
311 }
312 else
313 { 310 {
314 sprintf(lines, "%s%s\n", lines, pStVarOne[i]); 311 sprintf(lines, "%s%s\n", lines, pStVarOne[i]);
315 } 312 }
diff --git a/scilab/modules/hdf5/src/c/h5_readDataFromFile.c b/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
index f459044..01431e6 100644
--- a/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
+++ b/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
@@ -275,7 +275,7 @@ int getDatasetInfo(int _iDatasetId, int* _iComplex, int* _iDims, int* _piDims)
275 if (_piDims != 0 && *_iDims != 0) 275 if (_piDims != 0 && *_iDims != 0)
276 { 276 {
277 int i = 0; 277 int i = 0;
278 hsize_t* dims = (hsize_t*)MALLOC(sizeof(hsize_t) * *_iDims); 278 hsize_t* dims = (hsize_t*)MALLOC(sizeof(hsize_t) **_iDims);
279 if (H5Sget_simple_extent_dims(space, dims, NULL) < 0) 279 if (H5Sget_simple_extent_dims(space, dims, NULL) < 0)
280 { 280 {
281 FREE(dims); 281 FREE(dims);
@@ -1083,10 +1083,6 @@ int getScilabTypeFromDataSet(int _iDatasetId)
1083 { 1083 {
1084 iVarType = sci_boolean; 1084 iVarType = sci_boolean;
1085 } 1085 }
1086 else if (strcmp(pstScilabClass, g_SCILAB_CLASS_BOOLEAN) == 0)
1087 {
1088 iVarType = sci_boolean;
1089 }
1090 else if (strcmp(pstScilabClass, g_SCILAB_CLASS_POLY) == 0) 1086 else if (strcmp(pstScilabClass, g_SCILAB_CLASS_POLY) == 0)
1091 { 1087 {
1092 iVarType = sci_poly; 1088 iVarType = sci_poly;
diff --git a/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c b/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
index 19004dd..5d8ce5a 100644
--- a/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
+++ b/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
@@ -1168,10 +1168,6 @@ int getScilabTypeFromDataSet_v1(int _iDatasetId)
1168 { 1168 {
1169 iVarType = sci_boolean; 1169 iVarType = sci_boolean;
1170 } 1170 }
1171 else if (strcmp(pstScilabClass, g_SCILAB_CLASS_BOOLEAN) == 0)
1172 {
1173 iVarType = sci_boolean;
1174 }
1175 else if (strcmp(pstScilabClass, g_SCILAB_CLASS_POLY) == 0) 1171 else if (strcmp(pstScilabClass, g_SCILAB_CLASS_POLY) == 0)
1176 { 1172 {
1177 iVarType = sci_poly; 1173 iVarType = sci_poly;
diff --git a/scilab/modules/helptools/helptools.iss b/scilab/modules/helptools/helptools.iss
index e260293..6b7ee90 100644
--- a/scilab/modules/helptools/helptools.iss
+++ b/scilab/modules/helptools/helptools.iss
@@ -29,23 +29,10 @@ Source: thirdparty\docbook\*.*;DestDir: {app}\thirdparty\docbook; Flags: recurse
29; 29;
30Source: thirdparty\jhall.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 30Source: thirdparty\jhall.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
31Source: thirdparty\avalon-framework.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 31Source: thirdparty\avalon-framework.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
32Source: thirdparty\avalon-framework.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
33Source: thirdparty\avalon-framework.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
34Source: thirdparty\batik.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
35Source: thirdparty\batik.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
36Source: thirdparty\commons-io.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 32Source: thirdparty\commons-io.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
37Source: thirdparty\commons-io.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
38Source: thirdparty\commons-io.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
39Source: thirdparty\commons-logging.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 33Source: thirdparty\commons-logging.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
40Source: thirdparty\commons-logging.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
41Source: thirdparty\commons-logging.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
42Source: thirdparty\docbook-xsl-saxon.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 34Source: thirdparty\docbook-xsl-saxon.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
43Source: thirdparty\fop-hyph.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
44Source: thirdparty\fop-hyph.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
45Source: thirdparty\fop-hyph.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
46Source: thirdparty\fop.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 35Source: thirdparty\fop.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
47Source: thirdparty\fop.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
48Source: thirdparty\fop.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
49Source: thirdparty\jeuclid-core.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 36Source: thirdparty\jeuclid-core.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
50Source: thirdparty\jeuclid.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 37Source: thirdparty\jeuclid.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
51Source: thirdparty\jeuclid.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 38Source: thirdparty\jeuclid.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
@@ -54,10 +41,8 @@ Source: thirdparty\saxon.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_
54Source: thirdparty\saxon.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 41Source: thirdparty\saxon.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
55Source: thirdparty\xml-apis.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 42Source: thirdparty\xml-apis.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
56Source: thirdparty\xml-apis-ext.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 43Source: thirdparty\xml-apis-ext.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
57Source: thirdparty\xmlgraphics-commons-1.4.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 44Source: thirdparty\xmlgraphics-commons.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
58Source: thirdparty\xmlgraphics-commons.LICENSE;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 45Source: thirdparty\batik-all.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
59Source: thirdparty\xmlgraphics-commons.README;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
60Source: thirdparty\batik-all-1.7.jar;DestDir: {app}\thirdparty; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
61; 46;
62Source: modules\{#HELPTOOLS}\license.txt; DestDir: {app}\modules\{#HELPTOOLS}; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE} 47Source: modules\{#HELPTOOLS}\license.txt; DestDir: {app}\modules\{#HELPTOOLS}; Components: {#COMPN_SCILAB} and {#COMPN_JVM_MODULE}
63; 48;
diff --git a/scilab/modules/helptools/images/AFFICH_m_Example.zcos.png b/scilab/modules/helptools/images/AFFICH_m_Example.zcos.png
index e725586..8af89ce 100644
--- a/scilab/modules/helptools/images/AFFICH_m_Example.zcos.png
+++ b/scilab/modules/helptools/images/AFFICH_m_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/ANDBLK_Example.zcos.png b/scilab/modules/helptools/images/ANDBLK_Example.zcos.png
index 766268d..e2f0a05 100644
--- a/scilab/modules/helptools/images/ANDBLK_Example.zcos.png
+++ b/scilab/modules/helptools/images/ANDBLK_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/BARXY_Example.zcos.png b/scilab/modules/helptools/images/BARXY_Example.zcos.png
index a2661df..be27c07 100644
--- a/scilab/modules/helptools/images/BARXY_Example.zcos.png
+++ b/scilab/modules/helptools/images/BARXY_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/BIGSOM_f_Example.zcos.png b/scilab/modules/helptools/images/BIGSOM_f_Example.zcos.png
index edcf275..1164f3f 100644
--- a/scilab/modules/helptools/images/BIGSOM_f_Example.zcos.png
+++ b/scilab/modules/helptools/images/BIGSOM_f_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/BITCLEAR_en_US.zcos.png b/scilab/modules/helptools/images/BITCLEAR_en_US.zcos.png
index 1a5bfcd..6bc6a0d 100644
--- a/scilab/modules/helptools/images/BITCLEAR_en_US.zcos.png
+++ b/scilab/modules/helptools/images/BITCLEAR_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/BITCLEAR_fr_FR.zcos.png b/scilab/modules/helptools/images/BITCLEAR_fr_FR.zcos.png
index e54b102..144bd80 100644
--- a/scilab/modules/helptools/images/BITCLEAR_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/BITCLEAR_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/BITSET_en_US.zcos.png b/scilab/modules/helptools/images/BITSET_en_US.zcos.png
index 6673206..7883aca 100644
--- a/scilab/modules/helptools/images/BITSET_en_US.zcos.png
+++ b/scilab/modules/helptools/images/BITSET_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/BITSET_fr_FR.zcos.png b/scilab/modules/helptools/images/BITSET_fr_FR.zcos.png
index 4155af5..c730c85 100644
--- a/scilab/modules/helptools/images/BITSET_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/BITSET_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/Ball_Platform.zcos.png b/scilab/modules/helptools/images/Ball_Platform.zcos.png
index 50e68a4..f118be8 100644
--- a/scilab/modules/helptools/images/Ball_Platform.zcos.png
+++ b/scilab/modules/helptools/images/Ball_Platform.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/BouncingBall_Modelica.zcos.png b/scilab/modules/helptools/images/BouncingBall_Modelica.zcos.png
index 9323a5d..6455a91 100644
--- a/scilab/modules/helptools/images/BouncingBall_Modelica.zcos.png
+++ b/scilab/modules/helptools/images/BouncingBall_Modelica.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/CANIMXY_Example.zcos.png b/scilab/modules/helptools/images/CANIMXY_Example.zcos.png
index bbe3049..c94a4fa 100644
--- a/scilab/modules/helptools/images/CANIMXY_Example.zcos.png
+++ b/scilab/modules/helptools/images/CANIMXY_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/CLKINV_f_en_US.zcos.png b/scilab/modules/helptools/images/CLKINV_f_en_US.zcos.png
index c03285d..e4b7815 100644
--- a/scilab/modules/helptools/images/CLKINV_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/CLKINV_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/CLKINV_f_fr_FR.zcos.png b/scilab/modules/helptools/images/CLKINV_f_fr_FR.zcos.png
index 41ae77c..751cf00 100644
--- a/scilab/modules/helptools/images/CLKINV_f_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/CLKINV_f_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/CLKOUTV_f_en_US.zcos.png b/scilab/modules/helptools/images/CLKOUTV_f_en_US.zcos.png
index 85f8d23..70a29fd 100644
--- a/scilab/modules/helptools/images/CLKOUTV_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/CLKOUTV_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/CLKOUTV_f_fr_FR.zcos.png b/scilab/modules/helptools/images/CLKOUTV_f_fr_FR.zcos.png
index 85f8d23..70a29fd 100644
--- a/scilab/modules/helptools/images/CLKOUTV_f_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/CLKOUTV_f_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/CMAT3D_Example.zcos.png b/scilab/modules/helptools/images/CMAT3D_Example.zcos.png
index 0474466..d5583b2 100644
--- a/scilab/modules/helptools/images/CMAT3D_Example.zcos.png
+++ b/scilab/modules/helptools/images/CMAT3D_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/CMATVIEW_Example.zcos.png b/scilab/modules/helptools/images/CMATVIEW_Example.zcos.png
index 990dc5a..14a237c 100644
--- a/scilab/modules/helptools/images/CMATVIEW_Example.zcos.png
+++ b/scilab/modules/helptools/images/CMATVIEW_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/CONVERT_en_US.zcos.png b/scilab/modules/helptools/images/CONVERT_en_US.zcos.png
index c43a0c4..fa53bdc 100644
--- a/scilab/modules/helptools/images/CONVERT_en_US.zcos.png
+++ b/scilab/modules/helptools/images/CONVERT_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/CONVERT_fr_FR.zcos.png b/scilab/modules/helptools/images/CONVERT_fr_FR.zcos.png
index 5745ee8..fa53bdc 100644
--- a/scilab/modules/helptools/images/CONVERT_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/CONVERT_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/CSCOPE_en_US.zcos.png b/scilab/modules/helptools/images/CSCOPE_en_US.zcos.png
index 7676225..e2a34fe 100644
--- a/scilab/modules/helptools/images/CSCOPE_en_US.zcos.png
+++ b/scilab/modules/helptools/images/CSCOPE_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/Command.zcos.png b/scilab/modules/helptools/images/Command.zcos.png
index fa0962e..20b13a7 100644
--- a/scilab/modules/helptools/images/Command.zcos.png
+++ b/scilab/modules/helptools/images/Command.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/Command_bode.zcos.png b/scilab/modules/helptools/images/Command_bode.zcos.png
index 1460e8c..81fa758 100644
--- a/scilab/modules/helptools/images/Command_bode.zcos.png
+++ b/scilab/modules/helptools/images/Command_bode.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/Controller.zcos.png b/scilab/modules/helptools/images/Controller.zcos.png
index 0f5623d..25c27cf 100644
--- a/scilab/modules/helptools/images/Controller.zcos.png
+++ b/scilab/modules/helptools/images/Controller.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/DAE_Example.zcos.png b/scilab/modules/helptools/images/DAE_Example.zcos.png
index 06507c8..5ae417a 100644
--- a/scilab/modules/helptools/images/DAE_Example.zcos.png
+++ b/scilab/modules/helptools/images/DAE_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/DELAYV_f_en_US.zcos.png b/scilab/modules/helptools/images/DELAYV_f_en_US.zcos.png
index 947444e..9ead7fb 100644
--- a/scilab/modules/helptools/images/DELAYV_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/DELAYV_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/DELAY_f_1_en_US.zcos.png b/scilab/modules/helptools/images/DELAY_f_1_en_US.zcos.png
index 57cf73b..2a7516c 100644
--- a/scilab/modules/helptools/images/DELAY_f_1_en_US.zcos.png
+++ b/scilab/modules/helptools/images/DELAY_f_1_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/DELAY_f_2_en_US.zcos.png b/scilab/modules/helptools/images/DELAY_f_2_en_US.zcos.png
index 2adec8e..52a463b 100644
--- a/scilab/modules/helptools/images/DELAY_f_2_en_US.zcos.png
+++ b/scilab/modules/helptools/images/DELAY_f_2_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/DERIV_Example.zcos.png b/scilab/modules/helptools/images/DERIV_Example.zcos.png
index 33c9ce1..fd19bdf 100644
--- a/scilab/modules/helptools/images/DERIV_Example.zcos.png
+++ b/scilab/modules/helptools/images/DERIV_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/DLATCH_en_US.zcos.png b/scilab/modules/helptools/images/DLATCH_en_US.zcos.png
index d48187b..8c632d7 100644
--- a/scilab/modules/helptools/images/DLATCH_en_US.zcos.png
+++ b/scilab/modules/helptools/images/DLATCH_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/DLATCH_fr_FR.zcos.png b/scilab/modules/helptools/images/DLATCH_fr_FR.zcos.png
index 5026af0..68ebd06 100644
--- a/scilab/modules/helptools/images/DLATCH_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/DLATCH_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/EDGE_TRIGGER_Example.zcos.png b/scilab/modules/helptools/images/EDGE_TRIGGER_Example.zcos.png
index c743ea7..f040dcf 100644
--- a/scilab/modules/helptools/images/EDGE_TRIGGER_Example.zcos.png
+++ b/scilab/modules/helptools/images/EDGE_TRIGGER_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/ESELECT_f_Example.zcos.png b/scilab/modules/helptools/images/ESELECT_f_Example.zcos.png
index c482646..b8502a4 100644
--- a/scilab/modules/helptools/images/ESELECT_f_Example.zcos.png
+++ b/scilab/modules/helptools/images/ESELECT_f_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/EVTDLY_c_Example.zcos.png b/scilab/modules/helptools/images/EVTDLY_c_Example.zcos.png
index 36ec49d..a05a354 100644
--- a/scilab/modules/helptools/images/EVTDLY_c_Example.zcos.png
+++ b/scilab/modules/helptools/images/EVTDLY_c_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/EVTGEN_f_Example.zcos.png b/scilab/modules/helptools/images/EVTGEN_f_Example.zcos.png
index fef4861..5b8e7e0 100644
--- a/scilab/modules/helptools/images/EVTGEN_f_Example.zcos.png
+++ b/scilab/modules/helptools/images/EVTGEN_f_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/EVTVARDLY_Example.zcos.png b/scilab/modules/helptools/images/EVTVARDLY_Example.zcos.png
index f03554d..96dd459 100644
--- a/scilab/modules/helptools/images/EVTVARDLY_Example.zcos.png
+++ b/scilab/modules/helptools/images/EVTVARDLY_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/EXPRESSION_en_US.zcos.png b/scilab/modules/helptools/images/EXPRESSION_en_US.zcos.png
index a4482aa..fd19f61 100644
--- a/scilab/modules/helptools/images/EXPRESSION_en_US.zcos.png
+++ b/scilab/modules/helptools/images/EXPRESSION_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/EXTRACTBITS_en_US.zcos.png b/scilab/modules/helptools/images/EXTRACTBITS_en_US.zcos.png
index e6b2127..5df50b5 100644
--- a/scilab/modules/helptools/images/EXTRACTBITS_en_US.zcos.png
+++ b/scilab/modules/helptools/images/EXTRACTBITS_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/EXTRACTBITS_fr_FR.zcos.png b/scilab/modules/helptools/images/EXTRACTBITS_fr_FR.zcos.png
index c90356e..a54dbe0 100644
--- a/scilab/modules/helptools/images/EXTRACTBITS_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/EXTRACTBITS_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/EXTRACT_Example.zcos.png b/scilab/modules/helptools/images/EXTRACT_Example.zcos.png
index 82d277c..71bc847 100644
--- a/scilab/modules/helptools/images/EXTRACT_Example.zcos.png
+++ b/scilab/modules/helptools/images/EXTRACT_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/FROMWSB_en_US.zcos.png b/scilab/modules/helptools/images/FROMWSB_en_US.zcos.png
index a594564..dc92fba 100644
--- a/scilab/modules/helptools/images/FROMWSB_en_US.zcos.png
+++ b/scilab/modules/helptools/images/FROMWSB_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/GENSQR_f_diagram_en_US.zcos.png b/scilab/modules/helptools/images/GENSQR_f_diagram_en_US.zcos.png
index f7526bf..c7f109a 100644
--- a/scilab/modules/helptools/images/GENSQR_f_diagram_en_US.zcos.png
+++ b/scilab/modules/helptools/images/GENSQR_f_diagram_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/HYSTERESIS_Example.zcos.png b/scilab/modules/helptools/images/HYSTERESIS_Example.zcos.png
index f1e7ddd..30e438d 100644
--- a/scilab/modules/helptools/images/HYSTERESIS_Example.zcos.png
+++ b/scilab/modules/helptools/images/HYSTERESIS_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/Hydraulics.zcos.png b/scilab/modules/helptools/images/Hydraulics.zcos.png
index 7aa1765..5e9e722 100644
--- a/scilab/modules/helptools/images/Hydraulics.zcos.png
+++ b/scilab/modules/helptools/images/Hydraulics.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/IFTHEL_f_Example.zcos.png b/scilab/modules/helptools/images/IFTHEL_f_Example.zcos.png
index 7f061bc..0b2d609 100644
--- a/scilab/modules/helptools/images/IFTHEL_f_Example.zcos.png
+++ b/scilab/modules/helptools/images/IFTHEL_f_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/INIMPL_f_en_US.zcos.png b/scilab/modules/helptools/images/INIMPL_f_en_US.zcos.png
index d1ed5ab..18e565f 100644
--- a/scilab/modules/helptools/images/INIMPL_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/INIMPL_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/INIMPL_f_fr_FR.zcos.png b/scilab/modules/helptools/images/INIMPL_f_fr_FR.zcos.png
index db768dd..b94c5f7 100644
--- a/scilab/modules/helptools/images/INIMPL_f_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/INIMPL_f_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/INTEGRAL_m_1_Example.zcos.png b/scilab/modules/helptools/images/INTEGRAL_m_1_Example.zcos.png
index 1f03dd8..2e8dacc 100644
--- a/scilab/modules/helptools/images/INTEGRAL_m_1_Example.zcos.png
+++ b/scilab/modules/helptools/images/INTEGRAL_m_1_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/INTEGRAL_m_2_Example.zcos.png b/scilab/modules/helptools/images/INTEGRAL_m_2_Example.zcos.png
index 785a812..788dbfa 100644
--- a/scilab/modules/helptools/images/INTEGRAL_m_2_Example.zcos.png
+++ b/scilab/modules/helptools/images/INTEGRAL_m_2_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/INTMUL_en_US.zcos.png b/scilab/modules/helptools/images/INTMUL_en_US.zcos.png
index b14a0d8..999ad56 100644
--- a/scilab/modules/helptools/images/INTMUL_en_US.zcos.png
+++ b/scilab/modules/helptools/images/INTMUL_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/INTMUL_fr_FR.zcos.png b/scilab/modules/helptools/images/INTMUL_fr_FR.zcos.png
index 6cde92f..999ad56 100644
--- a/scilab/modules/helptools/images/INTMUL_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/INTMUL_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/INTRPLBLK_f_en_US.zcos.png b/scilab/modules/helptools/images/INTRPLBLK_f_en_US.zcos.png
index 63a9452..8d0dffc 100644
--- a/scilab/modules/helptools/images/INTRPLBLK_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/INTRPLBLK_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/IN_f_en_US.zcos.png b/scilab/modules/helptools/images/IN_f_en_US.zcos.png
index 613090a..4bdf32d 100644
--- a/scilab/modules/helptools/images/IN_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/IN_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/IN_f_fr_FR.zcos.png b/scilab/modules/helptools/images/IN_f_fr_FR.zcos.png
index 23acfff..4bdf32d 100644
--- a/scilab/modules/helptools/images/IN_f_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/IN_f_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/IdealTransformer_Example.zcos.png b/scilab/modules/helptools/images/IdealTransformer_Example.zcos.png
index 35e26f4..17b6d0d 100644
--- a/scilab/modules/helptools/images/IdealTransformer_Example.zcos.png
+++ b/scilab/modules/helptools/images/IdealTransformer_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/JKFLIPFLOP_en_US.zcos.png b/scilab/modules/helptools/images/JKFLIPFLOP_en_US.zcos.png
index ebcaa6d..5def158 100644
--- a/scilab/modules/helptools/images/JKFLIPFLOP_en_US.zcos.png
+++ b/scilab/modules/helptools/images/JKFLIPFLOP_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/JKFLIPFLOP_fr_FR.zcos.png b/scilab/modules/helptools/images/JKFLIPFLOP_fr_FR.zcos.png
index 5149b48..001263c 100644
--- a/scilab/modules/helptools/images/JKFLIPFLOP_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/JKFLIPFLOP_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/Kalman.zcos.png b/scilab/modules/helptools/images/Kalman.zcos.png
index 5076fd6..2c81f50 100644
--- a/scilab/modules/helptools/images/Kalman.zcos.png
+++ b/scilab/modules/helptools/images/Kalman.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/LOGIC_en_US.zcos.png b/scilab/modules/helptools/images/LOGIC_en_US.zcos.png
index cad08ef..7a3eb09 100644
--- a/scilab/modules/helptools/images/LOGIC_en_US.zcos.png
+++ b/scilab/modules/helptools/images/LOGIC_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/LOGIC_fr_FR.zcos.png b/scilab/modules/helptools/images/LOGIC_fr_FR.zcos.png
index 650bf2b..dc88d3a 100644
--- a/scilab/modules/helptools/images/LOGIC_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/LOGIC_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/MCLOCK_f_Example.zcos.png b/scilab/modules/helptools/images/MCLOCK_f_Example.zcos.png
index 671df29..9488d2a 100644
--- a/scilab/modules/helptools/images/MCLOCK_f_Example.zcos.png
+++ b/scilab/modules/helptools/images/MCLOCK_f_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/MFCLCK_f_Example.zcos.png b/scilab/modules/helptools/images/MFCLCK_f_Example.zcos.png
index fc81633..4366b2d 100644
--- a/scilab/modules/helptools/images/MFCLCK_f_Example.zcos.png
+++ b/scilab/modules/helptools/images/MFCLCK_f_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/MIN_f_Example.zcos.png b/scilab/modules/helptools/images/MIN_f_Example.zcos.png
index da52bd3..03c7dac 100644
--- a/scilab/modules/helptools/images/MIN_f_Example.zcos.png
+++ b/scilab/modules/helptools/images/MIN_f_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/M_freq_Example.zcos.png b/scilab/modules/helptools/images/M_freq_Example.zcos.png
index 2b6374c..ebd80a1 100644
--- a/scilab/modules/helptools/images/M_freq_Example.zcos.png
+++ b/scilab/modules/helptools/images/M_freq_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/NEGTOPOS_f_Example.zcos.png b/scilab/modules/helptools/images/NEGTOPOS_f_Example.zcos.png
index 0d6b3a7..0d16c92 100644
--- a/scilab/modules/helptools/images/NEGTOPOS_f_Example.zcos.png
+++ b/scilab/modules/helptools/images/NEGTOPOS_f_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/OUTIMPL_f_en_US.zcos.png b/scilab/modules/helptools/images/OUTIMPL_f_en_US.zcos.png
index 3dd156f..4abb6b4 100644
--- a/scilab/modules/helptools/images/OUTIMPL_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/OUTIMPL_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/OUTIMPL_f_fr_FR.zcos.png b/scilab/modules/helptools/images/OUTIMPL_f_fr_FR.zcos.png
index 3dd156f..4abb6b4 100644
--- a/scilab/modules/helptools/images/OUTIMPL_f_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/OUTIMPL_f_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/PID_1_Example.zcos.png b/scilab/modules/helptools/images/PID_1_Example.zcos.png
index 07b0b57..bb9dc08 100644
--- a/scilab/modules/helptools/images/PID_1_Example.zcos.png
+++ b/scilab/modules/helptools/images/PID_1_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/PID_2_Example.zcos.png b/scilab/modules/helptools/images/PID_2_Example.zcos.png
index 7a63c2a..a197bd7 100644
--- a/scilab/modules/helptools/images/PID_2_Example.zcos.png
+++ b/scilab/modules/helptools/images/PID_2_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/PID_3_Example.zcos.png b/scilab/modules/helptools/images/PID_3_Example.zcos.png
index d88bb29..81d3767 100644
--- a/scilab/modules/helptools/images/PID_3_Example.zcos.png
+++ b/scilab/modules/helptools/images/PID_3_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/PID_internal.zcos.png b/scilab/modules/helptools/images/PID_internal.zcos.png
index d26a394..583711e 100644
--- a/scilab/modules/helptools/images/PID_internal.zcos.png
+++ b/scilab/modules/helptools/images/PID_internal.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/QUANT_f_Example.zcos.png b/scilab/modules/helptools/images/QUANT_f_Example.zcos.png
index a781174..ee2b721 100644
--- a/scilab/modules/helptools/images/QUANT_f_Example.zcos.png
+++ b/scilab/modules/helptools/images/QUANT_f_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/QUANT_f_Example_Quantization_Mode.zcos.png b/scilab/modules/helptools/images/QUANT_f_Example_Quantization_Mode.zcos.png
index b81547f..8c248cb 100644
--- a/scilab/modules/helptools/images/QUANT_f_Example_Quantization_Mode.zcos.png
+++ b/scilab/modules/helptools/images/QUANT_f_Example_Quantization_Mode.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/RAMP_en_US.zcos.png b/scilab/modules/helptools/images/RAMP_en_US.zcos.png
index 16cea9d..ed63e60 100644
--- a/scilab/modules/helptools/images/RAMP_en_US.zcos.png
+++ b/scilab/modules/helptools/images/RAMP_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/RATELIMITER_Example.zcos.png b/scilab/modules/helptools/images/RATELIMITER_Example.zcos.png
index ecf2fcf..ec67bef 100644
--- a/scilab/modules/helptools/images/RATELIMITER_Example.zcos.png
+++ b/scilab/modules/helptools/images/RATELIMITER_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/RELAY_f_Example.zcos.png b/scilab/modules/helptools/images/RELAY_f_Example.zcos.png
index 5a975ff..6c206bd 100644
--- a/scilab/modules/helptools/images/RELAY_f_Example.zcos.png
+++ b/scilab/modules/helptools/images/RELAY_f_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/SAMPHOLD_m_Example.zcos.png b/scilab/modules/helptools/images/SAMPHOLD_m_Example.zcos.png
index 82bdda4..929b373 100644
--- a/scilab/modules/helptools/images/SAMPHOLD_m_Example.zcos.png
+++ b/scilab/modules/helptools/images/SAMPHOLD_m_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/SELECT_m_Example.zcos.png b/scilab/modules/helptools/images/SELECT_m_Example.zcos.png
index 3eedd4a..99daf04 100644
--- a/scilab/modules/helptools/images/SELECT_m_Example.zcos.png
+++ b/scilab/modules/helptools/images/SELECT_m_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/SHIFT_en_US.zcos.png b/scilab/modules/helptools/images/SHIFT_en_US.zcos.png
index 44a8718..be5b5ef 100644
--- a/scilab/modules/helptools/images/SHIFT_en_US.zcos.png
+++ b/scilab/modules/helptools/images/SHIFT_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/SHIFT_fr_FR.zcos.png b/scilab/modules/helptools/images/SHIFT_fr_FR.zcos.png
index 1fd9d05..076b33b 100644
--- a/scilab/modules/helptools/images/SHIFT_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/SHIFT_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/SHIFT_internal_en_US.zcos.png b/scilab/modules/helptools/images/SHIFT_internal_en_US.zcos.png
index 6063eb4..a34e362 100644
--- a/scilab/modules/helptools/images/SHIFT_internal_en_US.zcos.png
+++ b/scilab/modules/helptools/images/SHIFT_internal_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/SHIFT_internal_fr_FR.zcos.png b/scilab/modules/helptools/images/SHIFT_internal_fr_FR.zcos.png
index 6063eb4..a34e362 100644
--- a/scilab/modules/helptools/images/SHIFT_internal_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/SHIFT_internal_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/SRFLIPFLOP_en_US.zcos.png b/scilab/modules/helptools/images/SRFLIPFLOP_en_US.zcos.png
index ade7ad9..a29e895 100644
--- a/scilab/modules/helptools/images/SRFLIPFLOP_en_US.zcos.png
+++ b/scilab/modules/helptools/images/SRFLIPFLOP_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/SRFLIPFLOP_fr_FR.zcos.png b/scilab/modules/helptools/images/SRFLIPFLOP_fr_FR.zcos.png
index ade7ad9..a29e895 100644
--- a/scilab/modules/helptools/images/SRFLIPFLOP_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/SRFLIPFLOP_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/SWITCH2_m_Example.zcos.png b/scilab/modules/helptools/images/SWITCH2_m_Example.zcos.png
index 333f6fd..b72f909 100644
--- a/scilab/modules/helptools/images/SWITCH2_m_Example.zcos.png
+++ b/scilab/modules/helptools/images/SWITCH2_m_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/TIME_DELAY_Example.zcos.png b/scilab/modules/helptools/images/TIME_DELAY_Example.zcos.png
index 07fb20e..23a57d5 100644
--- a/scilab/modules/helptools/images/TIME_DELAY_Example.zcos.png
+++ b/scilab/modules/helptools/images/TIME_DELAY_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/TOWS_c_Example.zcos.png b/scilab/modules/helptools/images/TOWS_c_Example.zcos.png
index fd3bcd1..3bc838e 100644
--- a/scilab/modules/helptools/images/TOWS_c_Example.zcos.png
+++ b/scilab/modules/helptools/images/TOWS_c_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/Threshold_ZeroCrossing.zcos.png b/scilab/modules/helptools/images/Threshold_ZeroCrossing.zcos.png
index 2f29e78..997f45a 100644
--- a/scilab/modules/helptools/images/Threshold_ZeroCrossing.zcos.png
+++ b/scilab/modules/helptools/images/Threshold_ZeroCrossing.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/VARIABLE_DELAY_en_US.zcos.png b/scilab/modules/helptools/images/VARIABLE_DELAY_en_US.zcos.png
index e5c45a4..36ce475 100644
--- a/scilab/modules/helptools/images/VARIABLE_DELAY_en_US.zcos.png
+++ b/scilab/modules/helptools/images/VARIABLE_DELAY_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/VARIABLE_DELAY_fr_FR.zcos.png b/scilab/modules/helptools/images/VARIABLE_DELAY_fr_FR.zcos.png
index e5c45a4..36ce475 100644
--- a/scilab/modules/helptools/images/VARIABLE_DELAY_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/VARIABLE_DELAY_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/WRITEAU_f_Example.zcos.png b/scilab/modules/helptools/images/WRITEAU_f_Example.zcos.png
index a1fa9c0..6e84d82 100644
--- a/scilab/modules/helptools/images/WRITEAU_f_Example.zcos.png
+++ b/scilab/modules/helptools/images/WRITEAU_f_Example.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/batch_simulation.zcos.png b/scilab/modules/helptools/images/batch_simulation.zcos.png
index 68b2ec2..b1962c5 100644
--- a/scilab/modules/helptools/images/batch_simulation.zcos.png
+++ b/scilab/modules/helptools/images/batch_simulation.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/clock_c_en_US.zcos.png b/scilab/modules/helptools/images/clock_c_en_US.zcos.png
index d9a7424..c0e9cbd 100644
--- a/scilab/modules/helptools/images/clock_c_en_US.zcos.png
+++ b/scilab/modules/helptools/images/clock_c_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/cmscope.zcos.png b/scilab/modules/helptools/images/cmscope.zcos.png
index 37353ec..618fd4b 100644
--- a/scilab/modules/helptools/images/cmscope.zcos.png
+++ b/scilab/modules/helptools/images/cmscope.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/counter_en_US.zcos.png b/scilab/modules/helptools/images/counter_en_US.zcos.png
index 7ad49e0..12d3b80 100644
--- a/scilab/modules/helptools/images/counter_en_US.zcos.png
+++ b/scilab/modules/helptools/images/counter_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/cscopxy.zcos.png b/scilab/modules/helptools/images/cscopxy.zcos.png
index 877a70b..337ab04 100644
--- a/scilab/modules/helptools/images/cscopxy.zcos.png
+++ b/scilab/modules/helptools/images/cscopxy.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/cscopxy3d.zcos.png b/scilab/modules/helptools/images/cscopxy3d.zcos.png
index 0a23e4e..dea1f66 100644
--- a/scilab/modules/helptools/images/cscopxy3d.zcos.png
+++ b/scilab/modules/helptools/images/cscopxy3d.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/deadband_en_US.zcos.png b/scilab/modules/helptools/images/deadband_en_US.zcos.png
index 41b509f..26b9248 100644
--- a/scilab/modules/helptools/images/deadband_en_US.zcos.png
+++ b/scilab/modules/helptools/images/deadband_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/deadband_fr_FR.zcos.png b/scilab/modules/helptools/images/deadband_fr_FR.zcos.png
index 41b509f..26b9248 100644
--- a/scilab/modules/helptools/images/deadband_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/deadband_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/gensin_f_en_US.zcos.png b/scilab/modules/helptools/images/gensin_f_en_US.zcos.png
index eb92fdf..fa16e39 100644
--- a/scilab/modules/helptools/images/gensin_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/gensin_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/modulo_count_en_US.zcos.png b/scilab/modules/helptools/images/modulo_count_en_US.zcos.png
index 8247efa..eabf421 100644
--- a/scilab/modules/helptools/images/modulo_count_en_US.zcos.png
+++ b/scilab/modules/helptools/images/modulo_count_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/rfile_f_en_US.zcos.png b/scilab/modules/helptools/images/rfile_f_en_US.zcos.png
index fe86c26..635d0af 100644
--- a/scilab/modules/helptools/images/rfile_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/rfile_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/rfile_f_fr_FR.zcos.png b/scilab/modules/helptools/images/rfile_f_fr_FR.zcos.png
index cc55322..867f194 100644
--- a/scilab/modules/helptools/images/rfile_f_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/rfile_f_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/sawtooth_f_en_US.zcos.png b/scilab/modules/helptools/images/sawtooth_f_en_US.zcos.png
index f236d99..42e6748 100644
--- a/scilab/modules/helptools/images/sawtooth_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/sawtooth_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/scifunc_block_m_en_US.zcos.png b/scilab/modules/helptools/images/scifunc_block_m_en_US.zcos.png
index 03cfdd7..c402e86 100644
--- a/scilab/modules/helptools/images/scifunc_block_m_en_US.zcos.png
+++ b/scilab/modules/helptools/images/scifunc_block_m_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/step_function_1_en_US.zcos.png b/scilab/modules/helptools/images/step_function_1_en_US.zcos.png
index 3127cc9..8639882 100644
--- a/scilab/modules/helptools/images/step_function_1_en_US.zcos.png
+++ b/scilab/modules/helptools/images/step_function_1_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/step_function_2_en_US.zcos.png b/scilab/modules/helptools/images/step_function_2_en_US.zcos.png
index 89b400f8..763d8e9 100644
--- a/scilab/modules/helptools/images/step_function_2_en_US.zcos.png
+++ b/scilab/modules/helptools/images/step_function_2_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/text_f_fr_FR.zcos.png b/scilab/modules/helptools/images/text_f_fr_FR.zcos.png
index e76f2a0..d70fcea 100644
--- a/scilab/modules/helptools/images/text_f_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/text_f_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/wfile_f_en_US.zcos.png b/scilab/modules/helptools/images/wfile_f_en_US.zcos.png
index 003e191..ff5e954 100644
--- a/scilab/modules/helptools/images/wfile_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/wfile_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/wfile_f_fr_FR.zcos.png b/scilab/modules/helptools/images/wfile_f_fr_FR.zcos.png
index ffa9b3c..30b2bb1 100644
--- a/scilab/modules/helptools/images/wfile_f_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/wfile_f_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/writec_f_en_US.zcos.png b/scilab/modules/helptools/images/writec_f_en_US.zcos.png
index 2c6c33e..72824e9 100644
--- a/scilab/modules/helptools/images/writec_f_en_US.zcos.png
+++ b/scilab/modules/helptools/images/writec_f_en_US.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/images/writec_f_fr_FR.zcos.png b/scilab/modules/helptools/images/writec_f_fr_FR.zcos.png
index a7cf9cd..58b3945 100644
--- a/scilab/modules/helptools/images/writec_f_fr_FR.zcos.png
+++ b/scilab/modules/helptools/images/writec_f_fr_FR.zcos.png
Binary files differ
diff --git a/scilab/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java b/scilab/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java
index c34f4aa..ad0ebb9 100644
--- a/scilab/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java
+++ b/scilab/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java
@@ -43,10 +43,10 @@ public class FopConverter extends ContainerConverter {
43 String fileName = outputDirectory + "/" + baseName + "." + format.name().toLowerCase(); 43 String fileName = outputDirectory + "/" + baseName + "." + format.name().toLowerCase();
44 44
45 try { 45 try {
46 FopFactory fopFactory = FopFactory.newInstance(); 46 final File configuration = new File(System.getenv("SCI") + "/modules/helptools/etc/fopconf.xml");
47 FopFactory fopFactory = FopFactory.newInstance(configuration);
47 fopFactory.addElementMapping(new JLaTeXMathElementMapping()); 48 fopFactory.addElementMapping(new JLaTeXMathElementMapping());
48 fopFactory.getXMLHandlerRegistry().addXMLHandler(new JLaTeXMathXMLHandler()); 49 fopFactory.getXMLHandlerRegistry().addXMLHandler(new JLaTeXMathXMLHandler());
49 fopFactory.setUserConfig(new File(System.getenv("SCI") + "/modules/helptools/etc/fopconf.xml"));
50 50
51 // Step 3: Construct fop with desired output format 51 // Step 3: Construct fop with desired output format
52 OutputStream out = new BufferedOutputStream(new FileOutputStream(fileName)); 52 OutputStream out = new BufferedOutputStream(new FileOutputStream(fileName));
diff --git a/scilab/modules/io/sci_gateway/cpp/sci_genlib.cpp b/scilab/modules/io/sci_gateway/cpp/sci_genlib.cpp
index 66ab66f..19c6346 100644
--- a/scilab/modules/io/sci_gateway/cpp/sci_genlib.cpp
+++ b/scilab/modules/io/sci_gateway/cpp/sci_genlib.cpp
@@ -231,6 +231,15 @@ types::Function::ReturnValue sci_genlib(types::typed_list &in, int _iRetCount, t
231 231
232 //compute file md5 232 //compute file md5
233 FILE* fmdf5 = os_wfopen(stFullPath.data(), L"rb"); 233 FILE* fmdf5 = os_wfopen(stFullPath.data(), L"rb");
234 if (fmdf5 == NULL)
235 {
236 char* pstr = wide_string_to_UTF8(stFullPath.data());
237 Scierror(999, _("%s: Cannot open file ''%s''.\n"), "genlib", pstr);
238 FREE(pstr);
239 pLib->killMe();
240 return types::Function::Error;
241 }
242
234 char* md5 = md5_file(fmdf5); 243 char* md5 = md5_file(fmdf5);
235 fclose(fmdf5); 244 fclose(fmdf5);
236 245
diff --git a/scilab/modules/io/tests/nonreg_tests/bug_14041.tst b/scilab/modules/io/tests/nonreg_tests/bug_14041.tst
new file mode 100644
index 0000000..2b20d8d
--- /dev/null
+++ b/scilab/modules/io/tests/nonreg_tests/bug_14041.tst
@@ -0,0 +1,32 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2015 - Scilab Enterprises - Cedric Delamarre
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//<-- CLI SHELL MODE -->
8//<-- INTERACTIVE TEST -->
9// <-- Non-regression test for bug 14041 -->
10//
11// <-- Bugzilla URL -->
12// http://bugzilla.scilab.org/14041
13//
14// <-- Short Description -->
15// genlib crashes if one file is a symbolic link created by emacs to lock currently edited file
16
17// create a directory (ie: dir_genlib)
18// put in this directory a file wich contain the next script
19function genlibtest()
20 disp("genlibtest")
21endfunction
22
23// then open this file (with emacs), modify the function but not save the file
24
25// start scilab
26// go to the path of the created directory
27// execute in scilab
28
29genlib("dir_genlib", "genlibtest", %t ,%t)
30
31// this execution have to return an error : genlib: Cannot open file ''mylib//.#mylib.sci''.
32// instead of crash
diff --git a/scilab/modules/localization/help/en_US/getlanguage.xml b/scilab/modules/localization/help/en_US/getlanguage.xml
index 4e67fb1..7fbdd0b 100644
--- a/scilab/modules/localization/help/en_US/getlanguage.xml
+++ b/scilab/modules/localization/help/en_US/getlanguage.xml
@@ -14,7 +14,7 @@
14<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="getlanguage"> 14<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="getlanguage">
15 <refnamediv> 15 <refnamediv>
16 <refname>getlanguage</refname> 16 <refname>getlanguage</refname>
17 <refpurpose>returns current language used by Scilab.</refpurpose> 17 <refpurpose>returns the current language used by Scilab.</refpurpose>
18 </refnamediv> 18 </refnamediv>
19 <refsynopsisdiv> 19 <refsynopsisdiv>
20 <title>Calling Sequence</title> 20 <title>Calling Sequence</title>
@@ -23,7 +23,7 @@
23 <refsection> 23 <refsection>
24 <title>Description</title> 24 <title>Description</title>
25 <para> 25 <para>
26 <literal>getlanguage()</literal> returns current language used by Scilab. 26 <literal>getlanguage()</literal> returns the current language used by Scilab.
27 </para> 27 </para>
28 </refsection> 28 </refsection>
29 <refsection> 29 <refsection>
diff --git a/scilab/modules/localization/help/en_US/setdefaultlanguage.xml b/scilab/modules/localization/help/en_US/setdefaultlanguage.xml
index 858f11b..0c7a1f6 100644
--- a/scilab/modules/localization/help/en_US/setdefaultlanguage.xml
+++ b/scilab/modules/localization/help/en_US/setdefaultlanguage.xml
@@ -13,7 +13,7 @@
13<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="setdefaultlanguage" xml:lang="en"> 13<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="setdefaultlanguage" xml:lang="en">
14 <refnamediv> 14 <refnamediv>
15 <refname>setdefaultlanguage</refname> 15 <refname>setdefaultlanguage</refname>
16 <refpurpose>sets and saves the internal LANGUAGE value.</refpurpose> 16 <refpurpose>Permanently changes the language of Scilab's user interface.</refpurpose>
17 </refnamediv> 17 </refnamediv>
18 <refsynopsisdiv> 18 <refsynopsisdiv>
19 <title>Calling Sequence</title> 19 <title>Calling Sequence</title>
@@ -25,7 +25,7 @@
25 <varlistentry> 25 <varlistentry>
26 <term>language</term> 26 <term>language</term>
27 <listitem> 27 <listitem>
28 <para>a string, can have following values: 'fr', 'en', 'ru_RU', 'zh_TW', ...</para> 28 <para>a string made of a two-letter, lower-case, ISO Language Code, optionally followed by an underscore and a two-letter, upper-case, ISO country code), such as: 'fr', 'en', 'en_US', 'ru_RU', 'zh_TW'...</para>
29 </listitem> 29 </listitem>
30 </varlistentry> 30 </varlistentry>
31 </variablelist> 31 </variablelist>
@@ -33,16 +33,14 @@
33 <refsection> 33 <refsection>
34 <title>Description</title> 34 <title>Description</title>
35 <para> 35 <para>
36 <literal>setdefaultlanguage(language)</literal> changes current 36 <literal>setdefaultlanguage(language)</literal> changes the language used by Scilab user interface, including help, error messages, and saves this changes as the default for subsequent runs of Scilab.
37 language and saves this value in Scilab.
38 </para> 37 </para>
39 <para>You have to restart Scilab, if you want to use menus.</para> 38 <para>Menus will only be changed to the new language once Scilab is restarted.</para>
40 <para> 39 <para>
41 <literal>setdefaultlanguage('')</literal> resets language to the system value. 40 <literal>setdefaultlanguage('')</literal> resets the language to the system value.
42 </para> 41 </para>
43 <para> 42 <para>
44 <literal>setdefaultlanguage</literal> is used only Windows. On others operating systems 43 <literal>setdefaultlanguage</literal> only works on Windows. On others operating systems, it does nothing and always returns <literal>%f</literal>.
45 it returns always <literal>%f</literal>.
46 </para> 44 </para>
47 </refsection> 45 </refsection>
48 <refsection> 46 <refsection>
diff --git a/scilab/modules/localization/help/en_US/setlanguage.xml b/scilab/modules/localization/help/en_US/setlanguage.xml
index 2c40e2c..72e771c 100644
--- a/scilab/modules/localization/help/en_US/setlanguage.xml
+++ b/scilab/modules/localization/help/en_US/setlanguage.xml
@@ -14,9 +14,7 @@
14<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="setlanguage"> 14<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="setlanguage">
15 <refnamediv> 15 <refnamediv>
16 <refname>setlanguage</refname> 16 <refname>setlanguage</refname>
17 <refpurpose>sets the internal LANGUAGE 17 <refpurpose>Changes the language of Scilab's user interface</refpurpose>
18 value (for Windows only)
19 </refpurpose>
20 </refnamediv> 18 </refnamediv>
21 <refsynopsisdiv> 19 <refsynopsisdiv>
22 <title>Calling Sequence</title> 20 <title>Calling Sequence</title>
@@ -28,7 +26,7 @@
28 <varlistentry> 26 <varlistentry>
29 <term>language</term> 27 <term>language</term>
30 <listitem> 28 <listitem>
31 <para>with language='fr' or 'en', ... </para> 29 <para>string made of a two-letter, lower-case, ISO Language Code, optionally followed by an underscore and a two-letter, upper-case, ISO country code), such as: 'fr', 'en', 'en_US', 'ru_RU', 'zh_TW'...</para>
32 </listitem> 30 </listitem>
33 </varlistentry> 31 </varlistentry>
34 </variablelist> 32 </variablelist>
@@ -36,7 +34,13 @@
36 <refsection> 34 <refsection>
37 <title>Description</title> 35 <title>Description</title>
38 <para> 36 <para>
39 <literal>setlanguage(language)</literal> changes current language in scilab. 37 <literal>setlanguage(language)</literal> changes the language used by Scilab user interface, including help, error messages, for the current execution of Scilab.
38 </para>
39 <para>
40 <literal>setlanguage('')</literal> resets the language to the system value.
41 </para>
42 <para>
43 <literal>setlanguage</literal> works on all supported operating systems.
40 </para> 44 </para>
41 </refsection> 45 </refsection>
42 <refsection> 46 <refsection>
diff --git a/scilab/modules/localization/sci_gateway/cpp/sci_setdefaultlanguage.cpp b/scilab/modules/localization/sci_gateway/cpp/sci_setdefaultlanguage.cpp
index 9f6d196..c9cb2a2 100644
--- a/scilab/modules/localization/sci_gateway/cpp/sci_setdefaultlanguage.cpp
+++ b/scilab/modules/localization/sci_gateway/cpp/sci_setdefaultlanguage.cpp
@@ -76,7 +76,7 @@ types::Function::ReturnValue sci_setdefaultlanguage(types::typed_list &in, int _
76 */ 76 */
77 if (getWarningMode()) 77 if (getWarningMode())
78 { 78 {
79 sciprint(_("%ls: This feature is only used on Windows.\n"), L"setdefaultlanguage"); 79 sciprint(_("%ls: This feature is only supported on Windows.\n"), L"setdefaultlanguage");
80 } 80 }
81 81
82 types::Bool* pbOut = new types::Bool(FALSE); 82 types::Bool* pbOut = new types::Bool(FALSE);
diff --git a/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java b/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java
index bf8afd3..59c4bc9 100644
--- a/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java
+++ b/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java
@@ -114,11 +114,10 @@ public class CodeExporter extends FOCodeConverter {
114 * @param format the page format 114 * @param format the page format
115 */ 115 */
116 public void convert(String code, int[] lineNumberArray, String fileName, String type, String title, PageFormat format) { 116 public void convert(String code, int[] lineNumberArray, String fileName, String type, String title, PageFormat format) {
117 FopFactory fopFactory = FopFactory.newInstance();
118 OutputStream out = null; 117 OutputStream out = null;
119 118
120 try { 119 try {
121 fopFactory.setUserConfig(new File(ScilabConstants.SCI + "/modules/helptools/etc/fopconf.xml")); 120 FopFactory fopFactory = FopFactory.newInstance(new File(ScilabConstants.SCI + "/modules/helptools/etc/fopconf.xml"));
122 FOUserAgent userAgent = fopFactory.newFOUserAgent(); 121 FOUserAgent userAgent = fopFactory.newFOUserAgent();
123 userAgent.setProducer(CREATOR); 122 userAgent.setProducer(CREATOR);
124 userAgent.setTitle(title); 123 userAgent.setTitle(title);
diff --git a/scilab/modules/spreadsheet/src/c/ripole/pldstr.c b/scilab/modules/spreadsheet/src/c/ripole/pldstr.c
index 7ba1467..0535c9c 100644
--- a/scilab/modules/spreadsheet/src/c/ripole/pldstr.c
+++ b/scilab/modules/spreadsheet/src/c/ripole/pldstr.c
@@ -334,7 +334,7 @@ char *PLD_strtok( struct PLD_strtok *st, char *line, char *delimeters )
334 334
335 result = st->start; 335 result = st->start;
336 336
337 if ((st->start) && (st->start != '\0')) 337 if ((st->start) && (*st->start != '\0'))
338 { 338 {
339 stop = strpbrk( st->start, delimeters ); /* locate our next delimeter */ 339 stop = strpbrk( st->start, delimeters ); /* locate our next delimeter */
340 340
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/Xcos.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/Xcos.java
index d067957..e845f76 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/Xcos.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/Xcos.java
@@ -70,6 +70,9 @@ import com.mxgraph.model.mxICell;
70import com.mxgraph.util.mxEvent; 70import com.mxgraph.util.mxEvent;
71import com.mxgraph.util.mxEventObject; 71import com.mxgraph.util.mxEventObject;
72import com.mxgraph.view.mxStylesheet; 72import com.mxgraph.view.mxStylesheet;
73import javax.swing.SwingWorker;
74import org.scilab.modules.graph.ScilabCanvas;
75import org.scilab.modules.xcos.graph.swing.GraphComponent;
73 76
74/** 77/**
75 * Xcos entry point class 78 * Xcos entry point class
@@ -114,6 +117,22 @@ public final class Xcos {
114 }); 117 });
115 118
116 XConfiguration.addXConfigurationListener(new XcosConfiguration()); 119 XConfiguration.addXConfigurationListener(new XcosConfiguration());
120
121 /*
122 * Load some classes in the background to avoid any lag on the first drag'n drop.
123 *
124 * This will setup the whole rendering stack by dummy rendering a block' style
125 */
126 (new SwingWorker<Void, Void>() {
127 @Override
128 protected Void doInBackground() throws Exception {
129 Map<String, Object> style = Xcos.getInstance().getStyleSheet().getCellStyle("CLOCK_c", new HashMap<>());
130 ScilabCanvas canvas = new GraphComponent(null).createCanvas();
131 canvas.paintSvgForegroundImage(1, 1, canvas.getImageForStyle(style));
132 return null;
133 }
134
135 }).execute();
117 } 136 }
118 137
119 /* 138 /*
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CompileAction.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CompileAction.java
index 8522c3c..240d65c 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CompileAction.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CompileAction.java
@@ -13,11 +13,23 @@
13 13
14package org.scilab.modules.xcos.actions; 14package org.scilab.modules.xcos.actions;
15 15
16import static org.scilab.modules.action_binding.highlevel.ScilabInterpreterManagement.asynchronousScilabExec;
17import static org.scilab.modules.action_binding.highlevel.ScilabInterpreterManagement.buildCall;
18
16import java.awt.event.ActionEvent; 19import java.awt.event.ActionEvent;
20import java.awt.event.ActionListener;
21import java.util.logging.Logger;
22
23import javax.swing.Timer;
17 24
25import org.scilab.modules.action_binding.highlevel.ScilabInterpreterManagement.InterpreterException;
18import org.scilab.modules.graph.ScilabComponent; 26import org.scilab.modules.graph.ScilabComponent;
19import org.scilab.modules.graph.ScilabGraph; 27import org.scilab.modules.graph.ScilabGraph;
28import org.scilab.modules.graph.actions.base.GraphActionManager;
29import org.scilab.modules.graph.actions.base.OneBlockDependantAction;
20import org.scilab.modules.gui.menuitem.MenuItem; 30import org.scilab.modules.gui.menuitem.MenuItem;
31import org.scilab.modules.xcos.JavaController;
32import org.scilab.modules.xcos.ObjectProperties;
21import org.scilab.modules.xcos.graph.XcosDiagram; 33import org.scilab.modules.xcos.graph.XcosDiagram;
22import org.scilab.modules.xcos.utils.XcosMessages; 34import org.scilab.modules.xcos.utils.XcosMessages;
23 35
@@ -25,7 +37,7 @@ import org.scilab.modules.xcos.utils.XcosMessages;
25 * Diagram compilation management 37 * Diagram compilation management
26 */ 38 */
27@SuppressWarnings(value = { "serial" }) 39@SuppressWarnings(value = { "serial" })
28public final class CompileAction extends SimulationNotRunningAction { 40public final class CompileAction extends OneBlockDependantAction {
29 /** Name of the action */ 41 /** Name of the action */
30 public static final String NAME = XcosMessages.COMPILE; 42 public static final String NAME = XcosMessages.COMPILE;
31 /** Icon name of the action */ 43 /** Icon name of the action */
@@ -35,6 +47,9 @@ public final class CompileAction extends SimulationNotRunningAction {
35 /** Accelerator key for the action */ 47 /** Accelerator key for the action */
36 public static final int ACCELERATOR_KEY = 0; 48 public static final int ACCELERATOR_KEY = 0;
37 49
50 private int counter;
51 private Timer displayTimer;
52
38 /** 53 /**
39 * Constructor 54 * Constructor
40 * 55 *
@@ -43,6 +58,14 @@ public final class CompileAction extends SimulationNotRunningAction {
43 */ 58 */
44 public CompileAction(ScilabGraph scilabGraph) { 59 public CompileAction(ScilabGraph scilabGraph) {
45 super(scilabGraph); 60 super(scilabGraph);
61 char[] msg = (XcosMessages.COMPILATION_IN_PROGRESS + XcosMessages.DOTS).toCharArray();
62 final int minimalMsgLen = XcosMessages.COMPILATION_IN_PROGRESS.length();
63
64 counter = 0;
65 displayTimer = new Timer(1000, e -> {
66 counter = (counter + 1) % (XcosMessages.DOTS.length() + 1);
67 ((XcosDiagram) scilabGraph).info(new String(msg, 0, minimalMsgLen + counter));
68 });
46 } 69 }
47 70
48 /** 71 /**
@@ -65,63 +88,78 @@ public final class CompileAction extends SimulationNotRunningAction {
65 public void actionPerformed(ActionEvent e) { 88 public void actionPerformed(ActionEvent e) {
66 final XcosDiagram graph = (XcosDiagram) getGraph(e); 89 final XcosDiagram graph = (XcosDiagram) getGraph(e);
67 90
68 // action disabled when the cell is edited 91 // Action disabled when the cell is edited
69 final ScilabComponent comp = ((ScilabComponent) graph.getAsComponent()); 92 final ScilabComponent comp = ((ScilabComponent) graph.getAsComponent());
70 if (comp.isEditing()) { 93 if (comp.isEditing()) {
71 return; 94 return;
72 } 95 }
73 96
74 graph.info(XcosMessages.EXPORT_IN_PROGRESS); 97 updateUI(true);
75 98 displayTimer.start();
76 // FIXME: implement the compilation 99
77 // final ScilabDirectHandler handler = ScilabDirectHandler.acquire(); 100 final String cmd = createCompilationCommand(graph);
78 // if (handler == null) { 101 final ActionListener action = new ActionListener() {
79 // return; 102 @Override
80 // } 103 public void actionPerformed(ActionEvent e) {
81 // (new SwingWorker<Void, Void>() { 104 displayTimer.stop();
82 // 105 updateUI(false);
83 // @Override 106 }
84 // protected Void doInBackground() { 107 };
85 // try { 108
86 // handler.writeDiagram(((XcosDiagram) getGraph(null))); 109 try {
87 // ((XcosDiagram) getGraph(null)).setReadOnly(true); 110 asynchronousScilabExec(action, cmd);
88 // } catch (Exception e) { 111 } catch (InterpreterException e1) {
89 // cancel(true); 112 final Logger log = Logger.getLogger(CompileAction.class.getName());
90 // } 113 log.warning(e1.getMessage());
91 // return null; 114 }
92 // } 115 }
93 // 116
94 // @Override 117 /**
95 // protected void done() { 118 * Create the command String
96 // if (isCancelled()) { 119 *
97 // graph.info(XcosMessages.EMPTY_INFO); 120 * @param diagram
98 // 121 * the working diagram
99 // handler.release(); 122 * @return the command string
100 // return; 123 */
101 // } 124 private String createCompilationCommand(final XcosDiagram diagram) {
102 // 125 String cmd;
103 // graph.info(XcosMessages.COMPILATION_IN_PROGRESS); 126 final StringBuilder command = new StringBuilder();
104 // String cmd = "cpr = xcos_compile(scs_m);"; 127
105 // 128 /*
106 // final ActionListener action = new ActionListener() { 129 * Log compilation info
107 // @Override 130 */
108 // public void actionPerformed(ActionEvent e) { 131 final Logger log = Logger.getLogger(CompileAction.class.getName());
109 // graph.setReadOnly(false); 132 log.finest("start compilation");
110 // graph.info(XcosMessages.EMPTY_INFO); 133
111 // 134 JavaController controller = new JavaController();
112 // handler.release(); 135 int[] debugLevel = new int[1];
113 // } 136 controller.getObjectProperty(diagram.getUID(), diagram.getKind(), ObjectProperties.DEBUG_LEVEL, debugLevel);
114 // }; 137 command.append(buildCall("scicos_debug", debugLevel[0])).append("; ");
115 // 138
116 // try { 139 /*
117 // ScilabInterpreterManagement.asynchronousScilabExec(action, cmd); 140 * Export the schema on `scs_m`
118 // } catch (InterpreterException e) { 141 */
119 // Logger.getLogger(CompileAction.class.getName()).severe(e.toString()); 142 command.append("scs_m = scicos_new(\"0x").append(Long.toHexString(diagram.getUID())).append("\"); ");
120 // 143 command.append("cpr = xcos_compile(scs_m); ");
121 // handler.release(); 144
122 // } 145 cmd = command.toString();
123 // } 146 return cmd;
124 // 147 }
125 // }).execute(); 148
149 /**
150 * Update the UI depending on the action selected or not
151 *
152 * @param started
153 * the started status
154 */
155 public void updateUI(boolean started) {
156 GraphActionManager.setEnable(StartAction.class, !started);
157 ((XcosDiagram) getGraph(null)).setReadOnly(started);
158
159 if (started) {
160 ((XcosDiagram) getGraph(null)).info(XcosMessages.COMPILATION_IN_PROGRESS);
161 } else {
162 ((XcosDiagram) getGraph(null)).info(XcosMessages.EMPTY_INFO);
163 }
126 } 164 }
127} 165}
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/XcosFileType.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/XcosFileType.java
index 1190102..156376e 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/XcosFileType.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/XcosFileType.java
@@ -15,7 +15,9 @@ package org.scilab.modules.xcos.io;
15 15
16import java.io.File; 16import java.io.File;
17import java.io.FileInputStream; 17import java.io.FileInputStream;
18import java.io.FileOutputStream;
18import java.io.IOException; 19import java.io.IOException;
20import java.io.OutputStream;
19import java.util.Arrays; 21import java.util.Arrays;
20import java.util.Collection; 22import java.util.Collection;
21import java.util.EnumSet; 23import java.util.EnumSet;
@@ -28,15 +30,8 @@ import javax.swing.filechooser.FileNameExtensionFilter;
28import javax.xml.parsers.ParserConfigurationException; 30import javax.xml.parsers.ParserConfigurationException;
29import javax.xml.stream.XMLOutputFactory; 31import javax.xml.stream.XMLOutputFactory;
30import javax.xml.stream.XMLStreamWriter; 32import javax.xml.stream.XMLStreamWriter;
31import javax.xml.transform.Transformer;
32import javax.xml.transform.TransformerConfigurationException;
33import javax.xml.transform.TransformerException; 33import javax.xml.transform.TransformerException;
34import javax.xml.transform.TransformerFactory;
35import javax.xml.transform.sax.SAXResult;
36import javax.xml.transform.stream.StreamResult;
37import javax.xml.transform.stream.StreamSource;
38 34
39import org.scilab.modules.commons.xml.ScilabTransformerFactory;
40import org.scilab.modules.commons.xml.ScilabXMLOutputFactory; 35import org.scilab.modules.commons.xml.ScilabXMLOutputFactory;
41import org.scilab.modules.xcos.JavaController; 36import org.scilab.modules.xcos.JavaController;
42import org.scilab.modules.xcos.View; 37import org.scilab.modules.xcos.View;
@@ -44,12 +39,14 @@ import org.scilab.modules.xcos.Xcos;
44import org.scilab.modules.xcos.graph.XcosDiagram; 39import org.scilab.modules.xcos.graph.XcosDiagram;
45import org.scilab.modules.xcos.graph.model.XcosCellFactory; 40import org.scilab.modules.xcos.graph.model.XcosCellFactory;
46import org.scilab.modules.xcos.io.sax.XcosSAXHandler; 41import org.scilab.modules.xcos.io.sax.XcosSAXHandler;
47import org.scilab.modules.xcos.io.spec.ContentEntry;
48import org.scilab.modules.xcos.io.spec.XcosPackage; 42import org.scilab.modules.xcos.io.spec.XcosPackage;
49import org.scilab.modules.xcos.io.writer.IndentingXMLStreamWriter; 43import org.scilab.modules.xcos.io.writer.IndentingXMLStreamWriter;
50import org.scilab.modules.xcos.io.writer.XcosWriter; 44import org.scilab.modules.xcos.io.writer.XcosWriter;
51import org.scilab.modules.xcos.utils.XcosMessages; 45import org.scilab.modules.xcos.utils.XcosMessages;
46import org.xml.sax.InputSource;
52import org.xml.sax.SAXException; 47import org.xml.sax.SAXException;
48import org.xml.sax.XMLReader;
49import org.xml.sax.helpers.XMLReaderFactory;
53 50
54/** 51/**
55 * All the filetype recognized by Xcos. 52 * All the filetype recognized by Xcos.
@@ -96,28 +93,25 @@ public enum XcosFileType {
96 XCOS("xcos", XcosMessages.FILE_XCOS) { 93 XCOS("xcos", XcosMessages.FILE_XCOS) {
97 @Override 94 @Override
98 public void load(String file, XcosDiagram into) 95 public void load(String file, XcosDiagram into)
99 throws TransformerException { 96 throws IOException {
100 View xcosView = JavaController.lookup_view(Xcos.class.getName()); 97 View xcosView = JavaController.lookup_view(Xcos.class.getName());
101 try { 98 try {
102 JavaController.unregister_view(xcosView); 99 JavaController.unregister_view(xcosView);
103 100
104 final TransformerFactory tranFactory = ScilabTransformerFactory.newInstance(); 101 XcosSAXHandler handler = new XcosSAXHandler(into, null);
105 final Transformer aTransformer = tranFactory.newTransformer(); 102 XMLReader reader = XMLReaderFactory.createXMLReader();
103 reader.setContentHandler(handler);
104 reader.setErrorHandler(handler);
106 105
107 final StreamSource src = new StreamSource(new File(file).toURI().toURL().toString()); 106 LOG.entering("XMLReader", "parse");
108 final SAXResult result = new SAXResult(new XcosSAXHandler(into, null)); 107 reader.parse(new InputSource(file));
109 108 LOG.exiting("XMLReader", "parse");
110 LOG.entering("Transformer", "transform"); 109 } catch (SAXException e) {
111 aTransformer.transform(src, result);
112 LOG.exiting("Transformer", "transform");
113
114 } catch (TransformerConfigurationException e) {
115 Logger.getLogger(ContentEntry.class.getName()).severe(e.getMessageAndLocation());
116 } catch (TransformerException e) {
117 e.printStackTrace(); 110 e.printStackTrace();
118 Logger.getLogger(ContentEntry.class.getName()).severe(e.getMessageAndLocation()); 111 throw new RuntimeException(e);
119 } catch (Exception e) { 112 } catch (Exception e) {
120 e.printStackTrace(); 113 e.printStackTrace();
114 throw e;
121 } finally { 115 } finally {
122 JavaController.register_view(Xcos.class.getName(), xcosView); 116 JavaController.register_view(Xcos.class.getName(), xcosView);
123 } 117 }
@@ -125,10 +119,10 @@ public enum XcosFileType {
125 119
126 @Override 120 @Override
127 public void save(String file, XcosDiagram from) throws Exception { 121 public void save(String file, XcosDiagram from) throws Exception {
128 final StreamResult result = new StreamResult(file); 122 final OutputStream result = new FileOutputStream(file);
129 123
130 final XMLOutputFactory factory = ScilabXMLOutputFactory.newInstance(); 124 final XMLOutputFactory factory = ScilabXMLOutputFactory.newInstance();
131 final XMLStreamWriter writer = factory.createXMLStreamWriter(result); 125 final XMLStreamWriter writer = factory.createXMLStreamWriter(result, "UTF-8");
132 try { 126 try {
133 LOG.entering("XMLStreamWriter", "write"); 127 LOG.entering("XMLStreamWriter", "write");
134 new XcosWriter(null, new IndentingXMLStreamWriter(writer)).write(from.getUID(), from.getKind()); 128 new XcosWriter(null, new IndentingXMLStreamWriter(writer)).write(from.getUID(), from.getKind());
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/JGraphXHandler.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/JGraphXHandler.java
index a8e6a92..06e58e6 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/JGraphXHandler.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/JGraphXHandler.java
@@ -20,6 +20,8 @@ import org.xml.sax.Attributes;
20 20
21import com.mxgraph.model.mxGeometry; 21import com.mxgraph.model.mxGeometry;
22import com.mxgraph.util.mxPoint; 22import com.mxgraph.util.mxPoint;
23import java.util.ArrayList;
24import org.scilab.modules.types.ScilabList;
23 25
24class JGraphXHandler implements ScilabHandler { 26class JGraphXHandler implements ScilabHandler {
25 27
@@ -72,12 +74,6 @@ class JGraphXHandler implements ScilabHandler {
72 return g; 74 return g;
73 } 75 }
74 case mxPoint: { 76 case mxPoint: {
75 // defensive programming
76 if (!(saxHandler.parents.peek() instanceof mxGeometry)) {
77 return null;
78 }
79 mxGeometry parent = (mxGeometry) saxHandler.parents.peek();
80
81 mxPoint p = new mxPoint(); 77 mxPoint p = new mxPoint();
82 78
83 v = atts.getValue("x"); 79 v = atts.getValue("x");
@@ -88,11 +84,18 @@ class JGraphXHandler implements ScilabHandler {
88 if (v != null) { 84 if (v != null) {
89 p.setY(Double.valueOf(v)); 85 p.setY(Double.valueOf(v));
90 } 86 }
91 v = atts.getValue("as"); 87
92 if ("sourcePoint".equals(v)) { 88 if (saxHandler.parents.peek() instanceof mxGeometry) {
93 parent.setSourcePoint(p); 89 mxGeometry parent = (mxGeometry) saxHandler.parents.peek();
94 } else if ("targetPoint".equals(v)) { 90 v = atts.getValue("as");
95 parent.setTargetPoint(p); 91 if ("sourcePoint".equals(v)) {
92 parent.setSourcePoint(p);
93 } else if ("targetPoint".equals(v)) {
94 parent.setTargetPoint(p);
95 }
96 } else if (saxHandler.parents.peek() instanceof RawDataHandler.RawDataDescriptor) {
97 RawDataHandler.RawDataDescriptor parent = (RawDataHandler.RawDataDescriptor) saxHandler.parents.peek();
98 ((ArrayList) parent.value).add(p);
96 } 99 }
97 return p; 100 return p;
98 } 101 }
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/RawDataHandler.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/RawDataHandler.java
index 163b009..a551638 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/RawDataHandler.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/RawDataHandler.java
@@ -162,8 +162,7 @@ class RawDataHandler implements ScilabHandler {
162 162
163 switch (fieldValue.as) { 163 switch (fieldValue.as) {
164 case DIAGRAM_CONTEXT: { 164 case DIAGRAM_CONTEXT: {
165 @SuppressWarnings("unchecked") 165 ArrayList container = ((ArrayList) fieldValue.value);
166 ArrayList<String> container = ((ArrayList<String>) fieldValue.value);
167 container.add(atts.getValue("value")); 166 container.add(atts.getValue("value"));
168 break; 167 break;
169 } 168 }
@@ -219,7 +218,7 @@ class RawDataHandler implements ScilabHandler {
219 v = atts.getValue("imaginaryPart"); 218 v = atts.getValue("imaginaryPart");
220 if (v != null) { 219 if (v != null) {
221 // allocate the imaginary part on demand 220 // allocate the imaginary part on demand
222 if (imaginaryPartData == null) { 221 if (localScilabValue.isReal()) {
223 imaginaryPartData = new double[localScilabValue.getHeight()][localScilabValue.getWidth()]; 222 imaginaryPartData = new double[localScilabValue.getHeight()][localScilabValue.getWidth()];
224 localScilabValue.setImaginaryPart(imaginaryPartData); 223 localScilabValue.setImaginaryPart(imaginaryPartData);
225 } 224 }
@@ -347,7 +346,7 @@ class RawDataHandler implements ScilabHandler {
347 } else if ("ScilabList".equals(scilabClass)) { 346 } else if ("ScilabList".equals(scilabClass)) {
348 container = new ScilabList(); 347 container = new ScilabList();
349 } else { 348 } else {
350 container = new ArrayList<>(); 349 container = new ScilabList();
351 } 350 }
352 break; 351 break;
353 } 352 }
@@ -405,10 +404,10 @@ class RawDataHandler implements ScilabHandler {
405 ScicosObjectOwner diagram = (ScicosObjectOwner) parent; 404 ScicosObjectOwner diagram = (ScicosObjectOwner) parent;
406 405
407 @SuppressWarnings("unchecked") 406 @SuppressWarnings("unchecked")
408 ArrayList<String> value = (ArrayList<String>) fieldValue.value; 407 ArrayList value = (ArrayList) fieldValue.value;
409 VectorOfString ctx = new VectorOfString(value.size()); 408 VectorOfString ctx = new VectorOfString(value.size());
410 for (int i = 0; i < value.size(); i++) { 409 for (int i = 0; i < value.size(); i++) {
411 ctx.set(i, value.get(i)); 410 ctx.set(i, (String) value.get(i));
412 } 411 }
413 saxHandler.controller.setObjectProperty(diagram.getUID(), diagram.getKind(), ObjectProperties.DIAGRAM_CONTEXT, ctx); 412 saxHandler.controller.setObjectProperty(diagram.getUID(), diagram.getKind(), ObjectProperties.DIAGRAM_CONTEXT, ctx);
414 break; 413 break;
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/XcosSAXHandler.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/XcosSAXHandler.java
index 549b040..82655c2 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/XcosSAXHandler.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/sax/XcosSAXHandler.java
@@ -137,8 +137,14 @@ public class XcosSAXHandler extends DefaultHandler {
137 if (LOG.isLoggable(Level.FINEST)) { 137 if (LOG.isLoggable(Level.FINEST)) {
138 char[] indent = new char[parents.size()]; 138 char[] indent = new char[parents.size()];
139 Arrays.fill(indent, ' '); 139 Arrays.fill(indent, ' ');
140 // System.err.println(new String(indent) + localName + " id=\"" + atts.getValue("id") + "\""); 140 StringBuilder args = new StringBuilder();
141 LOG.finest(new String(indent) + localName + " id=\"" + atts.getValue("id") + "\""); 141 if (atts.getValue("id") != null) {
142 args.append(" id=\"").append(atts.getValue("id")).append("\"");
143 } else if (atts.getValue("as") != null) {
144 args.append(" as=\"").append(atts.getValue("as")).append("\"");
145 }
146 // System.err.println(new StringBuilder().append(indent).append(localName).append(args).toString());
147 LOG.finest(new StringBuilder().append(indent).append(localName).append(args).toString());
142 } 148 }
143 149
144 HandledElement found = elementMap.get(localName); 150 HandledElement found = elementMap.get(localName);
@@ -199,4 +205,26 @@ public class XcosSAXHandler extends DefaultHandler {
199 205
200 controller.setObjectProperty(parentUID, parentKind, ObjectProperties.CHILDREN, children); 206 controller.setObjectProperty(parentUID, parentKind, ObjectProperties.CHILDREN, children);
201 } 207 }
208
209 /*
210 * Implement ErrorHandler methods
211 */
212
213 @Override
214 public void warning(SAXParseException e) throws SAXException {
215 System.err.println("XcosSAXHandler warning: " + e.getSystemId() + " at line " + e.getLineNumber() + " column " + e.getColumnNumber());
216 System.err.println(e.getMessage());
217 }
218
219 @Override
220 public void error(SAXParseException e) throws SAXException {
221 System.err.println("XcosSAXHandler warning: " + e.getSystemId() + " at line " + e.getLineNumber() + " column " + e.getColumnNumber());
222 System.err.println(e.getMessage());
223 }
224
225 @Override
226 public void fatalError(SAXParseException e) throws SAXException {
227 System.err.println("XcosSAXHandler warning: " + e.getSystemId() + " at line " + e.getLineNumber() + " column " + e.getColumnNumber());
228 System.err.println(e.getMessage());
229 }
202} 230}
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/spec/ContentEntry.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/spec/ContentEntry.java
index 74fbbfc..4c4301f 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/spec/ContentEntry.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/io/spec/ContentEntry.java
@@ -20,6 +20,7 @@ import java.util.zip.ZipOutputStream;
20 20
21import javax.xml.stream.XMLOutputFactory; 21import javax.xml.stream.XMLOutputFactory;
22import javax.xml.stream.XMLStreamException; 22import javax.xml.stream.XMLStreamException;
23import javax.xml.stream.XMLStreamReader;
23import javax.xml.stream.XMLStreamWriter; 24import javax.xml.stream.XMLStreamWriter;
24import javax.xml.transform.Transformer; 25import javax.xml.transform.Transformer;
25import javax.xml.transform.TransformerConfigurationException; 26import javax.xml.transform.TransformerConfigurationException;
@@ -35,6 +36,10 @@ import org.scilab.modules.xcos.graph.XcosDiagram;
35import org.scilab.modules.xcos.io.sax.XcosSAXHandler; 36import org.scilab.modules.xcos.io.sax.XcosSAXHandler;
36import org.scilab.modules.xcos.io.writer.XcosWriter; 37import org.scilab.modules.xcos.io.writer.XcosWriter;
37import org.w3c.dom.Element; 38import org.w3c.dom.Element;
39import org.xml.sax.InputSource;
40import org.xml.sax.SAXException;
41import org.xml.sax.XMLReader;
42import org.xml.sax.helpers.XMLReaderFactory;
38 43
39public class ContentEntry implements Entry { 44public class ContentEntry implements Entry {
40 private static final Logger LOG = Logger.getLogger(ContentEntry.class.getName()); 45 private static final Logger LOG = Logger.getLogger(ContentEntry.class.getName());
@@ -61,23 +66,20 @@ public class ContentEntry implements Entry {
61 @Override 66 @Override
62 public void load(ZipEntry entry, InputStream stream) throws IOException { 67 public void load(ZipEntry entry, InputStream stream) throws IOException {
63 try { 68 try {
64 final TransformerFactory tranFactory = ScilabTransformerFactory.newInstance(); 69 XcosSAXHandler handler = new XcosSAXHandler(content, pack.getDictionary());
65 final Transformer aTransformer = tranFactory.newTransformer(); 70 XMLReader reader = XMLReaderFactory.createXMLReader();
66 71 reader.setContentHandler(handler);
67 final StreamSource src = new StreamSource(stream); 72 reader.setErrorHandler(handler);
68 final SAXResult result = new SAXResult(new XcosSAXHandler(content, pack.getDictionary())); 73
69 74 LOG.entering("XMLReader", "parse");
70 LOG.entering("Transformer", "transform"); 75 reader.parse(new InputSource(stream));
71 aTransformer.transform(src, result); 76 LOG.exiting("XMLReader", "parse");
72 LOG.exiting("Transformer", "transform"); 77 } catch (SAXException e) {
73
74 } catch (TransformerConfigurationException e) {
75 Logger.getLogger(ContentEntry.class.getName()).severe(e.getMessageAndLocation());
76 } catch (TransformerException e) {
77 e.printStackTrace(); 78 e.printStackTrace();
78 Logger.getLogger(ContentEntry.class.getName()).severe(e.getMessageAndLocation()); 79 throw new RuntimeException(e);
79 } catch (Exception e) { 80 } catch (Exception e) {
80 e.printStackTrace(); 81 e.printStackTrace();
82 throw e;
81 } 83 }
82 } 84 }
83 85
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/utils/XcosDelegates.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/utils/XcosDelegates.java
index 6220bb9..df186f3 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/utils/XcosDelegates.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/utils/XcosDelegates.java
@@ -53,13 +53,9 @@ public class XcosDelegates {
53 diag.installListeners(); 53 diag.installListeners();
54 54
55 final XcosFileType filetype = XcosFileType.findFileType(xcosFile); 55 final XcosFileType filetype = XcosFileType.findFileType(xcosFile);
56 // FIXME load file 56 filetype.load(xcosFile, diag);
57 // filetype.load(xcosFile, diag); 57 final mxGraphComponent graphComponent = diag.getAsComponent();
58 // 58 final BufferedImage image = mxCellRenderer.createBufferedImage(diag, null, 1, null, graphComponent.isAntiAlias(), null, graphComponent.getCanvas());
59 // final mxGraphComponent graphComponent = diag.getAsComponent();
60 //
61 // final BufferedImage image = mxCellRenderer.createBufferedImage(diag, null, 1, null, graphComponent.isAntiAlias(), null, graphComponent.getCanvas());
62 final BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
63 ImageIO.write(image, "png", imageFile); 59 ImageIO.write(image, "png", imageFile);
64 60
65 controller.deleteObject(diag.getUID()); 61 controller.deleteObject(diag.getUID());
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/utils/XcosMessages.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/utils/XcosMessages.java
index b13c356..8143edd 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/utils/XcosMessages.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/utils/XcosMessages.java
@@ -177,7 +177,6 @@ public final class XcosMessages {
177 public static final String NO_BLOCK_SELECTED = Messages.gettext("No block selected"); 177 public static final String NO_BLOCK_SELECTED = Messages.gettext("No block selected");
178 178
179 public static final String EXPORT_TO_XML = Messages.gettext("Export to XML") + DOTS; 179 public static final String EXPORT_TO_XML = Messages.gettext("Export to XML") + DOTS;
180 public static final String EXPORT_IN_PROGRESS = Messages.gettext("Export in progress") + DOTS;
181 public static final String IMPORT_FROM_XML = Messages.gettext("Import from XML") + DOTS; 180 public static final String IMPORT_FROM_XML = Messages.gettext("Import from XML") + DOTS;
182 181
183 public static final String ADDTO = Messages.gettext("Add to"); 182 public static final String ADDTO = Messages.gettext("Add to");
@@ -236,8 +235,7 @@ public final class XcosMessages {
236 public static final String GENERATING_C_CODE = Messages.gettext("Generating C Code for SuperBlock") + DOTS; 235 public static final String GENERATING_C_CODE = Messages.gettext("Generating C Code for SuperBlock") + DOTS;
237 public static final String ERROR_GENERATING_C_CODE = Messages.gettext("A SuperBlock must be selected to generate code"); 236 public static final String ERROR_GENERATING_C_CODE = Messages.gettext("A SuperBlock must be selected to generate code");
238 public static final String SIMULATION_IN_PROGRESS = Messages.gettext("Simulation in progress"); 237 public static final String SIMULATION_IN_PROGRESS = Messages.gettext("Simulation in progress");
239 public static final String COMPILATION_IN_PROGRESS = Messages.gettext("Compilation in progress, results will be stored in the \'scicos_cpr\' variable") 238 public static final String COMPILATION_IN_PROGRESS = Messages.gettext("Compilation in progress, results will be stored in the \'cpr\' variable");
240 + DOTS;
241 public static final String GENERATE_SUPERBLOCK = Messages.gettext("Generate SuperBlock, please wait") + DOTS; 239 public static final String GENERATE_SUPERBLOCK = Messages.gettext("Generate SuperBlock, please wait") + DOTS;
242 public static final String DRAW_LINK = Messages.gettext("Click on diagram to add link point or on a compatible target to finish"); 240 public static final String DRAW_LINK = Messages.gettext("Click on diagram to add link point or on a compatible target to finish");
243 241
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/XcosTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/XcosTest.java
index cdaa0fe..dc7969b 100644
--- a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/XcosTest.java
+++ b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/XcosTest.java
@@ -14,6 +14,7 @@ package org.scilab.tests.modules.xcos;
14 14
15import static org.junit.Assert.assertTrue; 15import static org.junit.Assert.assertTrue;
16 16
17import org.junit.Before;
17import org.junit.Test; 18import org.junit.Test;
18import org.scilab.modules.xcos.Xcos; 19import org.scilab.modules.xcos.Xcos;
19 20
@@ -22,12 +23,17 @@ import org.scilab.modules.xcos.Xcos;
22 */ 23 */
23public class XcosTest { 24public class XcosTest {
24 25
26 @Before
27 public void loadLibrary() {
28 System.loadLibrary("scilab");
29 }
30
25 /** 31 /**
26 * Be careful when modifying the tradename and version. 32 * Be careful when modifying the tradename and version.
27 */ 33 */
28 @Test 34 @Test
29 public void checkVersion() { 35 public void checkVersion() {
30 assertTrue(Xcos.TRADENAME.compareTo("Xcos") == 0); 36 assertTrue(Xcos.TRADENAME.compareTo("Xcos") == 0);
31 assertTrue(Xcos.VERSION.compareTo("1.0") == 0); 37 assertTrue(Xcos.VERSION.compareTo("2.0") == 0);
32 } 38 }
33} 39}
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/block/SortPortsTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/block/SortPortsTest.java
deleted file mode 100644
index 5cb1b23..0000000
--- a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/block/SortPortsTest.java
+++ /dev/null
@@ -1,167 +0,0 @@
1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2012 - Scilab Enterprises - Clement DAVID
4 *
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
10 *
11 */
12
13package org.scilab.tests.modules.xcos.block;
14
15import java.util.ArrayList;
16import java.util.Collections;
17import java.util.List;
18
19import org.junit.Assert;
20import org.junit.Test;
21import org.scilab.modules.xcos.block.BasicBlock;
22import org.scilab.modules.xcos.port.BasicPort;
23import org.scilab.modules.xcos.port.command.CommandPort;
24import org.scilab.modules.xcos.port.control.ControlPort;
25import org.scilab.modules.xcos.port.input.ExplicitInputPort;
26import org.scilab.modules.xcos.port.input.ImplicitInputPort;
27import org.scilab.modules.xcos.port.input.InputPort;
28import org.scilab.modules.xcos.port.output.ExplicitOutputPort;
29import org.scilab.modules.xcos.port.output.ImplicitOutputPort;
30import org.scilab.modules.xcos.port.output.OutputPort;
31
32public class SortPortsTest {
33
34 @Test
35 public void checkEmpty() {
36 final ArrayList<Object> children = new ArrayList<Object>();
37 BasicBlock.sort(children);
38
39 Assert.assertEquals(children, Collections.EMPTY_LIST);
40 assertRightOrder(children);
41 }
42
43 @Test
44 public void checkAlone() {
45 checkSingleInstance(new ExplicitInputPort());
46 checkSingleInstance(new ExplicitOutputPort());
47 checkSingleInstance(new ControlPort());
48 checkSingleInstance(new CommandPort());
49 }
50
51 private void checkSingleInstance(Object instance) {
52 final ArrayList<Object> children = new ArrayList<Object>();
53 children.add(instance);
54
55 BasicBlock.sort(children);
56
57 Assert.assertEquals(children, Collections.singletonList(instance));
58 assertRightOrder(children);
59 }
60
61 @Test
62 public void checkMulti() throws InstantiationException, IllegalAccessException {
63 checkMultiInstance(ExplicitInputPort.class);
64 checkMultiInstance(ExplicitOutputPort.class);
65 checkMultiInstance(ControlPort.class);
66 checkMultiInstance(CommandPort.class);
67
68 }
69
70 private void checkMultiInstance(final Class <? extends BasicPort > klass) throws InstantiationException, IllegalAccessException {
71 final ArrayList<Object> children = new ArrayList<Object>();
72
73 final int size = (int) Math.random() * 10;
74 for (int i = 0; i < size; i++) {
75 children.add(klass.newInstance());
76 }
77
78 final ArrayList<Object> sorted = new ArrayList<Object>(children);
79 BasicBlock.sort(sorted);
80
81 Assert.assertEquals(children, sorted);
82 assertRightOrder(sorted);
83 }
84
85 @Test
86 public void sortPortsTwice() {
87 final ArrayList<Object> children = new ArrayList<Object>();
88 fillRandomly(children);
89
90 final ArrayList<Object> sorted = new ArrayList<Object>(children);
91 BasicBlock.sort(sorted);
92 assertRightOrder(sorted);
93
94 final ArrayList<Object> sortedTwice = new ArrayList<Object>(sorted);
95 BasicBlock.sort(sortedTwice);
96
97 Assert.assertEquals(sorted, sortedTwice);
98 }
99
100 private void fillRandomly(final List<Object> children) {
101 final int size = (int) (Math.random() * 10) + 3;
102
103 for (int i = 0; i < size; i++) {
104 final int type = (int) (Math.random() * 6);
105
106 final BasicPort p;
107 switch (type) {
108 case 0:
109 p = new ExplicitInputPort();
110 break;
111 case 1:
112 p = new ImplicitInputPort();
113 break;
114 case 2:
115 p = new ExplicitOutputPort();
116 break;
117 case 3:
118 p = new ImplicitOutputPort();
119 break;
120 case 4:
121 p = new ControlPort();
122 break;
123 case 5:
124 p = new CommandPort();
125 break;
126 default:
127 p = null;
128 break;
129 }
130
131 children.add(p);
132 }
133 }
134
135 private void assertRightOrder(final List<Object> children) {
136 int typeIndex = 0;
137
138 for (Object object : children) {
139 switch (typeIndex) {
140 case 0:
141 if (object instanceof InputPort) {
142 break;
143 }
144 typeIndex++;
145 case 1:
146 if (object instanceof OutputPort) {
147 break;
148 }
149 typeIndex++;
150 case 2:
151 if (object instanceof ControlPort) {
152 break;
153 }
154 typeIndex++;
155 case 3:
156 if (object instanceof CommandPort) {
157 break;
158 }
159 typeIndex++;
160
161 default:
162 Assert.fail("children is not ordered");
163 break;
164 }
165 }
166 }
167}
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/DiagramComparatorTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/DiagramComparatorTest.java
index 18a7031..66bf773 100644
--- a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/DiagramComparatorTest.java
+++ b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/DiagramComparatorTest.java
@@ -20,17 +20,21 @@ import java.util.PriorityQueue;
20 20
21import org.junit.Before; 21import org.junit.Before;
22import org.junit.Test; 22import org.junit.Test;
23import org.scilab.modules.xcos.JavaController;
24import org.scilab.modules.xcos.Kind;
25import org.scilab.modules.xcos.ObjectProperties;
23import org.scilab.modules.xcos.Xcos; 26import org.scilab.modules.xcos.Xcos;
24import org.scilab.modules.xcos.block.SuperBlock; 27import org.scilab.modules.xcos.block.SuperBlock;
25import org.scilab.modules.xcos.graph.DiagramComparator; 28import org.scilab.modules.xcos.graph.DiagramComparator;
26import org.scilab.modules.xcos.graph.SuperBlockDiagram;
27import org.scilab.modules.xcos.graph.XcosDiagram; 29import org.scilab.modules.xcos.graph.XcosDiagram;
28 30
29public class DiagramComparatorTest { 31public class DiagramComparatorTest {
32 private JavaController controller;
30 33
31 @Before 34 @Before
32 public void loadLibrary() { 35 public void loadLibrary() {
33 System.loadLibrary("scilab"); 36 System.loadLibrary("scilab");
37 controller = new JavaController();
34 } 38 }
35 39
36 @Test 40 @Test
@@ -39,14 +43,14 @@ public class DiagramComparatorTest {
39 return; 43 return;
40 } 44 }
41 45
42 final PriorityQueue<XcosDiagram> sorted = new PriorityQueue<XcosDiagram>(1, DiagramComparator.getInstance()); 46 final PriorityQueue<XcosDiagram> sorted = new PriorityQueue<XcosDiagram>(1, new DiagramComparator());
43 final ArrayList<XcosDiagram> testVector = new ArrayList<XcosDiagram>(); 47 final ArrayList<XcosDiagram> testVector = new ArrayList<XcosDiagram>();
44 48
45 /* 49 /*
46 * Init test vector 50 * Init test vector
47 */ 51 */
48 for (int i = 0; i < 20; i++) { 52 for (int i = 0; i < 20; i++) {
49 testVector.add(new XcosDiagram()); 53 testVector.add(new XcosDiagram(controller.createObject(Kind.DIAGRAM), Kind.DIAGRAM));
50 } 54 }
51 55
52 /* 56 /*
@@ -72,14 +76,15 @@ public class DiagramComparatorTest {
72 return; 76 return;
73 } 77 }
74 78
75 final PriorityQueue<XcosDiagram> sorted = new PriorityQueue<XcosDiagram>(1, DiagramComparator.getInstance()); 79 final PriorityQueue<XcosDiagram> sorted = new PriorityQueue<XcosDiagram>(1, new DiagramComparator());
76 final ArrayList<XcosDiagram> testVector = new ArrayList<XcosDiagram>(); 80 final ArrayList<XcosDiagram> testVector = new ArrayList<XcosDiagram>();
77 81
78 /* 82 /*
79 * Init test vector 83 * Init test vector
80 */ 84 */
81 for (int i = 0; i < 20; i++) { 85 for (int i = 0; i < 20; i++) {
82 testVector.add(new SuperBlockDiagram()); 86 SuperBlock blk = new SuperBlock(controller.createObject(Kind.BLOCK));
87 testVector.add(new XcosDiagram(blk.getUID(), blk.getKind()));
83 } 88 }
84 89
85 /* 90 /*
@@ -109,27 +114,25 @@ public class DiagramComparatorTest {
109 /* 114 /*
110 * Init test vector 115 * Init test vector
111 */ 116 */
112 XcosDiagram root1 = new XcosDiagram(); 117 XcosDiagram root1 = new XcosDiagram(controller.createObject(Kind.DIAGRAM), Kind.DIAGRAM);
113 root1.installListeners(); 118 root1.installListeners();
114 XcosDiagram root2 = new XcosDiagram(); 119 XcosDiagram root2 = new XcosDiagram(controller.createObject(Kind.DIAGRAM), Kind.DIAGRAM);
115 root2.installListeners(); 120 root2.installListeners();
116 121
117 /* 122 /*
118 * First child 123 * First child
119 */ 124 */
120 SuperBlock r1b1 = new SuperBlock(); 125 SuperBlock r1b1 = new SuperBlock(controller.createObject(Kind.BLOCK));
121 root1.addCell(r1b1); 126 root1.addCell(r1b1);
122 127
123 SuperBlockDiagram r1diag1 = new SuperBlockDiagram(r1b1); 128 XcosDiagram r1diag1 = new XcosDiagram(r1b1.getUID(), r1b1.getKind());
124 r1diag1.installListeners(); 129 r1diag1.installListeners();
125 r1diag1.installSuperBlockListeners();
126 130
127 SuperBlock r1diag1b1 = new SuperBlock(); 131 SuperBlock r1diag1b1 = new SuperBlock(controller.createObject(Kind.BLOCK));
128 r1diag1.addCell(r1diag1b1); 132 r1diag1.addCell(r1diag1b1);
129 133
130 SuperBlockDiagram r1diag1b1diag1 = new SuperBlockDiagram(r1diag1b1); 134 XcosDiagram r1diag1b1diag1 = new XcosDiagram(r1diag1b1.getUID(), r1diag1b1.getKind());
131 r1diag1b1diag1.installListeners(); 135 r1diag1b1diag1.installListeners();
132 r1diag1b1diag1.installSuperBlockListeners();
133 136
134 /* 137 /*
135 * test vector 138 * test vector
@@ -164,9 +167,16 @@ public class DiagramComparatorTest {
164 for (XcosDiagram d : diags) { 167 for (XcosDiagram d : diags) {
165 int currentDepth = 0; 168 int currentDepth = 0;
166 169
167 while (d instanceof SuperBlockDiagram) { 170 long uid = d.getUID();
171 Kind kind = d.getKind();
172 while (kind == Kind.BLOCK) {
168 currentDepth++; 173 currentDepth++;
169 d = ((SuperBlockDiagram) d).getContainer().getParentDiagram(); 174
175 long[] refUID = new long[1];
176 controller.getObjectProperty(uid, kind, ObjectProperties.PARENT_BLOCK, refUID);
177
178 uid = refUID[0];
179 kind = controller.getKind(refUID[0]);
170 } 180 }
171 181
172 assert currentDepth >= depth; 182 assert currentDepth >= depth;
@@ -186,40 +196,36 @@ public class DiagramComparatorTest {
186 /* 196 /*
187 * Init test vector 197 * Init test vector
188 */ 198 */
189 XcosDiagram root1 = new XcosDiagram(); 199 XcosDiagram root1 = new XcosDiagram(controller.createObject(Kind.DIAGRAM), Kind.DIAGRAM);
190 root1.installListeners(); 200 root1.installListeners();
191 XcosDiagram root2 = new XcosDiagram(); 201 XcosDiagram root2 = new XcosDiagram(controller.createObject(Kind.DIAGRAM), Kind.DIAGRAM);
192 root2.installListeners(); 202 root2.installListeners();
193 203
194 /* 204 /*
195 * First child 205 * First child
196 */ 206 */
197 SuperBlock r1b1 = new SuperBlock(); 207 SuperBlock r1b1 = new SuperBlock(controller.createObject(Kind.BLOCK));
198 root1.addCell(r1b1); 208 root1.addCell(r1b1);
199 SuperBlock r2b1 = new SuperBlock(); 209 SuperBlock r2b1 = new SuperBlock(controller.createObject(Kind.BLOCK));
200 root1.addCell(r2b1); 210 root1.addCell(r2b1);
201 211
202 SuperBlockDiagram r1diag1 = new SuperBlockDiagram(r1b1); 212 XcosDiagram r1diag1 = new XcosDiagram(r1b1.getUID(), r1b1.getKind());
203 r1diag1.installListeners(); 213 r1diag1.installListeners();
204 r1diag1.installSuperBlockListeners(); 214 XcosDiagram r2diag1 = new XcosDiagram(r2b1.getUID(), r2b1.getKind());
205 SuperBlockDiagram r2diag1 = new SuperBlockDiagram(r2b1);
206 r2diag1.installListeners(); 215 r2diag1.installListeners();
207 r2diag1.installSuperBlockListeners();
208 216
209 /* 217 /*
210 * Second child 218 * Second child
211 */ 219 */
212 SuperBlock r1b2 = new SuperBlock(); 220 SuperBlock r1b2 = new SuperBlock(controller.createObject(Kind.BLOCK));
213 root1.addCell(r1b2); 221 root1.addCell(r1b2);
214 SuperBlock r2b2 = new SuperBlock(); 222 SuperBlock r2b2 = new SuperBlock(controller.createObject(Kind.BLOCK));
215 root1.addCell(r2b2); 223 root1.addCell(r2b2);
216 224
217 SuperBlockDiagram r1diag2 = new SuperBlockDiagram(r1b2); 225 XcosDiagram r1diag2 = new XcosDiagram(r1b2.getUID(), r1b2.getKind());
218 r1diag2.installListeners(); 226 r1diag2.installListeners();
219 r1diag2.installSuperBlockListeners(); 227 XcosDiagram r2diag2 = new XcosDiagram(r2b2.getUID(), r2b2.getKind());
220 SuperBlockDiagram r2diag2 = new SuperBlockDiagram(r2b2);
221 r2diag2.installListeners(); 228 r2diag2.installListeners();
222 r2diag2.installSuperBlockListeners();
223 229
224 /* 230 /*
225 * test vector 231 * test vector
@@ -265,7 +271,7 @@ public class DiagramComparatorTest {
265 271
266 while (it.hasNext()) { 272 while (it.hasNext()) {
267 XcosDiagram diag = it.next(); 273 XcosDiagram diag = it.next();
268 assert diag instanceof SuperBlockDiagram; 274 assert diag.getKind() == Kind.BLOCK;
269 } 275 }
270 } 276 }
271 277
@@ -281,28 +287,26 @@ public class DiagramComparatorTest {
281 /* 287 /*
282 * Init test vector 288 * Init test vector
283 */ 289 */
284 XcosDiagram root = new XcosDiagram(); 290 XcosDiagram root = new XcosDiagram(controller.createObject(Kind.DIAGRAM), Kind.DIAGRAM);
285 root.installListeners(); 291 root.installListeners();
286 292
287 /* 293 /*
288 * First child 294 * First child
289 */ 295 */
290 SuperBlock b1 = new SuperBlock(); 296 SuperBlock b1 = new SuperBlock(controller.createObject(Kind.BLOCK));
291 root.addCell(b1); 297 root.addCell(b1);
292 298
293 SuperBlockDiagram diag1 = new SuperBlockDiagram(b1); 299 XcosDiagram diag1 = new XcosDiagram(b1.getUID(), b1.getKind());
294 diag1.installListeners(); 300 diag1.installListeners();
295 diag1.installSuperBlockListeners();
296 301
297 /* 302 /*
298 * Second child 303 * Second child
299 */ 304 */
300 SuperBlock b2 = new SuperBlock(); 305 SuperBlock b2 = new SuperBlock(controller.createObject(Kind.BLOCK));
301 root.addCell(b2); 306 root.addCell(b2);
302 307
303 SuperBlockDiagram diag2 = new SuperBlockDiagram(b2); 308 XcosDiagram diag2 = new XcosDiagram(b2.getUID(), b2.getKind());
304 diag2.installListeners(); 309 diag2.installListeners();
305 diag2.installSuperBlockListeners();
306 310
307 /* 311 /*
308 * test vector 312 * test vector
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/ScicosParametersTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/ScicosParametersTest.java
deleted file mode 100644
index ac1fdf6..0000000
--- a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/ScicosParametersTest.java
+++ /dev/null
@@ -1,336 +0,0 @@
1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2010 - DIGITEO - Clement DAVID
4 *
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
10 *
11 */
12
13package org.scilab.tests.modules.xcos.graph;
14
15import java.awt.GraphicsEnvironment;
16import java.beans.PropertyChangeEvent;
17import java.beans.PropertyChangeListener;
18import java.beans.PropertyVetoException;
19import java.beans.VetoableChangeListener;
20import java.lang.reflect.Array;
21import java.lang.reflect.Field;
22import java.lang.reflect.InvocationTargetException;
23import java.lang.reflect.Method;
24import java.lang.reflect.Modifier;
25import java.util.ArrayList;
26import java.util.List;
27
28import org.junit.Before;
29import org.junit.Test;
30import org.scilab.modules.xcos.graph.ScicosParameters;
31
32/**
33 * Test the behavior of the {@link ScicosParameters} class.
34 *
35 * We are checking the class behavior by using introspection.
36 */
37public class ScicosParametersTest {
38 private static final String[] FIELDS;
39 private static final Field[] DEFAULT_VALUES;
40 private static final Method[] GETTERS;
41 private static final Method[] SETTERS;
42
43 @Before
44 public void loadLibrary() {
45 System.loadLibrary("scilab");
46 }
47
48 /**
49 * Initialize FIELDS, GETTERS and SETTERS and DEFAULT_VALUES.
50 */
51 static {
52 ArrayList<String> fields = new ArrayList<String>();
53 ArrayList<Method> setters = new ArrayList<Method>();
54 ArrayList<Method> getters = new ArrayList<Method>();
55 ArrayList<Field> default_values = new ArrayList<Field>();
56 /*
57 * First pass for getting SETTERS and FIELDS
58 */
59 for (Method m : ScicosParameters.class.getMethods()) {
60 if (m.getName().startsWith("set")) {
61 char[] field = m.getName().replaceFirst("set", "").toCharArray();
62 char firstChar = field[0];
63 field[0] = Character.toLowerCase(firstChar);
64
65 fields.add(new String(field));
66 setters.add(m);
67 }
68 }
69
70 /*
71 * Second pass for getting GETTERS and DEFAULT_VALUES
72 */
73 for (String f : fields) {
74 /*
75 * Getters
76 */
77 StringBuilder getter = new StringBuilder(f);
78 char firstChar = f.charAt(0);
79 getter.delete(0, 1);
80 getter.insert(0, Character.toUpperCase(firstChar));
81 getter.insert(0, "get");
82 String name = getter.toString();
83
84 for (Method m : ScicosParameters.class.getMethods()) {
85 if (m.getName().equals(name)) {
86 getters.add(m);
87 break;
88 }
89 }
90
91 /*
92 * Default values
93 */
94 StringBuilder constant = new StringBuilder(f);
95 for (int i = 0; i < constant.length(); i++) {
96 char c = constant.charAt(i);
97 if (Character.isUpperCase(c)) {
98 constant.insert(i, "_");
99 i++;
100 }
101 }
102 String field = constant.toString().toUpperCase();
103 try {
104 Field defaultValue = ScicosParameters.class.getDeclaredField(field);
105 default_values.add(defaultValue);
106 } catch (SecurityException e) {
107 throw new IllegalAccessError(e.toString());
108 } catch (NoSuchFieldException e) {
109 throw new IllegalAccessError(e.toString());
110 }
111 }
112
113 FIELDS = fields.toArray(new String[fields.size()]);
114 SETTERS = setters.toArray(new Method[setters.size()]);
115 GETTERS = getters.toArray(new Method[getters.size()]);
116 DEFAULT_VALUES = default_values.toArray(new Field[default_values.size()]);
117 }
118
119 @Test
120 public void checkNumberOfField() {
121 assert FIELDS.length == SETTERS.length;
122 assert FIELDS.length == GETTERS.length;
123 assert FIELDS.length == DEFAULT_VALUES.length;
124 }
125
126 @Test
127 public void checkInitValues() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
128 if (GraphicsEnvironment.isHeadless()) {
129 return;
130 }
131
132 ScicosParameters obj = new ScicosParameters();
133
134 for (int i = 0; i < DEFAULT_VALUES.length; i++) {
135 Field f = DEFAULT_VALUES[i];
136 Method m = GETTERS[i];
137
138 final Object result = m.invoke(obj, (Object[]) null);
139 final Object reference = f.get(null);
140 assert result.equals(reference);
141 }
142 }
143
144 @Test
145 public void checkBeansNamedProperties() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
146 if (GraphicsEnvironment.isHeadless()) {
147 return;
148 }
149
150 for (int i = 0; i < DEFAULT_VALUES.length; i++) {
151 Field f = DEFAULT_VALUES[i];
152 String field = FIELDS[i];
153
154 // Check existence (will throw an exception)
155 Field change = ScicosParameters.class.getDeclaredField(f.getName() + "_CHANGE");
156
157 // Check value (field)
158 assert change.get(null).equals(field);
159 }
160 }
161
162 @Test
163 public void checkBeansPropertyChangeEvent() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, InstantiationException {
164 if (GraphicsEnvironment.isHeadless()) {
165 return;
166 }
167
168 ScicosParameters obj = new ScicosParameters();
169 final List<PropertyChangeEvent> receivedEvents = new ArrayList<PropertyChangeEvent>();
170
171 obj.addPropertyChangeListener(new PropertyChangeListener() {
172 @Override
173 public void propertyChange(PropertyChangeEvent evt) {
174 receivedEvents.add(evt);
175 }
176 });
177
178 /*
179 * Update fields
180 */
181 for (int i = 0; i < DEFAULT_VALUES.length; i++) {
182 final Method set = SETTERS[i];
183 final Field defaultValue = DEFAULT_VALUES[i];
184
185 Object newValue = null;
186 if (defaultValue.getType().equals(double.class)) {
187 newValue = defaultValue.getDouble(null) + 1;
188 } else if (defaultValue.getType().equals(int.class)) {
189 newValue = defaultValue.getInt(null) + 1;
190 } else if (defaultValue.getType().equals(String.class)) {
191 newValue = ((String) defaultValue.get(null)).concat("1");
192 } else if (defaultValue.getType().isArray()) {
193 Object array = defaultValue.get(null);
194 final Class <? extends Object > type = defaultValue.getType().getComponentType();
195 final Object value;
196
197 final int arrayLength = Array.getLength(array);
198 value = Array.newInstance(type, arrayLength + 1);
199
200 /*
201 * Copying values
202 */
203 for (int j = 0; j < arrayLength; j++) {
204 Array.set(value, j, Array.get(array, j));
205 }
206
207 /*
208 * The latest value must be equal to the previous one or to the
209 * type's default value
210 */
211 final Object o;
212 if (arrayLength > 0) {
213 o = Array.get(array, arrayLength - 1);
214 } else {
215 o = type.newInstance();
216 }
217 Array.set(value, arrayLength, o);
218
219 newValue = value;
220 }
221
222 set.invoke(obj, newValue);
223 }
224
225 /*
226 * Check for modification events
227 */
228 for (int i = 0; i < DEFAULT_VALUES.length; i++) {
229 final Method get = GETTERS[i];
230 final PropertyChangeEvent evt = receivedEvents.get(i);
231
232 Object newValue = get.invoke(obj);
233 assert newValue.equals(evt.getNewValue());
234 }
235 }
236
237 @Test
238 public void checkBeansVetoableChangeEvent() throws IllegalArgumentException, IllegalAccessException, InstantiationException {
239 if (GraphicsEnvironment.isHeadless()) {
240 return;
241 }
242
243 ScicosParameters obj = new ScicosParameters();
244 final List<PropertyVetoException> receivedExceptions = new ArrayList<PropertyVetoException>();
245
246 obj.addVetoableChangeListener(new VetoableChangeListener() {
247 @Override
248 public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
249 // always throw exception
250 throw new PropertyVetoException(evt.getPropertyName(), evt);
251 }
252 });
253
254 /*
255 * Update fields
256 */
257 for (int i = 0; i < DEFAULT_VALUES.length; i++) {
258 final Method set = SETTERS[i];
259 final Field defaultValue = DEFAULT_VALUES[i];
260
261 Object newValue = null;
262 if (defaultValue.getType().equals(double.class)) {
263 newValue = defaultValue.getDouble(null) + 1;
264 } else if (defaultValue.getType().equals(int.class)) {
265 newValue = defaultValue.getInt(null) + 1;
266 } else if (defaultValue.getType().equals(String.class)) {
267 newValue = ((String) defaultValue.get(null)).concat("1");
268 } else if (defaultValue.getType().isArray()) {
269 Object array = defaultValue.get(null);
270 final Class <? extends Object > type = defaultValue.getType().getComponentType();
271 final Object value;
272
273 final int arrayLength = Array.getLength(array);
274 value = Array.newInstance(type, arrayLength + 1);
275
276 /*
277 * Copying values
278 */
279 for (int j = 0; j < arrayLength; j++) {
280 Array.set(value, j, Array.get(array, j));
281 }
282
283 /*
284 * The latest value must be equal to the previous one or to the
285 * type's default value
286 */
287 final Object o;
288 if (arrayLength > 0) {
289 o = Array.get(array, arrayLength - 1);
290 } else {
291 o = type.newInstance();
292 }
293 Array.set(value, arrayLength, o);
294
295 newValue = value;
296 }
297
298 try {
299 set.invoke(obj, newValue);
300 } catch (InvocationTargetException e) {
301 receivedExceptions.add((PropertyVetoException) e.getTargetException());
302 }
303 }
304
305 /*
306 * Check for received PropertyVetoException
307 */
308 assert receivedExceptions.size() == DEFAULT_VALUES.length;
309 for (int i = 0; i < DEFAULT_VALUES.length; i++) {
310 final String field = FIELDS[i];
311 final PropertyVetoException e = receivedExceptions.get(i);
312
313 assert e.getMessage().equals(field);
314 }
315 }
316
317 /**
318 * Call all public methods through introspection
319 *
320 * @param args
321 * not used
322 * @throws InvocationTargetException
323 * @throws IllegalAccessException
324 * @throws IllegalArgumentException
325 */
326 public static void main(String[] args) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
327 Object obj = new ScicosParametersTest();
328 Method[] tests = ScicosParametersTest.class.getDeclaredMethods();
329 for (Method method : tests) {
330 int modifiers = method.getModifiers();
331 if ((modifiers | Modifier.STATIC) != modifiers) {
332 method.invoke(obj, (Object[]) null);
333 }
334 }
335 }
336}
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/model/XcosCellFactoryTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/model/XcosCellFactoryTest.java
new file mode 100644
index 0000000..e793f83
--- /dev/null
+++ b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/graph/model/XcosCellFactoryTest.java
@@ -0,0 +1,58 @@
1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2011 - Scilab Enterprises - Clement DAVID
4 *
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
10 *
11 */
12package org.scilab.tests.modules.xcos.graph.model;
13
14import java.lang.reflect.Constructor;
15import java.lang.reflect.InvocationTargetException;
16import java.util.EnumSet;
17
18import org.junit.Before;
19import org.junit.Test;
20import org.scilab.modules.xcos.JavaController;
21import org.scilab.modules.xcos.Kind;
22import org.scilab.modules.xcos.block.BasicBlock;
23import org.scilab.modules.xcos.graph.model.BlockInterFunction;
24import org.scilab.modules.xcos.graph.model.XcosCellFactory;
25
26public class XcosCellFactoryTest {
27 private JavaController controller;
28
29 @Before
30 public void loadLibrary() {
31 System.loadLibrary("scilab");
32 controller = new JavaController();
33 }
34
35 @Test
36 public void createOneSpecificBlock() {
37 final String interfaceFunction = "BIGSOM_f";
38 BasicBlock blk = XcosCellFactory.createBlock(controller, XcosCellFactory.lookForInterfunction(interfaceFunction), interfaceFunction,
39 controller.createObject(Kind.BLOCK));
40
41 assert blk.getStyle().contains(interfaceFunction);
42 }
43
44 @Test
45 public void createAllSpecificBlocks() throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException,
46 IllegalArgumentException, InvocationTargetException {
47 EnumSet<BlockInterFunction> blocks = EnumSet.allOf(BlockInterFunction.class);
48 blocks.remove(BlockInterFunction.BASIC_BLOCK);
49
50 for (BlockInterFunction b : blocks) {
51 Constructor<? extends BasicBlock> cstr = b.getKlass().getConstructor(Long.TYPE);
52 BasicBlock blk = cstr.newInstance(controller.createObject(Kind.BLOCK));
53
54 // the block should have no children
55 assert blk.getChildCount() == 0;
56 }
57 }
58}
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/command/CommandPortTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/command/CommandPortTest.java
index 7a9908c..a3fe487 100644
--- a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/command/CommandPortTest.java
+++ b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/command/CommandPortTest.java
@@ -12,50 +12,54 @@
12 12
13package org.scilab.tests.modules.xcos.port.command; 13package org.scilab.tests.modules.xcos.port.command;
14 14
15import org.junit.Before;
16import org.junit.Test;
17import org.scilab.modules.xcos.JavaController;
18import org.scilab.modules.xcos.Kind;
15import org.scilab.modules.xcos.port.BasicPort; 19import org.scilab.modules.xcos.port.BasicPort;
16import org.scilab.modules.xcos.port.Orientation; 20import org.scilab.modules.xcos.port.Orientation;
17import org.scilab.modules.xcos.port.command.CommandPort; 21import org.scilab.modules.xcos.port.command.CommandPort;
18import org.junit.*;
19 22
20/** 23/**
21 * Unit test for {@link CommandPort} 24 * Unit test for {@link CommandPort}
22 */ 25 */
23public class CommandPortTest { 26public class CommandPortTest {
24 public static final int DEFAULT_PORTSIZE = 8; 27 public static final int DEFAULT_PORTSIZE = 8;
28 private JavaController controller;
29
30 @Before
31 public void loadLibrary() {
32 System.loadLibrary("scilab");
33 controller = new JavaController();
34 }
25 35
26 @Test 36 @Test
27 public void checkType() { 37 public void checkType() {
28 CommandPort port = new CommandPort(); 38 CommandPort port = new CommandPort(controller.createObject(Kind.PORT));
29 assert port.getType() == null; 39 assert port.getType() == null;
30 } 40 }
31 41
32 @Test 42 @Test
33 public void checkDefaultOrientation() { 43 public void checkDefaultOrientation() {
34 CommandPort port = new CommandPort(); 44 CommandPort port = new CommandPort(controller.createObject(Kind.PORT));
35 assert port.getOrientation() == Orientation.SOUTH; 45 assert port.getOrientation() == Orientation.SOUTH;
36 } 46 }
37 47
38 @Test 48 @Test
39 public void checkStyle() { 49 public void checkStyle() {
40 CommandPort port = new CommandPort(); 50 CommandPort port = new CommandPort(controller.createObject(Kind.PORT));
41 assert port.getStyle().contains("CommandPort"); 51 assert port.getStyle().contains("CommandPort");
42 } 52 }
43 53
44 @Test 54 @Test
45 public void checkTypeName() {
46 CommandPort port = new CommandPort();
47 assert port.getTypeName().equals("CommandPort");
48 }
49
50 @Test
51 public void checkClassHierarchy() { 55 public void checkClassHierarchy() {
52 CommandPort port = new CommandPort(); 56 CommandPort port = new CommandPort(controller.createObject(Kind.PORT));
53 assert port instanceof BasicPort; 57 assert port instanceof BasicPort;
54 } 58 }
55 59
56 @Test 60 @Test
57 public void checkDefaultGeometry() { 61 public void checkDefaultGeometry() {
58 CommandPort port = new CommandPort(); 62 CommandPort port = new CommandPort(controller.createObject(Kind.PORT));
59 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE; 63 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE;
60 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE; 64 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE;
61 } 65 }
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/control/ControlPortTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/control/ControlPortTest.java
index cc07818..925e234 100644
--- a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/control/ControlPortTest.java
+++ b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/control/ControlPortTest.java
@@ -12,50 +12,54 @@
12 12
13package org.scilab.tests.modules.xcos.port.control; 13package org.scilab.tests.modules.xcos.port.control;
14 14
15import org.junit.Before;
16import org.junit.Test;
17import org.scilab.modules.xcos.JavaController;
18import org.scilab.modules.xcos.Kind;
15import org.scilab.modules.xcos.port.BasicPort; 19import org.scilab.modules.xcos.port.BasicPort;
16import org.scilab.modules.xcos.port.Orientation; 20import org.scilab.modules.xcos.port.Orientation;
17import org.scilab.modules.xcos.port.control.ControlPort; 21import org.scilab.modules.xcos.port.control.ControlPort;
18import org.junit.*;
19 22
20/** 23/**
21 * Unit test for {@link ControlPort} 24 * Unit test for {@link ControlPort}
22 */ 25 */
23public class ControlPortTest { 26public class ControlPortTest {
24 public static final int DEFAULT_PORTSIZE = 8; 27 public static final int DEFAULT_PORTSIZE = 8;
28 private JavaController controller;
29
30 @Before
31 public void loadLibrary() {
32 System.loadLibrary("scilab");
33 controller = new JavaController();
34 }
25 35
26 @Test 36 @Test
27 public void checkType() { 37 public void checkType() {
28 ControlPort port = new ControlPort(); 38 ControlPort port = new ControlPort(controller.createObject(Kind.PORT));
29 assert port.getType() == null; 39 assert port.getType() == null;
30 } 40 }
31 41
32 @Test 42 @Test
33 public void checkDefaultOrientation() { 43 public void checkDefaultOrientation() {
34 ControlPort port = new ControlPort(); 44 ControlPort port = new ControlPort(controller.createObject(Kind.PORT));
35 assert port.getOrientation() == Orientation.NORTH; 45 assert port.getOrientation() == Orientation.NORTH;
36 } 46 }
37 47
38 @Test 48 @Test
39 public void checkStyle() { 49 public void checkStyle() {
40 ControlPort port = new ControlPort(); 50 ControlPort port = new ControlPort(controller.createObject(Kind.PORT));
41 assert port.getStyle().contains("ControlPort"); 51 assert port.getStyle().contains("ControlPort");
42 } 52 }
43 53
44 @Test 54 @Test
45 public void checkTypeName() {
46 ControlPort port = new ControlPort();
47 assert port.getTypeName().equals("ControlPort");
48 }
49
50 @Test
51 public void checkClassHierarchy() { 55 public void checkClassHierarchy() {
52 ControlPort port = new ControlPort(); 56 ControlPort port = new ControlPort(controller.createObject(Kind.PORT));
53 assert port instanceof BasicPort; 57 assert port instanceof BasicPort;
54 } 58 }
55 59
56 @Test 60 @Test
57 public void checkDefaultGeometry() { 61 public void checkDefaultGeometry() {
58 ControlPort port = new ControlPort(); 62 ControlPort port = new ControlPort(controller.createObject(Kind.PORT));
59 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE; 63 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE;
60 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE; 64 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE;
61 } 65 }
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/input/ExplicitInputPortTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/input/ExplicitInputPortTest.java
index 84d875a..6d9fffd 100644
--- a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/input/ExplicitInputPortTest.java
+++ b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/input/ExplicitInputPortTest.java
@@ -12,53 +12,57 @@
12 12
13package org.scilab.tests.modules.xcos.port.input; 13package org.scilab.tests.modules.xcos.port.input;
14 14
15import org.junit.Before;
16import org.junit.Test;
17import org.scilab.modules.xcos.JavaController;
18import org.scilab.modules.xcos.Kind;
15import org.scilab.modules.xcos.port.BasicPort; 19import org.scilab.modules.xcos.port.BasicPort;
16import org.scilab.modules.xcos.port.Orientation;
17import org.scilab.modules.xcos.port.BasicPort.Type; 20import org.scilab.modules.xcos.port.BasicPort.Type;
21import org.scilab.modules.xcos.port.Orientation;
18import org.scilab.modules.xcos.port.input.ExplicitInputPort; 22import org.scilab.modules.xcos.port.input.ExplicitInputPort;
19import org.scilab.modules.xcos.port.input.InputPort; 23import org.scilab.modules.xcos.port.input.InputPort;
20import org.junit.*;
21 24
22/** 25/**
23 * Unit test for {@link ExplicitInputPort} 26 * Unit test for {@link ExplicitInputPort}
24 */ 27 */
25public class ExplicitInputPortTest { 28public class ExplicitInputPortTest {
26 public static final int DEFAULT_PORTSIZE = 8; 29 public static final int DEFAULT_PORTSIZE = 8;
30 private JavaController controller;
31
32 @Before
33 public void loadLibrary() {
34 System.loadLibrary("scilab");
35 controller = new JavaController();
36 }
27 37
28 @Test 38 @Test
29 public void checkType() { 39 public void checkType() {
30 ExplicitInputPort port = new ExplicitInputPort(); 40 ExplicitInputPort port = new ExplicitInputPort(controller.createObject(Kind.PORT));
31 assert port.getType() == Type.EXPLICIT; 41 assert port.getType() == Type.EXPLICIT;
32 } 42 }
33 43
34 @Test 44 @Test
35 public void checkDefaultOrientation() { 45 public void checkDefaultOrientation() {
36 ExplicitInputPort port = new ExplicitInputPort(); 46 ExplicitInputPort port = new ExplicitInputPort(controller.createObject(Kind.PORT));
37 assert port.getOrientation() == Orientation.WEST; 47 assert port.getOrientation() == Orientation.WEST;
38 } 48 }
39 49
40 @Test 50 @Test
41 public void checkStyle() { 51 public void checkStyle() {
42 ExplicitInputPort port = new ExplicitInputPort(); 52 ExplicitInputPort port = new ExplicitInputPort(controller.createObject(Kind.PORT));
43 assert port.getStyle().contains("ExplicitInputPort"); 53 assert port.getStyle().contains("ExplicitInputPort");
44 } 54 }
45 55
46 @Test 56 @Test
47 public void checkTypeName() {
48 ExplicitInputPort port = new ExplicitInputPort();
49 assert port.getTypeName().equals("ExplicitInputPort");
50 }
51
52 @Test
53 public void checkClassHierarchy() { 57 public void checkClassHierarchy() {
54 ExplicitInputPort port = new ExplicitInputPort(); 58 ExplicitInputPort port = new ExplicitInputPort(controller.createObject(Kind.PORT));
55 assert port instanceof InputPort; 59 assert port instanceof InputPort;
56 assert port instanceof BasicPort; 60 assert port instanceof BasicPort;
57 } 61 }
58 62
59 @Test 63 @Test
60 public void checkDefaultGeometry() { 64 public void checkDefaultGeometry() {
61 ExplicitInputPort port = new ExplicitInputPort(); 65 ExplicitInputPort port = new ExplicitInputPort(controller.createObject(Kind.PORT));
62 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE; 66 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE;
63 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE; 67 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE;
64 } 68 }
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/input/ImplicitInputPortTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/input/ImplicitInputPortTest.java
index b65247b..69a6194 100644
--- a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/input/ImplicitInputPortTest.java
+++ b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/input/ImplicitInputPortTest.java
@@ -12,53 +12,57 @@
12 12
13package org.scilab.tests.modules.xcos.port.input; 13package org.scilab.tests.modules.xcos.port.input;
14 14
15import org.junit.Before;
16import org.junit.Test;
17import org.scilab.modules.xcos.JavaController;
18import org.scilab.modules.xcos.Kind;
15import org.scilab.modules.xcos.port.BasicPort; 19import org.scilab.modules.xcos.port.BasicPort;
16import org.scilab.modules.xcos.port.Orientation;
17import org.scilab.modules.xcos.port.BasicPort.Type; 20import org.scilab.modules.xcos.port.BasicPort.Type;
21import org.scilab.modules.xcos.port.Orientation;
18import org.scilab.modules.xcos.port.input.ImplicitInputPort; 22import org.scilab.modules.xcos.port.input.ImplicitInputPort;
19import org.scilab.modules.xcos.port.input.InputPort; 23import org.scilab.modules.xcos.port.input.InputPort;
20import org.junit.*;
21 24
22/** 25/**
23 * Unit test for {@link ImplicitInputPort} 26 * Unit test for {@link ImplicitInputPort}
24 */ 27 */
25public class ImplicitInputPortTest { 28public class ImplicitInputPortTest {
26 public static final int DEFAULT_PORTSIZE = 8; 29 public static final int DEFAULT_PORTSIZE = 8;
30 private JavaController controller;
31
32 @Before
33 public void loadLibrary() {
34 System.loadLibrary("scilab");
35 controller = new JavaController();
36 }
27 37
28 @Test 38 @Test
29 public void checkType() { 39 public void checkType() {
30 ImplicitInputPort port = new ImplicitInputPort(); 40 ImplicitInputPort port = new ImplicitInputPort(controller.createObject(Kind.PORT));
31 assert port.getType() == Type.IMPLICIT; 41 assert port.getType() == Type.IMPLICIT;
32 } 42 }
33 43
34 @Test 44 @Test
35 public void checkDefaultOrientation() { 45 public void checkDefaultOrientation() {
36 ImplicitInputPort port = new ImplicitInputPort(); 46 ImplicitInputPort port = new ImplicitInputPort(controller.createObject(Kind.PORT));
37 assert port.getOrientation() == Orientation.WEST; 47 assert port.getOrientation() == Orientation.WEST;
38 } 48 }
39 49
40 @Test 50 @Test
41 public void checkStyle() { 51 public void checkStyle() {
42 ImplicitInputPort port = new ImplicitInputPort(); 52 ImplicitInputPort port = new ImplicitInputPort(controller.createObject(Kind.PORT));
43 assert port.getStyle().contains("ImplicitInputPort"); 53 assert port.getStyle().contains("ImplicitInputPort");
44 } 54 }
45 55
46 @Test 56 @Test
47 public void checkTypeName() {
48 ImplicitInputPort port = new ImplicitInputPort();
49 assert port.getTypeName().equals("ImplicitInputPort");
50 }
51
52 @Test
53 public void checkClassHierarchy() { 57 public void checkClassHierarchy() {
54 ImplicitInputPort port = new ImplicitInputPort(); 58 ImplicitInputPort port = new ImplicitInputPort(controller.createObject(Kind.PORT));
55 assert port instanceof InputPort; 59 assert port instanceof InputPort;
56 assert port instanceof BasicPort; 60 assert port instanceof BasicPort;
57 } 61 }
58 62
59 @Test 63 @Test
60 public void checkDefaultGeometry() { 64 public void checkDefaultGeometry() {
61 ImplicitInputPort port = new ImplicitInputPort(); 65 ImplicitInputPort port = new ImplicitInputPort(controller.createObject(Kind.PORT));
62 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE; 66 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE;
63 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE; 67 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE;
64 } 68 }
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/output/ExplicitOutputPortTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/output/ExplicitOutputPortTest.java
index cdea844..aa3b42d 100644
--- a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/output/ExplicitOutputPortTest.java
+++ b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/output/ExplicitOutputPortTest.java
@@ -12,53 +12,57 @@
12 12
13package org.scilab.tests.modules.xcos.port.output; 13package org.scilab.tests.modules.xcos.port.output;
14 14
15import org.junit.Before;
16import org.junit.Test;
17import org.scilab.modules.xcos.JavaController;
18import org.scilab.modules.xcos.Kind;
15import org.scilab.modules.xcos.port.BasicPort; 19import org.scilab.modules.xcos.port.BasicPort;
16import org.scilab.modules.xcos.port.Orientation;
17import org.scilab.modules.xcos.port.BasicPort.Type; 20import org.scilab.modules.xcos.port.BasicPort.Type;
21import org.scilab.modules.xcos.port.Orientation;
18import org.scilab.modules.xcos.port.output.ExplicitOutputPort; 22import org.scilab.modules.xcos.port.output.ExplicitOutputPort;
19import org.scilab.modules.xcos.port.output.OutputPort; 23import org.scilab.modules.xcos.port.output.OutputPort;
20import org.junit.*;
21 24
22/** 25/**
23 * Unit test for {@link ExplicitOutputPort} 26 * Unit test for {@link ExplicitOutputPort}
24 */ 27 */
25public class ExplicitOutputPortTest { 28public class ExplicitOutputPortTest {
26 public static final int DEFAULT_PORTSIZE = 8; 29 public static final int DEFAULT_PORTSIZE = 8;
30 private JavaController controller;
31
32 @Before
33 public void loadLibrary() {
34 System.loadLibrary("scilab");
35 controller = new JavaController();
36 }
27 37
28 @Test 38 @Test
29 public void checkType() { 39 public void checkType() {
30 ExplicitOutputPort port = new ExplicitOutputPort(); 40 ExplicitOutputPort port = new ExplicitOutputPort(controller.createObject(Kind.PORT));
31 assert port.getType() == Type.EXPLICIT; 41 assert port.getType() == Type.EXPLICIT;
32 } 42 }
33 43
34 @Test 44 @Test
35 public void checkDefaultOrientation() { 45 public void checkDefaultOrientation() {
36 ExplicitOutputPort port = new ExplicitOutputPort(); 46 ExplicitOutputPort port = new ExplicitOutputPort(controller.createObject(Kind.PORT));
37 assert port.getOrientation() == Orientation.EAST; 47 assert port.getOrientation() == Orientation.EAST;
38 } 48 }
39 49
40 @Test 50 @Test
41 public void checkStyle() { 51 public void checkStyle() {
42 ExplicitOutputPort port = new ExplicitOutputPort(); 52 ExplicitOutputPort port = new ExplicitOutputPort(controller.createObject(Kind.PORT));
43 assert port.getStyle().contains("ExplicitOutputPort"); 53 assert port.getStyle().contains("ExplicitOutputPort");
44 } 54 }
45 55
46 @Test 56 @Test
47 public void checkTypeName() {
48 ExplicitOutputPort port = new ExplicitOutputPort();
49 assert port.getTypeName().equals("ExplicitOutputPort");
50 }
51
52 @Test
53 public void checkClassHierarchy() { 57 public void checkClassHierarchy() {
54 ExplicitOutputPort port = new ExplicitOutputPort(); 58 ExplicitOutputPort port = new ExplicitOutputPort(controller.createObject(Kind.PORT));
55 assert port instanceof OutputPort; 59 assert port instanceof OutputPort;
56 assert port instanceof BasicPort; 60 assert port instanceof BasicPort;
57 } 61 }
58 62
59 @Test 63 @Test
60 public void checkDefaultGeometry() { 64 public void checkDefaultGeometry() {
61 ExplicitOutputPort port = new ExplicitOutputPort(); 65 ExplicitOutputPort port = new ExplicitOutputPort(controller.createObject(Kind.PORT));
62 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE; 66 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE;
63 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE; 67 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE;
64 } 68 }
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/output/ImplicitOutputPortTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/output/ImplicitOutputPortTest.java
index 3b548c6..e97fc06 100644
--- a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/output/ImplicitOutputPortTest.java
+++ b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/port/output/ImplicitOutputPortTest.java
@@ -12,53 +12,57 @@
12 12
13package org.scilab.tests.modules.xcos.port.output; 13package org.scilab.tests.modules.xcos.port.output;
14 14
15import org.junit.Before;
16import org.junit.Test;
17import org.scilab.modules.xcos.JavaController;
18import org.scilab.modules.xcos.Kind;
15import org.scilab.modules.xcos.port.BasicPort; 19import org.scilab.modules.xcos.port.BasicPort;
16import org.scilab.modules.xcos.port.Orientation;
17import org.scilab.modules.xcos.port.BasicPort.Type; 20import org.scilab.modules.xcos.port.BasicPort.Type;
21import org.scilab.modules.xcos.port.Orientation;
18import org.scilab.modules.xcos.port.output.ImplicitOutputPort; 22import org.scilab.modules.xcos.port.output.ImplicitOutputPort;
19import org.scilab.modules.xcos.port.output.OutputPort; 23import org.scilab.modules.xcos.port.output.OutputPort;
20import org.junit.*;
21 24
22/** 25/**
23 * Unit test for {@link ImplicitOutputPort} 26 * Unit test for {@link ImplicitOutputPort}
24 */ 27 */
25public class ImplicitOutputPortTest { 28public class ImplicitOutputPortTest {
26 public static final int DEFAULT_PORTSIZE = 8; 29 public static final int DEFAULT_PORTSIZE = 8;
30 private JavaController controller;
31
32 @Before
33 public void loadLibrary() {
34 System.loadLibrary("scilab");
35 controller = new JavaController();
36 }
27 37
28 @Test 38 @Test
29 public void checkType() { 39 public void checkType() {
30 ImplicitOutputPort port = new ImplicitOutputPort(); 40 ImplicitOutputPort port = new ImplicitOutputPort(controller.createObject(Kind.PORT));
31 assert port.getType() == Type.IMPLICIT; 41 assert port.getType() == Type.IMPLICIT;
32 } 42 }
33 43
34 @Test 44 @Test
35 public void checkDefaultOrientation() { 45 public void checkDefaultOrientation() {
36 ImplicitOutputPort port = new ImplicitOutputPort(); 46 ImplicitOutputPort port = new ImplicitOutputPort(controller.createObject(Kind.PORT));
37 assert port.getOrientation() == Orientation.EAST; 47 assert port.getOrientation() == Orientation.EAST;
38 } 48 }
39 49
40 @Test 50 @Test
41 public void checkStyle() { 51 public void checkStyle() {
42 ImplicitOutputPort port = new ImplicitOutputPort(); 52 ImplicitOutputPort port = new ImplicitOutputPort(controller.createObject(Kind.PORT));
43 assert port.getStyle().contains("ImplicitOutputPort"); 53 assert port.getStyle().contains("ImplicitOutputPort");
44 } 54 }
45 55
46 @Test 56 @Test
47 public void checkTypeName() {
48 ImplicitOutputPort port = new ImplicitOutputPort();
49 assert port.getTypeName().equals("ImplicitOutputPort");
50 }
51
52 @Test
53 public void checkClassHierarchy() { 57 public void checkClassHierarchy() {
54 ImplicitOutputPort port = new ImplicitOutputPort(); 58 ImplicitOutputPort port = new ImplicitOutputPort(controller.createObject(Kind.PORT));
55 assert port instanceof OutputPort; 59 assert port instanceof OutputPort;
56 assert port instanceof BasicPort; 60 assert port instanceof BasicPort;
57 } 61 }
58 62
59 @Test 63 @Test
60 public void checkDefaultGeometry() { 64 public void checkDefaultGeometry() {
61 ImplicitOutputPort port = new ImplicitOutputPort(); 65 ImplicitOutputPort port = new ImplicitOutputPort(controller.createObject(Kind.PORT));
62 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE; 66 assert port.getGeometry().getWidth() == DEFAULT_PORTSIZE;
63 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE; 67 assert port.getGeometry().getHeight() == DEFAULT_PORTSIZE;
64 } 68 }
diff --git a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/utils/FileTypeTest.java b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/utils/FileTypeTest.java
index 0208d5f..82bc442 100644
--- a/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/utils/FileTypeTest.java
+++ b/scilab/modules/xcos/tests/java/org/scilab/tests/modules/xcos/utils/FileTypeTest.java
@@ -12,23 +12,29 @@
12 12
13package org.scilab.tests.modules.xcos.utils; 13package org.scilab.tests.modules.xcos.utils;
14 14
15import java.awt.GraphicsEnvironment;
15import java.io.File; 16import java.io.File;
16import java.io.IOException; 17import java.io.IOException;
17import java.awt.GraphicsEnvironment;
18 18
19import org.junit.Test;
20import org.junit.Assume; 19import org.junit.Assume;
21 20import org.junit.Before;
21import org.junit.Test;
22import org.scilab.modules.xcos.JavaController;
23import org.scilab.modules.xcos.Kind;
22import org.scilab.modules.xcos.graph.XcosDiagram; 24import org.scilab.modules.xcos.graph.XcosDiagram;
23import org.scilab.modules.xcos.io.XcosFileType; 25import org.scilab.modules.xcos.io.XcosFileType;
24 26
25
26/** 27/**
27 * Test the {@link XcosFileType} class. 28 * Test the {@link XcosFileType} class.
28 */ 29 */
29public class FileTypeTest { 30public class FileTypeTest {
30 private static final String XcosFileHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; 31 private static final String XcosFileHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
31 32
33 @Before
34 public void loadLibrary() {
35 System.loadLibrary("scilab");
36 }
37
32 @Test 38 @Test
33 public void checkSupportedType() { 39 public void checkSupportedType() {
34 assert XcosFileType.values().length == 4; 40 assert XcosFileType.values().length == 4;
@@ -71,7 +77,9 @@ public class FileTypeTest {
71 public void validateXcosFindFileType() throws Exception { 77 public void validateXcosFindFileType() throws Exception {
72 Assume.assumeTrue(!GraphicsEnvironment.isHeadless()); 78 Assume.assumeTrue(!GraphicsEnvironment.isHeadless());
73 File tmp = File.createTempFile("xcosTest", XcosFileType.XCOS.getDottedExtension()); 79 File tmp = File.createTempFile("xcosTest", XcosFileType.XCOS.getDottedExtension());
74 XcosFileType.XCOS.save(tmp.getCanonicalPath(), new XcosDiagram()); 80
81 JavaController controller = new JavaController();
82 XcosFileType.XCOS.save(tmp.getCanonicalPath(), new XcosDiagram(controller.createObject(Kind.DIAGRAM), Kind.DIAGRAM));
75 83