Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353615

Summary: [editor] can't view custom tag file source code (when inside a jar) using ctrl+click from jsp editor
Product: [WebTools] WTP Source Editing Reporter: Andre Albino Pereira <andreptb>
Component: jst.jspAssignee: Andre Albino Pereira <andreptb>
Status: RESOLVED FIXED QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P3 CC: thatnitind
Version: 3.3   
Target Milestone: 3.3.1   
Hardware: All   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch to fix CMElementDeclarationImpl.setLocationString(String) from tag-files inside jar
none
Patch to fix CMElementDeclarationImpl.setLocationString(String) from tag-files inside jar nsand.dev: iplog+

Description Andre Albino Pereira CLA 2011-08-02 12:07:16 EDT
Build Identifier: 20110615-0604

Holding ctrl and clicking at a declared custom tag-file in a jsp (or another tag-file) should open another jsp editor tab showing the tag-file source code. Instead, it opens a blank editor. That situation happens when:
- The project references a tag-file which is inside META-INF/tags of an external jar in the project build path.
- The project references a tag-file which is inside META-INF/tags of another java project in the main web project build path.

Reproducible: Always

Steps to Reproduce:
1. Add to a Web project build path an external jar (or another project) which contains a custom tag-file within META-INF/tags.
2. Create a jsp and declare that custom tag-file.
3. Hold ctrl and click at the declared tag-file. Should open a blank editor instead of showing the source code.
Comment 1 Andre Albino Pereira CLA 2011-08-02 13:12:04 EDT
Created attachment 200748 [details]
Patch to fix CMElementDeclarationImpl.setLocationString(String) from tag-files inside jar

It seems when custom tag-files inside jar are loaded the location string defined at org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentFactoryTLD:303 is wrong. This patch addresses this issue.
Comment 2 Andre Albino Pereira CLA 2011-08-02 13:15:58 EDT
Created attachment 200749 [details]
Patch to fix CMElementDeclarationImpl.setLocationString(String) from tag-files inside jar

This patch was generated with my code formatter disabled.

It seems when custom tag-files inside jar are loaded the location string
defined at
org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentFactoryTLD:303 is
wrong. This patch addresses this issue.
Comment 3 Nick Sandonato CLA 2011-08-08 17:46:38 EDT
Good find, Andre. Thanks for the patch. I've released the changes.
Comment 4 Andre Albino Pereira CLA 2011-08-08 19:33:38 EDT
(In reply to comment #3)
> Good find, Andre. Thanks for the patch. I've released the changes.

You're welcome!