adobe/brackets — pull request #3151 by TomMalbran (2013-03-18 02:33:15+00:00)
Title: Lots of Find in Files improvements

So here I made the next improvements to find in files covering most of the [Trello Card](https://trello.com/card/8-find-in-project-aka-find-in-files/4f90a6d98f77505d7940ce88/266) and some extras:

* Both the results and the dialog now use a proper template. The dialog template was used just for the content and only in Find in Files, but it could be used for all the find templates with few modifications.

* The results list now allows paging with just 2 links. I left the 100 results per page and increased to 300 the results per file, since we can now see all of them. It could still be increased, but haven't checked what would be right max.

* Clicking on a table row, now selects it, making it easier to go through all the results. The only problem is that the highlight color and the selected color are the same, so if needed one would need to be changed.

* Double clicking on a result now adds it to the working set.

* The file results are now sorted having the current document always first to make it possible to select the first result in the current document, if there is one.

* Searching through the files now uses `DocumentManager` for files in the working set, since only those could have unsaved changes and `FileUtils` for the rest. These should avoid creating a Document for every file creating lots of console errors as mentioned in #3146.

* All the find methods can now search through documents outside of the project in the working set.

* Every change done to the current document modifies the results to add/delete results and change the line numbers when needed.

* Added a new command to search only the files in the working set.

* Added 2 new commands to select the previous/next row in the search result table. Wasn't sure of the right command for Mac, so I made one up following the key order used in the find/replace commands.

* Moved all the search menu items with the 2 new and the Find in File/Subtree to a new Search menu. This reduced the size of the Edit menu and allowed me to add new menu items.