A template will not work for this because a template is usually static text (though it allows some property substitution). What you really need is a macro. I used to write macros like this in my favorite text editors (UltraEdit and NotePad++), but I haven't used macro capabilities in Eclipse. If you search for "macro" in the Eclipse Marketplace, you will see a few plugin that provide keyboard macro capabilities. You might try them and report back on which one worked best for you to perform this task.