void (@NotNull AnAction action, @NotNull AnActionEvent event) { if (event.getDataContext().getData(PlatformCoreDataKeys.CONTEXT_COMPONENT) == SplitButton.this) { selectedAction = action; copyPresentation(event.getPresentation()); repaint(); } }