Closed Bug 1604411 Opened 5 years ago Closed 5 years ago

Display variables declared in the expression in the autocomplete popup

Categories

(DevTools :: Console, enhancement, P3)

enhancement

Tracking

(firefox73 fixed)

RESOLVED FIXED
Firefox 73
Tracking Status
firefox73 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(1 file)

Given the following expression in the console input

var win = window;
wi

The autocomplete popup should display both win and window.

Variables are retrieved from CodeMirror state and sent to the
webconsole actor, where the filtering is done.

Depends on D57342

The attached patch works quite well, with one limitation: when in a function, it does not autocomplete the function parameters.
I'm not sure if I'm doing something wrong or if it's a codeMirror limitation.
I asked the question on https://discuss.codemirror.net/t/function-parameter-autocomplete/2240

This isn't too bad though, and we could probably fix that in a follow up.

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #2)

The attached patch works quite well, with one limitation: when in a function, it does not autocomplete the function parameters.
I'm not sure if I'm doing something wrong or if it's a codeMirror limitation.
I asked the question on https://discuss.codemirror.net/t/function-parameter-autocomplete/2240

This isn't too bad though, and we could probably fix that in a follow up.

Needed to look into the state context too. Now it works fine :)

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ccb4dd2108ce Add expression variables in autocomplete popup. r=Honza.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: