Eclipse:如何增加查找/替换历史记录? [英] Eclipse: How to increase find/replace history?

查看:804
本文介绍了Eclipse:如何增加查找/替换历史记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查找/替换对话框显示最后8个条目。对话框通过Ctrl + F显示。
我想增加历史记录中显示的查找和替换输入字段的数量。我必须搜索并替换几个字符串和正则表达式。因此,我一次又一次地输入字符串和正则表达式...



(我不是指文件内容更改的限制历史记录大小。)

解决方案

这个功能要求在Eclipse中有一个开放的错误(该错误是在十多年前的2004年8月创建的) p>

[find / replace]组合框需要记住更多的项目( https://bugs.eclipse.org/bugs/show_bug.cgi?id=72151



随意投票这个bug,或评论它试图使其解决。



有了这个bug,就已经有一个补丁文件,你也可以尝试把它注入你自己的Eclipse。

 索引:src / org / eclipse / ui / texteditor / FindReplaceDialog.java 
======= ================================================== ia == log.java,v
检索修订版1.49
diff -u -r1.49 FindReplaceDialog.java
--- src / org / eclipse / ui / texteditor / FindReplaceDialog.java 2005年2月25日15 :14:47 -0000 1.49
+++ src / org / eclipse / ui / texteditor / FindReplaceDialog.java 6 Apr 2005 13:36:01 -0000
@@ -140,8 +140, 11 @@
}
}

- / **对话框的大小搜索历史记录。 * /
- private static final int HISTORY_SIZE = 5;
+ / **对话框的大小搜索记录。
+ *用户不喜欢重新输入长的regex模式,
+ *所以给他们很多的历史。
+ * /
+ private static final int HISTORY_SIZE = 30;

private Point fLocation;
private Point fIncrementalBaseLocation;


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

解决方案

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;

这篇关于Eclipse:如何增加查找/替换历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆