/*
- * PIMS ( http://forge.scilab.org/index.php/p/pims ) - This file is part of PIMS
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
* Copyright (C) 2013 - Scilab Enterprises - Sylvestre Ledru
*
*
*/
-#include "ScilabJavaEnvironment.hxx"
-#include "ScilabGateway.hxx"
-
extern "C" {
#include "Scierror.h"
#include "gw_external_objects_java.h"
}
+#include "ScilabJavaEnvironment.hxx"
+#include "ScilabGateway.hxx"
+
using namespace org_scilab_modules_external_objects_java;
using namespace org_modules_external_objects;
try
{
const int envId = ScilabJavaEnvironment::start();
- // return ScilabGateway::setAllowReload(fname, envId, pvApiCtx);
+
+ ScilabJavaEnvironment *javaEnvironment = ScilabJavaEnvironment::getInstance();
+ if (!javaEnvironment)
+ {
+ Scierror(999, "%s: No Java environment available (instance is null).", fname);
+ return 0;
+ }
+
+ JavaOptionsSetter setter = javaEnvironment->getOptionsHelper().getSetter(JavaOptionsSetter::ALLOWRELOAD);
+ return ScilabGateway::getsetOptions(fname, envId, setter, pvApiCtx);
}
catch (std::exception & e)
{
Scierror(999, "%s: An error occured: %s", fname, e.what());
return 0;
}
+
+ return 0;
}