Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311961 - [content assist] JSP tags being suggested outside of root element node are provided in a hackish manor
Summary: [content assist] JSP tags being suggested outside of root element node are pr...
Status: NEW
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: Future   Edit
Assignee: wst.xml CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on: 311957 311959
Blocks:
  Show dependency tree
 
Reported: 2010-05-06 15:19 EDT by Ian Tewksbury CLA
Modified: 2013-06-19 11:13 EDT (History)
1 user (show)

See Also:


Attachments
Preliminary Fix (8.94 KB, patch)
2010-05-06 15:26 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 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.