void (ActionEvent e) { JCheckBox checkBox = (JCheckBox)e.getSource(); DataContext dataContext = ActionToolbar.getDataContextFor(checkBox); InputEvent inputEvent = new KeyEvent(checkBox, KeyEvent.KEY_PRESSED, System.currentTimeMillis(), 0, KeyEvent.VK_SPACE, ' '); AnActionEvent event = AnActionEvent.createFromAnAction(action, inputEvent, place, dataContext); ActionUtil.performActionDumbAwareWithCallbacks(action, event); }