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

Bug 475849

Summary: [HTML] Incorrect content assist when inside <script> tags and in offsets beside attributes
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: JS ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Carolyn_MacLeod, Michael_Rennie
Version: 9.0   
Target Milestone: 10.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Curtis Windatt CLA 2015-08-25 16:09:38 EDT
If you are in a script block you should get JS content assist.
If you are in the <script> tag you should get HTML content assist.

Currently we are returning html tag proposals inside the attributes.
Comment 1 Curtis Windatt CLA 2015-08-25 17:57:04 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=ab848bbe9412e91660a90335115413a66fae6e2f
Found a whole series of minor issues, all are now fixed and tests added:
1) <script> tags were considered part of script blocks
2) empty script blocks were given attribute completions (no text node)
3) if offset was touching an attribute, attributes weren't concatenated (minor regression from Bug 473948)
4) if offset was touching an attribute, proposals weren't marked as obsolete and proposals for existing attributes weren't filtered (checking the wrong node)
Comment 2 Carolyn MacLeod CLA 2015-08-26 09:27:44 EDT
Just curious - did you test inside <style> blocks? There could be similar issues there.
Comment 3 Curtis Windatt CLA 2015-08-26 10:03:13 EDT
(In reply to Carolyn MacLeod from comment #2)
> Just curious - did you test inside <style> blocks? There could be similar
> issues there.

Style blocks use the identical code path.  The relevant modified function is inScriptOrStyleBlock().  However, because I was rushing to get this done before leaving I didn't write any tests for the style tag.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=b8e982ce1b6b699e86581058492f2c0623a632ba

Adds the matching tests for style tag