/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.7
- *
- * This file is not intended to be easily readable and contains a number of
+ *
+ * This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
- * changes to this file unless you know what you are doing--modify the SWIG
- * interface file instead.
+ * changes to this file unless you know what you are doing--modify the SWIG
+ * interface file instead.
* ----------------------------------------------------------------------------- */
#define SWIGJAVA
#ifndef SWIGUNUSED
# if defined(__GNUC__)
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-# define SWIGUNUSED __attribute__ ((__unused__))
+# define SWIGUNUSED __attribute__ ((__unused__))
# else
# define SWIGUNUSED
# endif
# elif defined(__ICC)
-# define SWIGUNUSED __attribute__ ((__unused__))
+# define SWIGUNUSED __attribute__ ((__unused__))
# else
-# define SWIGUNUSED
+# define SWIGUNUSED
# endif
#endif
#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
# pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif
+# endif
#endif
#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
# define SWIGUNUSEDPARM(p)
# else
-# define SWIGUNUSEDPARM(p) p SWIGUNUSED
+# define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif
# define SWIGSTDCALL __stdcall
# else
# define SWIGSTDCALL
-# endif
+# endif
#endif
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
/* Fix for jlong on some versions of gcc on Windows */
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
-typedef long long __int64;
+ typedef long long __int64;
#endif
/* Fix for jlong on 64-bit x86 Solaris */
/* Support for throwing Java exceptions */
-typedef enum
-{
- SWIG_JavaOutOfMemoryError = 1,
- SWIG_JavaIOException,
- SWIG_JavaRuntimeException,
- SWIG_JavaIndexOutOfBoundsException,
- SWIG_JavaArithmeticException,
- SWIG_JavaIllegalArgumentException,
- SWIG_JavaNullPointerException,
- SWIG_JavaDirectorPureVirtual,
- SWIG_JavaUnknownError
+typedef enum {
+ SWIG_JavaOutOfMemoryError = 1,
+ SWIG_JavaIOException,
+ SWIG_JavaRuntimeException,
+ SWIG_JavaIndexOutOfBoundsException,
+ SWIG_JavaArithmeticException,
+ SWIG_JavaIllegalArgumentException,
+ SWIG_JavaNullPointerException,
+ SWIG_JavaDirectorPureVirtual,
+ SWIG_JavaUnknownError
} SWIG_JavaExceptionCodes;
-typedef struct
-{
- SWIG_JavaExceptionCodes code;
- const char *java_exception;
+typedef struct {
+ SWIG_JavaExceptionCodes code;
+ const char *java_exception;
} SWIG_JavaExceptions_t;
-static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg)
-{
- jclass excep;
- static const SWIG_JavaExceptions_t java_exceptions[] =
- {
- { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
- { SWIG_JavaIOException, "java/io/IOException" },
- { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
- { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
- { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
- { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
- { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
- { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
- { SWIG_JavaUnknownError, "java/lang/UnknownError" },
- { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" }
- };
- const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
-
- while (except_ptr->code != code && except_ptr->code)
- {
- except_ptr++;
- }
-
- (*jenv)->ExceptionClear(jenv);
- excep = (*jenv)->FindClass(jenv, except_ptr->java_exception);
- if (excep)
- {
- (*jenv)->ThrowNew(jenv, excep, msg);
- }
+static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
+ jclass excep;
+ static const SWIG_JavaExceptions_t java_exceptions[] = {
+ { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
+ { SWIG_JavaIOException, "java/io/IOException" },
+ { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
+ { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
+ { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
+ { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
+ { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
+ { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
+ { SWIG_JavaUnknownError, "java/lang/UnknownError" },
+ { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" }
+ };
+ const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
+
+ while (except_ptr->code != code && except_ptr->code)
+ except_ptr++;
+
+ (*jenv)->ExceptionClear(jenv);
+ excep = (*jenv)->FindClass(jenv, except_ptr->java_exception);
+ if (excep)
+ (*jenv)->ThrowNew(jenv, excep, msg);
}
extern "C" {
#endif
- SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getSCIHOME(JNIEnv *jenv, jclass jcls)
- {
- jstring jresult = 0 ;
- char *result = 0 ;
-
- (void)jenv;
- (void)jcls;
- result = (char *)getSCIHOME();
- if (result)
- {
- jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
- }
- return jresult;
- }
-
-
- SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getTMPDIR(JNIEnv *jenv, jclass jcls)
- {
- jstring jresult = 0 ;
- char *result = 0 ;
-
- (void)jenv;
- (void)jcls;
- result = (char *)getTMPDIR();
- if (result)
- {
- jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
- }
- return jresult;
- }
-
-
- SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getlanguage(JNIEnv *jenv, jclass jcls)
- {
- jstring jresult = 0 ;
- char *result = 0 ;
-
- (void)jenv;
- (void)jcls;
- result = (char *)getlanguage();
- if (result)
- {
- jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
- }
- return jresult;
- }
-
-
- SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_createtempfilename(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2)
- {
- jstring jresult = 0 ;
- char *arg1 = (char *) 0 ;
- int arg2 ;
- char *result = 0 ;
-
- (void)jenv;
- (void)jcls;
- arg1 = 0;
- if (jarg1)
- {
- arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
- if (!arg1)
- {
- return 0;
- }
- }
- arg2 = (int)jarg2;
- result = (char *)createtempfilename((char const *)arg1, arg2);
- if (result)
- {
- jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
- }
- if (arg1)
- {
- (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
- }
- return jresult;
- }
-
-
- SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getieee(JNIEnv *jenv, jclass jcls)
- {
- jint jresult = 0 ;
- int result;
-
- (void)jenv;
- (void)jcls;
- result = (int)getieee();
- jresult = (jint)result;
- return jresult;
- }
-
-
- SWIGEXPORT void JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_setieee(JNIEnv *jenv, jclass jcls, jint jarg1)
- {
- int arg1 ;
-
- (void)jenv;
- (void)jcls;
- arg1 = (int)jarg1;
- setieee(arg1);
- }
-
-
- SWIGEXPORT void JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_setformat(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2)
- {
- char *arg1 = (char *) 0 ;
- int arg2 ;
-
- (void)jenv;
- (void)jcls;
- arg1 = 0;
- if (jarg1)
- {
- arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
- if (!arg1)
- {
- return ;
- }
- }
- arg2 = (int)jarg2;
- setformat((char const *)arg1, arg2);
- if (arg1)
- {
- (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
- }
- }
-
-
- SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getformat(JNIEnv *jenv, jclass jcls)
- {
- jstring jresult = 0 ;
- char *result = 0 ;
-
- (void)jenv;
- (void)jcls;
- result = (char *)getformat();
- if (result)
- {
- jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
- }
- return jresult;
- }
-
-
- SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getformatwidth(JNIEnv *jenv, jclass jcls)
- {
- jint jresult = 0 ;
- int result;
-
- (void)jenv;
- (void)jcls;
- result = (int)getformatwidth();
- jresult = (jint)result;
- return jresult;
- }
-
-
- SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getScilabVersionMajor(JNIEnv *jenv, jclass jcls)
- {
- jint jresult = 0 ;
- int result;
-
- (void)jenv;
- (void)jcls;
- result = (int)getScilabVersionMajor();
- jresult = (jint)result;
- return jresult;
- }
-
-
- SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getScilabVersionMinor(JNIEnv *jenv, jclass jcls)
- {
- jint jresult = 0 ;
- int result;
-
- (void)jenv;
- (void)jcls;
- result = (int)getScilabVersionMinor();
- jresult = (jint)result;
- return jresult;
- }
-
-
- SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getScilabVersionMaintenance(JNIEnv *jenv, jclass jcls)
- {
- jint jresult = 0 ;
- int result;
-
- (void)jenv;
- (void)jcls;
- result = (int)getScilabVersionMaintenance();
- jresult = (jint)result;
- return jresult;
- }
-
-
- SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getScilabVersionTimestamp(JNIEnv *jenv, jclass jcls)
- {
- jint jresult = 0 ;
- int result;
-
- (void)jenv;
- (void)jcls;
- result = (int)getScilabVersionTimestamp();
- jresult = (jint)result;
- return jresult;
- }
+SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getSCIHOME(JNIEnv *jenv, jclass jcls) {
+ jstring jresult = 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (char *)getSCIHOME();
+ if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getTMPDIR(JNIEnv *jenv, jclass jcls) {
+ jstring jresult = 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (char *)getTMPDIR();
+ if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getlanguage(JNIEnv *jenv, jclass jcls) {
+ jstring jresult = 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (char *)getlanguage();
+ if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_createtempfilename(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
+ jstring jresult = 0 ;
+ char *arg1 = (char *) 0 ;
+ int arg2 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = 0;
+ if (jarg1) {
+ arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
+ if (!arg1) return 0;
+ }
+ arg2 = (int)jarg2;
+ result = (char *)createtempfilename((char const *)arg1,arg2);
+ if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
+ if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getieee(JNIEnv *jenv, jclass jcls) {
+ jint jresult = 0 ;
+ int result;
+
+ (void)jenv;
+ (void)jcls;
+ result = (int)getieee();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_setieee(JNIEnv *jenv, jclass jcls, jint jarg1) {
+ int arg1 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = (int)jarg1;
+ setieee(arg1);
+}
+
+
+SWIGEXPORT void JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_setformat(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
+ char *arg1 = (char *) 0 ;
+ int arg2 ;
+
+ (void)jenv;
+ (void)jcls;
+ arg1 = 0;
+ if (jarg1) {
+ arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0);
+ if (!arg1) return ;
+ }
+ arg2 = (int)jarg2;
+ setformat((char const *)arg1,arg2);
+ if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1);
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getformat(JNIEnv *jenv, jclass jcls) {
+ jstring jresult = 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (char *)getformat();
+ if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getformatwidth(JNIEnv *jenv, jclass jcls) {
+ jint jresult = 0 ;
+ int result;
+
+ (void)jenv;
+ (void)jcls;
+ result = (int)getformatwidth();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getScilabVersionMajor(JNIEnv *jenv, jclass jcls) {
+ jint jresult = 0 ;
+ int result;
+
+ (void)jenv;
+ (void)jcls;
+ result = (int)getScilabVersionMajor();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getScilabVersionMinor(JNIEnv *jenv, jclass jcls) {
+ jint jresult = 0 ;
+ int result;
+
+ (void)jenv;
+ (void)jcls;
+ result = (int)getScilabVersionMinor();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getScilabVersionMaintenance(JNIEnv *jenv, jclass jcls) {
+ jint jresult = 0 ;
+ int result;
+
+ (void)jenv;
+ (void)jcls;
+ result = (int)getScilabVersionMaintenance();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jint JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getScilabVersionTimestamp(JNIEnv *jenv, jclass jcls) {
+ jint jresult = 0 ;
+ int result;
+
+ (void)jenv;
+ (void)jcls;
+ result = (int)getScilabVersionTimestamp();
+ jresult = (jint)result;
+ return jresult;
+}
+
+
+SWIGEXPORT jstring JNICALL Java_org_scilab_modules_commons_ScilabCommonsJNI_getScilabVersionAsString(JNIEnv *jenv, jclass jcls) {
+ jstring jresult = 0 ;
+ char *result = 0 ;
+
+ (void)jenv;
+ (void)jcls;
+ result = (char *)getScilabVersionAsString();
+ if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result);
+ return jresult;
+}
#ifdef __cplusplus
import javax.swing.JTextArea;
+import org.scilab.modules.commons.ScilabCommonsUtils;
import org.scilab.modules.gui.ScilabTermination;
import org.scilab.modules.gui.bridge.CallScilabBridge;
import org.scilab.modules.gui.bridge.tab.SwingScilabTab;
ClosingOperationsManager.registerClosingOperation(tab, new ClosingOperationsManager.ClosingOperation() {
- public int canClose() {
- return 1;
- }
+ public int canClose() {
+ return 1;
+ }
- public void destroy() { }
+ public void destroy() { }
- public String askForClosing(final List<SwingScilabTab> list) {
- return null;
- }
+ public String askForClosing(final List<SwingScilabTab> list) {
+ return null;
+ }
- @Override
- public void updateDependencies(List<SwingScilabTab> list,
- ListIterator<SwingScilabTab> it) {
- }
- });
+ @Override
+ public void updateDependencies(List<SwingScilabTab> list,
+ ListIterator<SwingScilabTab> it) {
+ }
+ });
ClosingOperationsManager.addDependencyWithRoot(tab);
WindowsConfigurationManager.restorationFinished((SwingScilabTab) tab.getAsSimpleTab());
/* CONSOLE */
/* Create a tab to put console into */
LoadClassPath.loadOnUse("Console");
+ String tabName = String.format(Messages.gettext("Scilab %s Console"), ScilabCommonsUtils.getScilabVersionAsString());
if (uuid == null) {
- consoleTab = ScilabTab.createTab(Messages.gettext("Scilab Console"), UUID.randomUUID().toString());
+ consoleTab = ScilabTab.createTab(tabName, UUID.randomUUID().toString());
} else {
- consoleTab = ScilabTab.createTab(Messages.gettext("Scilab Console"), uuid);
+ consoleTab = ScilabTab.createTab(tabName, uuid);
}
ClosingOperationsManager.registerClosingOperation(consoleTab, new ClosingOperationsManager.ClosingOperation() {
- public int canClose() {
- CallScilabBridge.unblockConsole();
+ public int canClose() {
+ CallScilabBridge.unblockConsole();
- return 1;
- }
+ return 1;
+ }
- public void destroy() {
- if (!Scilab.getExitCalled()) {
- ScilabTermination.ScilabExit();
- }
+ public void destroy() {
+ if (!Scilab.getExitCalled()) {
+ ScilabTermination.ScilabExit();
}
+ }
- public String askForClosing(final List<SwingScilabTab> list) {
- return "Scilab";
- }
+ public String askForClosing(final List<SwingScilabTab> list) {
+ return "Scilab";
+ }
- @Override
- public void updateDependencies(List<SwingScilabTab> list,
- ListIterator<SwingScilabTab> it) {
- }
- });
+ @Override
+ public void updateDependencies(List<SwingScilabTab> list,
+ ListIterator<SwingScilabTab> it) {
+ }
+ });
ClosingOperationsManager.setRoot(consoleTab);