Skip to Content
IntelliJ IDEA Essentials
book

IntelliJ IDEA Essentials

by Jaroslaw Krochmalski
December 2014
Intermediate to advanced
276 pages
5h 54m
English
Packt Publishing
Content preview from IntelliJ IDEA Essentials

Using Live Templates

Live Templates lets you use the editor to insert frequently used code blocks into your source code.

Live Templates can be simple, parameterized, and surrounded. A simple template contains code blocks that will be expanded and inserted into the editor, replacing the abbreviation. Parameterized templates, on the other hand, have variables that will be filled automatically by IntelliJ IDEA or will prompt the user for input.

When a parameterized template is invoked and expanded in the editor, IntelliJ IDEA will suggest some predefined values for the defined variables. The surrounding templates expand before and after the selected code block. To insert a live template into the editor, just type the abbreviation and press the expand ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning IntelliJ IDEA: Integrated Development Environment for Java Programming

Beginning IntelliJ IDEA: Integrated Development Environment for Java Programming

Ted Hagos
Optimizing Java

Optimizing Java

Benjamin J. Evans, James Gough, Chris Newland

Publisher Resources

ISBN: 9781784396930