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 - Patch for: toggle comment broken for multiline selection
Summary: Patch for: toggle comment broken for multiline selection
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P3 blocker with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2009-07-11 13:29 UTC by maxnitribitt
Modified: 2014-07-08 12:36 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed patch (2.40 KB, patch)
2013-11-01 22:50 UTC, markiewb
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.