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 19208 - regular expresion search dialog works differently than substring search
Summary: regular expresion search dialog works differently than substring search
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@utilities
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-09 16:34 UTC by David Konecny
Modified: 2004-10-18 14:00 UTC (History)
3 users (show)

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 David Konecny 2002-01-09 16:34:02 UTC
Build: NetBeans IDE 3.3.1-dev (Build 200201090957)
Try this:
1.) trigger action Search Filesystem (e.g. on sampledir directory)
2.) start search for a SUBSTRING, e.g. "memory"
3.) in Search Results dialogs try to single/double click on some 
     "Position within the file" list box

Now try the same with this change:
2.) start search for a REGULAR EXPRESSION, e.g. "memory" or "mem*"

The second scenario has following problems:
1.) double click (in Position within the file) does not open file
2.) single click does not focus line with the search result
3.) if file is already opened, the annotation is added, but double click remove
     annotation what is strange.
Comment 1 _ lkramolis 2002-05-09 13:24:30 UTC
It is strange, I will investigate it soon.
Comment 2 _ lkramolis 2002-05-22 14:35:14 UTC
Problems 1 and 2 fixed.

Issue 3 remains because I am not sure how it could behave. I do not
know RE annotations reason. And also it looks it is not possible to
remove annotation by different way when I can not listen on deselection.
Comment 3 David Konecny 2002-05-23 12:24:29 UTC
Thanx for fixing first two problems.

However, I'm reopening the issue because the third problem was not 
fixed neither explained current behaviour. And it seems to me still 
very strange. What is the logic of this behaviour? Why second click 
removes the annotation? Does UI agree with current behaviour?
Comment 4 _ lkramolis 2002-05-23 13:18:30 UTC
Because I got Utilities module when RE annotations was already
implemented I do not know reason why. Why it is here and what is an
intention to have it.

So I am looking forward to know right reason.
Comment 5 _ lkramolis 2002-05-28 11:26:21 UTC
If nobody from UI or original author (Peter Zavadsky) will explain
correct behavior, I will close issue because it is not defect for me. OK?
Comment 6 David Konecny 2002-05-28 12:02:29 UTC
I agree that it is not defect from developer point of view, but I 
still see it as usability bug. And although this feature might not be 
used often we should fix it/correct it. Closing issue does not solve 
anything. The better seems to me to move the issue to UI/HIE team and 
let them decide what is the correct behaviour. My 2 cents.
Comment 7 Jiri Mzourek 2002-05-29 09:45:40 UTC
I suggest to have consistent behavior, it means the same as when you
do "substring" search (don't use annotation at all).
Comment 8 David Konecny 2002-05-29 10:06:33 UTC
Sounds good to me. Consistency is good thing. :-)

The alternative (which somebody proposed a long time ago, maybe it was 
PetrZ) was to use annotations also for substring search and annotate 
just found string(s). It would be just part line annotation and not 
the whole line annotation as it is for reg exp search.
Comment 9 Marek Grummich 2002-07-22 11:55:11 UTC
Set target milestone to TBD
Comment 10 Marek Grummich 2002-07-22 11:57:13 UTC
Set target milestone to TBD
Comment 11 Marian Petras 2004-10-18 13:59:04 UTC
Fixed in the trunk, thus also eliminating bug #33965 ("Cann't remove
highlighting from editor").

Modified files:
   utilities/src/org/netbeans/modules/search/types:
      FullTextType.java   (revision 1.38)
Comment 12 Marian Petras 2004-10-18 14:00:15 UTC
Strings found by regular expression search are now highlighted using
the same way as for strings found by substring search.