protected @Nullable JComponent getComponent(AnActionEvent event) {
    JComponent component = ComponentUtil.getParentOfType(JComponent.class, event.getData(CONTEXT_COMPONENT));
    Function<? super String, JComponent> function = component == null ? null : ComponentUtil.getClientProperty(component, FUNCTION);
    return function == null ? component : function.apply(mySwingActionId);
  }
protected @Nullable JComponent getComponent(AnActionEvent event)