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 227987 - JSP Comment/Uncomment does not work properly
Summary: JSP Comment/Uncomment does not work properly
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-27 10:45 UTC by tomzi
Modified: 2014-01-09 02:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tomzi 2013-03-27 10:45:20 UTC
For normal html content in the JSP page the Comment/Uncomment function works as expected:
<html>
   <body>
blaa
  </body>
<html>

Where ever I place my cursor, or whatever part i select and the choose the 'Toggle Comment' action (CTRL-SHIFT C for Eclipse Keymap) will put <!-- --> around

However if i use JSP tags like:
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
       <html:button>
bla
        </html:button>

Use Cases if I press Toggle Comment("|" marks cursore position:
1.) I am outside of a tag 
  | <html:button>  |
2.) If I am inside of a single Line tag
    <ht|ml:button>
3.) Multiline Tags:
   | <html:button alt="bla"
                 altKey="C"
                 bundle="MyBundle">
4.) Cursor selection ("[ ]" marks cursor selection:
    [<html:button alt="bla"
                 bundle="MyBundle">
bla
        </html:button>]

Expected:
1.) <%--<html:button>--%> 
2.) <%--<html:button>--%> 
3.) <%--<html:button alt="bla"--%>
                 altKey="C"
                 bundle="MyBundle">

4.) <%--<html:button alt="bla"
                 bundle="MyBundle">
bla
        </html:button>--%>
-> repeated Toggle Comment/Uncomment would also Uncomment again

Actual:
1.) Nothing happens
2.) Uncomment not working
3.) Nothing happens, works only after tag start
4.) Nothing happens

Altogether I'd expect it to have the same behaviour then Comment/Uncomment HTML or Java code



Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Linux version 3.5.0-26-generic running on amd64
Java; VM; Vendor = 1.7.0_17
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Comment 1 Martin Fousek 2014-01-08 14:30:21 UTC
All your cases should be fixed by web-main #fa1e4287b409.

This fix should be available for testing in few days within daily build:
http://bits.netbeans.org/download/trunk/nightly/latest/

Thanks for the report.
Comment 2 Quality Engineering 2014-01-09 02:55:53 UTC
Integrated into 'main-silver', will be available in build *201401090002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/fa1e4287b409
User: Martin Fousek <marfous@netbeans.org>
Log: #227987 - JSP Comment/Uncomment does not work properly