ActionPromoter (@NotNull Function<List<? extends AnAction>, List<AnAction>> function) { return new ActionPromoter() { @Override public @Nullable List<AnAction> promote(@NotNull List<? extends AnAction> actions, @NotNull DataContext context) { return function.apply(actions); } }; }