Vaadin Editor With spring injection

I need to inject a Vaadin CustomComponent into another CustomComponent. I have to replace the generated “new” by the spring injection. It works but the Vaadin Editor can’t show the Component anymore, it needs the new XXXComponent() in one of the @AutoGenerated method.
Is there a solution to keep the Editor working with a spring injection?
Thank you for your Help

The visual editor requires a few things about the structure of the class, as it has to parse the file to place the components - it cannot run the application but relies only on the code of that class. While there could be a little more flexibility (leading to only placeholders being shown for some components), this is not supported yet.

Your easiest options at the moment would be to inject the component to another field and then in the constructor (in code) either add it to the layout explicitly or replace a visually placed placeholder component with it. In either case, the size settings from the visual editor for that component are not copied.