From bec04779edbaedce8a642d25e0764a75b27f4f00 Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 7 Aug 2003 16:22:26 +0000 Subject: [PATCH] ported from fesi to rhino. --- src/helma/extensions/demo/DemoExtension.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/helma/extensions/demo/DemoExtension.java b/src/helma/extensions/demo/DemoExtension.java index 115a6444..dbc35cae 100644 --- a/src/helma/extensions/demo/DemoExtension.java +++ b/src/helma/extensions/demo/DemoExtension.java @@ -17,18 +17,12 @@ package helma.extensions.demo; -// fesi-related stuff: -import FESI.Data.ESObject; -import FESI.Data.ESWrapper; -import FESI.Data.GlobalObject; -import FESI.Exceptions.EcmaScriptException; -import FESI.Interpreter.Evaluator; import helma.extensions.ConfigurationException; import helma.extensions.HelmaExtension; import helma.framework.core.Application; import helma.main.Server; import helma.scripting.ScriptingEngine; -import helma.scripting.fesi.FesiEngine; +import helma.scripting.rhino.RhinoEngine; import java.util.HashMap; /** @@ -95,7 +89,7 @@ public class DemoExtension extends HelmaExtension { */ public HashMap initScripting(Application app, ScriptingEngine engine) throws ConfigurationException { - if (!(engine instanceof FesiEngine)) { + if (!(engine instanceof RhinoEngine)) { throw new ConfigurationException("scripting engine " + engine.toString() + " not supported in DemoExtension"); } @@ -103,14 +97,10 @@ public class DemoExtension extends HelmaExtension { app.logEvent("initScripting DemoExtension with " + app.getName() + " and " + engine.toString()); - // fesi-specific code: - Evaluator evaluator = ((FesiEngine) engine).getEvaluator(); - - // initialize prototypes and global vars here, but don't add them to fesi's global object - ESWrapper demo = new ESWrapper(Server.getServer(), evaluator); + // initialize prototypes and global vars here HashMap globals = new HashMap(); - globals.put("demo", demo); + globals.put("demo", Server.getServer()); return globals; }