Is there a macro recorder for Eclipse?
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.
Stop recording a macro in Eclipse
You start recording a macro using CtrlAltR and stop in the same way.
You can also use the buttons on the toolbar:
Macro functionality with keyboard shortcuts in Eclipse?
There doesn't seem to be anything else than Practically Macro for Eclipse. Once you use a Macro, you can press Ctrl-Alt-P to replay that. This helps a bit, but when you want to switch between a couple of macros back and forth doesn't help much.
Can I set up a keybind/hot key/macro to paste a line into Eclipse?
In Eclipse Preferences, go to Java->Editor->Templates
Click on "new" to create a new template.
In your template, write in the "pattern" textarea the command you want to be pasted.
For example :
throw new IllegalArgumentException("");
And in the "name" textbox, write the word that matches to that command.
Then, in Eclipse, in your Java Editor, write that word + auto-completion.
Eclipse will propose you,among others may be, your template.
The sysout
command name is that template :
System.out.println(${word_selection}${});${cursor}
Workspace Editor Macros in Eclipse
See my answer at How can I launch more than one debug session in Eclipse from a single click? . The same plugin can work for you as well.
Is there a standard action that inserts text, that can be used in a key binding?
You can try the Eclipse plugin Practically Macro. It allows you to record macros but also to define it by hand.
To create a short key that inserts "§" in your editor you must do the following steps:
Go into "Preferences/Practically Macro Options/Editor Macro Definitions" and create a new macro. Add the command "Insert String" and type § in the text field. Then give the macro a name and an id, e.g., "testmacro".
Go to "Preferences/General/Keys" and search for your newly created "testmacro". You can now bind an arbitrary key combination to it.
Related Topics
Double Calculation Producing Odd Result
Dbpedia Jena Query Returning Null
No Enclosing Instance of Type Server Is Accessible
Simpledateformat Parse(String Str) Doesn't Throw an Exception When Str = 2011/12/12Aaaaaaaaa
Java: Starting a New Thread in a Constructor
How to Properly Configure Implicit/Explicit Waits and Pageloadtimeout Through Selenium
Jpanel Positions and Sizes Changes According to Screensize
Appearance of Java Security Dialog
Repaint Swing Button with Different Gradient
In a Switch Statement, Why Are All the Cases Being Executed
Convert JSON Date to Java Date
How to Print Escape Characters in Java
How Often Should Connection, Statement and Resultset Be Closed in Jdbc
Java.Lang.Illegalstateexception: Not on Fx Application Thread; Currentthread = Thread-4
What Is the Replacement for Javax.Activation Package in Java 9
JPA Query Selecting Only Specific Columns Without Using Criteria Query