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.

Bug 203904 - Find better replacement for "Selection" scope in "Find in Projects..." dialog
Summary: Find better replacement for "Selection" scope in "Find in Projects..." dialog
Status: RESOLVED WORKSFORME
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 7.1
Hardware: PC Linux
: P4 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-18 13:41 UTC by legec
Modified: 2012-12-19 10:00 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description legec 2011-10-18 13:41:38 UTC
Product Version = NetBeans IDE 7.1 Beta (Build 201109252201)
Operating System = Linux version 2.6.38-11-generic running on amd64
Java; VM; Vendor = 1.6.0_22
Runtime = OpenJDK 64-Bit Server VM 20.0-b11

The "Find in Projects..." feature is, IMHO, really important in an ide.
It works just fine in netbeans - maybe you could try to speed it up, for simple word search when running in linux, "grep" is at least 10x faster. Or give access to the built-in grep command from within the ide ?
The integration with the ide - display the result list, double-click jumps to the right flag - is precious.

However, I just find that, more often than not, the "Selection" option offered in the "Scope" box provides is pretty useless to me.

The main drawback is that it defaults to the selection of the currently active component, which is often the editor, and in this case, it offers to "search" only inside the current active file - which is completely redundant with the "Find" action.

I have 2 simple alternatives to propose :
1 - at least, only consider the selection in the "Projects" or the "Files" tab. If a file is selected, maybe select this file's directory rather than the file alone.
2 - replace this "Selection" option with a textbox asking "Search in the following directories :", and let the user enter a comma separated list of directories (with a stored history, much like the "File Name Patterns" or the "Containing Text" inputs of the same dialog). Only keep results for files having a path which match one of the partial paths.

There are probably even better ideas out there.
Comment 1 Jaroslav Havlin 2012-12-19 10:00:52 UTC
Please try NetBeans 7.2.1 or 7.3 beta 2. If you press Ctrl+Shift+F, the last used scope will be selected by default. You can use "Current Project" or "Open Projects". If you press Ctrl+F in Projects window or Files window, the current selection will be used as default scope.
I think this behavior is correct. Please check it and feel free to reopen this issue.
Thank you for reporting.