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 151332 - Comment Blocks
Summary: Comment Blocks
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-24 20:55 UTC by compucoder
Modified: 2012-04-11 15:02 UTC (History)
1 user (show)

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 compucoder 2008-10-24 20:55:44 UTC
You currently have a shortcut and menu option to toggle a comment around a block of code. This adds in a single line
comment to each line. You should also add in a block comment option and shortcut as well. 

I also think you should change your shortvut mapping. You currently have ctrl+c and I noticed that ctrl+/ also works. I
suggest you take away ctrl+c and make it ctrl+/ and then for the block comment do ctrl+shirt+/ to get the block comment
option.

You may even want to add a phpdoc shortcut as well. I don't think you even have a menu option for that. PHPDoc comments
are a common practice and a best practice and should probably have a menu option and shortcut to add them.

Thanks
Comment 1 Mikhail Matveev 2008-10-29 19:59:56 UTC
I think these are good suggestions.
Comment 2 jeremyclarke 2009-07-31 18:50:56 UTC
PHPDoc comments are easy to produce. Just go above the function or variable you want to document and type:

/**

then hit enter. That will produce a skeleton that is intelligent about the contents of the function etc. There's no
keyboard shortcut but its easy to set up a macro for it that makes it easy.  I set one up with the following contents:

"/**" insert-break

I mapped this to SHIFT+META+C (i'm on a mac, you could use CTRL instead of META) so I just hit those keys above a
function and BAM, there's a mostly-done PHPdoc for my function :)

Once you have PHPDoc comments they do indeed fold just like functions and will fold/unfold when you do the 'fold all'
and 'unfold all' commands. That said its annoying because folded PHPDoc comments don't show any information, just 
  
   [+] /** [...]

I made an enhancement ticket about showing the first line of the comment in folded PHPDocs if you're interested in
voting for it :)
http://www.netbeans.org/issues/show_bug.cgi?id=169660

With regard to your request to change the keyboard shortcuts you should probably just change them yourself in the
keymapping options. 


Comment 3 jeremyclarke 2009-07-31 18:51:49 UTC
PHPDoc comments are easy to produce. Just go above the function or variable you want to document and type:

/**

then hit enter. That will produce a skeleton that is intelligent about the contents of the function etc. There's no
keyboard shortcut but its easy to set up a macro for it that makes it easy.  I set one up with the following contents:

"/**" insert-break

I mapped this to SHIFT+META+C (i'm on a mac, you could use CTRL instead of META) so I just hit those keys above a
function and BAM, there's a mostly-done PHPdoc for my function :)

Once you have PHPDoc comments they do indeed fold just like functions and will fold/unfold when you do the 'fold all'
and 'unfold all' commands. That said its annoying because folded PHPDoc comments don't show any information, just 
  
   [+] /** [...]

I made an enhancement ticket about showing the first line of the comment in folded PHPDocs if you're interested in
voting for it :)
http://www.netbeans.org/issues/show_bug.cgi?id=169660

With regard to your request to change the keyboard shortcuts you should probably just change them yourself in the
keymapping options. 


Comment 4 Tomasz Slota 2010-02-10 08:45:11 UTC
reassigning to default owner
Comment 5 Filip Zamboj 2010-09-15 12:27:13 UTC
batch reassigning
Comment 6 Ondrej Brejla 2012-04-11 15:02:49 UTC
WFM