Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353615 - [editor] can't view custom tag file source code (when inside a jar) using ctrl+click from jsp editor
Summary: [editor] can't view custom tag file source code (when inside a jar) using ctr...
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.3   Edit
Hardware: All Linux
: P3 normal (vote)
Target Milestone: 3.3.1   Edit
Assignee: Andre Albino Pereira CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-02 12:07 EDT by Andre Albino Pereira CLA
Modified: 2011-08-08 19:33 EDT (History)
1 user (show)

See Also:


Attachments
Patch to fix CMElementDeclarationImpl.setLocationString(String) from tag-files inside jar (19.09 KB, patch)
2011-08-02 13:12 EDT, Andre Albino Pereira CLA
no flags Details | Diff
Patch to fix CMElementDeclarationImpl.setLocationString(String) from tag-files inside jar (813 bytes, patch)
2011-08-02 13:15 EDT, Andre Albino Pereira CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!