jmasterx
jmasterx

Reputation: 54113

Netbeans and refactoring

I have Netbeans 7. When I have it generate my getters and setters it does:

public void foo() {
}

Whereas I need it to do:

  public void foo() 
  {
  }

Where the starting brace is on the next line.

The same thing happens when I use Source->Format, I need the method brace on the next line.

Is there a way to set this?

Thanks

Upvotes: 1

Views: 122

Answers (2)

Andre Holzner
Andre Holzner

Reputation: 18675

From the main menu bar,

  • select tools then options,
  • click on the editor icon,
  • select the formatting tab,
  • select java on the language drop down list
  • and select braces from the category drop down list.

Then select new line for the item method declaration in the braces placement group.

Upvotes: 3

perissf
perissf

Reputation: 16273

Tools->Options->Editor->Formatting->Java->Braces

Upvotes: 0

Related Questions