Tracing a shortcut in an intellectual idea

Is there any shortcut to create trace statements from the selected variable, for example ctrl-shift-0 in flash? For example: if I select myVar in the line below and click "DesiredShortcut":
var myVar = 5;

I would like to get:
var myVar = 5;
trace ('MyVar =' + MyVar);

thanks

+4
source share
1 answer

Consider using Live Templates .

For Java IntelliJ IDEA there is already a soutv template that will generate

 System.out.println("var=" + var); 

after pressing Tab .

You can define your own registration templates through your favorite journal structure.

+7
source

All Articles