Magick
Magick

Reputation: 5112

Domain model in EMF - can I produce POJOs using Acceleo?

I have a domain model that is created using ecore EMF.

And I would like to generate POJOs. I would like to be able customize the POJOs, so I am looking at using Acceleo.

However, I can only see creating POJOs in Acceleo from UML. When using EMF it produces EObjects, Estrings etc.

Is it possible to just produce POJOs?

Upvotes: 0

Views: 531

Answers (2)

parasietje
parasietje

Reputation: 1539

See the following link for generating POJOs with EMF: http://eclipseo.blogspot.be/2007/10/creating-pojos-using-emf.html

If you want to customize this even more, you could also use other methods:

  • XPand
  • XText
  • Acceleo ECore generation templates
  • etc

Upvotes: 1

sbegaudeau
sbegaudeau

Reputation: 1544

With Acceleo, you can generate anything you want. If you want to generate just POJOs from an UML model, you can use or fork the UML to Java generator available on Github. If you do, make sure to use the version matching the version of UML that you are using (master branch for UML2 v4.0.0, R1_1_maintenance branch for UML2 v3.x.x).

If you are using UML2 v3.x.x, you can simply install it by using the Eclipse Marketplace. The 2.0.0 release of the generator fo UML2 v4.0.0 will be released soon.

Upvotes: 1

Related Questions