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
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}
实际上你应该使用的键是 (sout) 然后点击 (tab) 底部。
你必须输入 sysout 然后点击 CTRL+空格
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" },
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.