Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353629 - [content assist] Custom tag file attributes proposal "mixing" attributes from other tag files inside the same jar
Summary: [content assist] Custom tag file attributes proposal "mixing" attributes from...
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 14:11 EDT by Andre Albino Pereira CLA
Modified: 2011-08-08 19:31 EDT (History)
1 user (show)

See Also:


Attachments
Patch to address the problem of loading all tag-files inside the same jar, "mixing" meta data information. (2.08 KB, patch)
2011-08-02 14: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 14:11:13 EDT
Build Identifier: 20110615-0604

When using ctrl+space to view attributes proposals in a tag-file declaration in the jsp editor it should show only the attributes referenced in the tag-file. Inspecting "org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentFactoryTLD.createElementDeclaration(CMDocumentImpl, Element, String)", one could see that when the tag-file is inside a jar, it tries to load all tag-files from that jar. That seems to be incorrect, since it should load only the tag-file referenced in the third argument "path" from "createElementDeclaration". By loading all tag-files using "org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentFactoryTLD.loadTagFile(CMElementDeclarationImpl, IFile, boolean, InputStream)", the attribute information (and all other metadata information) of all tag-files is mixed/overwritten in the same instance of "org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMElementDeclarationImpl", instead of containing only the information associated with the tag-file referenced by "path" argument of "createElementDeclaration".

Reproducible: Always

Steps to Reproduce:
1. Add a external jar to your Web project containing 2 custom tag-files with different attributes.
2. Create a jsp and declare one the tags.
3. Press ctrl+space and inspect the attributes proposed by the content assist, all the attributes from tag 1 and 2 will show.
Comment 1 Andre Albino Pereira CLA 2011-08-02 14:15:56 EDT
Created attachment 200754 [details]
Patch to address the problem of loading all tag-files inside the same jar, "mixing" meta data information.
Comment 2 Nick Sandonato CLA 2011-08-08 17:45:15 EDT
Thank you very much for your patch, Andre! I've released the changes.
Comment 3 Andre Albino Pereira CLA 2011-08-08 19:31:58 EDT
(In reply to comment #2)
> Thank you very much for your patch, Andre! I've released the changes.

You're welcome!