This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
For #6093: Added button to show all results in a list #6099
Closed
Closed
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0388f9c
Added button to show all results in a list
43cb09c
UI changes
44f1ec9
Cursor, title, shortcut
ca708e0
Merge master
df324c2
Fix merge errors
8128171
Code review changes
9bba693
Merge remote-tracking branch 'upstream/master' into find-all-in-file-…
220f51a
Code review changes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -858,9 +858,10 @@ define(function (require, exports, module) { | |
* @private | ||
* Displays a non-modal embedded dialog above the code mirror editor that allows the user to do | ||
* a find operation across all files in the project. | ||
* @param {?Entry} scope Project file/subfolder to search within; else searches whole project. | ||
* @param {?Entry=} scope Project file/subfolder to search within; else searches whole project. | ||
* @param {?string=} query - The query to search for; else asks for the query | ||
*/ | ||
function _doFindInFiles(scope) { | ||
function _doFindInFiles(scope, query) { | ||
// If the scope is a file with a custom viewer, then we | ||
// don't show find in files dialog. | ||
if (scope && EditorManager.getCustomViewerForPath(scope.fullPath)) { | ||
|
@@ -892,17 +893,25 @@ define(function (require, exports, module) { | |
currentQueryExpr = null; | ||
currentScope = scope; | ||
maxHitsFoundInFile = false; | ||
|
||
dialog.showDialog(initialString, scope); | ||
|
||
if (query) { | ||
StatusBar.showBusyIndicator(true); | ||
dialog.closed = true; | ||
_doSearch(query); | ||
} else { | ||
dialog.showDialog(initialString, scope); | ||
} | ||
} | ||
|
||
/** | ||
* @private | ||
* Search within the file/subtree defined by the sidebar selection | ||
* @param {?Entry=} scope - Project file/subfolder to search within; else takes entry selected in file tree. | ||
* @param {?string=} query - The query to search for; else asks for the query | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here with dash and optional parameter |
||
*/ | ||
function _doFindInSubtree() { | ||
var selectedEntry = ProjectManager.getSelectedItem(); | ||
_doFindInFiles(selectedEntry); | ||
function _doFindInSubtree(scope, query) { | ||
scope = scope || ProjectManager.getSelectedItem(); | ||
query = query || undefined; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no need for this line, since |
||
_doFindInFiles(scope, query); | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
between name and description{string=}
which is the same as{?string}
but makes it an optional parameter, only when is the last one or the next one is optional too. Same with{Entry=}