Working with the Eclipse Modeling Framework can save you a lot of time when generating code out of your UML models.
If you have defined a metamodel on top of an UML model that you are trying to read with MWE
org.eclipse.emf.mwe.utils.Reader you may experience the problem
that classes with types from your metamodel are not correctly resolved
within your XPAND templates. According to this bug report it is not
clear if the bug has been really fixed in the newest version of EMF.
As long as a fix is unavailable, you can use the (deprecated)
org.eclipse.xtend.typesystem.emf.XmiReader instead. That works
perfectly fine for me.