【发布时间】:2013-06-26 06:45:39
【问题描述】:
查找/替换对话框显示最后 8 个条目。该对话框通过 Ctrl+F 显示。 我想增加“查找”和“替换为”输入字段的历史记录中显示的条目数。我必须搜索和替换几个字符串和正则表达式。因此我一次又一次地输入字符串和正则表达式......
(我不是指文件内容更改的“限制历史大小”。)
【问题讨论】:
查找/替换对话框显示最后 8 个条目。该对话框通过 Ctrl+F 显示。 我想增加“查找”和“替换为”输入字段的历史记录中显示的条目数。我必须搜索和替换几个字符串和正则表达式。因此我一次又一次地输入字符串和正则表达式......
(我不是指文件内容更改的“限制历史大小”。)
【问题讨论】:
这个特性请求在 Eclipse 中有一个未解决的 bug(这个 bug 是在 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;
【讨论】: