【问题标题】:Eclipse: How to increase find/replace history?Eclipse:如何增加查找/替换历史?
【发布时间】:2013-06-26 06:45:39
【问题描述】:

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

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

【问题讨论】:

    标签: eclipse replace history


    【解决方案1】:

    这个特性请求在 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;
    

    【讨论】:

    • 该错误在 2016 年 11 月被标记为已解决。不过,该框仍然只记得七个项目。什么都没有改变。
    猜你喜欢
    • 2022-11-10
    • 2010-11-09
    • 1970-01-01
    • 1970-01-01
    • 2016-06-11
    • 2020-04-18
    • 2019-04-10
    • 2012-09-09
    • 1970-01-01
    相关资源
    最近更新 更多