Eclipse: How to increase find/replace history?

淺唱寂寞╮ 提交于 2019-12-05 01:38:02

问题


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.)


回答1:


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;


来源:https://stackoverflow.com/questions/17313258/eclipse-how-to-increase-find-replace-history

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!