This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I was thinking about Castalia for Delphi way to put a code under the comment - select a block of code, press / and block is commented, press / again, the code is uncommented. You do not have to be precise about selecting text. A line where selection starts (regardless of where in this line selection starts) is the first one to be commented, the line where selection ends (regardless of where in this line selection ends) is the last one to be commented. Also, some Visual Studio features would be nice (or wherever I saw that), right click on a method name, click "comment method" and method is commented.
First feature (select code and comment) use for this Ctrl+/. Maybe would be nice to have smarter comment: - if user select all lines - use // - if user select piece of lines - use /* */
as Alexander mentioned, it's already here (use Ctrl+/) Just a note: /* */ comment is used in C file, while // commenting in C++ files
I think would be better to customize code commenting: .. <code1><code2><code3> .. if user select only <code2> then when user press Ctrl+/ .. <code1>/* <code2> */<code3> .. or when he select few lines .. <code1.1><code1.2><code1.3> <code2.1><code2.2><code2.3> .. with comments (user select from <code1.2> to <code2.2>) .. <code1.1> /* <code1.2><code1.3> <code2.1><code2.2> */<code2.3> .. Note: usage /* only for C is for me not obvious because standard C++ describe how can code commented PS How is in issues rules write : one issue - one problem. I propose create issue for smart commenting how I did describe If obucinac is not against. How do you think, Vladimir?
Alexander, yes, please, file ENH one per each your proposal :-) Thanks, Vladimir
btw, I filed ENH about "comment method". Thanks for the idea. http://www.netbeans.org/issues/show_bug.cgi?id=141321