Information source on "live-templates"

Hi IntelliJ people,

Is there any information source how to properly use "live-templates" inside
Idea. I don't completely understand how to properly specify user variable
and there is no documentation on the predefined variables. Can anybody point
me any scenario:
1. How to create a template with variables ?
2. How to properly use it inside the code ?
3. Are there any advanced use-cases ?

This cool feature without documentation is quite useless for me right now.

Thanks in advance.


0
Avatar
Permanently deleted user

Paul Grinchenko wrote:

Is there any information source how to properly use "live-templates" inside
Idea. I don't completely understand how to properly specify user variable
and there is no documentation on the predefined variables. Can anybody point
me any scenario:
1. How to create a template with variables ?
2. How to properly use it inside the code ?
3. Are there any advanced use-cases ?


Paul,

here is a starting point :

1?/ create a new L.T:
if (null == $VAR$) {
$SELECTION$
}

2?/ click on the "Edit variable" button.
3?/ in the edit dialog, right click on empty cells, to display a list of
available functions (see picture attached)

4?/ choose
variableOfType("")


For more examples, look on the twiki :
http://www.intellij.org/twiki/bin/view/Main/LiveTemplateContribs

Alain




Attachment(s):
livetemplate.GIF
0
Avatar
Permanently deleted user

And then, select some code in editor and press CtrlAltJ (Surround With
Live Template - just because $SELECTION$ var is defined. If not - type the
template abbreviation and press Tab).

--
Best regards,
Mike Aizatsky.
-


JetBrains, Inc / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"



0
Avatar
Permanently deleted user

Thanks a lot for all answers


0
Avatar
Permanently deleted user

Paul!

You are probably using the EAP build of IDEA that is not supplied with the
documentation.
If you take version 2.5 - 2.6 you will find a detailed description of Live
Templates in the corresponding help section.
It would only not cover the "Surround With" template and some other
peculiarities that are specific for the Ariadna project (that to be IDEA
version 3.0 in the future).

--
Best regards,
Customer Support Manager
Ann Oreshnikova
-



JetBrains, Inc / IntelliJ Software,
http://www.intellij.com

"Develop with pleasure!"
"Paul Grinchenko" <pgrinchenko@netegrity.com> wrote in message
news:aeq7ep$4t7$1@is.intellij.net...

Thanks a lot for all answers

>
>


0

请先登录再写评论。