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.

View | Details | Raw Unified | Return to bug 46811
Collapse All | Expand All

(-)core/src/org/netbeans/core/ShortcutsFolder.java (-1 / +18 lines)
Lines 120-125 Link Here
120
     * @return KeyActionPair or null if it cannot be created
120
     * @return KeyActionPair or null if it cannot be created
121
     */
121
     */
122
    protected InstanceCookie acceptDataObject(final DataObject dob) {
122
    protected InstanceCookie acceptDataObject(final DataObject dob) {
123
        if (Boolean.TRUE.equals(dob.getPrimaryFile().getAttribute("hidden"))) {
124
            return null;
125
        }
126
        
123
        InstanceCookie ic = super.acceptDataObject(dob);
127
        InstanceCookie ic = super.acceptDataObject(dob);
124
        if (ic != null) {
128
        if (ic != null) {
125
            try {
129
            try {
Lines 444-450 Link Here
444
                            }
448
                            }
445
                        }
449
                        }
446
                    } else {
450
                    } else {
447
                        InstanceDataObject.remove(f, r.instanceName(), r.instanceClass());
451
                        String instanceName = r.instanceName();
452
                        if (!InstanceDataObject.remove(f, instanceName, r.instanceClass())) {
453
                            //We may be deleting an explicitly (user) defined keystroke,
454
                            //which will have X- prepended to its filename - explicitly
455
                            //defined keystrokes do not get CTRL- remapped to Command-
456
                            //on mac os
457
                            InstanceDataObject.remove(f, "X-" + instanceName, r.instanceClass());
458
                        }
448
                    }
459
                    }
449
                } else { // It is '.shadow' file
460
                } else { // It is '.shadow' file
450
                    FileObject root = f.getPrimaryFile();
461
                    FileObject root = f.getPrimaryFile();
Lines 530-535 Link Here
530
        public boolean add;
541
        public boolean add;
531
        public ChangeRequest(KeyStroke key, Action action, boolean add) {
542
        public ChangeRequest(KeyStroke key, Action action, boolean add) {
532
            super(Utilities.keyToString(key), action);
543
            super(Utilities.keyToString(key), action);
544
            this.add = add;
545
        }
546
        
547
        public ChangeRequest(KeyStroke key, Action action, boolean add, boolean explicit) {
548
            super (explicit ? "X-" + Utilities.keyToString(key) : Utilities.keyToString(key),
549
                action);
533
            this.add = add;
550
            this.add = add;
534
        }
551
        }
535
    }
552
    }

Return to bug 46811