New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 12 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2013
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Feature



Sign in to add a comment

Feature request: autocomplete in the CodeMirror sources panel

Reported by remysh...@gmail.com, Dec 21 2012 Back to list

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.101 Safari/537.11

Steps to reproduce the problem:
Just as I have autocomplete (and variables property lookup) in the console, it would be useful to have this in the sources panel whilst editing (I know there's an autocomplete demo already for CodeMirror ( http://codemirror.net/demo/complete.html - though could do with some Google engineer love).

These kinds of changes would start making DevTools more of a first class development environment (rather than just first class debugging environment) :)

What is the expected behavior?

What went wrong?
Nothing - just a feature request.

Did this work before? N/A 

Chrome version: 23.0.1271.101  Channel: stable
OS Version: OS X 10.7.4
 

Comment 1 by meh...@chromium.org, Dec 21 2012

Labels: -Type-Bug Type-Feature

Comment 2 by Deleted ...@, Jan 8 2013

1+ me to !
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 10 2013

Labels: -Feature-DevTools Cr-Platform-DevTools
Owner: vsevik@chromium.org

Comment 5 by vsevik@chromium.org, May 13 2013

Cc: vsevik@chromium.org
Owner: lushnikov@chromium.org
Status: Assigned
Project Member

Comment 7 by bugdroid1@chromium.org, May 24 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=151107

------------------------------------------------------------------------
r151107 | lushnikov@chromium.org | 2013-05-24T15:48:11.783090Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/cm/codemirror.css?r1=151107&r2=151106&pathrev=151107
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/cm/codemirror.js?r1=151107&r2=151106&pathrev=151107

DevTools: update CM to TOT version 3.13+ (6edd771495)

The Tip-of-tree CodeMirror has fix to the behaviour of
beforeChange event which is important for autocompletion.

BUG= 167290 
R=vsevik@chromium.org

Review URL: https://codereview.chromium.org/15846008
------------------------------------------------------------------------
Project Member

Comment 8 by bugdroid1@chromium.org, May 24 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=151108

------------------------------------------------------------------------
r151108 | lushnikov@chromium.org | 2013-05-24T16:00:07.081683Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/CodeMirrorTextEditor.js?r1=151108&r2=151107&pathrev=151108

DevTools: [CodeMirror] Implement correct handling of onChange event

Currently CodeMirrorTextEditor emits "onTextChanged" call to delegate
with inaccurate arguments: it feels to the delegate that every change
removes whole text from editor and pastes a new one instead. This
patch updates text change handler to pass precise arguments to the delegate.

The new implementation relies on the fact that CodeMirror passes changes
in a batch to the event, so it iterates through them and calls "onTextChanged"
per every change.

BUG= 167290 
R=vsevik@chromium.org

Review URL: https://codereview.chromium.org/16023002
------------------------------------------------------------------------
Project Member

Comment 9 by bugdroid1@chromium.org, May 27 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=151191

------------------------------------------------------------------------
r151191 | lushnikov@chromium.org | 2013-05-27T13:29:44.217711Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/CompletionDictionary.js?r1=151191&r2=151190&pathrev=151191
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/Settings.js?r1=151191&r2=151190&pathrev=151191
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/CodeMirrorTextEditor.js?r1=151191&r2=151190&pathrev=151191
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/UISourceCodeFrame.js?r1=151191&r2=151190&pathrev=151191
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/TextUtils.js?r1=151191&r2=151190&pathrev=151191
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/externs.js?r1=151191&r2=151190&pathrev=151191

DevTools: [CodeMirror] autocompletion for CodeMirrorTextEditor

Add autocompletion functionality for CodeMirrorTextEditor.
Autocompletion works by maintaining a synchronized state of completion
dictionary so that it contains all the words in the the text document.
The dictionary is updated incrementally by listening to the beforeChange
and onChange events.

BUG= 167290 
R=vsevik@chromium.org

Review URL: https://codereview.chromium.org/15986003
------------------------------------------------------------------------
Status: Fixed
The feature is implemented behind a devtools experiment
I'm testing this in Canary (with CodeMirror editor enable and this feature flag enabled), but ctrl+space scrolls the window down (in the source panel) and not complete. Anyone else?
Ignore my last comment - I found I didn't check "use codemirror" (I had chrome & canary open and got confused).

Sign in to add a comment