where does the instanceof of MyClass come from that is used in the test,
e.g. how does testAllParameterTypes look like? Please note that MWE is
usually not required in unit tests and it does not use dependency
injection out of the box.

Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com

which gives a NullPointerException when executing e.mapSysEx(it). With debugging I verified that the Collection is not null and does not contain null entries. The _myclass instance is null and causes the exception. All parameters passed by the MWE2 workflow contain the expected values.

The testAllParameterTypes() is just plain Java, calling the transform() method of the TargetmodelFactory, which runs the standalone MWE2 workflow:

Regarding the static extension approach:
If I could import a static extension, this would solve my problem. But the create methods prevent me from converting all methods to static methods.

In the generated Java class, I cannot find any restrictiion which would prevent static create methods. Xtend creates a private HashMap, which also could be static. If all generated artefacts would be static, everything would run.

Finally I got it running. I just want to share the knowledge in case that anyone else gets such a problem, too.
Basically I had to pass the injector to the workflowcomponent and be sure to create the instance of the Xtend class using that injector. Afterwards everything is initialized by the injection mechanism.

Here is the solution:
I implemented a StandaloneSetup, which looks like: