Skip to content

5. Generate Eclipse UML diagram from Slick Table Mapping

Hayssam Saleh edited this page Sep 18, 2013 · 6 revisions

Because sometimes a picture is worth a thousand lines of code, you can generate a eclipse emf diagram through the statement below :

// model.Xdb is the object containing the case classes and generated Slick mapping tables
// The second parameter is the filename where the generated Eclipse UML/EMF model will be stored
new Export().export2EMF(new ObjectRef(model.XDb).reflect, "database/slickemf.ecore")

After running the statement above on your Model Object. in Eclipse, right click on the ecore file and select "Initialize Ecore Diagram File ..." menu option. This menu option is available only if the Eclipse EMF extension is installed.

The diagrams below are generated by the statement above for the database subproject

Case classes Diagram

Slick Table Mapping Diagram

Clone this wiki locally