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

Bug 486676

Summary: [assist][html] Tag completions appear inside script blocks
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public
Version: 11.0   
Target Milestone: 11.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Michael Rennie CLA 2016-01-27 14:15:04 EST
Consider the following snippet:

<html>
	<head>
		<script>
		var xx = 0;
		x  //<completion here
		</script>
	</head>
	<body>
		<script>
		this.x  //<completion here
		</script>
	</body>
</html>

If you try to complete the 'x' where indicated you get the proposals from browser and for 'xx' (GOOD) but you also get a proposal for an obsolete HTNL tag <xmp> (BAD).
Comment 1 Curtis Windatt CLA 2016-02-02 14:17:57 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=82350171a1c2b0caeafe8593c832fd3d2bc2f5a5
Fixed in master + tests

The previous parser had text nodes whereas the new parser returns a tag node with a text attribute.  I removed all the logic using the text node and added a separate check to see if we were in the actual tag (so we get attribute completions).