Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311957 - [content model] Need way for ModelQueryExtensions to make document root level contributions
Summary: [content model] Need way for ModelQueryExtensions to make document root level...
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: wst.xml CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 311959 311961
  Show dependency tree
 
Reported: 2010-05-06 14:56 EDT by Ian Tewksbury CLA
Modified: 2013-06-19 11:13 EDT (History)
2 users (show)

See Also:
itewksbu: review? (keith.chong.ca)
thatnitind: review? (nsand.dev)


Attachments
Enhancement Patch (8.63 KB, patch)
2010-05-06 15:02 EDT, Ian Tewksbury CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Tewksbury CLA 2010-05-06 14:56:23 EDT
Currently the ModelQueryExtension only always an extender to make contributions to the content of elements but not to the document root level.  The scenario where this is needed is for content assist being able to suggest JSP and JSP library tags at the document root level (Bug 197954).
Comment 1 Ian Tewksbury CLA 2010-05-06 15:02:14 EDT
Created attachment 167369 [details]
Enhancement Patch

I will be the first to admit I am not overly familiar with the ModelQuery* code base but I took a stab at this anyways.  My suggested patch for allowing ModelQueryExtensions to provide document root level contributions is based on the existing functionality for allowing them to contribute to element content.  There is some validation and filtering of contributions that is done for the element content case that I did not see anyway how it would apply to the document root case, but I could very well be miss understanding the purposes of this validation and filtering.

This suggested patch passes all existing JUnits.  I would be happy to provide some new ones but not exactly sure the best way to go about testing this functionality directly.