ActionGroup (@NotNull ActionGroup actionGroup) { final class Compact extends ActionGroupWrapper implements CompactActionGroup, TransparentWrapper { Compact(@NotNull ActionGroup action) { super(action); } } return actionGroup instanceof CompactActionGroup ? actionGroup : new Compact(actionGroup); }