Reputation: 1
I have newest Eclipse version installed on my laptop. When I try to use shortcut "syso" for System.out.println()
(I click CTRL + SPACE) i get two new windows like this:
But on my older laptop, when I click same combinations of keyboard buttons, I instantly get System.out.println()
without any questions like on the added picture.
I tried compare Eclipse settings between two computers, but there are huge number of preferences to configure under Eclipse. I open Preferences -> Java -> Editor -> Templates and found sysout, then clicked edit, but settings are same. Can someone help me, please? Many thanks, Java begginer
EDIT: I found on older laptop (and Eclipse version) there is no syso template, only sysout, but both working On new laptop same template, only working sysout
Upvotes: 0
Views: 13311
Reputation: 937
Go to file--->preferences--->user snippets
Search for 'java.json' then include this line and save.
"sout": { "prefix": "sout", "body": ["System.out.println("$1");"], "description": "print new line" },
Upvotes: 0
Reputation: 11
actually the keys you should use is (sout) then click on (tab) bottom.
Upvotes: 1
Reputation: 13482
Please check this
Windows->Preferences->Java->Editor->Templates
be confirm you have only one entry for syso
in template menu.
Also check what code is written for me this shortcut is there
System.out.println(${word_selection}${});${cursor}
Upvotes: 2