| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 * @param {!Workspace.Project} project | 132 * @param {!Workspace.Project} project |
| 133 * @param {!Workspace.ProjectSearchConfig} searchConfig | 133 * @param {!Workspace.ProjectSearchConfig} searchConfig |
| 134 * @param {boolean=} dirtyOnly | 134 * @param {boolean=} dirtyOnly |
| 135 * @return {!Array.<string>} | 135 * @return {!Array.<string>} |
| 136 */ | 136 */ |
| 137 _projectFilesMatchingFileQuery(project, searchConfig, dirtyOnly) { | 137 _projectFilesMatchingFileQuery(project, searchConfig, dirtyOnly) { |
| 138 var result = []; | 138 var result = []; |
| 139 var uiSourceCodes = project.uiSourceCodes(); | 139 var uiSourceCodes = project.uiSourceCodes(); |
| 140 for (var i = 0; i < uiSourceCodes.length; ++i) { | 140 for (var i = 0; i < uiSourceCodes.length; ++i) { |
| 141 var uiSourceCode = uiSourceCodes[i]; | 141 var uiSourceCode = uiSourceCodes[i]; |
| 142 if (!uiSourceCode.contentType().isTextType()) |
| 143 continue; |
| 142 var binding = Persistence.persistence.binding(uiSourceCode); | 144 var binding = Persistence.persistence.binding(uiSourceCode); |
| 143 if (binding && binding.network === uiSourceCode) | 145 if (binding && binding.network === uiSourceCode) |
| 144 continue; | 146 continue; |
| 145 if (dirtyOnly && !uiSourceCode.isDirty()) | 147 if (dirtyOnly && !uiSourceCode.isDirty()) |
| 146 continue; | 148 continue; |
| 147 if (this._searchConfig.filePathMatchesFileQuery(uiSourceCode.fullDisplayNa
me())) | 149 if (this._searchConfig.filePathMatchesFileQuery(uiSourceCode.fullDisplayNa
me())) |
| 148 result.push(uiSourceCode.url()); | 150 result.push(uiSourceCode.url()); |
| 149 } | 151 } |
| 150 result.sort(String.naturalOrderComparator); | 152 result.sort(String.naturalOrderComparator); |
| 151 return result; | 153 return result; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 294 |
| 293 /** | 295 /** |
| 294 * @override | 296 * @override |
| 295 * @param {!Workspace.ProjectSearchConfig} searchConfig | 297 * @param {!Workspace.ProjectSearchConfig} searchConfig |
| 296 * @return {!Sources.FileBasedSearchResultsPane} | 298 * @return {!Sources.FileBasedSearchResultsPane} |
| 297 */ | 299 */ |
| 298 createSearchResultsPane(searchConfig) { | 300 createSearchResultsPane(searchConfig) { |
| 299 return new Sources.FileBasedSearchResultsPane(searchConfig); | 301 return new Sources.FileBasedSearchResultsPane(searchConfig); |
| 300 } | 302 } |
| 301 }; | 303 }; |
| OLD | NEW |