I'm a newbee in code generation and want to use the EMF framework to
generate code from my UML diagrams. Could someone point out where I could
find a step by step tutorial on what functions to call to convert my model
to an Ecore model, to create a genmodel and to generate code for it?
Also I would like to extend the conversion from UML to Ecore to support my
stereotyped UML elements (they should be tagged).
> After exploring more about what EMF does, I begin to doubt it is what
> I need. I would like to extend the UML2 framework so that it generates
> code for my UML elements.
The UML framework doesn't directly generate code so there's not much to
> But now it seems to me the EMF framework actually generates code for
> the UML editor, and not for the UML elements itself.
There is a UML.ecore which is used to generated the UML model itself,
its item providers, and the editor...
> Is there a way to define what code I would like to have generated for
> my UML elements itself?
It would be a from scratch effort and there are several template engines
available to help.
> Or should I code this all by myself?
Pretty much you're on your own. I'm not sure what you're trying to
generate, but I assume it must be very different from what EMF generates
or must involve UML element types for which there is to corresponding
Ecore mapping and hence for which EMF generates nothing...