Is there a macro recorder for Eclipse?

JavaEclipseIdeEditorMacros

Java Problem Overview


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

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?

Java Solutions


Solution 1 - Java

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 Macro at SourceForge a couple of days ago. It requires Eclipse 3.4.

Solution 2 - Java

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

Solution 3 - Java

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

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.

Solution 4 - Java

I've had success using AutoHotKey (Windows only, though).

Solution 5 - Java

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

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 information on using it.

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

Solution 6 - Java

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

http://sikuli.org/

Solution 7 - Java

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

Solution 8 - Java

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.

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.

Solution 9 - Java

Talking about Emacs, jEdit has 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).

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTim HowlandView Question on Stackoverflow
Solution 1 - JavaErnestView Answer on Stackoverflow
Solution 2 - JavamfeberView Answer on Stackoverflow
Solution 3 - JavaIlya KochetovView Answer on Stackoverflow
Solution 4 - JavaKevinOView Answer on Stackoverflow
Solution 5 - JavazvikicoView Answer on Stackoverflow
Solution 6 - JavaDamir L.View Answer on Stackoverflow
Solution 7 - JavarcreswickView Answer on Stackoverflow
Solution 8 - JavaMatt BoehmView Answer on Stackoverflow
Solution 9 - JavaluiscoloradoView Answer on Stackoverflow