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 * @unrestricted | 5 * @unrestricted |
6 */ | 6 */ |
7 Sources.FileBasedSearchResultsPane = class extends Sources.SearchResultsPane { | 7 Sources.FileBasedSearchResultsPane = class extends Sources.SearchResultsPane { |
8 /** | 8 /** |
9 * @param {!Workspace.ProjectSearchConfig} searchConfig | 9 * @param {!Workspace.ProjectSearchConfig} searchConfig |
10 */ | 10 */ |
(...skipping 17 matching lines...) Expand all Loading... |
28 var uiSourceCode = searchResult.uiSourceCode; | 28 var uiSourceCode = searchResult.uiSourceCode; |
29 if (!uiSourceCode) | 29 if (!uiSourceCode) |
30 return; | 30 return; |
31 this._addFileTreeElement(searchResult); | 31 this._addFileTreeElement(searchResult); |
32 } | 32 } |
33 | 33 |
34 /** | 34 /** |
35 * @param {!Sources.FileBasedSearchResult} searchResult | 35 * @param {!Sources.FileBasedSearchResult} searchResult |
36 */ | 36 */ |
37 _addFileTreeElement(searchResult) { | 37 _addFileTreeElement(searchResult) { |
38 var fileTreeElement = new Sources.FileBasedSearchResultsPane.FileTreeElement
(this._searchConfig, searchResult); | 38 var fileTreeElement = new Sources.FileBasedSearchResultsPane.FileTreeElement
(this.searchConfig, searchResult); |
39 this._treeOutline.appendChild(fileTreeElement); | 39 this._treeOutline.appendChild(fileTreeElement); |
40 // Expand until at least a certain number of matches is expanded. | 40 // Expand until at least a certain number of matches is expanded. |
41 if (this._matchesExpandedCount < Sources.FileBasedSearchResultsPane.matchesE
xpandedByDefaultCount) | 41 if (this._matchesExpandedCount < Sources.FileBasedSearchResultsPane.matchesE
xpandedByDefaultCount) |
42 fileTreeElement.expand(); | 42 fileTreeElement.expand(); |
43 this._matchesExpandedCount += searchResult.searchMatches.length; | 43 this._matchesExpandedCount += searchResult.searchMatches.length; |
44 } | 44 } |
45 }; | 45 }; |
46 | 46 |
47 Sources.FileBasedSearchResultsPane.matchesExpandedByDefaultCount = 20; | 47 Sources.FileBasedSearchResultsPane.matchesExpandedByDefaultCount = 20; |
48 Sources.FileBasedSearchResultsPane.fileMatchesShownAtOnce = 20; | 48 Sources.FileBasedSearchResultsPane.fileMatchesShownAtOnce = 20; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 /** | 208 /** |
209 * @param {number} startMatchIndex | 209 * @param {number} startMatchIndex |
210 * @return {boolean} | 210 * @return {boolean} |
211 */ | 211 */ |
212 _showMoreMatchesElementSelected(startMatchIndex) { | 212 _showMoreMatchesElementSelected(startMatchIndex) { |
213 this.removeChild(this._showMoreMatchesTreeElement); | 213 this.removeChild(this._showMoreMatchesTreeElement); |
214 this._appendSearchMatches(startMatchIndex, this._searchResult.searchMatches.
length); | 214 this._appendSearchMatches(startMatchIndex, this._searchResult.searchMatches.
length); |
215 return false; | 215 return false; |
216 } | 216 } |
217 }; | 217 }; |
OLD | NEW |