To use templates:
Notes:
Templates can have variables, which are place-holders for the dynamic part of a template pattern, e.g. subject to change with every application of the particular template.
When a template is inserted in the Java editor and the template pattern contained a template variable, the editor enters the template edit mode.
A box is drawn around all variables. The first variable is selected and can be modified by typing in the editor. If the same variable existed multiple times in the template pattern, all instances of the same variable are highlighted in blue and updated instantaneously to save typing.
Pressing Tab navigates to the next unique template variable, Shift-Tab navigates to the previous unique template variable.
The template edit mode is left by either pressing Tab on the last template variable or pressing Esc or Enter.
Example:
void m(int[] intarray){}
and position the caret inside the method.
for
and press Ctrl+Space to open Code Assist
intarray
) is automatically detected.
i
is now selected and you are in the template edit mode.
Typing another name instantaneously updates all occurrences of it.