| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.CodeMirrorTextEditor} | 7 * @extends {WebInspector.CodeMirrorTextEditor} |
| 8 * @param {!WebInspector.SourcesTextEditorDelegate} delegate | 8 * @param {!WebInspector.SourcesTextEditorDelegate} delegate |
| 9 */ | 9 */ |
| 10 WebInspector.SourcesTextEditor = function(delegate) | 10 WebInspector.SourcesTextEditor = function(delegate) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 WebInspector.SourcesTextEditor.prototype = { | 61 WebInspector.SourcesTextEditor.prototype = { |
| 62 /** | 62 /** |
| 63 * @return {boolean} | 63 * @return {boolean} |
| 64 */ | 64 */ |
| 65 _isSearchActive: function() | 65 _isSearchActive: function() |
| 66 { | 66 { |
| 67 return !!this._tokenHighlighter.highlightedRegex(); | 67 return !!this._tokenHighlighter.highlightedRegex(); |
| 68 }, | 68 }, |
| 69 | 69 |
| 70 /** | 70 /** |
| 71 * @override |
| 72 * @param {number} lineNumber |
| 73 */ |
| 74 scrollToLine: function(lineNumber) |
| 75 { |
| 76 WebInspector.CodeMirrorTextEditor.prototype.scrollToLine.call(this, line
Number); |
| 77 this._scroll(); |
| 78 }, |
| 79 |
| 80 /** |
| 71 * @param {!RegExp} regex | 81 * @param {!RegExp} regex |
| 72 * @param {?WebInspector.TextRange} range | 82 * @param {?WebInspector.TextRange} range |
| 73 */ | 83 */ |
| 74 highlightSearchResults: function(regex, range) | 84 highlightSearchResults: function(regex, range) |
| 75 { | 85 { |
| 76 /** | 86 /** |
| 77 * @this {WebInspector.CodeMirrorTextEditor} | 87 * @this {WebInspector.CodeMirrorTextEditor} |
| 78 */ | 88 */ |
| 79 function innerHighlightRegex() | 89 function innerHighlightRegex() |
| 80 { | 90 { |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 this._codeMirror.addOverlay(overlayMode); | 1003 this._codeMirror.addOverlay(overlayMode); |
| 994 this._highlightDescriptor = { | 1004 this._highlightDescriptor = { |
| 995 overlay: overlayMode, | 1005 overlay: overlayMode, |
| 996 selectionStart: selectionStart | 1006 selectionStart: selectionStart |
| 997 }; | 1007 }; |
| 998 } | 1008 } |
| 999 } | 1009 } |
| 1000 | 1010 |
| 1001 WebInspector.SourcesTextEditor.LinesToScanForIndentationGuessing = 1000; | 1011 WebInspector.SourcesTextEditor.LinesToScanForIndentationGuessing = 1000; |
| 1002 WebInspector.SourcesTextEditor.MaximumNumberOfWhitespacesPerSingleSpan = 16; | 1012 WebInspector.SourcesTextEditor.MaximumNumberOfWhitespacesPerSingleSpan = 16; |
| OLD | NEW |