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 238498 - Find in grep mode
Summary: Find in grep mode
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.3.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: ilia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-18 09:53 UTC by henri127
Modified: 2014-04-17 13:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description henri127 2013-11-18 09:53:42 UTC
Product Version = NetBeans IDE 7.3.1 (Build 201306052037)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_21
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01

Using grep for "Find in Projects..." always returns null results
Comment 1 Jaroslav Havlin 2013-11-29 14:00:19 UTC
I guess the problem is that grep command is not available on Windows.
Maybe this search provider should be enabled on unix systems only.

Reassigning to cnd/Other. Please evaluate it. Thank you.
Comment 2 henri127 2013-12-01 12:33:57 UTC
cnd/Other? For what does this abbreviation stand? 
I thought java was meant to be to work on all systems. Is there a replacement to use this command?
Comment 3 ilia 2013-12-03 08:50:37 UTC
henri127, 

"Grep" search is not implemented on Windows yet.
It returns 0 results because it tries to seek a "grep" command,
which is available on UNIX, only and fails.
For now I'll disable "grep" tab in "Find in Projects".

As an alternative you can choose "Match: Regular Expression" 
on "Default Search" tab. That works on all OS because java's 
internal mechanisms are used for this search.

http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
Here you can find java's regexp docs.
Comment 4 henri127 2013-12-03 12:37:24 UTC
The disadvantage from a regular search are its limitation to just one file. When projects are large and have a lot of files, opening all files should be done.
Sometimes projects, not Java, have a same variable name used in different context, and thus different implications, p.e. an integer value constant used with different values in C. Not to mention that often a function is not found by Netbeans in C/C++ when the function is defined in a Macro. It would be helpful if one could do a search on all files and see what the implications are. As a replacement I use a search with the Windows search engine, but this still is not as helpfull as in the case when with just double clicking one could open a file containing such an implication for the search result tab. I will certainly upgrade Netbeans when the searching is improved, and recall, but am not sure, that in previous versions this command was available. I found this <http://superuser.com/questions/26593/best-way-to-confidently-search-files-and-contents-in-windows-without-using-an>, <http://www.mythicsoft.com/agentransack/> had some trouble with downloading but right clicking and save as did the job. Of course Java has so many possibilities for Strings that this will not be an option, nor is searching specific for an IDE.
Comment 5 Quality Engineering 2013-12-24 02:42:47 UTC
Integrated into 'main-silver', will be available in build *201312240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ef0d91141087
User: Ilia Gromov <ilia@netbeans.org>
Log: fixed Bug 238498 - Find in grep mode
- disabled grep search for Windows users
Comment 6 soldatov 2014-03-22 08:42:04 UTC
verified in NetBeans IDE 7.4 (Build 20140320-3f80b6998498)
Comment 7 Quality Engineering 2014-03-26 17:08:12 UTC
Integrated into 'releases/release74', will be available in build *201403261440* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/995e25d20bc8
User: Ilia Gromov <ilia@netbeans.org>
Log: fixed Bug 238498 - Find in grep mode
- disabled grep search for Windows users
(transplanted from ef0d911410873b49dda0a07334cb6bf79795bfd4)
Comment 8 henri127 2014-04-14 09:58:15 UTC
I am running 8.0 now it does not seem to work on windows, except for the fact that it disabled
Comment 9 soldatov 2014-04-14 10:05:32 UTC
(In reply to henri127 from comment #8)
> I am running 8.0 now it does not seem to work on windows, except for the
> fact that it disabled
see Comment 5
Comment 10 henri127 2014-04-14 10:58:59 UTC
just downloaded it, is this nightly build of version 8.0, because the documentation refers to something from October 2013 and names 7.4
Comment 11 henri127 2014-04-14 11:41:56 UTC
just downloaded and installed this build, the find in grep mode is not different from regular 8.0 version
Comment 12 Alexander Simon 2014-04-14 12:06:03 UTC
(In reply to henri127 from comment #11)
> just downloaded and installed this build, the find in grep mode is not
> different from regular 8.0 version
The grep mode does not work on Windows (because grep mode required a operation system support). It works only on unix.
So the fix is:
- disabling grep mode on Windows.
Comment 13 henri127 2014-04-14 13:09:43 UTC
I understand this and why find the search in grep mode is not working, but the command: "Find in projects" returns two possible tabs. One for the grep mode, the other for a regular search. Also the regular search always returns null results.
Comment 14 Alexander Simon 2014-04-14 13:29:41 UTC
(In reply to henri127 from comment #13)
> I understand this and why find the search in grep mode is not working, but
> the command: "Find in projects" returns two possible tabs. One for the grep
> mode, the other for a regular search. Also the regular search always returns
> null results.
Please, file a separate bug for "Regular Find in projects".