Community
Participate
Working Groups
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
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.
I am using 3.1M7.
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 ;-)
There is/was no work going on in this area. We plan to improve Find/Replace for 3.2.
*** Bug 98653 has been marked as a duplicate of this bug. ***
*** Bug 99287 has been marked as a duplicate of this bug. ***
*** Bug 113534 has been marked as a duplicate of this bug. ***
See also bug 113534 for a detailed description of actual/expected behavior of the "selected lines" vs. "all" button.
Unfortunately we have to defer this.
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).
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.
>I propose to splice this bug into four new bugs, closing this one. Feel free to do so and adjust the duplicates accordingly.
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.
Marking this one as INVALID as it has been replaced by individual bugs.