This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Currently, the Find in Files dialog heavily relies on where it was invoked. First, it's shortcut is the same as the shortcut for the Find (in a single file) feature. So when I am typing in the editor window and press Ctrl+F, I get the Find (in editor) dialog. It would be nice if there was a single shortcut that always fires the Find in Files dialog. Secondly, it always searches in the directory tree which was selected before starting the dialog, and there is no way to override this. This is inappropriate especially when starting Find in Files from the main menu. So, there should be a field which allows specifying the directory to search in (with a reasonable default preselected). This field should be very easily reachable - in the first basic tab, where the user specifies the string to search.
Accepted.
*** Issue 70371 has been marked as a duplicate of this issue. ***
From bug report #35257, it seems that some users might not know about context-dependent Find... and only use Find in Projects for searching across multiple files. Fixing this issue would help those users. I suggest that there would be only one action for searching across multiple files. When invoked, a dialog would appear and the dialog would allow to choose: - search all open projects - search the current project - search selected packages | Select... | A shortcut for the action would NOT be Ctrl-F so that it could be invoked even from the text editor. It could be the current shortcut for action Find in Projects (Ctrl-Shift-P).
This is now mostly addressed in NB 6, so I am marking this as fixed. The only remaining subissue is the fact that the shortcut for Find in File is the same as the shortcut for Find in Files, which is not really a problem. Thanks!
The shortcut Ctrl-F is still context dependent, i.e. it does "find in file" if the document window (editor) is active and it does "find in files" in other cases. There is also another shortcut Ctrl-Shift-F which should always invoke "find in files". The remaining sub-issue is that this shortcut currently clashes with action "Reformat Code" so that it does not work if the editor is active. The reason is that action "Reformat Code" should have a different shortcut according to the updated keymap specification. Action "find in files" behaves slightly differently, depending on whether it was invoked from action "Find... (Ctrl-F)" or from "Find in Projects... (Ctrl-Shift-F). If invoked from "Find...", search scope "Selection" is pre-selected in the Find dialogue. If invoked from "Find in Projects...", search scope "Open Projects" is pre-selected.