Index: core/src/org/netbeans/core/ShortcutsFolder.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/ShortcutsFolder.java,v retrieving revision 1.19 diff -u -u -r1.19 ShortcutsFolder.java --- core/src/org/netbeans/core/ShortcutsFolder.java 27 Jul 2004 04:19:45 -0000 1.19 +++ core/src/org/netbeans/core/ShortcutsFolder.java 31 Jul 2004 18:17:39 -0000 @@ -120,6 +120,10 @@ * @return KeyActionPair or null if it cannot be created */ protected InstanceCookie acceptDataObject(final DataObject dob) { + if (Boolean.TRUE.equals(dob.getPrimaryFile().getAttribute("hidden"))) { + return null; + } + InstanceCookie ic = super.acceptDataObject(dob); if (ic != null) { try { @@ -444,7 +448,14 @@ } } } else { - InstanceDataObject.remove(f, r.instanceName(), r.instanceClass()); + String instanceName = r.instanceName(); + if (!InstanceDataObject.remove(f, instanceName, r.instanceClass())) { + //We may be deleting an explicitly (user) defined keystroke, + //which will have X- prepended to its filename - explicitly + //defined keystrokes do not get CTRL- remapped to Command- + //on mac os + InstanceDataObject.remove(f, "X-" + instanceName, r.instanceClass()); + } } } else { // It is '.shadow' file FileObject root = f.getPrimaryFile(); @@ -530,6 +541,12 @@ public boolean add; public ChangeRequest(KeyStroke key, Action action, boolean add) { super(Utilities.keyToString(key), action); + this.add = add; + } + + public ChangeRequest(KeyStroke key, Action action, boolean add, boolean explicit) { + super (explicit ? "X-" + Utilities.keyToString(key) : Utilities.keyToString(key), + action); this.add = add; } }