You shouldn't need to add the template as it should already be there under Java->Editor->Templates. Ensure that you have ticked the checkbox at the beginning of the template definition. Also make sure that you're pressing Ctrl+Space with the text cursor positioned immediately after the "t" in "sysout". This works for me.
Sysout shortcut key not working even after setting the template
Pergunta
I added the sysout in the Eclipse template, context as Java statements
and Pattern as System.out.println(${word_selection}${});${cursor}
but still when I try typing "sysout" and press Ctrl + Space
, it says "No default proposal".
Please help me how to figure this out, I am using MyEclipse version -8.6
Solução 3
Outras dicas
I had the same problem, but it turned out I was typing a code snippet outside of a method, so Eclipse correctly decided not to propose this template. How silly!
Eclipse > Preferences > Java > Editor > Content Assistant > Advanced
Make sure Template Proposals is checked in one of the shown lists.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow