4

Trying to find out how to change NetBeans (7.2) from deleting lines between comments.

I Type

// comment 1

// comment 2

NetBeans auto format changes to

// comment 1
// comment 2

Is there a setting I am mising where I can stop the program from deleting that line?

ollo
  • 24,797
  • 14
  • 106
  • 155
Adam
  • 723
  • 10
  • 22
  • http://stackoverflow.com/questions/2712285/editing-the-netbeans-source-formatting-standard – Yes Barry Oct 27 '12 at 21:19
  • what version of Netbeans are you on? – Spudley Oct 27 '12 at 21:43
  • I'm using 7.2. I can't seem to find anything about comment formatting in tools->options->editor. – Adam Oct 27 '12 at 21:50
  • Instead of formatting the whole file, just select the part that is unformatted and format that. – Petah Oct 30 '12 at 23:39
  • 1
    Same thing is happening for me in NetBeans 8.0.2 with Java code. I cannot find any setting that helps in `NetBeans > Preferences > Editor > Formatting > Category: Comments` nor in `Category: Blank Lines`. – Basil Bourque Jul 03 '15 at 01:17

1 Answers1

0

No, but if you can change to multiline comment style

/* comment 1 */


/* comment 2 */

every new line between them will be preserved.

dev-null-dweller
  • 29,274
  • 3
  • 65
  • 85
  • Is this still the only way to avoid getting grouped comments? I prefer the double slash to this method and would still like to keep my comments separate when formatting. I'm on 8.2. – DCOPTimDowd Aug 30 '17 at 16:32