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.
Just for the record, there is another project called 宏宏 that does Eclipse macros, but it doesn't record many important things (like searching to navigate). It is also extremely slow.
Talking about Emacs, 编辑 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).