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.
It would be great to have the "Toggle Comment" command in XML and related edit modes. When the caret is on an opening or closing tag the command would add a leading <!-- to the start tag and a trailing --> to the corresponding end tag, or <%-- and --%> in the JSP editor. When there already is a comment within the tag or its subtags the command should not do anything. Uncommenting should work just opposite ;)
If there is code selected, the automatic comment should wrap the tags enclosed by the selection. Uncomment should work whenever the caret is located inside a commented block. Text selection should remain unchanged during commenting/uncommenting.
I agree, this will be very useful. *** This issue has been marked as a duplicate of 119638 ***