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 25564 - Permit search-and-replace on selected text
Summary: Permit search-and-replace on selected text
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Search (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL: http://www.netbeans.org/servlets/Brow...
Keywords:
: 6801 36213 41914 (view as bug list)
Depends on:
Blocks: 51964
  Show dependency tree
 
Reported: 2002-07-11 21:37 UTC by Jesse Glick
Modified: 2007-11-05 13:42 UTC (History)
3 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 Jesse Glick 2002-07-11 21:37:03 UTC
I.e. if there is a text selection in the editor,
make S-&-R operate only within that region for
convenience. Thread on nbusers for more.

Workaround: move cursor to start of desired
region, press Ctrl-H. Dialog will begin searching
there. Close dialog when at end of desired region.
Comment 1 Jesse Glick 2002-07-11 21:40:25 UTC
I suppose this would be desired as a context menu item when there is a
text selection, and perhaps also a modification to the behavior of
Ctrl-H or Edit -> Replace.
Comment 2 Marek Grummich 2002-07-22 09:53:42 UTC
Set target milestone to TBD
Comment 3 Marek Grummich 2002-07-22 09:57:41 UTC
Set target milestone to TBD
Comment 4 psuk 2004-03-19 10:55:59 UTC
*** Issue 36213 has been marked as a duplicate of this issue. ***
Comment 5 psuk 2004-03-19 11:27:05 UTC
We should add something like:
[x] Current Selection Only

in Find/Replace dialog.

Things to consider:
1. Selected text appears in Find/Replace dialog as default value. We
want to keep this functionality, as this is default behavior in most
editors

2. When should we make the option (Current Selection Only) pre-set? 
If 1 is true, then it doesn't make sense to pre-set the option
everytime when user selects the code. 
So either

2.1  it will be false all the time and user will specifically check
it, or 
2.2 we need to find out a heuristic alghoritm.

Example from non-IDE world - openoffice: if the selection is within
one paragraph, it expects that user is looking in whole document. If
the selection spawns multiple paragrahs, it defaults the option in
File/Replace dialog to 
[x] Current selection only

We might use similar approach - just limit it to one line, as the
expectation is that if user selects multiple lines, he wants to select
in this block. 
User that want to find exactly the same block (e.g. mutliple lines)
can uncheck the option.
Comment 6 psuk 2004-03-23 18:16:35 UTC
Changing subcomponent to "search"
Comment 7 Roman Strobl 2004-12-07 13:33:09 UTC
*** Issue 41914 has been marked as a duplicate of this issue. ***
Comment 8 Roman Strobl 2004-12-07 13:34:39 UTC
Setting target milestone to 4.1 according to 41914.
Comment 9 Roman Strobl 2004-12-07 13:35:06 UTC
*** Issue 41914 has been marked as a duplicate of this issue. ***
Comment 10 Martin Roskanin 2004-12-09 16:43:23 UTC
*** Issue 6801 has been marked as a duplicate of this issue. ***
Comment 11 Martin Roskanin 2005-01-03 15:00:28 UTC
implemented in [maintrunk]

/cvs/editor/libsrc/org/netbeans/editor/BaseSettingsInitializer.java,v
 <--  BaseSettingsInitializer.java
new revision: 1.24; previous revision: 1.23

/cvs/editor/libsrc/org/netbeans/editor/Bundle.properties,v  <-- 
Bundle.properties
new revision: 1.53; previous revision: 1.52

/cvs/editor/libsrc/org/netbeans/editor/DocumentFinder.java,v  <-- 
DocumentFinder.java
initial revision: 1.1

/cvs/editor/libsrc/org/netbeans/editor/DrawLayerFactory.java,v  <-- 
DrawLayerFactory.java
new revision: 1.43; previous revision: 1.42

/cvs/editor/libsrc/org/netbeans/editor/FindSupport.java,v  <-- 
FindSupport.java
new revision: 1.61; previous revision: 1.60

/cvs/editor/libsrc/org/netbeans/editor/SettingsDefaults.java,v  <-- 
SettingsDefaults.java
new revision: 1.45; previous revision: 1.44

/cvs/editor/libsrc/org/netbeans/editor/SettingsNames.java,v  <-- 
SettingsNames.java
new revision: 1.17; previous revision: 1.16

/cvs/editor/libsrc/org/netbeans/editor/ext/FindDialogPanel.form,v  <--
 FindDialogPanel.form
new revision: 1.9; previous revision: 1.8

/cvs/editor/libsrc/org/netbeans/editor/ext/FindDialogPanel.java,v  <--
 FindDialogPanel.java
new revision: 1.12; previous revision: 1.11

/cvs/editor/libsrc/org/netbeans/editor/ext/FindDialogSupport.java,v 
<--  FindDialogSupport.java
new revision: 1.54; previous revision: 1.53

/cvs/editor/src/org/netbeans/modules/editor/options/BaseOptions.java,v
 <--  BaseOptions.java
new revision: 1.98; previous revision: 1.97

/cvs/editor/src/org/netbeans/modules/editor/options/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.76; previous revision: 1.75
Comment 12 zikmund 2005-01-17 10:35:42 UTC
Verified.