Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting auto complete shortcuts in Eclipse

Tags:

java

eclipse

When programming Java in Eclipse, I can type syso and press control+space to auto-complete this and get System.out.println();. I was wondering if there are settings somewhere in Eclipse to allow me to set other shortcuts of this form. (For instance, I'd like to type syscur and have this auto-complete to System.currentTimeMillis();.)

like image 796
Sal Avatar asked May 04 '12 11:05

Sal


2 Answers

You can do this here: Window -> Preferences -> Java -> Editor -> Templates. You can also add a Template View, which you find at Window -> Show View -> Other -> Search for Templates.

like image 145
Kai Avatar answered Nov 11 '22 06:11

Kai


This feature is called Code Templates

like image 3
Christophe Roussy Avatar answered Nov 11 '22 07:11

Christophe Roussy