ScriptMonkeyApplicationComponent applicationComponent = ApplicationManager.getApplication().getComponent(ScriptMonkeyApplicationComponent.class);
File jsFolder = new File(applicationComponent.getSettings().getHomeFolder(), Constants.JS_FOLDER_NAME);
File globalScripts = new File(jsFolder, "global");
if (globalScripts.exists()) {
File[] jsFiles = globalScripts.listFiles(new JSFileFilter());
for (File jsFile : jsFiles) {
try {
logger.info("Evaluating script '" + jsFile + "' ...");
engine.eval(new FileReader(jsFile));
logger.info("Script successfully processed !");