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

Bug 371399

Summary: JS content assist shows duplicate proposals
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: John Arthorne <john.arthorne>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: andrew.eisenberg
Version: 0.4   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
sample file none

Description Mark Macdonald CLA 2012-02-13 12:41:56 EST
Created attachment 210929 [details]
sample file

I've noticed some cases where invoking content assist shows several proposals for the same identifier.

For example
1. Copy the attached source file into a new .js file
2. Put the editing caret on line 678
3. Type 'anno' and then press Ctrl+Space.
4. A bunch of duplicates are proposed:
> annotationModel
> annotations
> annotationModel
> annotations
> annotationModel
> annotation
Comment 1 John Arthorne CLA 2012-06-05 13:43:59 EDT
This will soon be replaced with Esprima-based content assist. Will leave open until that happens but don't plan to investigate.
Comment 2 Andrew Eisenberg CLA 2012-08-29 16:58:38 EDT
I played with this using the esprima-based content assistant and doing content assist at line 678 doesn't give you much of anything because there is a syntax error at line 663.  After fixing the error, the esprima-based content assistant does not show any duplicates.  There is still some work that needs to be done on parser-recovery.  But, I am guessing that this issue can be closed.
Comment 3 John Arthorne CLA 2012-09-04 16:24:44 EDT
Thanks Andrew. I was ignoring this because I figured the new esprima parsing would handle it better.