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

Bug 486590

Summary: [HTML][assist] HTML content assist does not work for 2 common cases
Product: [ECD] Orion Reporter: Carolyn MacLeod <Carolyn_MacLeod>
Component: JS ToolsAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: unspecified   
Target Milestone: 11.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Carolyn MacLeod CLA 2016-01-26 11:45:51 EST
HTML content assist "does the wrong thing" for 2 common cases.
(Note: in the examples below, the | denotes the location of the cursor when content assist is activated).

Case 1) After typing a complete attribute name. Examples:
   <div class|></div>
   <div class="fred" role|></div>
   <span tabindex|></span>

   In these 3 examples, no proposals are offered, and the status message says
   "No proposals found". The expected result is to insert ="" and put the cursor
   inside the quotes.

Case 2) After typing a complete attribute name plus the equals sign. Examples:
   <div class=|></div>
   <div class="fred" role=|></div>
   <span tabindex=|></span>

   In these 3 examples, a filtered list of attribute proposals is offered.
   (i.e. 'class', 'role', or 'tabindex' is filtered from the attribute list).
   This list is unexpected, because the expected result is to insert "" and
   put the cursor inside the quotes.
Comment 1 Olivier Thomann CLA 2016-01-27 08:42:31 EST
I have a fix for (1), but it doesn't quite work for (2). The reason is that for (2) the prefix is "" whereas for (1) the prefix is not "class". I would expect the prefix to be "class=". And then it would work.
I am investigating in what part of the code the prefix is set. It comes from the params object being passed when invoking code assist.
Comment 2 Olivier Thomann CLA 2016-02-01 13:57:06 EST
Fixed as part of the fix for bug 486608