I'm working on a M2T project that generates code from a java model. This model defines a number of class objects that have instance variables, methods etc.
When the workflow is executed, it will only generate the code for the first class defined in the model and not for all classes.
I suspect that this is caused by the fact that my java model has no 'root' object. Most tutorials on the matter assume a root object like 'Model'.
Is it possible to make a 'main' definition such that all instances of that type are considered without having a root object in the model?
This is how the current main definition looks like:
«DEFINE main FOR Class»
«FILE name.toString() + ".java"»
public class «name» {
«EXPAND field FOREACH field»
...
}
«ENDFILE»
«ENDDEFINE»
This error message makes finally clear: you HAVE a root object.
you still can use EMF means to get children e.g. eContents/eAllContents.
it would help if you could share some information on your metamodel
to give you some better advice on what to do.