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.
Summary: | Automatically add generated mnemonics for large submenus without them | ||
---|---|---|---|
Product: | platform | Reporter: | Jesse Glick <jglick> |
Component: | Actions | Assignee: | Jan Peska <JPESKA> |
Status: | REOPENED --- | ||
Severity: | blocker | CC: | jtulach, markiewb, mihmax, shche123 |
Priority: | P4 | Keywords: | A11Y, API, UI |
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: |
Suggested patch
Corrected patch |
Description
Jesse Glick
2003-01-17 17:31:20 UTC
Created attachment 8613 [details]
Suggested patch
Adding A11Y keyword only because it speeds up KB navigability, but this might not be enough reason. Correction to patch: the whole block if (autoMnemonicIndex >= autoMnemonicText.length()) { // Past the end, skip it - but pad text a bit. // (Padding is approximate since the font is probably proportional anyway.) label = " " + label; // NOI18N } else { label = "&" + autoMnemonicText.charAt(autoMnemonicIndex++) + ' ' + label; // NOI18N } should be enclosed in: if (autoMnemonic) { // as before... } Created attachment 8616 [details]
Corrected patch
Try clicking nbbuild/build.xml and select Run Target... - that gets mnemonics too. Jesse, you wanted to know my opinion, you get it: Perfect. To Maxym: actually I was CCing you in case you wanted to check whether a Cyrillic version of MNEM_submenu_items would make sense for Bundle_ru.properties, or whether it should better use the Latin accelerator keys. Depends on whether Russian-language users would typically have a Cyrillic keyboard configuration; I remember you dealing with this question w.r.t. menu mnemonics. But thanks for the evaluation too. :-) Hmm, I'm not so sure if this patch is suitable for users. For users it will seem that mnemonics appear "magically", they will IMO have troubles to understand conditions under which mnemonics are automatically generated --> user confusion and feeling "not in control". Please consider consulting with HIE and/or show me that I'm wrong. Thx. Assigned to new owner. Jesse, if you want to move this forward, write some test and integrate it yourself. Would still be useful in Set Main Project, Open Recent File, Open Recent Project, Project Group, and Javadoc References submenus. But better to activate on demand only, using some kind of utility, e.g. JMenu menu = new JMenu("Set Main Project"); menu.add(new JMenuItem("&None")); menu.addSeparator(); for (Project p : ...) { Actions.addToLongMenu(menu, new JMenuItem(p.displayName))); } where the utility method would append the menu item to the menu; assign it the next available mnemonic in sequence (in this example skipping over 'N' since it is already in use); and in case the menu grows too long to display comfortably, creates a new cascading submenu (mnemonic '.' perhaps) to hold subsequent items, as in the Insert Unicode action, also serving as a possible replacement for hacks like the "More Javadoc..." item under "Javadoc References". *** Bug 136749 has been marked as a duplicate of this bug. *** |