Bug 113534 - [find/replace] Find/Replace on selected lines with changes to the selection
Summary: [find/replace] Find/Replace on selected lines with changes to the selection
Status: RESOLVED DUPLICATE of bug 285822
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-24 10:31 EDT by Maxime Daniel CLA
Modified: 2009-08-06 05:58 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Daniel CLA 2005-10-24 10:31:37 EDT
Build id: I20051018-0932.

The scenario that I would like to see supported in find replace on selected
lines would be the following:
- select a few lines of code;
- bring up the Find/Replace dialog; (note: 'Selected Lines' is checked);
- type in a find query;
- type in a replace with text;
- hit Replace All; (occurrences of the Find string get changed, as expected);
- make a new selection without closing the Find/Replace box;
- hit Replace All again, and get the same change happen upon the new selection.

What happens else in the last step is that all occurrences of the find text get
changed into the whole file. This is because 'Selected Lines' gets unselected
when I change the selection. The workaround is quite simple: once I have changed
my selection, I should check 'Selected Lines' again. The only problem I have
with this is that I get caught up to three times a day ;-)
I understand that Ctrl-Zing immediately saves the situation. Yet, I believe it
would be slightly better to stick to the safest change here, limited to the
selected area as long as the 'Selected Lines' got checked and a valid selection
is available, or at least as long as only transient states separate times at
which a valid selection is available.
Comment 1 Tom Hofmann CLA 2005-10-24 11:39:12 EDT
The issue you bring up is mentioned in bug 48463 comment 0: 

<quote>
if you 
use the editor window to drag a new selection the dialog switches itself back 
to scope 'all' and mangles your entire file.
</quote>

*** This bug has been marked as a duplicate of 48463 ***
Comment 2 Sjoerd CLA 2009-08-06 04:23:57 EDT
I have split bug 48463 into four more specific bugs. This bug is actually a duplicate of bug 285822 "Find scope does not stay on "Selected lines" while selecting".
Comment 3 Dani Megert CLA 2009-08-06 05:58:34 EDT

*** This bug has been marked as a duplicate of bug 285822 ***