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 168430

Summary: Patch for: toggle comment broken for multiline selection
Product: java Reporter: maxnitribitt <maxnitribitt>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: RESOLVED WONTFIX    
Severity: blocker CC: markiewb
Priority: P3 Keywords: PATCH_AVAILABLE
Version: 6.x   
Hardware: Macintosh   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Proposed patch

Description maxnitribitt 2009-07-11 13:29:54 UTC
Toggle comment should inspect each line on multiline selection. Currently it looks like only the first line is inspected
to decide if a line should be commented out or in. I'm missing this since I switched from JBuilder some years ago:

before Toggle:

some code
// another line of code

after toggle (JBuilder):

// some code
another line of code

after toggle (NetBeans):

// some code
//// another line of code
Comment 1 Max Sauer 2009-07-13 12:09:47 UTC
Yes, this would be nice. Targeting 6.8.
Comment 2 markiewb 2012-12-17 18:52:44 UTC
Set target-milestone of open issue to TBD (was < 7.3, f.e. 6.8), so the issue doesn't get lost.
Comment 3 markiewb 2012-12-17 19:02:08 UTC
Set target-milestone of open issue to TBD (was < 7.3, f.e. 6.8), so the issue
doesn't get lost. This time the target milestone is really set.
Comment 4 markiewb 2013-11-01 22:50:05 UTC
Created attachment 141792 [details]
Proposed patch

I like to propose a patch for this RFE. Please review and commit!

The toggle comment logic now toggles the comment at each line separately. This works now as requested, but the common NB user might be accustomed to the old behaviour.
Comment 5 maxnitribitt 2013-11-02 03:28:04 UTC
Thanks a lot for adding this! This is so useful for debugging. Can't wait to use it.
Comment 6 Dusan Balek 2014-05-16 08:08:52 UTC
Makes sense. Patch applied. Thank you for your contribution.

http://hg.netbeans.org/jet-main/rev/7f2af9990520
Comment 7 Quality Engineering 2014-05-17 04:33:39 UTC
Integrated into 'main-silver', will be available in build *201405170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7f2af9990520
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #168430 - Patch for: toggle comment broken for multiline selection - applied.
Comment 8 Dusan Balek 2014-05-26 15:39:07 UTC
Unfortunately, the original patch had to be reverted. See #244615 for more details.

http://hg.netbeans.org/jet-main/rev/c6ed70327131
Comment 9 Quality Engineering 2014-05-28 02:39:40 UTC
Integrated into 'main-silver', will be available in build *201405280001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c6ed70327131
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #244615 - regression: broken Toggle Comment - fixed. Patch for ##168430 reverted.