| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 onTextEditorContentSet() { | 168 onTextEditorContentSet() { |
| 169 if (this._diff) | 169 if (this._diff) |
| 170 this._diff.updateDiffMarkersImmediately(); | 170 this._diff.updateDiffMarkersImmediately(); |
| 171 super.onTextEditorContentSet(); | 171 super.onTextEditorContentSet(); |
| 172 for (var message of this._allMessages()) | 172 for (var message of this._allMessages()) |
| 173 this._addMessageToSource(message); | 173 this._addMessageToSource(message); |
| 174 this._decorateAllTypes(); | 174 this._decorateAllTypes(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 /** | 177 /** |
| 178 * @return {!Array<!Workspace.UISourceCode.Message>} | 178 * @return {!Set<!Workspace.UISourceCode.Message>} |
| 179 */ | 179 */ |
| 180 _allMessages() { | 180 _allMessages() { |
| 181 return this._persistenceBinding ? | 181 if (this._persistenceBinding) { |
| 182 this._persistenceBinding.network.messages().concat(this._persistenceBind
ing.fileSystem.messages()) : | 182 var combinedSet = this._persistenceBinding.network.messages(); |
| 183 this._uiSourceCode.messages(); | 183 combinedSet.addAll(this._persistenceBinding.fileSystem.messages()); |
| 184 return combinedSet; |
| 185 } |
| 186 return this._uiSourceCode.messages(); |
| 184 } | 187 } |
| 185 | 188 |
| 186 /** | 189 /** |
| 187 * @override | 190 * @override |
| 188 * @param {!Common.TextRange} oldRange | 191 * @param {!Common.TextRange} oldRange |
| 189 * @param {!Common.TextRange} newRange | 192 * @param {!Common.TextRange} newRange |
| 190 */ | 193 */ |
| 191 onTextChanged(oldRange, newRange) { | 194 onTextChanged(oldRange, newRange) { |
| 192 if (this._diff) | 195 if (this._diff) |
| 193 this._diff.updateDiffMarkersWhenPossible(); | 196 this._diff.updateDiffMarkersWhenPossible(); |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 | 681 |
| 679 /** | 682 /** |
| 680 * @param {!Workspace.UISourceCode.Message} a | 683 * @param {!Workspace.UISourceCode.Message} a |
| 681 * @param {!Workspace.UISourceCode.Message} b | 684 * @param {!Workspace.UISourceCode.Message} b |
| 682 * @return {number} | 685 * @return {number} |
| 683 */ | 686 */ |
| 684 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) { | 687 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) { |
| 685 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] - | 688 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] - |
| 686 Workspace.UISourceCode.Message._messageLevelPriority[b.level()]; | 689 Workspace.UISourceCode.Message._messageLevelPriority[b.level()]; |
| 687 }; | 690 }; |
| OLD | NEW |