NetBeans 有没有办法在单独的行中自动创建括号? [英] Is there a way for NetBeans to automatically create brackets in a separate line?

查看:26
本文介绍了NetBeans 有没有办法在单独的行中自动创建括号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When I create a new class for instance, I get this:

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

package helloworld;

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

讨厌括号以这种方式放置.有没有办法让它创建这样的东西:

I hate it when brackets are placed this way. Is there a way to make it create things like this:

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

package helloworld;

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

}

推荐答案

只需按照以下步骤操作:

Simply follow these steps:

  1. 导航到 Tools ->选项 ->编辑器
  2. 导航到 Editor ->格式化
  3. 选择以下内容
    • 语言:Java
    • 类别:大括号
  • 大括号放置:新行

这篇关于NetBeans 有没有办法在单独的行中自动创建括号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆