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 170769 - Patch for: Provide ability to toggle diff mode with shortcut
Summary: Patch for: Provide ability to toggle diff mode with shortcut
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Peska
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2009-08-22 20:51 UTC by pwn4g3
Modified: 2013-05-07 02:25 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed patch (4.35 KB, patch)
2013-05-02 22:20 UTC, markiewb
Details | Diff
Patch in action (42.38 KB, image/png)
2013-05-02 22:20 UTC, markiewb
Details
Proposed patch without registering to main menu (2.66 KB, patch)
2013-05-03 21:55 UTC, markiewb
Details | Diff
Patch in action (no main menu registration, but actions can still be used via assignable shortcuts) (18.86 KB, image/png)
2013-05-03 21:57 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pwn4g3 2009-08-22 20:51:40 UTC
The diff-sidebar provides a quick way of checking changes made to a file that is versioned by showing colored markers.
The options dialog (Tools -> Options -> Miscellaneous -> Diff tab) offers 3 options (regarding the internal diff):
"Ignore Leading And Trailing Whitespace", "Ignore Changes In Inner Whitespace", and "Ignore Changes In Case".

Make these aforementioned options bindable by shortcut (Tools -> Options -> Keymap).

Background: the diff-sidebar marks local edits based on options set in the diff setup. However, the file view (and
editor tabs) mark them as edited even if whitespace only has been changed. This can result in a file marked as changed,
but changes are not visible without going to the options dialog.

If changing behaviour was bindable to a shortcut, it would be helpful to quickly check versioned files that otherwise
would only clutter commits.
Comment 1 markiewb 2013-05-02 22:20:04 UTC
Created attachment 134065 [details]
Proposed patch

I like to propose the given patch to solve the issue. It introduces new actions and registers them to Menu|View|Diff. Shortcuts for the new actions can be set in the keymap settings.

Please review and commit, if the patch is appropriate. Thank you.
Comment 2 markiewb 2013-05-02 22:20:25 UTC
Created attachment 134066 [details]
Patch in action
Comment 3 Ondrej Vrabec 2013-05-03 10:01:30 UTC
anything going to the main menu must pass through the uireviews
Comment 4 markiewb 2013-05-03 21:55:18 UTC
Created attachment 134094 [details]
Proposed patch without registering to main menu

(In reply to comment #3)
> anything going to the main menu must pass through the uireviews

I understand. I removed the menu registration. The actions are still available and can be used via shortcuts. Is this a compromise? 

In the worst case I'll take the patch and create a 3rd-party module from it.
Comment 5 markiewb 2013-05-03 21:57:08 UTC
Created attachment 134095 [details]
Patch in action (no main menu registration, but actions can still be used via assignable shortcuts)
Comment 6 Ondrej Vrabec 2013-05-06 12:59:26 UTC
core-main #40a05d49aa3e
Comment 7 Quality Engineering 2013-05-07 02:25:30 UTC
Integrated into 'main-golden', will be available in build *201305062300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/40a05d49aa3e
User: Benno Markiewicz <markiewb@netbeans.org>
Log: Issue #170769 - Provide ability to toggle diff mode with shortcut