Add any component to Macro Plugin

Hello community!

I am here about macro plugin development.
I’ve been trying to render a Macro inside another macro but nothing works for me so far.

I know in a usermacro I can just use what xml is written in the edito but when I try to use exactly that in a plugin .vm it doesn’t render.

So I thought I might try getting it via Java. So I Imported the ThemeHelper. Only I couldn’t… What I did:

public class WatchedOverview implements Macro {
    private final NotificationManager notificationManager;
    private final SettingsManager settingsManager;
    private final PageManager pageManager;
    private final ThemeHelper helper;

    public WatchedOverview(@ComponentImport CacheManager cacheManager,
                           @ComponentImport I18nResolver i18nResolver,
                           @ComponentImport NotificationManager notificationManager,
                           @ComponentImport SpaceManager spaceManager,
                           @ComponentImport PermissionManager permissionManager,
                           @ComponentImport SettingsManager settingsManager,
                           @ComponentImport PageManager pageManager,
                           @ComponentImport ThemeHelper helper) {

        this.pageManager = pageManager;
        this.notificationManager = notificationManager;
        this.settingsManager = settingsManager;
        this.helper = helper;

And then I would’ve added the helper to the velocity parameters. But like I said it made the plugin crash.

I also tried the “$action” parameter from
But still nothing.

Can someone help me? I’m at a loss.

Thanks in advance. :bee:

Found a workaround for my usecase