115

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?

johny655
  • 25
  • 6
Tim Howland
  • 7,919
  • 4
  • 28
  • 46

9 Answers9

40

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.

Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
  • 9
    Link appears to be broken. Correct link is: http://sourceforge.net/projects/practicalmacro/ – Templar Nov 09 '09 at 21:55
  • Am using Eclipse Mars and it works great. In order to make it work, then the file `PracticallyMacro_0.4.9.jar` needs to be put in the eclipse/downloads/plugins directory (create the plugins directory if it doesn't exist). You can edit macros by going to Windows/Preferences/Practically Macro Options and you can run the macros via a new toolbar that is created. – gordon613 Mar 30 '17 at 12:46
  • Am using Neon with STS and still works great. I simply put the jar into the `dropins` folder. THANKS! this is a real time saver! (well, maybe it doesn't save time, but it makes my job more fun). ;-) – John Henckel Jun 07 '17 at 20:19
  • We have 'Eclipse Macro' >> https://wiki.eclipse.org/E4/Macros – Anver Sadhat Jan 09 '19 at 12:26
11

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

mfeber
  • 202
  • 2
  • 3
9

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ilya Kochetov
  • 17,988
  • 6
  • 44
  • 60
9

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

rcreswick
  • 16,483
  • 15
  • 59
  • 70
KevinO
  • 970
  • 2
  • 13
  • 31
6

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.

zvikico
  • 9,765
  • 4
  • 38
  • 49
5

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

http://sikuli.org/

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Damir L.
  • 51
  • 1
  • 1
4

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.

Csa77
  • 649
  • 13
  • 19
rcreswick
  • 16,483
  • 15
  • 59
  • 70
4

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Matt Boehm
  • 1,894
  • 1
  • 18
  • 21
2

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/

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
luiscolorado
  • 1,525
  • 2
  • 16
  • 23
  • 1
    +1 I've used Emacs and Eclipse for projects and they have pros and cons. However, jEdit is the best of both worlds (built-in macros, Java core, nice UI, tons of plugins, good documentation). It's like the fundamentals Emacs reborn with modern technologies. I wish I knew about it earlier. – User1 Jan 11 '11 at 04:21