Bug 48463 - [find/replace] usability bugs for Replace dialog and selections
Summary: [find/replace] usability bugs for Replace dialog and selections
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-11 03:50 EST by Thomas Whitmore CLA
Modified: 2009-08-06 06:41 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Whitmore CLA 2003-12-11 03:50:42 EST
Using the Find/ Replace dialog for repeated replacements in the same text 
selection, the second and subsequent replacements malfunction.

There seems to be some 'cursor location' within the selection, which is moved 
to one of the replacement positions, then the Replace All is only partial and 
your code is broken.

I find Replace on multiple phrases an important tool for manual code 
engineering and factoring. Especially when code is partly cut and pasted or is 
not compiling, bulk Replacement is crucial to bring the code body back into 
line.

    Special wish: replace with Matching Capitalization
    - eg replace 'foo' -> 'bar' would do fooList, addFoo, removeFoo, getFoos, 
        foo, otherFoo

This dialog has been improved, the dialog seems to stay on scope 'selected 
lines' for subsequent searches, now, but there's another problem where if you 
use the editor window to drag a new selection the dialog switches itself back 
to scope 'all' and mangles your entire file.

Thirdly: the selection is only processed as 'lines'. If I selected a non-
complete line this is because I wish that to be the scope. This can be useful 
within expressions, and precision on the user's exact selection may be a 
requirement (as opposed to incorrectly altering all the other terms on the 
line).

This Replace dialog is quite useful to me, my engineering usage of Eclipse does 
not by any means just rest on the refactorings, so bringing this tool up some 
would great. I've also put the Replace 'Matching Capitals' Wish up separately 
for your admin convenience.


Regards,
Thomas
Comment 1 Victor Toni CLA 2005-05-17 12:17:20 EDT
Is there any progress on this bug?

It is really annoying.

Here my workcase;

1) Mark some small text fragment for use in the find dialog. Works. 
2) Check "Selected Lines" (Scope). Works.
3) Click inside the editor. Automatically "All" (Scope) is selected. This
shouldn't happen. 
4) Select text in editor. Works.
5) Check "Selected Lines" (Scope). This "clears" the selection. This shouldn't
happen either. 

If my workcase is to special for this bug I can open a dedicated one.
Comment 2 Victor Toni CLA 2005-05-17 12:18:14 EDT
I am using 3.1M7.
Comment 3 Victor Toni CLA 2005-05-17 12:33:39 EDT
I tried some other workcases:

1) Mark some text to be used as _selection_ in the find dialog. Works.
2) Open the find dialog. The default is "All".
3) Check "Selected Lines" (Scope). This "clears" the selection.
4) Click Find & and then close.

After this the default will be "Selected Lines".

1) Mark some text to be used as _selection_ in the find dialog. Works.
2) Open the find dialog. This "clears" the selection. (Because of the default)

If there is a way this actually works it should be made easier ;-)
Comment 4 Dani Megert CLA 2005-05-17 13:02:25 EDT
There is/was no work going on in this area. We plan to improve Find/Replace for 3.2.
Comment 5 Dani Megert CLA 2005-06-08 03:37:42 EDT
*** Bug 98653 has been marked as a duplicate of this bug. ***
Comment 6 Dani Megert CLA 2005-06-10 10:01:10 EDT
*** Bug 99287 has been marked as a duplicate of this bug. ***
Comment 7 Tom Hofmann CLA 2005-10-24 11:39:12 EDT
*** Bug 113534 has been marked as a duplicate of this bug. ***
Comment 8 Tom Hofmann CLA 2005-10-24 11:40:02 EDT
See also bug 113534 for a detailed description of actual/expected behavior of
the "selected lines" vs. "all" button.
Comment 9 Dani Megert CLA 2006-02-28 03:44:29 EST
Unfortunately we have to defer this.
Comment 10 Cagatay Calli CLA 2007-08-21 08:27:28 EDT
There are patches about this bug in Bug 64584 (After first search selection effitiently lost and dialog set to Scope=All ) and Bug 28949 (Replace with Matching Capitalization).
Comment 11 Sjoerd CLA 2009-08-05 04:51:58 EDT
I propose to splice this bug into four new bugs, closing this one.

1. There is a cursor location within the selection
2. Replace with matching capitalization
3. Dragging a new selection switches back to scope 'all'
4. Selection has line precision instead of character precision

This makes it possible to monitor progress on this bug more closely, set more precise priorities and mark duplicates more precisely. Currently, it is very hard to solve this bug because this would mean that 4 problems have to be solved at once.
Comment 12 Dani Megert CLA 2009-08-05 04:54:21 EDT
>I propose to splice this bug into four new bugs, closing this one.
Feel free to do so and adjust the duplicates accordingly.
Comment 13 Sjoerd CLA 2009-08-06 04:20:29 EDT
1. Bug 285821 Cursor location within selection breaks "Replace All"
2. Bug 28949 [find/replace] retain caps when replacing
3. Bug 285822 Find scope does not stay on "Selected lines" while selecting
4. Bug 285823 Find/Replace has line precision instead of character precision

Please add yourself to the CC list of the bug you are interested in.
Comment 14 Dani Megert CLA 2009-08-06 06:41:45 EDT
Marking this one as INVALID as it has been replaced by individual bugs.