private void detachSystemActionPerformer(JTextComponent c) { if (c == null) return; Action action = getEditorAction(c); if (action == null) return; Action globalSystemAction = getSystemAction(c); if (globalSystemAction == null) return; if (globalSystemAction instanceof CallbackSystemAction) { Object key = ((CallbackSystemAction) globalSystemAction).getActionMapKey(); ActionMap am = c.getActionMap(); if (am != null) { Object ea = am.get(key); if (action.equals(ea)) { am.remove(key); } } } }