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 58552 - Add comment /uncomment block feature
Summary: Add comment /uncomment block feature
Status: RESOLVED DUPLICATE of bug 184938
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
: 15330 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-03 20:49 UTC by pzajac
Modified: 2010-05-03 17:39 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 pzajac 2005-05-03 20:49:13 UTC
There is possible comment and uncomment selected block of text in editor for
java source. It will be nice if the xml editor would have the same feature. 

For example: 

<a> 
   <b/>
   <c/> 
</a>

will be commented as:

<!--<a>       -->
<!--   <b/>   -->
<!--   <c/>   -->
<!--</a>      -->
Comment 1 Marek Fukala 2005-06-20 15:08:05 UTC
I would prefer the code to be commented out in following format:

<!--
<a> 
   <b/>
   <c/> 
</a>
-->

It is not common to comment html code in the way you proposed.

What type of comment should be used in jsps? I propose the JSP one (<%-- xxx --%>).

Opinions?
Comment 2 zikmund 2005-06-20 15:20:39 UTC
I agree with JSP comment <%--  --%>.
Having comment on each line will allow you provide action 'uncomment'. However
having the whole block commented I can't imagine how you will implement uncomment...
Comment 3 pzajac 2005-06-20 15:22:52 UTC
You are right. There is dificult to comment xml with existing comments. Example

<a>
<!-- <c> </c> --!>
</a> 

Probably this issue is wontfix. 


Comment 4 Marek Fukala 2005-06-21 08:32:05 UTC
To Karel: 

One of the possible solution would be:

<%--
ahoj
Karle
Zikmunde
--%>

User selects 'Karle' and perform uncomment =>

<%--
ahoj
--%>
Karle
<%--
Zikmunde
--%>

But I am not against commenting each line of the code though it looks weird.
Comment 5 Alexander Kouznetsov 2006-06-29 09:32:37 UTC
Since the lack of this functionality is really annoying, I'm raising the priority.
Comment 6 Marek Fukala 2006-10-24 13:17:49 UTC
*** Issue 15330 has been marked as a duplicate of this issue. ***
Comment 7 Marek Fukala 2006-10-24 13:18:42 UTC
FYI, comment for Petr Kuzel:

>------- Additional comments from pkuzel Fri Sep 5 12:20:38 +0000 2003 -------
>
>These are already implemented in the kit. Their names are prefixed by
>xml-, i.e. xml-comment. They are not bound to standard shortcuts.

Comment 8 Marek Fukala 2007-02-16 14:43:16 UTC
Reassigning to default owner of selected subcomponent. New owners are gladly
welcomed.
Comment 9 gliesian 2010-05-03 17:39:46 UTC
There is actually two issues here... 

1) New comment/uncomment feature for XML

2) New comment/uncomment feature for JSP/JSTL Tags

I'm marking this older Issue as the duplicate, since the newer issue calls for icon inclusion in the toolbar.

Thanks.

*** This bug has been marked as a duplicate of bug 184938 ***