[ https://issues.apache.org/jira/browse/TRINIDAD-1892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13627036#comment-13627036 ]
Andrew Robinson commented on TRINIDAD-1892: ------------------------------------------- Due to the fact that the preferred method seems to be to use sub-classes and call the generated class "Partial"+ originalName, I'm implementing the sub-class approach for the tag classes. I changed the code to create and pass the SourceTemplate to the generator, but at this time the AbstractComponentTagGenerator is not consuming the SourceTemplate parameter. I added TODO comments to functions that need to support it. If someone desires the SourceTemplate approach over the sub-class approach, a separate ER may be filed to add that code. > Sub-class support for for JSP tag generation > -------------------------------------------- > > Key: TRINIDAD-1892 > URL: https://issues.apache.org/jira/browse/TRINIDAD-1892 > Project: MyFaces Trinidad > Issue Type: Improvement > Components: Build > Affects Versions: 2.0.0-alpha > Reporter: Andy Schwartz > Assignee: Andrew Robinson > > Trinidad's GenerateComponentMojo allows a base source template to be > specified for components that are generated. The contents of the template > file are merged with the generated contents to form the complete component > class. > Trinidad's GenerateJspTaglibsMojo, while containing some code that hints at > this support, eg: > private class IfComponentModifiedFilter extends ComponentFilter > { > protected boolean accept( > ComponentBean component) > { > String tagClass = component.getTagClass(); > String sourcePath = Util.convertClassToSourcePath(tagClass, ".java"); > String templatePath = Util.convertClassToSourcePath(tagClass, > "Template.java"); > File targetFile = new File(generatedSourceDirectory, sourcePath); > File templateFile = new File(templateSourceDirectory, templatePath); > // accept if templateFile is newer or component has been modified > return (templateFile.lastModified() > targetFile.lastModified() || > component.isModifiedSince(targetFile.lastModified())); > } > } > Does not appear to fully support this. > Opening this issue to request that we enhance GenerateJspTaglibsMojo to > include support for allowing a base template source file to be specified for > generated component tags. Without this, if any tag customization is > necessary, the tag generation tool cannot be used - ie. the entire tag must > be written from scratch. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira