| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * @implements {Sources.SourcesView.EditorAction} | 5 * @implements {Sources.SourcesView.EditorAction} |
| 6 * @unrestricted | 6 * @unrestricted |
| 7 */ | 7 */ |
| 8 Sources.InplaceFormatterEditorAction = class { | 8 Sources.InplaceFormatterEditorAction = class { |
| 9 /** | 9 /** |
| 10 * @param {!Common.Event} event | 10 * @param {!Common.Event} event |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 uiSourceCode.removeAllDecorations(); | 117 uiSourceCode.removeAllDecorations(); |
| 118 | 118 |
| 119 for (var decoration of decorations) { | 119 for (var decoration of decorations) { |
| 120 var range = decoration.range(); | 120 var range = decoration.range(); |
| 121 var startLocation = sourceMapping.originalToFormatted(range.startLine, ran
ge.startColumn); | 121 var startLocation = sourceMapping.originalToFormatted(range.startLine, ran
ge.startColumn); |
| 122 var endLocation = sourceMapping.originalToFormatted(range.endLine, range.e
ndColumn); | 122 var endLocation = sourceMapping.originalToFormatted(range.endLine, range.e
ndColumn); |
| 123 | 123 |
| 124 uiSourceCode.addDecoration( | 124 uiSourceCode.addDecoration( |
| 125 new Common.TextRange(...startLocation, ...endLocation), | 125 new Common.TextRange(...startLocation, ...endLocation), |
| 126 /** @type {string} */ (decoration.type()), | 126 /** @type {string} */ (decoration.type()), decoration.data()); |
| 127 decoration.data()); | |
| 128 } | 127 } |
| 129 } | 128 } |
| 130 }; | 129 }; |
| OLD | NEW |