OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |