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; }
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;