Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: Source/devtools/front_end/UISourceCodeFrame.js

Issue 15986003: DevTools: [CodeMirror] autocompletion for CodeMirrorTextEditor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/TextUtils.js ('k') | Source/devtools/front_end/externs.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 10 *
(...skipping 17 matching lines...) Expand all
28 28
29 /** 29 /**
30 * @constructor 30 * @constructor
31 * @extends {WebInspector.SourceFrame} 31 * @extends {WebInspector.SourceFrame}
32 * @param {WebInspector.UISourceCode} uiSourceCode 32 * @param {WebInspector.UISourceCode} uiSourceCode
33 */ 33 */
34 WebInspector.UISourceCodeFrame = function(uiSourceCode) 34 WebInspector.UISourceCodeFrame = function(uiSourceCode)
35 { 35 {
36 this._uiSourceCode = uiSourceCode; 36 this._uiSourceCode = uiSourceCode;
37 WebInspector.SourceFrame.call(this, this._uiSourceCode); 37 WebInspector.SourceFrame.call(this, this._uiSourceCode);
38 if (WebInspector.experimentsSettings.textEditorAutocomplete.isEnabled())
39 this.textEditor.setCompletionDictionary(new WebInspector.SampleCompletio nDictionary());
40
38 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Formatt edChanged, this._onFormattedChanged, this); 41 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Formatt edChanged, this._onFormattedChanged, this);
39 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyChanged, this._onWorkingCopyChanged, this); 42 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyChanged, this._onWorkingCopyChanged, this);
40 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyCommitted, this._onWorkingCopyCommitted, this); 43 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyCommitted, this._onWorkingCopyCommitted, this);
41 } 44 }
42 45
43 WebInspector.UISourceCodeFrame.prototype = { 46 WebInspector.UISourceCodeFrame.prototype = {
44 wasShown: function() 47 wasShown: function()
45 { 48 {
46 WebInspector.SourceFrame.prototype.wasShown.call(this); 49 WebInspector.SourceFrame.prototype.wasShown.call(this);
47 this._boundWindowFocused = this._windowFocused.bind(this); 50 this._boundWindowFocused = this._windowFocused.bind(this);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 contextMenu.appendSeparator(); 168 contextMenu.appendSeparator();
166 }, 169 },
167 170
168 dispose: function() 171 dispose: function()
169 { 172 {
170 this.detach(); 173 this.detach();
171 }, 174 },
172 175
173 __proto__: WebInspector.SourceFrame.prototype 176 __proto__: WebInspector.SourceFrame.prototype
174 } 177 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/TextUtils.js ('k') | Source/devtools/front_end/externs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698