public final void processTemplateStart( final ITemplateContext context, final ITemplateStart templateStart, final ITemplateBoundariesStructureHandler structureHandler) { try { doProcessTemplateStart(context, templateStart, structureHandler); } catch (final TemplateProcessingException e) { if (templateStart.hasLocation()) { if (!e.hasTemplateName()) { e.setTemplateName(templateStart.getTemplateName()); } if (!e.hasLineAndCol()) { e.setLineAndCol(templateStart.getLine(), templateStart.getCol()); } } throw e; } catch (final Exception e) { throw new TemplateProcessingException( "Error during execution of processor '" + this.getClass().getName() + "'", templateStart.getTemplateName(), templateStart.getLine(), templateStart.getCol(), e); } }
public final void process( final ITemplateContext context, final IDocType docType, final IDocTypeStructureHandler structureHandler) { try { doProcess(context, docType, structureHandler); } catch (final TemplateProcessingException e) { if (docType.hasLocation()) { if (!e.hasTemplateName()) { e.setTemplateName(docType.getTemplateName()); } if (!e.hasLineAndCol()) { e.setLineAndCol(docType.getLine(), docType.getCol()); } } throw e; } catch (final Exception e) { throw new TemplateProcessingException( "Error during execution of processor '" + this.getClass().getName() + "'", docType.getTemplateName(), docType.getLine(), docType.getCol(), e); } }
public final void process( final ITemplateContext context, final IText text, final ITextStructureHandler structureHandler) { try { doProcess(context, text, structureHandler); } catch (final TemplateProcessingException e) { if (text.hasLocation()) { if (!e.hasTemplateName()) { e.setTemplateName(text.getTemplateName()); } if (!e.hasLineAndCol()) { e.setLineAndCol(text.getLine(), text.getCol()); } } throw e; } catch (final Exception e) { throw new TemplateProcessingException( "Error during execution of processor '" + this.getClass().getName() + "'", text.getTemplateName(), text.getLine(), text.getCol(), e); } }
public final void process( final ITemplateContext context, final IProcessingInstruction processingInstruction, final IProcessingInstructionStructureHandler structureHandler) { try { doProcess(context, processingInstruction, structureHandler); } catch (final TemplateProcessingException e) { if (processingInstruction.hasLocation()) { if (!e.hasTemplateName()) { e.setTemplateName(processingInstruction.getTemplateName()); } if (!e.hasLineAndCol()) { e.setLineAndCol(processingInstruction.getLine(), processingInstruction.getCol()); } } throw e; } catch (final Exception e) { throw new TemplateProcessingException( "Error during execution of processor '" + this.getClass().getName() + "'", processingInstruction.getTemplateName(), processingInstruction.getLine(), processingInstruction.getCol(), e); } }
public final void process( final ITemplateContext context, final IComment comment, final ICommentStructureHandler structureHandler) { try { doProcess(context, comment, structureHandler); } catch (final TemplateProcessingException e) { if (comment.hasLocation()) { if (!e.hasTemplateName()) { e.setTemplateName(comment.getTemplateName()); } if (!e.hasLineAndCol()) { e.setLineAndCol(comment.getLine(), comment.getCol()); } } throw e; } catch (final Exception e) { throw new TemplateProcessingException( "Error during execution of processor '" + this.getClass().getName() + "'", comment.getTemplateName(), comment.getLine(), comment.getCol(), e); } }
public final void process( final ITemplateContext context, final IXMLDeclaration xmlDeclaration, final IXMLDeclarationStructureHandler structureHandler) { try { doProcess(context, xmlDeclaration, structureHandler); } catch (final TemplateProcessingException e) { if (xmlDeclaration.hasLocation()) { if (!e.hasTemplateName()) { e.setTemplateName(xmlDeclaration.getTemplateName()); } if (!e.hasLineAndCol()) { e.setLineAndCol(xmlDeclaration.getLine(), xmlDeclaration.getCol()); } } throw e; } catch (final Exception e) { throw new TemplateProcessingException( "Error during execution of processor '" + this.getClass().getName() + "'", xmlDeclaration.getTemplateName(), xmlDeclaration.getLine(), xmlDeclaration.getCol(), e); } }
public final void process( final ITemplateContext context, final IProcessableElementTag tag, final IElementTagStructureHandler structureHandler) { try { doProcess(context, tag, structureHandler); } catch (final TemplateProcessingException e) { // This is a nice moment to check whether the execution raised an error and, if so, add location information if (tag.hasLocation()) { if (!e.hasTemplateName()) { e.setTemplateName(tag.getTemplateName()); } if (!e.hasLineAndCol()) { e.setLineAndCol(tag.getLine(), tag.getCol()); } } throw e; } catch (final Exception e) { throw new TemplateProcessingException( "Error during execution of processor '" + this.getClass().getName() + "'", tag.getTemplateName(), tag.getLine(), tag.getCol(), e); } }
public final void process( final ITemplateContext context, final ICDATASection cdataSection, final ICDATASectionStructureHandler structureHandler) { try { doProcess(context, cdataSection, structureHandler); } catch (final TemplateProcessingException e) { if (cdataSection.hasLocation()) { if (!e.hasTemplateName()) { e.setTemplateName(cdataSection.getTemplateName()); } if (!e.hasLineAndCol()) { e.setLineAndCol(cdataSection.getLine(), cdataSection.getCol()); } } throw e; } catch (final Exception e) { throw new TemplateProcessingException( "Error during execution of processor '" + this.getClass().getName() + "'", cdataSection.getTemplateName(), cdataSection.getLine(), cdataSection.getCol(), e); } }
public final void processTemplateEnd( final ITemplateContext context, final ITemplateEnd templateEnd, final ITemplateBoundariesStructureHandler structureHandler) { try { doProcessTemplateEnd(context, templateEnd, structureHandler); } catch (final TemplateProcessingException e) { if (templateEnd.hasLocation()) { if (!e.hasTemplateName()) { e.setTemplateName(templateEnd.getTemplateName()); } if (!e.hasLineAndCol()) { e.setLineAndCol(templateEnd.getLine(), templateEnd.getCol()); } } throw e; } catch (final Exception e) { throw new TemplateProcessingException( "Error during execution of processor '" + this.getClass().getName() + "'", templateEnd.getTemplateName(), templateEnd.getLine(), templateEnd.getCol(), e); } }
e.setLineAndCol(line, col);
e.setLineAndCol(modelLine, modelCol);
if (attributeName == null) { e.setLineAndCol(tag.getLine(), tag.getCol()); } else { final IAttribute attribute = tag.getAttribute(attributeName); if (attribute != null) { e.setLineAndCol(attribute.getLine(), attribute.getCol());
e.setLineAndCol(attribute.getLine(), attribute.getCol());
e.setLineAndCol(attributeLine, attributeCol);
e.setLineAndCol(attribute.getLine(), attribute.getCol());
e.setLineAndCol(attribute.getLine(), attribute.getCol());