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.

Bug 141257 - Easier code commenting
Summary: Easier code commenting
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-23 03:51 UTC by obucinac
Modified: 2008-07-23 12:31 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description obucinac 2008-07-23 03:51:55 UTC
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.
Comment 1 avp 2008-07-23 07:10:08 UTC
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 /*  */
Comment 2 Vladimir Voskresensky 2008-07-23 10:36:07 UTC
as Alexander mentioned, it's already here (use Ctrl+/)
Just a note:
/*  */ comment is used in C file, while // commenting in C++ files
Comment 3 avp 2008-07-23 10:55:56 UTC
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?
 
Comment 4 Vladimir Voskresensky 2008-07-23 11:02:20 UTC
Alexander, yes, please, file ENH one per each your proposal :-)
Thanks,
Vladimir
Comment 5 Vladimir Voskresensky 2008-07-23 12:31:15 UTC
btw, I filed ENH about "comment method". Thanks for the idea. http://www.netbeans.org/issues/show_bug.cgi?id=141321