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 129962 - Modify Criteria doesn't remember selection
Summary: Modify Criteria doesn't remember selection
Status: RESOLVED WORKSFORME
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jaroslav Havlin
URL:
Keywords: UI
: 148985 159716 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-12 21:11 UTC by cruxic
Modified: 2012-10-22 13:19 UTC (History)
2 users (show)

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 cruxic 2008-03-12 21:11:41 UTC
Here is one way to reproduce the problem:

1) Right click "Source Packages" and select "Find..."
2) Do a trivial search.
3) Select "Test Packages" in the project tree.
4) In the search results click "Modify Criteria" - Now the scope is selection ("Test Packages") instead of the original
"Source Packages".  The original selection should be remembered in the search criteria.

If this was the intended behavior then I'd argue strongly that it confuses more users than it aides.  If the user truly
wants to execute the same search from a different scope then he/she can merely invoke another find from that scope - the
form conveniently retains the most previous inputs.
Comment 1 Roman Ondruska 2008-03-13 18:36:50 UTC
Selection (Scope) is one of several searching criteria that might be changed with Modify Search action. I do not see
that it is evident the user may want to change everything but the scope. What if the user wants to add another project
to search based on results they got? I also do not see the relevant use-case where the user needs to change selection in
Projects before the Modify Search is done; if you have some, please provide it.

However, if we find out that the searching scope should really be persisted when doing Modify Search, the possible
solution is to add another option (the default one) 

(o) Use Last Scope

that would be only displayed for Modify Search. Question is whether 'Selection' option should be removed in this case or
not.

Moving to RFE, it would be nice to have a wider feedback.
Comment 2 cruxic 2008-03-13 21:11:17 UTC
Here's the use case:

1) User wants to find all JDBC queries on the "people" table because that table is no longer used.
2) User selects the "Source Packages" node because he wants to search the entire code base.
3) User enters search string and runs it.
4) User proceeds to deal with each found occurrence in turn.
5) User uses tree to open another Java file and makes various tweaks to it.
6) User wants to see if he got them all so he clicks "Modify Search" and then "Find" to repeat the same search.
7) User gets no results so he concludes that his work is done and proceeds to commit the code.
8) User later realizes that he missed a bunch and wonders how on earth they didn't show up in his search.

The problem lies in step #5.  The act of using the tree changed the selection.  Since "Modify Search" does not remember
the original search selection, when the search is repeated it is in fact using a very different search scope.

I strongly believe that the current behavior is counter intuitive.  If I click "Modify Search" and make ZERO changes on
that form it should yield the exact same parameters as it did the first time.  I doubt that any U.I. experts would
disagree with this.

If the user truly wants to repeat the same search using a different scope, as you suggest, they can simply select the
different tree location and choose "Find...".  The form will hold the most recent criteria so they don't have to
re-enter stuff.

What do you think?
Comment 3 Andrey Yamkovoy 2009-03-19 11:10:16 UTC
*** Issue 159716 has been marked as a duplicate of this issue. ***
Comment 4 Jaroslav Havlin 2011-08-09 13:34:24 UTC
*** Bug 148985 has been marked as a duplicate of this bug. ***
Comment 5 Jaroslav Havlin 2012-10-22 13:19:03 UTC
The original selection is remembered since NetBeans 7.2.