Mahmoud Gamal
Mahmoud Gamal

Reputation: 1

How i can adding shortcut keys for java code in eclipse

I want to add a quick shortcut like (sout + Tab = System.out.println() ) in eclipse how I can do this?

Upvotes: 0

Views: 71

Answers (2)

cjslv
cjslv

Reputation: 377

There is already a shortcut for System.out.println().

just type sysout then press ctrl + space.

If you want to make a template for other code, for example System.out.print(), Go to Preferences > Java > Editor > Templates and create a new template. To use the newly created template, type the name of the template + ctrl + space.

Upvotes: 1

Tom Grylls
Tom Grylls

Reputation: 121

Window>Preferences>Java>Editor>Templates>New

edit name and pattern

try it

Upvotes: 0

Related Questions