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 34966 - Find in Files - Search for Object Names Containing not completely working properly
Summary: Find in Files - Search for Object Names Containing not completely working pr...
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-16 17:43 UTC by mmele
Modified: 2003-12-11 14:27 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 mmele 2003-07-16 17:43:04 UTC
First problem:
When searching, I can't use the file extension as a 
substring for the object name. It looks like a file 
extension is not considered to be part of the "Object 
Name". 
1. I choose "Find in Files" then selected the "Object Name" 
tab.
2.Then I choose "Substring" option for "Search for Object 
Names Containing:"
3. Then I entered a file extension (jsp).
4. Made sure the "Use this criterion for search." was 
checked.
5. Clicked the "Search" button.
6. Resulted in "No matching nodes were found".  

Second problem:
The Regular Expresion option doesn't seem to work either 
for searching by object name.
I entered ^a.* to find any files starting with a (I know I 
have serveral) but nothing was found.
I entered \.jsp$ to find any files with a jsp extension and 
again no results were found.

IMHO, since search by file type does not work (Issue 
32923), I think the search by "Object Names" should be 
working better.
Comment 1 Marian Petras 2003-07-28 11:19:20 UTC
When searching by object name, names of files are ignored totally.
Rather names of objects (each object is made of one or more files) are
used for searching. Since object names are usually equal to names of
their primary files minus their extensions, it works as you described.

The fact is that regular expressions for searching objects by names do
not work (I reproduced the problem on a Sun machine running Solaris 8).
Comment 2 mmele 2003-07-28 15:09:36 UTC
Is there or will there be the ability to search on all 
files with filenames that begin with a specified string, 
end with a specified string, or contain a specified 
string?  Or the ability to search on a files by type or 
extension?
Comment 3 Marian Petras 2003-07-29 10:32:02 UTC
Once I fix this bug (should be in NB 4.0), it will be possible to
search for objects whose names begin with a specified string, end with
a specified string, or contain a specified string.

It is possible to search by object types already - use tab "Type" of
the "Find in Files" dialog.

The current search engine does not search _files_ by names. It
searches _objects_ by names. This probably will not be changed in NB 4.0.
Comment 4 mmele 2003-07-29 15:48:13 UTC
Thanks for the feedback.  That's good that it will be part 
of NB4.0.  You mentioned that it is possible to search by 
object types already using the tab "Type" of
the "Find in Files" dialog. However, as I stated initially 
and I think others have reported that this feature is not 
working in NB 3.5 (Issue#: 32923 ).  Should it be?
Part of this problem seems to be that you cannot manage 
the search types in the tools->options->ide configuration-
> system->search types section.  When yoy try to create a 
new search type all you get is a list of "<unrecognized 
setting>".
Comment 5 Marian Petras 2003-07-29 19:43:25 UTC
Searching by object types does work. The only problem is with subnodes
of node "Search Types" in the Options dialog - and it is tracked as
issue #32923.
Comment 6 Marian Petras 2003-08-08 11:58:34 UTC
Fixed in the trunk.

Now it is able to find files whole names (without extension) begin,
end or contain a specified string.

Examples:
Type the regular expressions below to field "Regular Expression"
within the "Object Name" tab of the "Find in Files" dilaog.

    ^Color  ....  find files whose names begin with "Color"
    view$  .....  find files whose names end (without extension)
                  with "view"
    ^Color.*view$  ...  find files whose names begin
                        with "Color" and end (without extension)
                        with "view"
    Image  .....  find files whose names contain substring "Image"
    ^[AF]  .....  find files whose names begin with "A" or "F"