emf2gv:start [EMF Tools Wiki]
 

EMF To GraphViz (emf2gv)

Overview / The idea

The idea : EMF is a powerful framework that allows to create generic editors to manage your model files. These editors represent the models as a tree in a very convenient way.

The tree representation is particularly adapted to visualize containment references. Unfortunately, when your model has several non containment references, it is not so easy to get a comprehensive representation of the model in the tree view. It is possible to show such referenced objects as child nodes by customizing the generated editor, but that way, a same object instance appears twice ore more in the tree editor and it is not obvious to understand which tree items correspond to the same instance object.

In such cases, the best solution is to build a GMF diagram editor. That way, you get a graphical representation of your model in which references are clearly visible (at least, the ones you choose to represent). Unfortunately, GMF is a complex framework, and when you ecore model is not yet stable, having to keep up to date a GMF diagram editor in each stabilization iteration makes the iterations get longer.

The idea of emf2gv is to provide a lightweight alternative to GMF in such cases allowing to quickly get a read-only graphical representation of any EMF model by simply drawing the EClass instances as nodes and the EReferences instances as edges (like an UML class diagram).

EMF2GV

EMF2GV automatically retrieves and draws the EMF Edit plugin icons. Miscellaneous appearance details can be adjusted before rendering the graph. EMF2GV also validates each node and shows an error or warning icon when needed.

Here you can see the default result that emf2gv produces with the previous model example (notice the error icon on the Empty Classroom node and the warning icon on the Tony Parker node) :

EMF2GV is open source software (EPL or LGPL licence). You are free to download it and use it.

Features

The plugin actually supports the following features :

  • Generation of a graphical representation of any EMF model
  • Default Ecore model rendering (base on a particular graphical description embedded in emf2gv)
  • An editor allowing to edit the “graphical descriptions” (a “graphical description” contains the directives used to generate a diagram for a given EMF Metamodel)
  • An ability to generate a default graphical description (for a given EMF Metamodel)
  • Static appearance proerties (background colors, edges style, …) which can be overrided by dynamic properties (through OCL expressions)
  • Dynamic appearance properties (through “Dynamic Property Overriders” with OCL expressions)
  • Validation support (error & warning icon added on EClass figures when needed)
  • OCL Support (Filtering rules to hide/show the diagram's figures, edges labels, …)
  • Possibility to use emf2gv outside of eclipse in a standalone or J2EE application
  • Miscellaneous :
    • Possibility to keep the generated GraphViz source
    • Possibility to select a sub node of on EMF resource to process in order not to process the whole resource

It includes the following UI helpers :

  • a wizard making it easier to create a graphical description from an ecore model
  • a launch configuration UI (with an associated launch shortcut)
  • a preference page that allows to define the GraphViz dot utility path

Emf2gv is designed to be usable with any EMF model.

Screenshots

Documentation

  • Installation : see the dedicated section of the manual (see below)
  • Quick start / tutorial : see the tutorials of the Getting Started section of the manual (since 1.1.0)
  • User Manual :

Links

 
emf2gv/start.txt · Last modified: 2011/06/27 20:05 by jfbraz
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki