| Summary: | [client] cheap js content assist | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Susan McCourt <susan> |
| Component: | Client | Assignee: | John Arthorne <john.arthorne> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | karol, mamacdon, simon_kaegi |
| Version: | 0.2 | ||
| Target Milestone: | 0.4 M2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | 367232, 367233, 367252, 367426 | ||
| Bug Blocks: | |||
|
Description
Susan McCourt
Now that Mark has done work in bug 343774, maybe this is easier to hand off to someone for experimentation? Marking 0.2M8 as this seems to be a self-hosting blocker, but note we don't have anyone assigned to it yet. (In reply to comment #0) We're already running JSLint, and it's smart enough to know what names are defined in a given scope. Maybe the content assist can take advantage of that? If I could press Ctrl+Space and see the variables from my current function appear in the suggestion list, I'd consider that a big win. We have only content assist for keywords, but I think this is all we will be able to do for 0.2. Somewhat related: There's an example plugin at [1] that uses the language js parser to provide identifier completion. However it is woefully unaware of scope rules, so it offers a lot of irrelevant suggestions. But language js seems like a good starting point for doing something smarter. [1] http://mamacdon.github.com/0.2/plugins/language/languagejsPlugin.html marking 0.4 for visibility, since this is mentioned as potential theme for 0.4 (but it is not assigned yet) I'm going to work on some incremental improvements here. The problem with using an existing parser is likely that they won't handle malformed scripts very well. When invoking content assist, the script is almost never well-formed. I'm going to start by picking off the low-hanging fruit and we can go from there. Marking this fixed based on the work in M2 (see blocker bugs). Further improvements can be captured in different bugs. |