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

Bug 465322

Summary: [assist] Template insertion proposes array values as 'keywords'
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt, Silenio_Quarti
Version: 8.0   
Target Milestone: 9.0   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/46802
https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=1be0ca78453020ca19a341bba3e43d0f07271e25
Whiteboard:

Description Michael Rennie CLA 2015-04-23 11:50:59 EDT
Steps:
1. enter: typ^[assist here]
2. choose the typeof template 
3. hit tab once 
4. at this point you see another assist popup showing words styled as keywords and being described as keywords. None of the those entries are in fact keywords.
Comment 1 Michael Rennie CLA 2015-04-27 12:15:57 EDT
The problem is that the data list given is passed back into the framework - into a new TemplateContentAssist in linkedMode.js - which computes the list a keywords.

When contributors create a data object to pass in to content assist we should be able to specify a title and styling as well. Something like (out of the JS templates.js file):

var typeofValues = {
 type: "link", //$NON-NLS-0$
 values: [
	"boolean", //$NON-NLS-0$
	"function", //$NON-NLS-0$
	"number", //$NON-NLS-0$
	"object", //$NON-NLS-0$
	"string", //$NON-NLS-0$
	"symbol",
	"undefined" //$NON-NLS-0$
 ],
 title: null,
 style: 'emphasis'
};
Comment 2 Eclipse Genie CLA 2015-04-29 13:22:45 EDT
New Gerrit change created: https://git.eclipse.org/r/46802
Comment 4 Michael Rennie CLA 2015-05-14 15:16:59 EDT
The fix has been merged