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.
I'm trying to fix issue 32733 by hiding the FIND shortcut on non-Solaris platforms. The simple fix is to add something like: <attr name="hidden" methodvalue="org.netbeans.core.ui.MenuWarmUpTask.isNotSola ris"/> But the method is never called. Also, modifying core/ui's layer.xml to include: <attr name="hidden" boolvalue="true"/> has no effect. So I took a look at ExtBrowser's settings, which is where I got the idea for this approach. Indeed, in the options node under Server and External Tools | Web Browsers, there are two "unrecognized settings" nodes - which are really nodes for Netscape and IE, neither of which should be visible on my mac - they use the same approach - a hidden property set true by a method call. So it looks like this is broken.
There is no generally active 'hidden' attribute defined. For certain folder trees, the interpreting code may recognize a 'hidden' attribute and assign it some meaning. Adding the behavior of recognizing 'hidden' on any new folders counts as an API change and must be filed as such thru apireviews. In the particular case of shortcuts, there is AFAIK no direct way to selectively hide some. You could make instanceCreate return something useless depending on some condition (using a methodvalue attr). This will block other layers from binding that key, note.
Note that it appears that the extbrowser module also expects this to work.
Reopening as an enhancement. The code I would like to add to org.netbeans.core.ShortcutsFolder is: protected InstanceCookie acceptDataObject(final DataObject dob) { + if (Boolean.TRUE.equals(dob.getPrimaryFile().getAttribute("hidden"))) { + return null; + } This will allow per-platform keystroke definitions for keys that, to create a native user experience, should be bound differently on some platforms. Specifically it will allow us to remap: - Alt-arrow - normally switches tabs. On the mac, these are bound to, e.g. jump to next word, select next word, etc. - Delete - doesn't exist on mac (laptops at least). On the mac, deletion should be bound to backspace, but this is probably not right for other platforms. We are agreed that this is provisional - a better global API for keybindings would be a good goal for 4.1 - but we do need 4.0 to be a usable platform for mac users, and unnatural keybindings is the principal objection. Per Jesse's request, we will treat this issue as one half of issue 46811 - though these two issues really sink or float together.
Assigning to apireviews. The requested compatibility contract is "friend".
"Note that it appears that the extbrowser module also expects this to work." - yes, for web browsers, which is totally unrelated from an API perspective. As I said before: "For certain folder trees, the interpreting code may recognize a 'hidden' attribute and assign it some meaning."
Since issue #46833 was fixed, I believe this can now be closed as WONTFIX?
yup