Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do multi-line comments in NetBeans without auto DocBlock formatting?

Sometimes in my code I like to comment out a block of code for temporary use/reference etc eg:

/* 

blah

*/ 

But it's a minor annoyance that if I then want to go and insert a line inside that block, when I click enter, it will automatically put a * on the next line as though I were doing a DocBlock. This happens on every enter key:

/* 

blah<enter pressed here>
*

*/ 

Now I would have thought this 'auto-formatting' should only take place if the opening comment is using the format /** (two stars). Multi line comments were around a long time before DocBlocks, so I'm not sure why it forces these "old school" standard straight forward /* */ comments to have fancy unwanted extra DocBlock *'s!

So is there a way to:

  • a) Ideally - only have that formatting take place if the opening tag is /**
  • b) Or if it can't differentiate between /* and /**, is there a way to disable the auto-comment-formatting entirely?

Cheers

like image 271
Manachi Avatar asked Jun 04 '13 06:06

Manachi


People also ask

How do you comment out in NetBeans?

If we want to comment out a block of code in NetBeans IDE, we can simply use [ctrl]+[shift]+[c] .


1 Answers

I ended up entering this as a Netbeans bug in their Bugzilla and they have now fixed the issue. They did this VERY Quickly I should add - within 12 hours - kudos to them. From what I can make out it looks like it will be included in Netbeans 7.4 release. Gotta love Open Source! :)

Job details here:

https://netbeans.org/bugzilla/show_bug.cgi?id=230814

like image 69
Manachi Avatar answered Oct 29 '22 00:10

Manachi