void (@NotNull AnAction sourceAction) { Presentation sourcePresentation = sourceAction.getTemplatePresentation(); Presentation presentation = getTemplatePresentation(); boolean allFlags = this instanceof ActionGroup && sourceAction instanceof ActionGroup; presentation.copyFrom(sourcePresentation, null, allFlags); copyShortcutFrom(sourceAction); }