java有没有一种方法可以让NetBeans在单独的一行中自动创建括号?
例如,当我创建一个新类时,我得到:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package helloworld;
/**
*
* @author Sergio
*/
public class WordManipulations{
}
我讨厌这样放括号。有没有办法让它创造出这样的东西:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package helloworld;
/**
*
* @author Sergio
*/
public class WordManipulations
{
}
# 1 楼答案
在Netbeans中,进入工具选项。然后选择格式化选项卡,并在语言下拉列表下选择Java
现在有几个选项可以按您喜欢的方式更改格式
# 2 楼答案
还有JIndent插件
# 3 楼答案
只需遵循以下步骤:
Tools -> Options -> Editor
Editor -> Formatting