Closed
Bug 1216668
Opened 9 years ago
Closed 9 years ago
Implement console autocomplete for inline arrays and multiline strings
Categories
(DevTools :: Console, defect)
DevTools
Console
Tracking
(firefox44 fixed)
RESOLVED
FIXED
Firefox 44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: bgrins, Assigned: bgrins)
References
(Blocks 1 open bug)
Details
(Whiteboard: [polish-backlog])
Attachments
(2 files)
Right now, if you enter any of these you won't get autocompletion in the console: [1,2,3]. 1. `foo`. There's special casing for string literals, but I suspect that if we use Parser.jsm we can detect other types and do better autocompletion
Assignee | ||
Updated•9 years ago
|
Summary: Implement console autocomplete for inline arrays, numbers, and multiline strings → Implement console autocomplete for inline arrays and multiline strings
Assignee | ||
Comment 1•9 years ago
|
||
Bug 1216668 - Move Parser.jsm to devtools/shared so the webconsole server can use it;r=jryans
Attachment #8676431 -
Flags: review?(jryans)
Assignee | ||
Comment 2•9 years ago
|
||
Bug 1216668 - Implement console autocomplete for inline arrays, numbers, and multiline strings;r=fitzgen
Attachment #8676432 -
Flags: review?(nfitzgerald)
Attachment #8676431 -
Flags: review?(jryans) → review+
Comment on attachment 8676431 [details] MozReview Request: Bug 1216668 - Move Parser.jsm to devtools/shared so the webconsole server can use it;r=jryans https://reviewboard.mozilla.org/r/22693/#review20179 I am about to change how our resource:// URLs work in bug 1203159, so you'll have some conflicts if that lands before you. I'll be sending a mail to the list about it later today.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Updated•9 years ago
|
Attachment #8676432 -
Flags: review?(nfitzgerald) → review+
Comment 4•9 years ago
|
||
Comment on attachment 8676432 [details] MozReview Request: Bug 1216668 - Implement console autocomplete for inline arrays, numbers, and multiline strings;r=fitzgen https://reviewboard.mozilla.org/r/22695/#review20183 r=me with comments below addressed ::: devtools/shared/webconsole/utils.js:878 (Diff revision 1) > + let lastTree = syntaxTree._trees[syntaxTree._trees.length - 1]; Accessing private members willy-nilly is a bit of a smell, can you add a .lastSubTree() or lastChild() or something method? As a reader, I'd like to be able to focus on what high level steps we are taking rather than the internal implementation of Parser.jsm. ::: devtools/shared/webconsole/utils.js:886 (Diff revision 1) > + if (expression.type === "ArrayExpression") { Do we want to provide autocomplet suggestions for object literal expressions and Object.prototype? `({ foo: 1 }).` Would be fine with a follow up.
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen][:nf] from comment #4) > Comment on attachment 8676432 [details] > MozReview Request: Bug 1216668 - Implement console autocomplete for inline > arrays, numbers, and multiline strings;r=fitzgen > > https://reviewboard.mozilla.org/r/22695/#review20183 > > r=me with comments below addressed > > ::: devtools/shared/webconsole/utils.js:878 > (Diff revision 1) > > + let lastTree = syntaxTree._trees[syntaxTree._trees.length - 1]; > > Accessing private members willy-nilly is a bit of a smell, can you add a > .lastSubTree() or lastChild() or something method? As a reader, I'd like to > be able to focus on what high level steps we are taking rather than the > internal implementation of Parser.jsm. > Good point, I'll add a getLastSyntaxTree() method on that object (I believe that's the right term since SyntaxTree is the object that has the AST attached to it). > ::: devtools/shared/webconsole/utils.js:886 > (Diff revision 1) > > + if (expression.type === "ArrayExpression") { > > Do we want to provide autocomplet suggestions for object literal expressions > and Object.prototype? `({ foo: 1 }).` > > Would be fine with a follow up. Yeah, let's move that into a follow up. I think there are different expectations with object literals, where you might want to do something like `var foo = { bar: 1 }.` and expect to see 'bar' in that list (which this technique will never do). But we could discuss this further in another bug.
https://hg.mozilla.org/integration/fx-team/rev/b491da27641b https://hg.mozilla.org/integration/fx-team/rev/9c494af00cfb
https://hg.mozilla.org/mozilla-central/rev/b491da27641b https://hg.mozilla.org/mozilla-central/rev/9c494af00cfb
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•