private static TemplateElement findTemplateElement(TemplateElement te, int line) { if (te.getBeginLine() > line || te.getEndLine() < line) { return null; if ( e.getBeginLine() == line && e.getEndLine() > line ) { bestMatch = e; if ( e.getBeginLine() == e.getEndLine() && e.getBeginLine() == line) { bestMatch = e; break;
@Override protected TemplateElement[] accept(Environment env) throws TemplateException, IOException { if (!DebuggerService.suspendEnvironment( env, this.getTemplate().getSourceName(), getChild(0).getBeginLine())) { return getChild(0).accept(env); } else { throw new StopException(env, "Stopped by debugger"); } }
private static TemplateElement findTemplateElement(TemplateElement te, int line) { if (te.getBeginLine() > line || te.getEndLine() < line) { return null; if ( e.getBeginLine() == line && e.getEndLine() > line ) { bestMatch = e; if ( e.getBeginLine() == e.getEndLine() && e.getBeginLine() == line) { bestMatch = e; break;
private static TemplateElement findTemplateElement(TemplateElement te, int line) { if (te.getBeginLine() > line || te.getEndLine() < line) { return null; if ( e.getBeginLine() == line && e.getEndLine() > line ) { bestMatch = e; if ( e.getBeginLine() == e.getEndLine() && e.getBeginLine() == line) { bestMatch = e; break;
private static TemplateElement findTemplateElement(TemplateElement te, int line) { if(te.getBeginLine() > line || te.getEndLine() < line) { return null; } // Find the narrowest match for(Enumeration children = te.children(); children.hasMoreElements();) { TemplateElement child = (TemplateElement)children.nextElement(); TemplateElement childmatch = findTemplateElement(child, line); if(childmatch != null) { return childmatch; } } // If no child provides narrower match, return this return te; }
protected void accept(Environment env) throws TemplateException, IOException { if(!DebuggerService.suspendEnvironment(env, nestedBlock.getBeginLine())) { nestedBlock.accept(env); } else { throw new StopException(env, "Stopped by debugger"); } }
@Override protected TemplateElement[] accept(Environment env) throws TemplateException, IOException { if (!DebuggerService.suspendEnvironment( env, this.getTemplate().getSourceName(), getChild(0).getBeginLine())) { return getChild(0).accept(env); } else { throw new StopException(env, "Stopped by debugger"); } }
@Override protected TemplateElement[] accept(Environment env) throws TemplateException, IOException { if (!DebuggerService.suspendEnvironment( env, this.getTemplate().getSourceName(), getChild(0).getBeginLine())) { return getChild(0).accept(env); } else { throw new StopException(env, "Stopped by debugger"); } }