if (!"global".equalsIgnoreCase (name)) { Iterator evals = getRegisteredRequestEvaluators (); while (evals.hasNext ()) { try { RequestEvaluator reval = (RequestEvaluator) evals.next (); FunctionPrototype fp = (FunctionPrototype) reval.evaluator.getFunctionPrototype(); reval.global.putHiddenProperty (name, new NodeConstructor (name, fp, reval)); } catch (Exception ignore) {} } }
    public void registerPrototype (String name, File dir, Prototype proto) {        // IServer.getLogger().log ("registering prototype "+name);        // show the type checker thread that there has been type activity        idleSeconds = 0;        String list[] = dir.list();        Hashtable ntemp = new Hashtable ();        Hashtable nfunc = new Hashtable ();        Hashtable nact = new Hashtable ();        for (int i=0; i<list.length; i++) {            File tmpfile = new File (dir, list[i]);            int dot = list[i].indexOf (".");            if (dot < 0)                continue;            String tmpname = list[i].substring(0, dot);            if (list[i].endsWith (app.templateExtension)) {                try {                    Template t = new Template (tmpfile, tmpname, proto);                    ntemp.put (tmpname, t);                } catch (Throwable x) {                    IServer.getLogger().log ("Error creating prototype: "+x);                }            } else if (list[i].endsWith (app.scriptExtension) && tmpfile.length () > 0) {                try {                    FunctionFile ff = new FunctionFile (tmpfile, tmpname, proto);                    nfunc.put (tmpname, ff);                } catch (Throwable x) {                    IServer.getLogger().log ("Error creating prototype: "+x);                }            } else if (list[i].endsWith (app.actionExtension) && tmpfile.length () > 0) {                try {                    Action af = new Action (tmpfile, tmpname, proto);                    nact.put (tmpname, af);                } catch (Throwable x) {                    IServer.getLogger().log ("Error creating prototype: "+x);                }           }        }        proto.templates = ntemp;        proto.functions = nfunc;        proto.actions = nact;    }