Community
Participate
Working Groups
Build Identifier: 20110615-0604 When a custom tag includes other JSP file using the 'include' directive, hyperlink of the custom tag opens the included JSP file instead of the custom tag file. This happens because the location string of the custom tag is overwritten in the following method during processing the included JSP file. org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentFactoryTLD.loadTagFile(CMElementDeclarationImpl, IFile, boolean, InputStream) Reproducible: Always Steps to Reproduce: 1. Create a JSP file 'taglibs.jsp' in the webapp root directory. <%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> 2. Create a custom tag file 'myfunc.tag' with the following line and place it into the /WEB-INF/tags directory. <%@ include file="/taglibs.jsp" %> 3. Create another JSP file with the following line. <tags:myfunc /> 4. Command (or Control) + Click the custom tag to open myfunc.tag. Expected: myfunc.tag is opened. Actual: taglibs.jsp is opened.
Created attachment 202924 [details] Fix hyperlink of custom tag file with include directive The patch modifies the following methods (I haven't tested .tagx file, but it seems to be the same). org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentFactoryTLD.loadTagFile(CMElementDeclarationImpl, IFile, boolean, InputStream) org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentFactoryTLD.loadTagXFile(CMElementDeclarationImpl, IFile, boolean, InputStream)
Thanks for the patch! I think it looks pretty good. We're pretty late into SR1 right now, so I'll target it for SR2.
Code checked in. Thanks again!
Thank you for the review and the commit. :)