Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: How to increase find/replace history?

The find/replace dialog shows last 8 entries. The dialog is shown via Ctrl+F. I want to increase the number of entries shown in the history of the "find" and the "replace with" input field. I have to search and replace several strings and regular expressions. Therefore I type the strings and regex again and again...

(I do not mean the "Limit history size" for changes of file content.)

like image 945
leonardo12 Avatar asked Jun 26 '13 06:06

leonardo12


1 Answers

There is an open bug in Eclipse with this feature request (the bug was created in August 2004, more than 10 years ago) :

[find/replace] combobox needs to remember more items (https://bugs.eclipse.org/bugs/show_bug.cgi?id=72151)

Feel free to vote for this bug, or comment it to try to make it resolved.

With the bug there is already a patch file, you can also try to inject it into you own Eclipse.

Index: src/org/eclipse/ui/texteditor/FindReplaceDialog.java
===================================================================
RCS file: /home/eclipse/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceDialog.java,v
retrieving revision 1.49
diff -u -r1.49 FindReplaceDialog.java
--- src/org/eclipse/ui/texteditor/FindReplaceDialog.java    25 Feb 2005 15:14:47 -0000  1.49
+++ src/org/eclipse/ui/texteditor/FindReplaceDialog.java    6 Apr 2005 13:36:01 -0000
@@ -140,8 +140,11 @@
        }
    }

-   /** The size of the dialogs search history. */
-   private static final int HISTORY_SIZE= 5;
+   /** The size of the dialogs search history.
+     * Users don't like retyping long regex patterns, 
+     * so give them lots of history.
+     */
+   private static final int HISTORY_SIZE= 30;

    private Point fLocation;
    private Point fIncrementalBaseLocation;
like image 87
Yosef-at-Panaya Avatar answered Nov 08 '22 20:11

Yosef-at-Panaya