return t.invoke(new EvaluationContext(context != null ? context.getThisObject() : null, context, t), this, arguments);
}
public String eval(ILocatedEntity referer, String template, String templateId, EvaluationContext context) {
final String inputName = templateId != null ? templateId : referer.getLocation();
AstParser p = new AstParser(new ErrorReporter() {
public void error(int start, int end, int line, String s) {
DefaultEvaluationStrategy.this.fireError(null, inputName + ":" + s);
}
});
IBundleEntity[] loaded = null;
if (!p.parseBody(template, "syntax", inputName)) {
loaded = new ITemplate[0];
} else {
loaded = p.getResult();
}
ITemplate t = loaded != null && loaded.length == 1
&& loaded[0].getKind() == IBundleEntity.KIND_TEMPLATE
&& loaded[0].getName().equals("inline")