| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 scheduleSearchInNextFileOrFinish.call(this); | 215 scheduleSearchInNextFileOrFinish.call(this); |
| 216 | 216 |
| 217 /** | 217 /** |
| 218 * @param {!Workspace.UISourceCode} uiSourceCode | 218 * @param {!Workspace.UISourceCode} uiSourceCode |
| 219 * @this {Sources.SourcesSearchScope} | 219 * @this {Sources.SourcesSearchScope} |
| 220 */ | 220 */ |
| 221 function searchInNextFile(uiSourceCode) { | 221 function searchInNextFile(uiSourceCode) { |
| 222 if (uiSourceCode.isDirty()) | 222 if (uiSourceCode.isDirty()) |
| 223 contentLoaded.call(this, uiSourceCode, uiSourceCode.workingCopy()); | 223 contentLoaded.call(this, uiSourceCode, uiSourceCode.workingCopy()); |
| 224 else | 224 else |
| 225 uiSourceCode.checkContentUpdated(true, contentUpdated.bind(this, uiSourc
eCode)); | 225 uiSourceCode.requestContent().then(contentLoaded.bind(this, uiSourceCode
)); |
| 226 } | 226 } |
| 227 | 227 |
| 228 /** | 228 /** |
| 229 * @param {!Workspace.UISourceCode} uiSourceCode | |
| 230 * @this {Sources.SourcesSearchScope} | |
| 231 */ | |
| 232 function contentUpdated(uiSourceCode) { | |
| 233 uiSourceCode.requestContent().then(contentLoaded.bind(this, uiSourceCode))
; | |
| 234 } | |
| 235 | |
| 236 /** | |
| 237 * @this {Sources.SourcesSearchScope} | 229 * @this {Sources.SourcesSearchScope} |
| 238 */ | 230 */ |
| 239 function scheduleSearchInNextFileOrFinish() { | 231 function scheduleSearchInNextFileOrFinish() { |
| 240 if (fileIndex >= files.length) { | 232 if (fileIndex >= files.length) { |
| 241 if (!callbacksLeft) { | 233 if (!callbacksLeft) { |
| 242 progress.done(); | 234 progress.done(); |
| 243 callback(); | 235 callback(); |
| 244 return; | 236 return; |
| 245 } | 237 } |
| 246 return; | 238 return; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 286 |
| 295 /** | 287 /** |
| 296 * @override | 288 * @override |
| 297 * @param {!Workspace.ProjectSearchConfig} searchConfig | 289 * @param {!Workspace.ProjectSearchConfig} searchConfig |
| 298 * @return {!Sources.FileBasedSearchResultsPane} | 290 * @return {!Sources.FileBasedSearchResultsPane} |
| 299 */ | 291 */ |
| 300 createSearchResultsPane(searchConfig) { | 292 createSearchResultsPane(searchConfig) { |
| 301 return new Sources.FileBasedSearchResultsPane(searchConfig); | 293 return new Sources.FileBasedSearchResultsPane(searchConfig); |
| 302 } | 294 } |
| 303 }; | 295 }; |
| OLD | NEW |