gecko-dev/devtools/server
Nicolas Chevobbe 14ff2e3235 Bug 1476656 - Trigger autocomplete on bracket; r=Honza.
This patch adds the ability to open the autocomplete popup when
typing an opening bracket (i.e. `[`]) in the console input.
This impacts a significant amount of function where we assumed
that the only way to get a completion was to use a dot.
We uses the rename `anylyzeInputString` function to get the
completion part from an input, as well as if the user is performing
an element access (i.e., using the bracket).
We then send that information to the webconsole actor, which send
it to the client.
This allows us to rely on a single parse of the input and gives us
access to this information everywhere we need to, be it on the client
or on the server.

We allow the user to type property name without quotes, and we add
them when the user accept an autocompletion.
We also automatically add a closing bracket (i.e. `]`), when it's needed.

Some test are added. On the server side to make sure the actor's autocomplete
function returns what's expected.
We take that as an opportunity to add test for commands.
On the client side, tests are added to ensure the different behavior works
as expected (check the completion text and the input  after accepting
the completion when the user entered some letters, or not, with or without
quotes, with different quotes, hitting the autocomplete cache, …).

A test which accesses the autocomplete cache was modified since the shape
of the cache changed to include the last matchProp as well as the
isElementAccess boolean.

Differential Revision: https://phabricator.services.mozilla.com/D6128

--HG--
extra : moz-landing-system : lando
2018-09-26 13:54:35 +00:00
..
actors Bug 1476656 - Trigger autocomplete on bracket; r=Honza. 2018-09-26 13:54:35 +00:00
performance Bug 1484496: Part 5d - Convert devtools/ nsISimpleEnumerator users to use JS iteration. r=bgrins 2018-08-18 19:28:37 -07:00
socket Bug 1454696 - Run eslint --fix for prefer-const;r=yulia 2018-06-01 12:36:09 +02:00
startup Bug 1474980 - Stop exporting ActorPool/OriginalLocation from server/main.js. r=jryans 2018-07-11 10:49:45 -07:00
tests Bug 1423201 - Changed uses of defer to new Promise in devtools/server/tests/mochitest r=nchevobbe 2018-09-26 02:44:56 +00:00
main.js Bug 1473513 - Backed out changeset 27419719402e for failures on mobile/android/tests/browser/chrome/test_debugger_server.html CLOSED TREE 2018-09-25 19:35:00 +03:00
moz.build Bug 1473513 - Backed out changeset d72f6ff37ca6 for failures on mobile/android/tests/browser/chrome/test_debugger_server.html CLOSED TREE 2018-09-25 19:34:26 +03:00