Eclipse Java shortcut for "printf"?

When coding in Java in Eclipse, is there a shortcut similar to typing "syso" and pressing CTRL + Space for System.out.println (), but for printf instead of println?

+8
java eclipse
source share
3 answers

You can create your own using eclipse template functionality .

To create your own template, look here Window->Preferences->Java->Editor->Templates .

For example, sysout functionality has this pattern:

 System.out.println(${word_selection}${});${cursor} 

you can create a similar one for System.out.print()

+18
source share

You can make your own for printf :

In the settings, select Java->editor->templates .

+4
source share

I don’t see one in the default completion templates, but you can create your own template

+2
source share

All Articles