6

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

4

1 回答 1

2

Eclipse 中有一个带有此功能请求的开放错误(该错误创建于 2004 年 8 月,超过 10 年前):

[查找/替换] 组合框需要记住更多项目 ( https://bugs.eclipse.org/bugs/show_bug.cgi?id=72151 )

随意为这个错误投票,或评论它以尝试解决它。

有了这个 bug 已经有一个补丁文件,你也可以尝试将它注入到你自己的 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;
于 2015-04-13T07:18:41.333 回答