Java Eclipse 有宏记录器吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/103202/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 08:18:57  来源:igfitidea点击:

Is there a macro recorder for Eclipse?

javaeclipseideeditormacros

提问by Tim Howland

Is there a good Eclipse plugin for recording and playing back macros?

是否有用于录制和播放宏的好的 Eclipse 插件?

I've tried this one, but it didn't do me any good- it seemed like it wasn't ready for prime time.

我试过这个,但它对我没有任何好处——它似乎还没有准备好迎接黄金时段。

I know about editor templates, but I'm looking for something that I can use to record my keystrokes and then apply multiple times against a wad of text.

我知道编辑器模板,但我正在寻找可以用来记录我的击键然后针对一叠文本多次应用的东西。

This seems like a strange hole in an IDE. Am I missing some built-in facility for this?

这似乎是 IDE 中的一个奇怪漏洞。我是否为此缺少一些内置设施?

采纳答案by rcreswick

I put something together over the last month or so that you may find useful. It has limitations since the Eclipse editor/commands weren't designed with macro support in mind, but I think it works reasonably well. I just posted Practical Macroat SourceForge a couple of days ago. It requires Eclipse 3.4.

我在上个月左右整理了一些东西,以便您可能会觉得有用。它有局限性,因为 Eclipse 编辑器/命令在设计时没有考虑到宏支持,但我认为它运行得相当好。几天前我刚刚在 SourceForge 上发布了实用宏。它需要 Eclipse 3.4。

回答by Ilya Kochetov

This seems like a strange hole in an IDE, am I missing some builtin facility for this?

这似乎是 IDE 中的一个奇怪漏洞,我是否缺少一些内置工具?

This is a common problem. There are around four bugs opened in Eclipse tracker for this. Unfortunately you would probably see macros in Eclipse in v4.0 or later.

这是一个常见的问题。为此在 Eclipse 跟踪器中打开了大约四个错误。不幸的是,您可能会在 v4.0 或更高版本的 Eclipse 中看到宏。

回答by zvikico

There was a plug-in called Eclipse Monkeywhich allowed writing scripts that execute inside the IDE. It was terminatedabout a month ago due to lack of interest.

有一个名为Eclipse Monkey的插件,它允许编写在 IDE 内执行的脚本。由于缺乏兴趣,它在大约一个月前被终止

It is based on an older plug-in called Groovy Monkey. If you google it, you can still get it. The Aptana team has some more informationon using it.

它基于一个名为Groovy Monkey的旧插件。如果你谷歌它,你仍然可以得到它。Aptana 团队有更多关于使用它的信息

Note that this allows writing scripts, but not recording actions.

请注意,这允许编写脚本,但不允许记录操作。

回答by rcreswick

Just for the record, there is another project called MacroSchmacrothat does Eclipse macros, but it doesn't record many important things (like searching to navigate). It is also extremely slow.

只是为了记录,还有另一个名为MacroSchmacro 的项目可以执行 Eclipse 宏,但它没有记录很多重要的事情(比如搜索导航)。它也非常缓慢。

回答by Matt Boehm

For simple text expansion on a Windows computer, you could use AutoHotkey. It's not as powerful as most macro tools, but since it's not tied to any one program, it can be used in other editors, emails, etc.

对于 Windows 计算机上的简单文本扩展,您可以使用AutoHotkey。它不如大多数宏工具强大,但由于它不绑定到任何一个程序,因此可以在其他编辑器、电子邮件等中使用。

For example, if I type ";;ln" AutoHotkey instantly sends the keystrokes to delete this and replace it with "System.out.println();" with the cursor in between the parentheses.

例如,如果我输入 ";;ln" AutoHotkey 立即发送击键以删除它并将其替换为 "System.out.println();" 将光标放在括号之间。

回答by mfeber

Emacs+ Version 3.x adds keyboard macros (http://www.mulgasoft.com/emacsplus) to its feature set.

Emacs+ 3.x 版在其功能集中添加了键盘宏 ( http://www.mulgasoft.com/emacsplus)。

回答by KevinO

I've had success using AutoHotKey.

我已经成功使用 AutoHotKey。

回答by luiscolorado

Talking about Emacs, jEdithas a very strong macro facility. There are a lot of high quality macros and plug-ins, and several macros are already built it in. You can even add some logic using bean scripting, which is analogous to VBA. So, you can write very powerful stuff (any many people have done so).

谈到 Emacs,jEdit有一个非常强大的宏工具。里面有很多高质量的宏和插件,已经内置了几个宏。你甚至可以使用bean脚本添加一些逻辑,类似于VBA。所以,你可以写出非常强大的东西(很多人都这样做过)。

jEdit is obviously a separate editor, but I think it's worth a shot. See http://www.jedit.org/

jEdit 显然是一个独立的编辑器,但我认为值得一试。见http://www.jedit.org/

回答by Damir L.

This is not an Eclipse-specific one, but it can be used there as well:

这不是特定于 Eclipse 的,但它也可以在那里使用:

http://sikuli.org/

http://sikuli.org/