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

Bug 488257

Summary: [HTML] Unexpected prefix for attribute value content assist
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: JS ToolsAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: Carolyn_MacLeod, Olivier_Thomann
Version: 10.0   
Target Milestone: 12.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 486608    
Bug Blocks:    
Attachments:
Description Flags
Proposed patch none

Description Curtis Windatt CLA 2016-02-22 15:39:57 EST
<div role="">
There should be 61 value completions for the role attribute.  The unit test for this passes, but in the editor you get no proposals.

Debugging it I found the prefix received by our content assist is 'role="'.  Previously, we would get an empty string as the prefix.  This is caused by Bug 486608 where the characters treated as a prefix changed.  The tests pass because we specify the prefix ourselves rather than use something generated by the editor content assist.
Comment 1 Curtis Windatt CLA 2016-02-22 15:42:51 EST
The change to the prefix string fixed a real problem with the attribute assist.  The fix for this should probably be to fix the prefix in htmlContentAssist once we know we are in an attribute value.
Comment 2 Olivier Thomann CLA 2016-02-22 17:24:48 EST
Created attachment 259873 [details]
Proposed patch

Reverting the regexp that computes the prefix.
Comment 3 Olivier Thomann CLA 2016-02-26 13:23:23 EST
Fixed.
Comment 4 Curtis Windatt CLA 2016-02-29 09:20:49 EST
(In reply to Olivier Thomann from comment #3)
> Fixed.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=213970e7be05f701a1e841b1a66a571f2a5f608b
Complete fix with tests