| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 return; | 117 return; |
| 118 | 118 |
| 119 uiSourceCode.removeAllDecorations(); | 119 uiSourceCode.removeAllDecorations(); |
| 120 | 120 |
| 121 for (var decoration of decorations) { | 121 for (var decoration of decorations) { |
| 122 var range = decoration.range(); | 122 var range = decoration.range(); |
| 123 var startLocation = sourceMapping.originalToFormatted(range.startLine, ran
ge.startColumn); | 123 var startLocation = sourceMapping.originalToFormatted(range.startLine, ran
ge.startColumn); |
| 124 var endLocation = sourceMapping.originalToFormatted(range.endLine, range.e
ndColumn); | 124 var endLocation = sourceMapping.originalToFormatted(range.endLine, range.e
ndColumn); |
| 125 | 125 |
| 126 uiSourceCode.addDecoration( | 126 uiSourceCode.addDecoration( |
| 127 new Common.TextRange(startLocation[0], startLocation[1], endLocation[0
], endLocation[1]), | 127 new TextUtils.TextRange(startLocation[0], startLocation[1], endLocatio
n[0], endLocation[1]), |
| 128 /** @type {string} */ (decoration.type()), decoration.data()); | 128 /** @type {string} */ (decoration.type()), decoration.data()); |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 }; | 131 }; |
| OLD | NEW |