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.
[release32 mar 31] When navigating context menus via keyboard, NewAction at least in its one-NewType form cannot be activated by keyboard (presumably missing keybinding on JInlineMenu). This could be an accessibility problem--if a mouse is unusable, there will be no way to select these new types. Also for similar problems, try uninstalling various combinations of modules that provide help sets, so that the Shortcuts menu greys out, or Contents greys out, etc.--keyboard traversal over these menu items is not quite right. I suspect that some code relating to keyboard focus is missing from JInlineMenu or Actions.SubMenu, but am not sure what exactly.
Target milestone -> 3.3
This should be working now. Closing as invalid for current builds. Please reopen, if you experience the problem again.
Reopen to adjust the resolution.
I tried it on current buidls and it seems to work. So closing as worksforme. Please reopen if I'm wrong.
reopening....
I'm not sure if this was ever really fixed (I don't think it was), but it is definitely still broken in [dev nov 17]. As an example: in MDI mode, with apisupport installed, go to the Runtime tab, KB navigate to Bean Browser, down to Lookup results, Sh-F10 and try to select Add superclass/interface (this uses NewAction with one NewType). It will not work, you have to select it from the mouse. Also there is a little hook that makes it look like there is going to be a submenu, though there is none; will attach screenshot. Look carefully at the upper-right corner of the selected menu item.
Created attachment 3463 [details] Snapshot of bean browser area and its context menu (Sh-F10 activation only!)
I should have been too sick last week. The problem is of course still there.
Problem is the Action.SubMenu (which is JMenu instance) is trying to act like pure JMenuItem in case it includes just one item (new type), but is not the best actor, it just looks like JMenuItem, but when you select it , it doesn't run the action, but tries to expand sub-menu (therefore the little thing appears). CC UI Jiri what solution to take: 1) Make it as normal JMenu, expanding even 1 item in sub-memu, 2) Try to make it better actor of JMenuItem. The first solution is much easier and error-prone, but is probably not the desired. For the second I'm now finding the nice way, but not sure at the moment if there is such. Let know about it.
Fixed in [main-trunk]. Fix: openide/../openide/awt/NbPopupMenuUI.java [1.3] Note: I'v found the solution for the 2), so it will work as designed. But on the other hand, from the code point its just a hack to UI class. And I don't like it much. Maybe it will be necessary to rethink later. The better would be, Actions.SubMenu is JInlineMenu which is changing the component (JMenuItem, JMenu(Plus)) when needed. But Actions.SubMenu is public and JMenuPlus already. Note for testing: You can try it out also on Tools | Options | L&F | Menubar - its new has now just one item (Add Menu), its menu's has two items (Add -> Menu, Separator).
verified dev#20011120
NewAction does in fact work fine now, thanks. But I notice that PasteAction still suffers from the same problem.
Target milestone -> 3.3.1.
Jesse, please provide steps for reproducing the prob for the Paste action. I haven't succeed to do it.
Neither can I, now (tried in an Ant script). I am sure I saw this recently for Paste (I specifically tried Add... in the same IDE session and it was fine) but now I cannot remember what kind of node I was working on when I saw it. If I find out I will reopen. I don't imagine you changed anything in the last five days or so.
Wait, found it. It is fixed in the popup menu, but not in the main Edit menu. Expand some Ant build script (r33 nov 27), Ctrl-C to copy some element in it (task, target, whatever), click on its parent (or anywhere else it could be pasted), then Alt-E and try to select Paste with the keyboard--problem still exists. S-F10 to get the popup, and Paste works fine from there. So probably the PopupPresenter and MenuPresenter do not match.
I got the clue. Anyway, it will be a problem a bit. The presenters are OK, they match. The problem is following: I was fixing the bug the way I hacked our NbPopupMenuUI so it acts for Action.SubMenu as JMenuItem and not JMenu when it has just one item etc. But for menu we there is used standard UI, which of course takes the Action.SubMenu as JMenu for each cases what is not what we need. Therefore the behaviour differs between menu's and popup's. Well it seems for me it wasn't good idea to make SubMenu this way (acting like JMenuItem and JMenu as well). I will think about it again.
Note: I would rank the priority lower in this form: since the popup version is usable from the keyboard, lack of KB accessibility from the main menu is not really harmful, at least if you know that the popup will work. I would suggest P4.
Fixed in [release33] Fix: openide/../openide/awt/Actions.java [1.53.4.1] Note: I hacked also for Actions.SubMenu for the case it is in 'menu' and want to act like JMenuItem. Unfortunatelly the same way woudn't be possible for the case when it is in 'popup' since the NbPopupMenuUI automatically expands the sub-menu and passes focus to it. In future it would be nice to get rid of this dog&cat SubMenu and NbPopupMenuUI. I leave it P3, if some problem with A11Y occure again, so it's not forgotten.
verified in [nb331_dev](20020111)
Sorry to say that this is broken again, for popups only, and on 1.4 only (1.3.1_02 is OK). [dev apr 03] Start IDE; I used MDI mode. (I am using Linux 2.4.x w/ Sawmill WM & Gnome.) Click on Explorer to make sure it has focus. Using KB, navigate to examples/colorpicker/ColorPreview.java. Expand, go into Fields. S-F10 to open popup. Move to "Add Field..." with KB and try to press Enter; the bug appears (little bump appears at edge of menu item, and menu does not close). Select some field and copy it. Move back to Fields node, S-F10, Paste -> bug, cannot select. Alt-E to post Edit menu, move to Paste, hit Enter -> works (tries to paste, fails because the field name is duplicated though). Under 1.3.1_02, the popup usage is OK, and menu usage is OK under both JDKs. I did not check in 3.3.1 release, only in a dev build.
*** Issue 23608 has been marked as a duplicate of this issue. ***
It is opened in [orion](020517-rc4) on [jdk1.4](fcs)
Fixed in [trunk] Fix: openide/../awt/Actions.java [1.62] Actions.Submenu was working in pulldown menu only (if pretending to be a normal menu item), now enabled the same also in popup menu for the same case.
verified in [nb_dev](20020708)
the fix is bad. It caused issue 25427 which I consider more serious than this one. I revert the fix and reopen this issue
Investigated it, and found the problem is there was proceded the action for the "menu-item-like" Actions.SubMenu also fot the case it was not the current selected path. The event was sent just for some preprocessing. (See MenuSelectionManager). Thus the checking if the path matches the currently selected one.
Fixed in [trunk] (applied the abovementioned correction). Fix: openide/../awt/Actions.java [1.64]
verified in nb3.4
Resolved for 3.4.x or earlier, no new info since then -> closing.