Search code examples
javaeclipseideintellij-idealive-templates

What is the Eclipse equivalent of IntelliJ "Live templates"?


I mean stuff like typing "iter" and getting a "for" loop with a choice of what variable to iterate on , typing "soutv" to generate a "System.out.println" with the "variable=" already in ...

Thanks !


Solution

  • It is called Templates and it's found under,

    Window → Preferences → Java → Editor → Templates

    enter image description here

    The "soutv" template does not exist ("sysout" does, and it's similar), but it's easy to add. I used this pattern:

    System.out.println("variable=" + ${cursor}${});