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 33171
Collapse All | Expand All

(-)Actions.java (-6 / +18 lines)
Line 22 Link Here
22
import javax.swing.text.Keymap;
Lines 24-25 Link Here
24
import org.openide.util.Mutex;
25
import org.openide.util.actions.*;
Line 27 Link Here
26
import org.openide.util.Lookup;
27
import org.openide.util.Mutex;
Line 28 Link Here
29
import org.openide.util.actions.*;
Line 70 Link Here
70
            return null;
72
            if (null == (accelerator = findKeyStroke(action))) {
71
--
73
                return null;
74
            }
Line 85 Link Here
89
    private static KeyStroke findKeyStroke(Action action) {
90
        Keymap map = (Keymap) Lookup.getDefault().lookup(Keymap.class);
91
        if (map == null) {
92
            return null;
93
        }
94
        
95
        KeyStroke keyStrokes [] = map.getKeyStrokesForAction(action);
96
        return keyStrokes.length == 0 ? null : keyStrokes[0];
97
    }
98
    
Line 697 Link Here
697
                item.setAccelerator((KeyStroke)action.getValue(Action.ACCELERATOR_KEY));
711
                item.setAccelerator(findKeyStroke(action));
698
--

Return to bug 33171