summaryrefslogtreecommitdiffstats
path: root/scilab
diff options
context:
space:
mode:
authormottelet <stephane.mottelet@utc.fr>2021-01-20 17:21:53 +0100
committerClément David <clement.david@esi-group.com>2021-04-01 22:19:09 +0200
commited33e3e3c6ab6795758a31cd6fa6750982f24053 (patch)
tree47e7c5df690f3785069252080f4fda640f59120d /scilab
parent4cf41e8516d2c054e53b51aaba411ee7f50c0989 (diff)
downloadscilab-ed33e3e3c6ab6795758a31cd6fa6750982f24053.zip
scilab-ed33e3e3c6ab6795758a31cd6fa6750982f24053.tar.gz
* Bug 10964 fixed: now Scinotes can execute the current file in NW mode
http://bugzilla.scilab.org/show_bug.cgi?id=10964 This patch also allows the evaluation of a selection. Change-Id: I14c3b519ec58ed9cd22c713f990a8ce6c2179f01
Diffstat (limited to 'scilab')
-rw-r--r--scilab/modules/console/Makefile.am6
-rw-r--r--scilab/modules/console/Makefile.in45
-rw-r--r--scilab/modules/console/src/c/console.vcxproj1
-rw-r--r--scilab/modules/console/src/c/console.vcxproj.filters3
-rw-r--r--scilab/modules/console/src/java/org/scilab/modules/console/AdvCLIManagement.java16
-rw-r--r--scilab/modules/console/src/java/org/scilab/modules/console/AdvCLIManagementJNI.java33
-rw-r--r--scilab/modules/console/src/jni/AdvCLIManagement.i47
-rw-r--r--scilab/modules/console/src/jni/AdvCLIManagement_wrap.c233
-rw-r--r--scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.java26
-rw-r--r--scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.java31
10 files changed, 416 insertions, 25 deletions
diff --git a/scilab/modules/console/Makefile.am b/scilab/modules/console/Makefile.am
index efc6f4f..c42d52b 100644
--- a/scilab/modules/console/Makefile.am
+++ b/scilab/modules/console/Makefile.am
@@ -54,7 +54,8 @@ CONSOLE_CPP_SOURCES = \
54#### console : List of the c files #### 54#### console : List of the c files ####
55CONSOLE_C_JNI_SOURCES = \ 55CONSOLE_C_JNI_SOURCES = \
56 src/jni/GuiManagement_wrap.c \ 56 src/jni/GuiManagement_wrap.c \
57 src/jni/DropFiles_wrap.c 57 src/jni/DropFiles_wrap.c \
58 src/jni/AdvCLIManagement_wrap.c
58 59
59GIWS_WRAPPERS = src/jni/CallScilabBridge.giws.xml 60GIWS_WRAPPERS = src/jni/CallScilabBridge.giws.xml
60 61
@@ -189,7 +190,8 @@ INCLUDE_FLAGS = $(libsciconsole_la_CPPFLAGS)
189 190
190#### SWIG Declaration #### 191#### SWIG Declaration ####
191SWIG_WRAPPERS = src/jni/GuiManagement.i \ 192SWIG_WRAPPERS = src/jni/GuiManagement.i \
192 src/jni/DropFiles.i 193 src/jni/DropFiles.i \
194 src/jni/AdvCLIManagement.i
193 195
194# Provides macros compilation, Java compilation, cleaning 196# Provides macros compilation, Java compilation, cleaning
195# If you want Makefile to call ant, add USEANT=1 197# If you want Makefile to call ant, add USEANT=1
diff --git a/scilab/modules/console/Makefile.in b/scilab/modules/console/Makefile.in
index 444450d..0be2453 100644
--- a/scilab/modules/console/Makefile.in
+++ b/scilab/modules/console/Makefile.in
@@ -1,7 +1,7 @@
1# Makefile.in generated by automake 1.16.1 from Makefile.am. 1# Makefile.in generated by automake 1.16.3 from Makefile.am.
2# @configure_input@ 2# @configure_input@
3 3
4# Copyright (C) 1994-2018 Free Software Foundation, Inc. 4# Copyright (C) 1994-2020 Free Software Foundation, Inc.
5 5
6# This Makefile.in is free software; the Free Software Foundation 6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it, 7# gives unlimited permission to copy and/or distribute it,
@@ -233,15 +233,17 @@ am__v_lt_0 = --silent
233am__v_lt_1 = 233am__v_lt_1 =
234libsciconsole_la_DEPENDENCIES = libsciconsole-minimal.la 234libsciconsole_la_DEPENDENCIES = libsciconsole-minimal.la
235am__libsciconsole_la_SOURCES_DIST = src/jni/GuiManagement_wrap.c \ 235am__libsciconsole_la_SOURCES_DIST = src/jni/GuiManagement_wrap.c \
236 src/jni/DropFiles_wrap.c src/c/GuiManagement.c \ 236 src/jni/DropFiles_wrap.c src/jni/AdvCLIManagement_wrap.c \
237 src/c/dropFiles.c src/c/others/initMacOSXEnv.c \ 237 src/c/GuiManagement.c src/c/dropFiles.c \
238 src/jni/CallScilabBridge.cpp src/cpp/ClearConsole.cpp \ 238 src/c/others/initMacOSXEnv.c src/jni/CallScilabBridge.cpp \
239 src/cpp/ClearConsolePart.cpp src/cpp/ConsolePrintf.cpp \ 239 src/cpp/ClearConsole.cpp src/cpp/ClearConsolePart.cpp \
240 src/cpp/ConsoleRead.cpp src/cpp/ConsoleIsWaitingForInput.cpp \ 240 src/cpp/ConsolePrintf.cpp src/cpp/ConsoleRead.cpp \
241 src/cpp/ConsoleIsWaitingForInput.cpp \
241 src/cpp/GetCharWithoutOutput.cpp src/cpp/PromptToHome.cpp \ 242 src/cpp/GetCharWithoutOutput.cpp src/cpp/PromptToHome.cpp \
242 src/cpp/ScilabLinesUpdate.cpp src/cpp/SetConsolePrompt.cpp 243 src/cpp/ScilabLinesUpdate.cpp src/cpp/SetConsolePrompt.cpp
243am__objects_1 = src/jni/libsciconsole_la-GuiManagement_wrap.lo \ 244am__objects_1 = src/jni/libsciconsole_la-GuiManagement_wrap.lo \
244 src/jni/libsciconsole_la-DropFiles_wrap.lo 245 src/jni/libsciconsole_la-DropFiles_wrap.lo \
246 src/jni/libsciconsole_la-AdvCLIManagement_wrap.lo
245@IS_MACOSX_TRUE@am__objects_2 = src/c/others/libsciconsole_la-initMacOSXEnv.lo 247@IS_MACOSX_TRUE@am__objects_2 = src/c/others/libsciconsole_la-initMacOSXEnv.lo
246am__objects_3 = src/c/libsciconsole_la-GuiManagement.lo \ 248am__objects_3 = src/c/libsciconsole_la-GuiManagement.lo \
247 src/c/libsciconsole_la-dropFiles.lo $(am__objects_2) 249 src/c/libsciconsole_la-dropFiles.lo $(am__objects_2)
@@ -311,6 +313,7 @@ am__depfiles_remade = sci_gateway/cpp/$(DEPDIR)/libsciconsole_minimal_la-console
311 src/cpp/$(DEPDIR)/libsciconsole_la-SetConsolePrompt.Plo \ 313 src/cpp/$(DEPDIR)/libsciconsole_la-SetConsolePrompt.Plo \
312 src/cpp/$(DEPDIR)/libsciconsole_minimal_la-prompt.Plo \ 314 src/cpp/$(DEPDIR)/libsciconsole_minimal_la-prompt.Plo \
313 src/cpp/$(DEPDIR)/libsciconsole_minimal_la-scilabRead.Plo \ 315 src/cpp/$(DEPDIR)/libsciconsole_minimal_la-scilabRead.Plo \
316 src/jni/$(DEPDIR)/libsciconsole_la-AdvCLIManagement_wrap.Plo \
314 src/jni/$(DEPDIR)/libsciconsole_la-CallScilabBridge.Plo \ 317 src/jni/$(DEPDIR)/libsciconsole_la-CallScilabBridge.Plo \
315 src/jni/$(DEPDIR)/libsciconsole_la-DropFiles_wrap.Plo \ 318 src/jni/$(DEPDIR)/libsciconsole_la-DropFiles_wrap.Plo \
316 src/jni/$(DEPDIR)/libsciconsole_la-GuiManagement_wrap.Plo \ 319 src/jni/$(DEPDIR)/libsciconsole_la-GuiManagement_wrap.Plo \
@@ -528,8 +531,8 @@ MKDIR_P = @MKDIR_P@
528MPI_ENABLE = @MPI_ENABLE@ 531MPI_ENABLE = @MPI_ENABLE@
529MSGCAT = @MSGCAT@ 532MSGCAT = @MSGCAT@
530MSGFMT = @MSGFMT@ 533MSGFMT = @MSGFMT@
531MSGFMT_015 = @MSGFMT_015@
532MSGMERGE = @MSGMERGE@ 534MSGMERGE = @MSGMERGE@
535MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
533NM = @NM@ 536NM = @NM@
534NMEDIT = @NMEDIT@ 537NMEDIT = @NMEDIT@
535OBJDUMP = @OBJDUMP@ 538OBJDUMP = @OBJDUMP@
@@ -716,7 +719,8 @@ CONSOLE_CPP_SOURCES = \
716#### console : List of the c files #### 719#### console : List of the c files ####
717CONSOLE_C_JNI_SOURCES = \ 720CONSOLE_C_JNI_SOURCES = \
718 src/jni/GuiManagement_wrap.c \ 721 src/jni/GuiManagement_wrap.c \
719 src/jni/DropFiles_wrap.c 722 src/jni/DropFiles_wrap.c \
723 src/jni/AdvCLIManagement_wrap.c
720 724
721GIWS_WRAPPERS = src/jni/CallScilabBridge.giws.xml 725GIWS_WRAPPERS = src/jni/CallScilabBridge.giws.xml
722BUILT_SOURCES = $(am__append_1) $(am__append_2) 726BUILT_SOURCES = $(am__append_1) $(am__append_2)
@@ -820,7 +824,8 @@ INCLUDE_FLAGS = $(libsciconsole_la_CPPFLAGS)
820 824
821#### SWIG Declaration #### 825#### SWIG Declaration ####
822SWIG_WRAPPERS = src/jni/GuiManagement.i \ 826SWIG_WRAPPERS = src/jni/GuiManagement.i \
823 src/jni/DropFiles.i 827 src/jni/DropFiles.i \
828 src/jni/AdvCLIManagement.i
824 829
825 830
826# Provides macros compilation, Java compilation, cleaning 831# Provides macros compilation, Java compilation, cleaning
@@ -1117,6 +1122,8 @@ src/jni/libsciconsole_la-GuiManagement_wrap.lo: \
1117 src/jni/$(am__dirstamp) src/jni/$(DEPDIR)/$(am__dirstamp) 1122 src/jni/$(am__dirstamp) src/jni/$(DEPDIR)/$(am__dirstamp)
1118src/jni/libsciconsole_la-DropFiles_wrap.lo: src/jni/$(am__dirstamp) \ 1123src/jni/libsciconsole_la-DropFiles_wrap.lo: src/jni/$(am__dirstamp) \
1119 src/jni/$(DEPDIR)/$(am__dirstamp) 1124 src/jni/$(DEPDIR)/$(am__dirstamp)
1125src/jni/libsciconsole_la-AdvCLIManagement_wrap.lo: \
1126 src/jni/$(am__dirstamp) src/jni/$(DEPDIR)/$(am__dirstamp)
1120src/c/libsciconsole_la-GuiManagement.lo: src/c/$(am__dirstamp) \ 1127src/c/libsciconsole_la-GuiManagement.lo: src/c/$(am__dirstamp) \
1121 src/c/$(DEPDIR)/$(am__dirstamp) 1128 src/c/$(DEPDIR)/$(am__dirstamp)
1122src/c/libsciconsole_la-dropFiles.lo: src/c/$(am__dirstamp) \ 1129src/c/libsciconsole_la-dropFiles.lo: src/c/$(am__dirstamp) \
@@ -1205,6 +1212,7 @@ distclean-compile:
1205@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciconsole_la-SetConsolePrompt.Plo@am__quote@ # am--include-marker 1212@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciconsole_la-SetConsolePrompt.Plo@am__quote@ # am--include-marker
1206@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciconsole_minimal_la-prompt.Plo@am__quote@ # am--include-marker 1213@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciconsole_minimal_la-prompt.Plo@am__quote@ # am--include-marker
1207@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciconsole_minimal_la-scilabRead.Plo@am__quote@ # am--include-marker 1214@AMDEP_TRUE@@am__include@ @am__quote@src/cpp/$(DEPDIR)/libsciconsole_minimal_la-scilabRead.Plo@am__quote@ # am--include-marker
1215@AMDEP_TRUE@@am__include@ @am__quote@src/jni/$(DEPDIR)/libsciconsole_la-AdvCLIManagement_wrap.Plo@am__quote@ # am--include-marker
1208@AMDEP_TRUE@@am__include@ @am__quote@src/jni/$(DEPDIR)/libsciconsole_la-CallScilabBridge.Plo@am__quote@ # am--include-marker 1216@AMDEP_TRUE@@am__include@ @am__quote@src/jni/$(DEPDIR)/libsciconsole_la-CallScilabBridge.Plo@am__quote@ # am--include-marker
1209@AMDEP_TRUE@@am__include@ @am__quote@src/jni/$(DEPDIR)/libsciconsole_la-DropFiles_wrap.Plo@am__quote@ # am--include-marker 1217@AMDEP_TRUE@@am__include@ @am__quote@src/jni/$(DEPDIR)/libsciconsole_la-DropFiles_wrap.Plo@am__quote@ # am--include-marker
1210@AMDEP_TRUE@@am__include@ @am__quote@src/jni/$(DEPDIR)/libsciconsole_la-GuiManagement_wrap.Plo@am__quote@ # am--include-marker 1218@AMDEP_TRUE@@am__include@ @am__quote@src/jni/$(DEPDIR)/libsciconsole_la-GuiManagement_wrap.Plo@am__quote@ # am--include-marker
@@ -1380,6 +1388,13 @@ src/jni/libsciconsole_la-DropFiles_wrap.lo: src/jni/DropFiles_wrap.c
1380@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1388@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1381@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciconsole_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/jni/libsciconsole_la-DropFiles_wrap.lo `test -f 'src/jni/DropFiles_wrap.c' || echo '$(srcdir)/'`src/jni/DropFiles_wrap.c 1389@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciconsole_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/jni/libsciconsole_la-DropFiles_wrap.lo `test -f 'src/jni/DropFiles_wrap.c' || echo '$(srcdir)/'`src/jni/DropFiles_wrap.c
1382 1390
1391src/jni/libsciconsole_la-AdvCLIManagement_wrap.lo: src/jni/AdvCLIManagement_wrap.c
1392@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciconsole_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/jni/libsciconsole_la-AdvCLIManagement_wrap.lo -MD -MP -MF src/jni/$(DEPDIR)/libsciconsole_la-AdvCLIManagement_wrap.Tpo -c -o src/jni/libsciconsole_la-AdvCLIManagement_wrap.lo `test -f 'src/jni/AdvCLIManagement_wrap.c' || echo '$(srcdir)/'`src/jni/AdvCLIManagement_wrap.c
1393@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/jni/$(DEPDIR)/libsciconsole_la-AdvCLIManagement_wrap.Tpo src/jni/$(DEPDIR)/libsciconsole_la-AdvCLIManagement_wrap.Plo
1394@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/jni/AdvCLIManagement_wrap.c' object='src/jni/libsciconsole_la-AdvCLIManagement_wrap.lo' libtool=yes @AMDEPBACKSLASH@
1395@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1396@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciconsole_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/jni/libsciconsole_la-AdvCLIManagement_wrap.lo `test -f 'src/jni/AdvCLIManagement_wrap.c' || echo '$(srcdir)/'`src/jni/AdvCLIManagement_wrap.c
1397
1383src/c/libsciconsole_la-GuiManagement.lo: src/c/GuiManagement.c 1398src/c/libsciconsole_la-GuiManagement.lo: src/c/GuiManagement.c
1384@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciconsole_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libsciconsole_la-GuiManagement.lo -MD -MP -MF src/c/$(DEPDIR)/libsciconsole_la-GuiManagement.Tpo -c -o src/c/libsciconsole_la-GuiManagement.lo `test -f 'src/c/GuiManagement.c' || echo '$(srcdir)/'`src/c/GuiManagement.c 1399@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciconsole_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/c/libsciconsole_la-GuiManagement.lo -MD -MP -MF src/c/$(DEPDIR)/libsciconsole_la-GuiManagement.Tpo -c -o src/c/libsciconsole_la-GuiManagement.lo `test -f 'src/c/GuiManagement.c' || echo '$(srcdir)/'`src/c/GuiManagement.c
1385@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libsciconsole_la-GuiManagement.Tpo src/c/$(DEPDIR)/libsciconsole_la-GuiManagement.Plo 1400@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/c/$(DEPDIR)/libsciconsole_la-GuiManagement.Tpo src/c/$(DEPDIR)/libsciconsole_la-GuiManagement.Plo
@@ -1723,7 +1738,8 @@ installdirs:
1723 done 1738 done
1724install: $(BUILT_SOURCES) 1739install: $(BUILT_SOURCES)
1725 $(MAKE) $(AM_MAKEFLAGS) install-am 1740 $(MAKE) $(AM_MAKEFLAGS) install-am
1726install-exec: install-exec-am 1741install-exec: $(BUILT_SOURCES)
1742 $(MAKE) $(AM_MAKEFLAGS) install-exec-am
1727install-data: install-data-am 1743install-data: install-data-am
1728uninstall: uninstall-am 1744uninstall: uninstall-am
1729 1745
@@ -1810,6 +1826,7 @@ distclean: distclean-am
1810 -rm -f src/cpp/$(DEPDIR)/libsciconsole_la-SetConsolePrompt.Plo 1826 -rm -f src/cpp/$(DEPDIR)/libsciconsole_la-SetConsolePrompt.Plo
1811 -rm -f src/cpp/$(DEPDIR)/libsciconsole_minimal_la-prompt.Plo 1827 -rm -f src/cpp/$(DEPDIR)/libsciconsole_minimal_la-prompt.Plo
1812 -rm -f src/cpp/$(DEPDIR)/libsciconsole_minimal_la-scilabRead.Plo 1828 -rm -f src/cpp/$(DEPDIR)/libsciconsole_minimal_la-scilabRead.Plo
1829 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-AdvCLIManagement_wrap.Plo
1813 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-CallScilabBridge.Plo 1830 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-CallScilabBridge.Plo
1814 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-DropFiles_wrap.Plo 1831 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-DropFiles_wrap.Plo
1815 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-GuiManagement_wrap.Plo 1832 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-GuiManagement_wrap.Plo
@@ -1898,6 +1915,7 @@ maintainer-clean: maintainer-clean-am
1898 -rm -f src/cpp/$(DEPDIR)/libsciconsole_la-SetConsolePrompt.Plo 1915 -rm -f src/cpp/$(DEPDIR)/libsciconsole_la-SetConsolePrompt.Plo
1899 -rm -f src/cpp/$(DEPDIR)/libsciconsole_minimal_la-prompt.Plo 1916 -rm -f src/cpp/$(DEPDIR)/libsciconsole_minimal_la-prompt.Plo
1900 -rm -f src/cpp/$(DEPDIR)/libsciconsole_minimal_la-scilabRead.Plo 1917 -rm -f src/cpp/$(DEPDIR)/libsciconsole_minimal_la-scilabRead.Plo
1918 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-AdvCLIManagement_wrap.Plo
1901 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-CallScilabBridge.Plo 1919 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-CallScilabBridge.Plo
1902 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-DropFiles_wrap.Plo 1920 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-DropFiles_wrap.Plo
1903 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-GuiManagement_wrap.Plo 1921 -rm -f src/jni/$(DEPDIR)/libsciconsole_la-GuiManagement_wrap.Plo
@@ -1923,7 +1941,8 @@ uninstall-am: uninstall-libsciconsole_la_etcDATA \
1923 uninstall-libsciconsole_la_rootDATA \ 1941 uninstall-libsciconsole_la_rootDATA \
1924 uninstall-pkglibLTLIBRARIES 1942 uninstall-pkglibLTLIBRARIES
1925 1943
1926.MAKE: all check check-am install install-am install-strip 1944.MAKE: all check check-am install install-am install-exec \
1945 install-strip
1927 1946
1928.PHONY: CTAGS GTAGS TAGS all all-am all-local am--depfiles check \ 1947.PHONY: CTAGS GTAGS TAGS all all-am all-local am--depfiles check \
1929 check-am check-local clean clean-generic clean-libtool \ 1948 check-am check-local clean clean-generic clean-libtool \
diff --git a/scilab/modules/console/src/c/console.vcxproj b/scilab/modules/console/src/c/console.vcxproj
index 5ce936f..6ebe60b 100644
--- a/scilab/modules/console/src/c/console.vcxproj
+++ b/scilab/modules/console/src/c/console.vcxproj
@@ -247,6 +247,7 @@
247 </PostBuildEvent> 247 </PostBuildEvent>
248 </ItemDefinitionGroup> 248 </ItemDefinitionGroup>
249 <ItemGroup> 249 <ItemGroup>
250 <ClCompile Include="..\jni\AdvCLIManagement_wrap.c" />
250 <ClCompile Include="..\cpp\prompt.cpp" /> 251 <ClCompile Include="..\cpp\prompt.cpp" />
251 <ClCompile Include="..\cpp\scilabRead.cpp" /> 252 <ClCompile Include="..\cpp\scilabRead.cpp" />
252 <ClCompile Include="..\jni\CallScilabBridge.cpp" /> 253 <ClCompile Include="..\jni\CallScilabBridge.cpp" />
diff --git a/scilab/modules/console/src/c/console.vcxproj.filters b/scilab/modules/console/src/c/console.vcxproj.filters
index 9c29ee7..b1d0c58 100644
--- a/scilab/modules/console/src/c/console.vcxproj.filters
+++ b/scilab/modules/console/src/c/console.vcxproj.filters
@@ -23,6 +23,9 @@
23 </Filter> 23 </Filter>
24 </ItemGroup> 24 </ItemGroup>
25 <ItemGroup> 25 <ItemGroup>
26 <ClCompile Include="..\jni\AdvCLIManagement_wrap.cpp">
27 <Filter>Source Files</Filter>
28 </ClCompile>
26 <ClCompile Include="..\jni\CallScilabBridge.cpp"> 29 <ClCompile Include="..\jni\CallScilabBridge.cpp">
27 <Filter>Source Files</Filter> 30 <Filter>Source Files</Filter>
28 </ClCompile> 31 </ClCompile>
diff --git a/scilab/modules/console/src/java/org/scilab/modules/console/AdvCLIManagement.java b/scilab/modules/console/src/java/org/scilab/modules/console/AdvCLIManagement.java
new file mode 100644
index 0000000..f002bbd
--- /dev/null
+++ b/scilab/modules/console/src/java/org/scilab/modules/console/AdvCLIManagement.java
@@ -0,0 +1,16 @@
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.1
4 *
5 * Do not make changes to this file unless you know what you are doing--modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9package org.scilab.modules.console;
10
11public class AdvCLIManagement {
12 public static String GetCurrentPrompt() {
13 return AdvCLIManagementJNI.GetCurrentPrompt();
14 }
15
16}
diff --git a/scilab/modules/console/src/java/org/scilab/modules/console/AdvCLIManagementJNI.java b/scilab/modules/console/src/java/org/scilab/modules/console/AdvCLIManagementJNI.java
new file mode 100644
index 0000000..d9870ed
--- /dev/null
+++ b/scilab/modules/console/src/java/org/scilab/modules/console/AdvCLIManagementJNI.java
@@ -0,0 +1,33 @@
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.1
4 *
5 * Do not make changes to this file unless you know what you are doing--modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9package org.scilab.modules.console;
10
11public class AdvCLIManagementJNI {
12
13 static {
14 try {
15 System.loadLibrary("sciconsole");
16 } catch (SecurityException e) {
17 System.err.println("A security manager exists and does not allow the loading of the specified dynamic library.");
18 System.err.println(e.getLocalizedMessage());
19 System.exit(-1);
20 } catch (UnsatisfiedLinkError e) {
21 System.err.println("The native library sciconsole does not exist or cannot be found.");
22 if (System.getenv("CONTINUE_ON_JNI_ERROR") == null) {
23 System.err.println(e.getLocalizedMessage());
24 System.err.println("Current java.library.path is : "+System.getProperty("java.library.path"));
25 System.exit(-1);
26 }else{
27 System.err.println("Continuing anyway because of CONTINUE_ON_JNI_ERROR");
28 }
29 }
30 }
31
32 public final static native String GetCurrentPrompt();
33}
diff --git a/scilab/modules/console/src/jni/AdvCLIManagement.i b/scilab/modules/console/src/jni/AdvCLIManagement.i
new file mode 100644
index 0000000..4bed747
--- /dev/null
+++ b/scilab/modules/console/src/jni/AdvCLIManagement.i
@@ -0,0 +1,47 @@
1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2021 - Stépahen Mottelet
4 *
5 * This file is hereby licensed under the terms of the GNU GPL v3.0,
6 * For more information, see the COPYING file which you should have received
7 * along with this program.
8 *
9 */
10
11
12/* AdvCLIManagement.i */
13/**
14 * Windows: swig -java -package org.scilab.modules.console -outdir ../java/org/scilab/modules/console/ AdvCLIManagement.i
15 * Other: Use the option --enable-build-swig to the configure
16*/
17%module AdvCLIManagement
18%{
19extern char * GetCurrentPrompt();
20%}
21
22/* static load of library */
23%pragma(java) jniclasscode=%{
24 static {
25 try {
26 System.loadLibrary("sciconsole");
27 } catch (SecurityException e) {
28 System.err.println("A security manager exists and does not allow the loading of the specified dynamic library.");
29 System.err.println(e.getLocalizedMessage());
30 System.exit(-1);
31 } catch (UnsatisfiedLinkError e) {
32 System.err.println("The native library sciconsole does not exist or cannot be found.");
33 if (System.getenv("CONTINUE_ON_JNI_ERROR") == null) {
34 System.err.println(e.getLocalizedMessage());
35 System.err.println("Current java.library.path is : "+System.getProperty("java.library.path"));
36 System.exit(-1);
37 }else{
38 System.err.println("Continuing anyway because of CONTINUE_ON_JNI_ERROR");
39 }
40 }
41 }
42%}
43
44extern char * GetCurrentPrompt();
45
46
47
diff --git a/scilab/modules/console/src/jni/AdvCLIManagement_wrap.c b/scilab/modules/console/src/jni/AdvCLIManagement_wrap.c
new file mode 100644
index 0000000..8fdb76b
--- /dev/null
+++ b/scilab/modules/console/src/jni/AdvCLIManagement_wrap.c
@@ -0,0 +1,233 @@
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.1
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11
12#ifndef SWIGJAVA
13#define SWIGJAVA
14#endif
15
16
17/* -----------------------------------------------------------------------------
18 * This section contains generic SWIG labels for method/variable
19 * declarations/attributes, and other compiler dependent labels.
20 * ----------------------------------------------------------------------------- */
21
22/* template workaround for compilers that cannot correctly implement the C++ standard */
23#ifndef SWIGTEMPLATEDISAMBIGUATOR
24# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
25# define SWIGTEMPLATEDISAMBIGUATOR template
26# elif defined(__HP_aCC)
27/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
28/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
29# define SWIGTEMPLATEDISAMBIGUATOR template
30# else
31# define SWIGTEMPLATEDISAMBIGUATOR
32# endif
33#endif
34
35/* inline attribute */
36#ifndef SWIGINLINE
37# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
38# define SWIGINLINE inline
39# else
40# define SWIGINLINE
41# endif
42#endif
43
44/* attribute recognised by some compilers to avoid 'unused' warnings */
45#ifndef SWIGUNUSED
46# if defined(__GNUC__)
47# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
48# define SWIGUNUSED __attribute__ ((__unused__))
49# else
50# define SWIGUNUSED
51# endif
52# elif defined(__ICC)
53# define SWIGUNUSED __attribute__ ((__unused__))
54# else
55# define SWIGUNUSED
56# endif
57#endif
58
59#ifndef SWIG_MSC_UNSUPPRESS_4505
60# if defined(_MSC_VER)
61# pragma warning(disable : 4505) /* unreferenced local function has been removed */
62# endif
63#endif
64
65#ifndef SWIGUNUSEDPARM
66# ifdef __cplusplus
67# define SWIGUNUSEDPARM(p)
68# else
69# define SWIGUNUSEDPARM(p) p SWIGUNUSED
70# endif
71#endif
72
73/* internal SWIG method */
74#ifndef SWIGINTERN
75# define SWIGINTERN static SWIGUNUSED
76#endif
77
78/* internal inline SWIG method */
79#ifndef SWIGINTERNINLINE
80# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
81#endif
82
83/* exporting methods */
84#if defined(__GNUC__)
85# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
86# ifndef GCC_HASCLASSVISIBILITY
87# define GCC_HASCLASSVISIBILITY
88# endif
89# endif
90#endif
91
92#ifndef SWIGEXPORT
93# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
94# if defined(STATIC_LINKED)
95# define SWIGEXPORT
96# else
97# define SWIGEXPORT __declspec(dllexport)
98# endif
99# else
100# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
101# define SWIGEXPORT __attribute__ ((visibility("default")))
102# else
103# define SWIGEXPORT
104# endif
105# endif
106#endif
107
108/* calling conventions for Windows */
109#ifndef SWIGSTDCALL
110# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
111# define SWIGSTDCALL __stdcall
112# else
113# define SWIGSTDCALL
114# endif
115#endif
116
117/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
118#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
119# define _CRT_SECURE_NO_DEPRECATE
120#endif
121
122/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
123#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
124# define _SCL_SECURE_NO_DEPRECATE
125#endif
126
127/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
128#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
129# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
130#endif
131
132/* Intel's compiler complains if a variable which was never initialised is
133 * cast to void, which is a common idiom which we use to indicate that we
134 * are aware a variable isn't used. So we just silence that warning.
135 * See: https://github.com/swig/swig/issues/192 for more discussion.
136 */
137#ifdef __INTEL_COMPILER
138# pragma warning disable 592
139#endif
140
141
142/* Fix for jlong on some versions of gcc on Windows */
143#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
144 typedef long long __int64;
145#endif
146
147/* Fix for jlong on 64-bit x86 Solaris */
148#if defined(__x86_64)
149# ifdef _LP64
150# undef _LP64
151# endif
152#endif
153
154#include <jni.h>
155#include <stdlib.h>
156#include <string.h>
157
158
159/* Support for throwing Java exceptions */
160typedef enum {
161 SWIG_JavaOutOfMemoryError = 1,
162 SWIG_JavaIOException,
163 SWIG_JavaRuntimeException,
164 SWIG_JavaIndexOutOfBoundsException,
165 SWIG_JavaArithmeticException,
166 SWIG_JavaIllegalArgumentException,
167 SWIG_JavaNullPointerException,
168 SWIG_JavaDirectorPureVirtual,
169 SWIG_JavaUnknownError,
170 SWIG_JavaIllegalStateException,
171} SWIG_JavaExceptionCodes;
172
173typedef struct {
174 SWIG_JavaExceptionCodes code;
175 const char *java_exception;
176} SWIG_JavaExceptions_t;
177
178
179static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
180 jclass excep;
181 static const SWIG_JavaExceptions_t java_exceptions[] = {
182 { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
183 { SWIG_JavaIOException, "java/io/IOException" },
184 { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
185 { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
186 { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
187 { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
188 { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
189 { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
190 { SWIG_JavaUnknownError, "java/lang/UnknownError" },
191 { SWIG_JavaIllegalStateException, "java/lang/IllegalStateException" },
192 { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" }
193 };
194 const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
195
196 while (except_ptr->code != code && except_ptr->code)
197 except_ptr++;
198
199 (*jenv)->ExceptionClear(jenv);
200 excep = (*jenv)->FindClass(jenv, except_ptr->java_exception);
201 if (excep)
202 (*jenv)->ThrowNew(jenv, excep, msg);
203}
204
205
206/* Contract support */
207
208#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else
209
210
211extern char * GetCurrentPrompt();
212
213
214#ifdef __cplusplus
215extern "C" {
216#endif
217
218SWIGEXPORT jstring JNICALL Java_org_scilab_modules_console_AdvCLIManagementJNI_GetCurrentPrompt(JNIEnv *jenv, jclass jcls) {
219 jstring jresult = 0 ;
220 char *result = 0 ;
221
222 (void)jenv;
223 (void)jcls;
224 result = (char *)GetCurrentPrompt();
225 if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
226 return jresult;
227}
228
229
230#ifdef __cplusplus
231}
232#endif
233
diff --git a/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.java b/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.java
index 868a5e0..4c67216 100644
--- a/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.java
+++ b/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/EvaluateSelectionAction.java
@@ -2,8 +2,8 @@
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2009 - DIGITEO - Bruno JOFRET 3 * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
4 * Copyright (C) 2010 - Calixte DENIZET 4 * Copyright (C) 2010 - Calixte DENIZET
5 *
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises 5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2021 - Stéphane MOTTELET
7 * 7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0, 8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1. 9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
@@ -28,6 +28,9 @@ import org.scilab.modules.scinotes.SciNotes;
28import org.scilab.modules.scinotes.ScilabEditorPane; 28import org.scilab.modules.scinotes.ScilabEditorPane;
29 29
30import org.scilab.modules.history_manager.HistoryManagement; 30import org.scilab.modules.history_manager.HistoryManagement;
31import org.scilab.modules.action_binding.highlevel.ScilabInterpreterManagement;
32import org.scilab.modules.console.SciPromptView;
33import org.scilab.modules.console.AdvCLIManagement;
31 34
32/** 35/**
33 * EvaluateSelectionAction class 36 * EvaluateSelectionAction class
@@ -64,8 +67,25 @@ public final class EvaluateSelectionAction extends DefaultAction {
64 while (tokens.hasMoreTokens()) { 67 while (tokens.hasMoreTokens()) {
65 lines[i++] = tokens.nextToken(); 68 lines[i++] = tokens.nextToken();
66 } 69 }
67 HistoryManagement.appendLinesToScilabHistory(lines, lines.length); 70 if (ScilabConsole.isExistingConsole())
68 ScilabConsole.getConsole().getAsSimpleConsole().sendCommandsToScilab(selection, true, false); 71 {
72 HistoryManagement.appendLinesToScilabHistory(lines, lines.length);
73 ScilabConsole.getConsole().getAsSimpleConsole().sendCommandsToScilab(selection, true, false);
74 } else {
75 /* This happens when SciNotes is launched as standalone (ie without
76 * Scilab) or Scilab launched in -nw mode */
77 new Thread(() -> {
78 try {
79 System.out.println(selection);
80 ScilabInterpreterManagement.synchronousScilabExec(selection);
81 System.out.println();
82 System.out.print(AdvCLIManagement.GetCurrentPrompt());
83 }
84 catch (ScilabInterpreterManagement.InterpreterException e) {
85 System.out.println(e.getMessage());
86 }
87 }).start();
88 }
69 } 89 }
70 } 90 }
71 91
diff --git a/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.java b/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.java
index ae62245..3e7aa1b 100644
--- a/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.java
+++ b/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/ExecuteFileIntoScilabAction.java
@@ -3,8 +3,8 @@
3 * Copyright (C) 2009 - DIGITEO - Bruno JOFRET 3 * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
4 * Copyright (C) 2009 - DIGITEO - Allan CORNET 4 * Copyright (C) 2009 - DIGITEO - Allan CORNET
5 * Copyright (C) 2010 - Calixte DENIZET 5 * Copyright (C) 2010 - Calixte DENIZET
6 *
7 * Copyright (C) 2012 - 2016 - Scilab Enterprises 6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
7 * Copyright (C) 2021 - Stéphane MOTTELET
8 * 8 *
9 * This file is hereby licensed under the terms of the GNU GPL v2.0, 9 * This file is hereby licensed under the terms of the GNU GPL v2.0,
10 * pursuant to article 5.3.4 of the CeCILL v.2.1. 10 * pursuant to article 5.3.4 of the CeCILL v.2.1.
@@ -19,6 +19,8 @@ package org.scilab.modules.scinotes.actions;
19 19
20import javax.swing.JButton; 20import javax.swing.JButton;
21import javax.swing.KeyStroke; 21import javax.swing.KeyStroke;
22import javax.swing.SwingUtilities;
23
22 24
23import org.scilab.modules.gui.console.ScilabConsole; 25import org.scilab.modules.gui.console.ScilabConsole;
24import org.scilab.modules.gui.menuitem.MenuItem; 26import org.scilab.modules.gui.menuitem.MenuItem;
@@ -29,6 +31,10 @@ import org.scilab.modules.gui.messagebox.ScilabModalDialog.IconType;
29import org.scilab.modules.scinotes.SciNotes; 31import org.scilab.modules.scinotes.SciNotes;
30import org.scilab.modules.scinotes.ScilabDocument; 32import org.scilab.modules.scinotes.ScilabDocument;
31import org.scilab.modules.scinotes.utils.SciNotesMessages; 33import org.scilab.modules.scinotes.utils.SciNotesMessages;
34import org.scilab.modules.action_binding.highlevel.ScilabInterpreterManagement;
35import org.scilab.modules.action_binding.InterpreterManagement;
36import org.scilab.modules.console.SciPromptView;
37import org.scilab.modules.console.AdvCLIManagement;
32 38
33/** 39/**
34 * ExecuteFileIntoScilabAction Class 40 * ExecuteFileIntoScilabAction Class
@@ -68,12 +74,23 @@ public class ExecuteFileIntoScilabAction extends DefaultAction {
68 filePath = filePath.replaceAll("'", "''"); 74 filePath = filePath.replaceAll("'", "''");
69 if (filePath.compareTo("") != 0) { 75 if (filePath.compareTo("") != 0) {
70 String cmdToExec = "exec('" + filePath + "', -1)"; 76 String cmdToExec = "exec('" + filePath + "', -1)";
71 try { 77 if (ScilabConsole.isExistingConsole())
78 {
72 ScilabConsole.getConsole().getAsSimpleConsole().sendCommandsToScilab(cmdToExec, true, false); 79 ScilabConsole.getConsole().getAsSimpleConsole().sendCommandsToScilab(cmdToExec, true, false);
73 } catch (NoClassDefFoundError e) { 80 } else {
74 /* This happens when SciNotes is launch as standalone (ie without 81 /* This happens when SciNotes is launched as standalone (ie without
75 * Scilab) */ 82 * Scilab) or Scilab launched in -nw mode */
76 ScilabModalDialog.show(editor, SciNotesMessages.COULD_NOT_FIND_CONSOLE); 83 new Thread(() -> {
84 try {
85 System.out.println(cmdToExec);
86 ScilabInterpreterManagement.synchronousScilabExec(cmdToExec);
87 System.out.println();
88 System.out.print(AdvCLIManagement.GetCurrentPrompt());
89 }
90 catch (ScilabInterpreterManagement.InterpreterException e) {
91 System.out.println(e.getMessage());
92 }
93 }).start();
77 } 94 }
78 } 95 }
79 } 96 }
@@ -86,7 +103,7 @@ public class ExecuteFileIntoScilabAction extends DefaultAction {
86 if (((ScilabDocument) getEditor().getTextPane().getDocument()).isContentModified()) { 103 if (((ScilabDocument) getEditor().getTextPane().getDocument()).isContentModified()) {
87 if (saveBefore || ScilabModalDialog.show(getEditor(), SciNotesMessages.EXECUTE_WARNING, SciNotesMessages.EXECUTE_FILE_INTO_SCILAB, 104 if (saveBefore || ScilabModalDialog.show(getEditor(), SciNotesMessages.EXECUTE_WARNING, SciNotesMessages.EXECUTE_FILE_INTO_SCILAB,
88 IconType.WARNING_ICON, ButtonType.CANCEL_OR_SAVE_AND_EXECUTE) == AnswerOption.SAVE_EXECUTE_OPTION) { 105 IconType.WARNING_ICON, ButtonType.CANCEL_OR_SAVE_AND_EXECUTE) == AnswerOption.SAVE_EXECUTE_OPTION) {
89 if (editor.save(getEditor().getTabPane().getSelectedIndex(), true)) { 106 if (editor.save(getEditor().getTabPane().getSelectedIndex(), true)) {
90 this.executeFile(editor, editor.getTextPane().getName()); 107 this.executeFile(editor, editor.getTextPane().getName());
91 } 108 }
92 } 109 }