简体   繁体   English

如何在STS中使用模板

[英]How to use templates in STS

in netbeans when I type sout and then tab it print System.out.print(); 在netbeans中,当我键入sout时,然后将其选项卡打印出System.out.print();

How I can do this in springsource tool suite ? 如何在springsource工具套件中执行此操作? I create template in window -> preferences -> java -> editor -> but I dont know how to call this template I try TAB, ENTER or ctrl space but with no success 我在窗口->首选项-> Java->编辑器->中创建模板,但是我不知道如何调用此模板,我尝试使用Tab,Enter或Ctrl空格,但是没有成功

I tested it on my STS and it works fine. 我在STS上进行了测试,效果很好。 From your link: 从您的链接:

Check Automatically insert if you want the template to expand automatically on ctrl-space when there is no other matching template available. 如果您希望在没有其他匹配模板可用时在ctrl-space上自动扩展模板,请选中自动插入。 It is usually good idea to leave the checkbox checked, otherwise you would get a template proposal "popup". 通常,最好选中该复选框,否则您将获得一个模板建议“弹出窗口”。

Under General - Keys "CTRL-SPACE" is bound to "Content Assist", do you have this also? 在“常规”下,键“ CTRL-SPACE”绑定到“内容辅助”,您是否也有此功能?

好的,最后,当我将所有配置恢复为默认值时,它开始工作,它开始工作,所以我不知道哪里出了问题,但是现在无论如何,它仍然可以工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM