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

Bug 426142

Summary: Content assist should not autotrigger at EOL of //line comment
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: EditorAssignee: Elijah El-Haddad <elijahe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: grant_gayed
Version: 5.0Flags: grant_gayed: review+
Target Milestone: 5.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2014-01-20 10:17:58 EST
1. Create a .js file containing a // line comment
2. Put the caret at the end of the commented line, then type a '.'
3. Content assist opens. I expected it to not open.

Filing against editor since I think the bug is with styler or styleAccessor, not the content assist engine.
Comment 1 Grant Gayed CLA 2014-01-29 10:34:25 EST
I believe that contentAssist:615 should be calling styleAccessor.getStyles() with caretOffset-1, similar to how it's used a few lines above to compute currentChar, since what's needed is the context where the '.' was typed.  As a more fundamental example, starting with a completely empty editor and pressing '.' should call getStyles() with offset 0, since the '.' is at offset 0 (it currently calls with 1).
Comment 2 Elijah El-Haddad CLA 2014-01-29 15:12:01 EST
Fix pushed to github: https://github.com/elijahe/orion.client/commit/6a2bebec08a7da090730fa6131ec3e52441f0abb
Comment 3 Grant Gayed CLA 2014-01-29 17:14:28 EST
Fix released as-is > 20140129.