Closed
Bug 780791
Opened 12 years ago
Closed 12 years ago
WebConsole autocompletion doesn't autocomplete on string literals.
Categories
(DevTools :: Console, defect)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 17
People
(Reporter: espadrine, Assigned: espadrine)
Details
Attachments
(1 file, 3 obsolete files)
4.01 KB,
patch
|
Details | Diff | Splinter Review |
The following content, typed in the WebConsole: > "Dolske".<TAB> … should autocomplete. This is the last feature, not counting bug 774753, that we need to get parity with WebKit's Developer Tools autocompletion.
Assignee | ||
Comment 1•12 years ago
|
||
This patch distinguishes string literals and objects, and autocompletes on both. It uses the already-existing state machine. It passes the mochitests.
Assignee: nobody → thaddee.tyl
Attachment #649513 -
Flags: review?(mihai.sucan)
Assignee | ||
Comment 2•12 years ago
|
||
Dealt with matchProp, added a test. This patch is meant to be dealt with after the non-object patch (bug 79415).
Attachment #649513 -
Attachment is obsolete: true
Attachment #649513 -
Flags: review?(mihai.sucan)
Attachment #649957 -
Flags: review?(mihai.sucan)
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #649957 -
Attachment is obsolete: true
Attachment #649957 -
Flags: review?(mihai.sucan)
Attachment #649964 -
Flags: review?(mihai.sucan)
Comment 4•12 years ago
|
||
Comment on attachment 649964 [details] [diff] [review] Autocompletion of string literals Review of attachment 649964 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for your patch. Minor comments below. ::: browser/devtools/webconsole/WebConsoleUtils.jsm @@ +914,5 @@ > > + let lastDot = completionPart.lastIndexOf("."); > + if (lastDot > 0 && > + (completionPart[lastDot - 1] === "'" || > + completionPart[lastDot - 1] === '"') && s/===/==/ (this is nit: please follow existing code style: no strict checks unless needed.) @@ +915,5 @@ > + let lastDot = completionPart.lastIndexOf("."); > + if (lastDot > 0 && > + (completionPart[lastDot - 1] === "'" || > + completionPart[lastDot - 1] === '"') && > + (completionPart[0] === '"' || completionPart[0] === "'")) { here you might want completionPart[0] == completionPart[lastDot - 1]. @@ +923,2 @@ > > + } else { nit: code style: } else {
Attachment #649964 -
Flags: review?(mihai.sucan) → review+
Assignee | ||
Comment 5•12 years ago
|
||
(In reply to Mihai Sucan [:msucan] from comment #4) > @@ +915,5 @@ > > + let lastDot = completionPart.lastIndexOf("."); > > + if (lastDot > 0 && > > + (completionPart[lastDot - 1] === "'" || > > + completionPart[lastDot - 1] === '"') && > > + (completionPart[0] === '"' || completionPart[0] === "'")) { > > here you might want completionPart[0] == completionPart[lastDot - 1]. I am worried to do this change, since I am looking forward to introducing further literal completion capabilities, and this would match regexp literal completion.
Assignee | ||
Comment 6•12 years ago
|
||
Nits. Try push at: https://tbpl.mozilla.org/?tree=Try&rev=0dab4c567473
Attachment #649964 -
Attachment is obsolete: true
Comment 7•12 years ago
|
||
Comment on attachment 651461 [details] [diff] [review] [in-fx-team] Autocompletion of string literals Landed: https://hg.mozilla.org/integration/fx-team/rev/a8f42a338f37 Thank you Thaddee!
Attachment #651461 -
Attachment description: Autocompletion of string literals → [in-fx-team] Autocompletion of string literals
Updated•12 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [fixed-in-fx-team]
Version: unspecified → Trunk
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a8f42a338f37
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 17
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•