NetBeans是否有办法在单独的行中自动创建括号?

Ser*_*pia 18 java ide netbeans brackets

当我创建一个新类时,我得到这个:

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package helloworld;

/**
 *
 * @author Sergio
 */
public class WordManipulations{        
}
Run Code Online (Sandbox Code Playgroud)

当这样放置方括号时,我讨厌它.有没有办法让它创建这样的东西:

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package helloworld;

/**
 *
 * @author Sergio
 */
public class WordManipulations 
{

}
Run Code Online (Sandbox Code Playgroud)

Pra*_*rav 41

只需按以下步骤操作:

  1. 导航 Tools -> Options -> Editor
  2. 导航 Editor -> Formatting
  3. 选择以下内容
    • 语言:Java
    • 类别:大括号
  4. 在"类声明,方法声明等"中
    • 大括号放置:新线