NetBeans curly braces auto-closing

淺唱寂寞╮ 提交于 2019-12-24 02:16:48

问题


In the last time I often initialize arrays in this form :

int[] test = new int[]{1,2,3};

When I type '[', NetBeans immediately put the closing brace.

The question is - which is the macro to do the same job with curly braces ?


回答1:


Select from menu Tools > Options, select Editor in toolbar, go for Code Completion tab. You will see that Insert Closing Brackets Automatically is already automatically checked by default.

There was a guy, who asked an analogical question a while ago. There was no helpful answer. I guess that means that we should look for that in future versions.




回答2:


I looked for solution too, for NetBeans 8.5 check answer, https://stackoverflow.com/a/38338967/7162006, in same window is option: Completition Selectors For Java add: {, autocomplete by hiting enter in editor. (classically)



来源:https://stackoverflow.com/questions/5717789/netbeans-curly-braces-auto-closing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!