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

Bug 311961

Summary: [content assist] JSP tags being suggested outside of root element node are provided in a hackish manor
Product: [WebTools] WTP Source Editing Reporter: Ian Tewksbury <itewksbu>
Component: wst.xmlAssignee: wst.xml <wst.xml-inbox>
Status: NEW --- QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P3 CC: nsand.dev
Version: 3.2   
Target Milestone: Future   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 311957, 311959    
Bug Blocks:    
Attachments:
Description Flags
Preliminary Fix none

Description Ian Tewksbury CLA 2010-05-06 15:19:42 EDT
Unfortunately the 'correct' fix for Bug 197954 requires new API in the ModelQuery* area and at this late in the game for WTP 3.2 this can't be done.  To that end Bug 197954 fix is a hack around this by manually injecting the tag lib and JSP suggestions rather then using the model query suggestions.

This bug is to correct the 'damage' done by the intermediary fix for Bug 197954.  This will be done by taking advantage of two enhancements:

Bug 311957 - [content model] Need way for ModelQueryExtensions to make document root level contributions 
Bug 311959 - [content assist] Update model query extensions to provide document root level contributions
Comment 1 Ian Tewksbury CLA 2010-05-06 15:26:16 EDT
Created attachment 167375 [details]
Preliminary Fix

This fix is based on the current patches for Bug 21197 and Bug 311959.  This patch has been smoke tested as working and passes current JUnits.

This patch will most likely have to be updated as Bug 21197 and Bug 311959 evolve. But in its-self this patch is simple. It just updates AbstractXMLModelQueryCompletionProposalComputer#getAvailableRootChildren to make a ModelQuery using the document as the root node along with existing functionality.  This of course only works with the enhancements provided by Bug 21197 and Bug 311959.

New JUnits for this bug will most likely not have to be written because the JUnits that are provided with the 'hackish' fix for Bug 197954 should thoroughly be testing this scenario already, all that will change is the manor in which the content assist contributions are made.