Bug 311522 - [find/replace] Offer Find->Replace All from caret location
Summary: [find/replace] Offer Find->Replace All from caret location
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 322409 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-04 08:04 EDT by Peter Soetens CLA
Modified: 2019-09-06 16:16 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Soetens CLA 2010-05-04 08:04:02 EDT
This is standard Helios M6

Create a text file with contents: <<EOF
aba

aba

aba
EOF

Put the cursor at the second line. In the Find/Replace dialog (Ctrl-f), replace aba with TEST, and disable 'Wrap search'. Then click 'Replace All'. It will do the replace in the whole scope instead of (expected result:) replacing only occurences from cursor until end of file. 

Discovered this in the CDT, but also tested it with the standard editor on a txt file.

Peter

-- Configuration Details --
Product: Eclipse 1.3.0.20091112-2040 (org.eclipse.epp.package.cpp.product)
Installed Features:
 org.eclipse.platform 3.6.0.v20100121-9hF78GK1FufosnFu87UwXZfHJWXovR-z-9b
Comment 1 Dani Megert CLA 2010-05-05 11:59:21 EDT
I don't know what's misleading in the word 'ALL'. ;-)

I'm turning this into a feature request for you.
Comment 2 Peter Soetens CLA 2010-05-06 08:35:01 EDT
(In reply to comment #1)
> I don't know what's misleading in the word 'ALL'. ;-)
> 
> I'm turning this into a feature request for you.

Thanks. It's just that it conflicts (visually) with the 'Wrap search' option. Wrapping is off, but this button can ignore that and wrap anyway.

Or you need to restructure the dialog to separate out the ALL from the options that don't apply to it (for example: 'Case sensitive' *is* taken into account).

I checked with 'kate' which offers a similar replace dialog/options, it has the same behaviour as Eclipse.

I don't mind if you classify this as noise and close this bug report...

Peter
Comment 3 Dani Megert CLA 2010-05-06 10:54:39 EDT
Other replace dialogs offer the functionality you describe but then it's made obvious that the direction (up/down or from top) is considered when replacing "all". So, I think it's OK to keep this enhancement open.
Comment 4 Dani Megert CLA 2010-08-12 01:52:14 EDT
*** Bug 322409 has been marked as a duplicate of this bug. ***
Comment 5 David Wright CLA 2010-08-12 03:08:45 EDT
(In reply to comment #4)
> *** Bug 322409 has been marked as a duplicate of this bug. ***
Aren't we missing something here? This behaviour is a change from Galileo and removes a useful option (eg when the user wants to remove all references to a .* static import within the class body without removing the import itself). 
This user at least will hold off for now from permanently upgrading to Helios as a result, which suggests we're looking at a regression.
Comment 6 Dani Megert CLA 2010-08-12 07:59:31 EDT
You can select a piece of text and then replace all in that selection.
Comment 7 David Wright CLA 2010-08-12 08:07:57 EDT
(In reply to comment #6)
> You can select a piece of text and then replace all in that selection.
That indeed is a workaround, but loses the benefit of the very nice 'find the selection' featurette. 
Is there some reason why Helios shouldn't keep useful behaviour established in earlier releases?
Comment 8 Dani Megert CLA 2010-08-12 08:10:19 EDT
>Is there some reason why Helios shouldn't keep useful behaviour established in
>earlier releases?
Because 'Replace ALL' was misleading.
Comment 9 David Wright CLA 2010-08-12 08:23:57 EDT
(In reply to comment #8)
> Because 'Replace ALL' was misleading.
Well it never misled this user, who read it in in relation to the Wrap checkbox. Was this behaviour raised as a bug, and if so by how many users? Don't by any means just take my word for it, but consider if changing an established and useful behaviour was such a good idea.
Comment 10 Eclipse Webmaster CLA 2019-09-06 16:16:19 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.