| Summary: | Template proposals always showing up in content assist even when it doesn't make sense | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Andrew Eisenberg <andrew.eisenberg> |
| Component: | Editor | Assignee: | Project Inbox <orion.editor-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 0.5 | ||
| Target Milestone: | 0.5 M2 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
Fixed. Added a small function that looks for the previous newline or non-whitespace char. If the previous char is a newline, then we assume that templates are fine to propose. If previous char is other, then we check against a hardcoded list of chars :!@#$%^&*.<> This is far from perfect, but I think it is sufficient for our circumstances. Commit is pushed with regression tests. Commit is here: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=03ab15dc9027d9fd98bdaa8b8a23df7c7f93404b |
Consider this js snippet: this.for| content assist at the | will show the templates for 'for'. This doesn't make sense. the Template content assist plugin should provide no results if the previous token is a '.' or '(', and perhaps some other keywords as well.