Billie
Billie

Reputation: 9146

How to add eclipse String shortcuts?

For example, if I type sysout and then ctrl + space, it'll automaticlly fill System.out.println();.

How can I add a custom shortcut? Thanks in advance!

Upvotes: 2

Views: 49

Answers (3)

Naveen
Naveen

Reputation: 367

Window -> Preferences -> New -> Java -> Editor -> Templates

Name: MainProgram (which is like sysout)

Pattern:

public static void main(String args[]){

}

And then ok.

Now If you type MainProgram and Ctrl+space which gives you the full program..

Upvotes: 0

Honest
Honest

Reputation: 192

window-preferences-General-key

then set you custom key on "content assistant" item

Upvotes: 0

rray
rray

Reputation: 2556

access the menu, window>preference, type the name of your language, at threeview select editor>template click at new put your template and OK

Upvotes: 1

Related Questions