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 226955 - Patch for: Export the current keymap as HTML and show in browser
Summary: Patch for: Export the current keymap as HTML and show in browser
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Key bindings (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: PATCH_AVAILABLE
: 206360 (view as bug list)
Depends on:
Blocks: 231968
  Show dependency tree
 
Reported: 2013-03-03 23:28 UTC by markiewb
Modified: 2013-06-28 00:29 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed patch (17.36 KB, patch)
2013-03-03 23:42 UTC, markiewb
Details | Diff
Patch in action (206.37 KB, image/png)
2013-03-03 23:43 UTC, markiewb
Details
Updated screenshot (57.51 KB, image/png)
2013-05-03 09:55 UTC, Svata Dedic
Details
Updated patch (21.92 KB, patch)
2013-05-03 09:55 UTC, Svata Dedic
Details | Diff
Updated screenshot II (18.04 KB, image/png)
2013-05-03 20:59 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-03-03 23:28:26 UTC
Currently there is an action named "export shortcuts to HTML". See https://blogs.oracle.com/geertjan/entry/hidden_netbeans_feature_export_shortcuts

But this action needs some usability improvements:

ACTUAL:
* shows platform-independent shortcuts like D/O
* shows the keymaps of all available profiles
* file is generated into the userdir

EXPECTED:
* show systemspecific shortcuts like SHIFT/ALT/CTRL instead of D/O (more useful IMHO)
* show the keymap of the current profile only (who wants to compare the keys of multiple profiles?)
* file is still generated into the userdir, but the generated HTML file will be opened in HTML browser (No one wants to navigate there manually)
Comment 1 markiewb 2013-03-03 23:29:28 UTC
Even jglick proposes to have a print button in the keymap panel - see https://blogs.oracle.com/geertjan/entry/hidden_netbeans_feature_export_shortcuts#comment-1327962019210
Comment 2 markiewb 2013-03-03 23:42:59 UTC
Created attachment 132121 [details]
Proposed patch

I like to propose the following patch to solve this issue.

The patch extends the existing ExportShortcutsAction to export a single keymap. There will a new "Print..." button in the keymap options panel, which will invoke the action using the current keymap profile. After the generation the file will be opened in the HTML-Browser via HtmlBrowser.URLDisplayer.getDefault().showURLExternal(). The shortcuts will be displayed as system-specific (like SHIFT-ALT instead if D-O). That is what the user expects because the keymap options panels also shows them system-specific.

Backwards-compatibility is preserved as much as possible. The original action works like before - it still shows platform-independent shortcuts for all profiles at the same time, but it will be opened in the HTML browser too.

@NB-Devs: Please review, discuss and commit.
Comment 3 markiewb 2013-03-03 23:43:31 UTC
Created attachment 132122 [details]
Patch in action
Comment 4 markiewb 2013-05-01 19:45:02 UTC
*** Bug 206360 has been marked as a duplicate of this bug. ***
Comment 5 markiewb 2013-05-01 19:48:51 UTC
@Svata: Any change to get the patch integrated in 7.4? Do you need support/modifications from my side?
Comment 6 Svata Dedic 2013-05-03 09:54:30 UTC
After advice from our UI expert (in cc:), I made a minor rearrangement/rename of the buttons. See the attached screenshot.

Additional changes/suggestions:
* better error handling in exportShortcutsToHTML
* shared code between ProfilesPanel and the export action

Please review the suggested changes & the screenshot - thanks.
Comment 7 Svata Dedic 2013-05-03 09:55:02 UTC
Created attachment 134078 [details]
Updated screenshot
Comment 8 Svata Dedic 2013-05-03 09:55:27 UTC
Created attachment 134079 [details]
Updated patch
Comment 9 markiewb 2013-05-03 20:59:09 UTC
Created attachment 134093 [details]
Updated screenshot II

(In reply to comment #6)
> After advice from our UI expert (in cc:), I made a minor rearrangement/rename
> of the buttons. See the attached screenshot.
> 
> Additional changes/suggestions:
> * better error handling in exportShortcutsToHTML
> * shared code between ProfilesPanel and the export action
> 
> Please review the suggested changes & the screenshot - thanks.

@Svata: Your attached screenshot doesn't show the correct dialog. I applied the patch to my local sources. Looks good and works! Thanks. I added an updated screenshot. It can be used for the noteworthy page?!

The HTML output isn't beautiful (not your fault/topic), but it is better than nothing and its improvement would be another RFE.
Comment 10 Svata Dedic 2013-05-04 22:07:25 UTC
Applied in rev http://hg.netbeans.org/jet-main/rev/a85b58d3330c
Comment 11 Quality Engineering 2013-05-06 04:01:07 UTC
Integrated into 'main-golden', will be available in build *201305052300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a85b58d3330c
User: Svata Dedic <sdedic@netbeans.org>
Log: #226955: Added HTML browser view of keymap [Benno Markiewicz]