| Summary: | [Content assist] Completion is not working correctly for variable names containing $ | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Sebastian Pahnke <pahnke.sebastian> |
| Component: | JS Tools | Assignee: | Curtis Windatt <curtis.windatt.public> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | curtis.windatt.public, itaip6, Olivier_Thomann, steve_northover |
| Version: | 13.0 | ||
| Target Milestone: | 15.0 | ||
| Hardware: | PC | ||
| OS: | Windows NT | ||
| Whiteboard: | |||
|
Description
Sebastian Pahnke
Olivier, could this be related to the wildcard matching or was that limited to * and ? We might just have to update the valid characters list. If easy, please fix. Otherwise, move back to P3. Thanks! http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=aed08836d161a456d3e687ffc9bc937c46ca667a Fixed in master with tests Two issues found. 1) $ is not a character when figuring out the prefix (causes case 3) and 2) The formatted proposal only uses a prefix set by Tern, ignoring the prefix we calculated in out tools (case 2). Hey guys, I ran into this problem once again but in a more complex situation, when filtering proposals. The steps to reproduce: 1. Insert code: var a$a1; var a$a2; 2. Type "a$" then hit CTRL+SPACE to open content assist 3. You can see both a$a1 and a$a2 in the proposal list as expected 4. Type an additional 'a' character. Expected result: Both suggestions should still appear Actual result: Content assist is closed I debugged the code and currently believe that the problem lies in this function: https://github.com/eclipse/orion.client/blob/master/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js#L466 Since the '$' sign is in the prefix, it does not get escaped. Therefore the created regex is bad and the proposals are filtered out. What do you say about escaping the prefix as well as the filter? |