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 46806 - Support "hidden" attribute on ShortcutsFolder
Summary: Support "hidden" attribute on ShortcutsFolder
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: apireviews
URL:
Keywords: API, API_REVIEW_FAST
Depends on: 46811
Blocks: 32874 46807 46808
  Show dependency tree
 
Reported: 2004-07-31 14:16 UTC by _ tboudreau
Modified: 2008-12-22 19:56 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2004-07-31 14:16:15 UTC
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.
Comment 1 Jesse Glick 2004-07-31 18:21:06 UTC
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.
Comment 2 _ tboudreau 2004-07-31 19:44:30 UTC
Note that it appears that the extbrowser module also expects this to work.
Comment 3 _ tboudreau 2004-07-31 22:58:00 UTC
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.
Comment 4 _ tboudreau 2004-07-31 22:59:15 UTC
Assigning to apireviews.  The requested compatibility contract is "friend".
Comment 5 Jesse Glick 2004-08-01 02:22:35 UTC
"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."
Comment 6 Jesse Glick 2004-08-16 18:01:48 UTC
Since issue #46833 was fixed, I believe this can now be closed as WONTFIX?
Comment 7 _ tboudreau 2004-08-16 21:03:26 UTC
yup