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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 _processMatchingFilesForProject: function(searchId, project, filesMathingFil
eQuery, progress, callback, files) | 151 _processMatchingFilesForProject: function(searchId, project, filesMathingFil
eQuery, progress, callback, files) |
152 { | 152 { |
153 if (searchId !== this._searchId) { | 153 if (searchId !== this._searchId) { |
154 this._searchFinishedCallback(false); | 154 this._searchFinishedCallback(false); |
155 return; | 155 return; |
156 } | 156 } |
157 | 157 |
158 files = files.sort(String.naturalOrderComparator); | 158 files = files.sort(String.naturalOrderComparator); |
159 files = files.intersectOrdered(filesMathingFileQuery, String.naturalOrde
rComparator); | 159 files = files.intersectOrdered(filesMathingFileQuery, String.naturalOrde
rComparator); |
160 var dirtyFiles = this._projectFilesMatchingFileQuery(project, this._sear
chConfig, true); | 160 var dirtyFiles = this._projectFilesMatchingFileQuery(project, this._sear
chConfig, true); |
161 files = files.mergeOrdered(dirtyFiles); | 161 files = files.mergeOrdered(dirtyFiles, String.naturalOrderComparator); |
162 | 162 |
163 if (!files.length) { | 163 if (!files.length) { |
164 progress.done(); | 164 progress.done(); |
165 callback(); | 165 callback(); |
166 return; | 166 return; |
167 } | 167 } |
168 | 168 |
169 progress.setTotalWork(files.length); | 169 progress.setTotalWork(files.length); |
170 | 170 |
171 var fileIndex = 0; | 171 var fileIndex = 0; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 265 |
266 /** | 266 /** |
267 * @param {!WebInspector.ProjectSearchConfig} searchConfig | 267 * @param {!WebInspector.ProjectSearchConfig} searchConfig |
268 * @return {!WebInspector.FileBasedSearchResultsPane} | 268 * @return {!WebInspector.FileBasedSearchResultsPane} |
269 */ | 269 */ |
270 createSearchResultsPane: function(searchConfig) | 270 createSearchResultsPane: function(searchConfig) |
271 { | 271 { |
272 return new WebInspector.FileBasedSearchResultsPane(searchConfig); | 272 return new WebInspector.FileBasedSearchResultsPane(searchConfig); |
273 } | 273 } |
274 } | 274 } |
OLD | NEW |