Context(Environment env) throws TemplateException { invokingMacroContext = env.getCurrentMacroContext(); List bodyParameterNames = invokingMacroContext.nestedContentParameterNames; if (bodyParameters != null) { for (int i = 0; i < bodyParameters.size(); i++) { Expression exp = (Expression) bodyParameters.get(i); TemplateModel tm = exp.eval(env); if (bodyParameterNames != null && i < bodyParameterNames.size()) { String bodyParameterName = (String) bodyParameterNames.get(i); if (bodyVars == null) { bodyVars = env.new Namespace(); } bodyVars.put(bodyParameterName, tm); } } } }
Context(Environment env, TemplateObject callPlace, List nestedContentParameterNames) { this.localVars = env.new Namespace(); this.callPlace = callPlace; this.nestedContentNamespace = env.getCurrentNamespace(); this.nestedContentParameterNames = nestedContentParameterNames; this.prevLocalContextStack = env.getLocalContextStack(); this.prevMacroContext = env.getCurrentMacroContext(); }
Macro.Context invokingMacroContext = getCurrentMacroContext(); LocalContextStack prevLocalContextStack = localContextStack; TemplateObject callPlace = invokingMacroContext.callPlace;
Macro.Context ctx = env.getCurrentMacroContext(); return ctx == null ? null : ctx.getLocals(); Context ctx = env.getCurrentMacroContext(); if (ctx == null) { throw new TemplateException(
Context(Environment env) throws TemplateException { invokingMacroContext = env.getCurrentMacroContext(); List bodyParameterNames = invokingMacroContext.bodyParameterNames; if (bodyParameters != null) { for (int i=0; i<bodyParameters.size(); i++) { Expression exp = (Expression) bodyParameters.get(i); TemplateModel tm = exp.getAsTemplateModel(env); if (bodyParameterNames != null && i < bodyParameterNames.size()) { String bodyParameterName = (String) bodyParameterNames.get(i); if (bodyVars == null) { bodyVars = env.new Namespace(); } bodyVars.put(bodyParameterName, tm); } } } }
Context(Environment env) throws TemplateException { invokingMacroContext = env.getCurrentMacroContext(); List bodyParameterNames = invokingMacroContext.nestedContentParameterNames; if (bodyParameters != null) { for (int i = 0; i < bodyParameters.size(); i++) { Expression exp = (Expression) bodyParameters.get(i); TemplateModel tm = exp.eval(env); if (bodyParameterNames != null && i < bodyParameterNames.size()) { String bodyParameterName = (String) bodyParameterNames.get(i); if (bodyVars == null) { bodyVars = env.new Namespace(); } bodyVars.put(bodyParameterName, tm); } } } }
Context(Environment env) throws TemplateException { invokingMacroContext = env.getCurrentMacroContext(); List bodyParameterNames = invokingMacroContext.nestedContentParameterNames; if (bodyParameters != null) { for (int i = 0; i < bodyParameters.size(); i++) { Expression exp = (Expression) bodyParameters.get(i); TemplateModel tm = exp.eval(env); if (bodyParameterNames != null && i < bodyParameterNames.size()) { String bodyParameterName = (String) bodyParameterNames.get(i); if (bodyVars == null) { bodyVars = env.new Namespace(); } bodyVars.put(bodyParameterName, tm); } } } }
Context(Environment env, TemplateObject callPlace, List nestedContentParameterNames) { this.localVars = env.new Namespace(); this.callPlace = callPlace; this.nestedContentNamespace = env.getCurrentNamespace(); this.nestedContentParameterNames = nestedContentParameterNames; this.prevLocalContextStack = env.getLocalContextStack(); this.prevMacroContext = env.getCurrentMacroContext(); }
Context(Environment env, TemplateElement body, List bodyParameterNames) { this.localVars = env.new Namespace(); this.prevMacroContext = env.getCurrentMacroContext(); this.bodyNamespace = env.getCurrentNamespace(); this.prevLocalContextStack = env.getLocalContextStack(); this.body = body; this.bodyParameterNames = bodyParameterNames; }
Context(Environment env, TemplateObject callPlace, List nestedContentParameterNames) { this.localVars = env.new Namespace(); this.callPlace = callPlace; this.nestedContentNamespace = env.getCurrentNamespace(); this.nestedContentParameterNames = nestedContentParameterNames; this.prevLocalContextStack = env.getLocalContextStack(); this.prevMacroContext = env.getCurrentMacroContext(); }
void visit(BodyInstruction.Context bctxt) throws TemplateException, IOException { Macro.Context invokingMacroContext = getCurrentMacroContext(); ArrayList prevLocalContextStack = localContextStack; TemplateElement body = invokingMacroContext.body; if (body != null) { this.currentMacroContext = invokingMacroContext.prevMacroContext; currentNamespace = invokingMacroContext.bodyNamespace; Configurable prevParent = getParent(); setParent(currentNamespace.getTemplate()); this.localContextStack = invokingMacroContext.prevLocalContextStack; if (invokingMacroContext.bodyParameterNames != null) { pushLocalContext(bctxt); } try { visit(body); } finally { if (invokingMacroContext.bodyParameterNames != null) { popLocalContext(); } this.currentMacroContext = invokingMacroContext; currentNamespace = getMacroNamespace(invokingMacroContext.getMacro()); setParent(prevParent); this.localContextStack = prevLocalContextStack; } } }
Macro.Context ctx = env.getCurrentMacroContext(); return ctx == null ? null : ctx.getLocals();
Macro.Context invokingMacroContext = getCurrentMacroContext(); LocalContextStack prevLocalContextStack = localContextStack; TemplateObject callPlace = invokingMacroContext.callPlace;
Macro.Context invokingMacroContext = getCurrentMacroContext(); LocalContextStack prevLocalContextStack = localContextStack; TemplateObject callPlace = invokingMacroContext.callPlace;
Macro.Context ctx = env.getCurrentMacroContext(); return ctx == null ? null : ctx.getLocals(); Context ctx = env.getCurrentMacroContext(); if (ctx == null) { throw new TemplateException(
Macro.Context ctx = env.getCurrentMacroContext(); return ctx == null ? null : ctx.getLocals(); Context ctx = env.getCurrentMacroContext(); if (ctx == null) { throw new TemplateException(