Is there a way for NetBeans to automatically create brackets in a separate line?

前端 未结 3 1696
攒了一身酷
攒了一身酷 2021-01-03 23:40

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.
 */

pack         


        
相关标签:
3条回答
  • 2021-01-04 00:08

    Also there's the JIndent plugin.

    0 讨论(0)
  • 2021-01-04 00:09

    In Netbeans go to Tools > Options. Then select the Formatting tab and select Java under the language drop down.

    There are now several options to change the formatting the way you like it.

    0 讨论(0)
  • 2021-01-04 00:22

    Simply follow these steps:

    1. Navigate to Tools -> Options -> Editor
    2. Navigate to Editor -> Formatting
    3. Select the following
      • Language: Java
      • Category: Braces
    4. In "Class Declaration, Method Declaration, etc."
      • Braces Placement: New Line
    0 讨论(0)
提交回复
热议问题