Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 293099 - [content assist] [content model] JSP and Taglib Model Query Extensions should be aware of include options
Summary: [content assist] [content model] JSP and Taglib Model Query Extensions should...
Status: CLOSED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P2 major (vote)
Target Milestone: 3.2 M4   Edit
Assignee: Ian Tewksbury CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 107138
  Show dependency tree
 
Reported: 2009-10-22 15:28 EDT by Ian Tewksbury CLA
Modified: 2010-01-13 16:44 EST (History)
2 users (show)

See Also:
nsand.dev: review+


Attachments
Fix Patch (3.94 KB, patch)
2009-10-22 15:31 EDT, Ian Tewksbury CLA
no flags Details | Diff
Fix Patch Update 1 (3.55 KB, patch)
2009-11-04 13:42 EST, Ian Tewksbury CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Tewksbury CLA 2009-10-22 15:28:35 EDT
Currently the JSPModelQueryExtension and TaglibModelQueryExtension added by Bug 291246 do not pay attention to their given include options.  This is an issue when a requester is only looking for attribute declarations and these extensions only ever return element declarations.  This causes class cast exceptions with the outline view.  The result being when you right click on a node in the outline view the only option listed is "remove" but there should be many add options that are not being listed because of the class cast exception.

patch to follow.
Comment 1 Ian Tewksbury CLA 2009-10-22 15:31:49 EDT
Created attachment 150300 [details]
Fix Patch

This patch updates the Model Query Extensions to only do their work if the include options includes INCLUDE_CHILD_NODES, otherwise an empty array is returned.
Comment 2 Ian Tewksbury CLA 2009-10-22 15:37:10 EDT
This bug only depends on 107138 in so much that currently the JSP content assist processor only sends INCLUDE_ATTRIBUTES as its include options when really it should be asking for INCLUDE_CHILD_NODES and this is updated in 107138.  If this is committed before Bug 107138 then the outline view will work but content assist for JSP tag libs and custom tags will break.  If this patch waits for Bug 107138 then the outline view stays broken but the content assist continues to work weather or not Bug 107138 is committed.
Comment 3 Ian Tewksbury CLA 2009-11-04 13:42:27 EST
Created attachment 151345 [details]
Fix Patch Update 1

The patch had become obsolete due to other patches going in in this area.  This is an updated patch that should apply now.
Comment 4 Nick Sandonato CLA 2009-12-02 10:32:34 EST
Fixed.
Comment 5 Ian Tewksbury CLA 2010-01-13 16:44:47 EST
Verified in 3.2I-20100105_003934