Create OmniGraffle class diagrams from your Java sources and EMF models

Eclipse P2 update site

Drag'n drop to install,
or visit eclipse Marketplace

View the Project on GitHub

use prefix "[j2og]" for j2og related issues

Jens' Developer Blog jevopisdeveloperblog.blogspot.de/

OmniGraffle is a great diagramming tool for Mac OS X. The Eclipse plugin j2og adds a new menu entry to the Eclipse package explorer, so that you can automatically create class diagrams in OmniGraffle from your existing Java sources. Additionally it is possible to also create diagrams from EMF ecore or Xcore files (in case you don't like the ecoretools for stability or aesthetic reasons ;-) ).

Its usage is very simple: Select "Create OmniGraffle Diagram" from the context menu of a java source file (i.e. compilation unit) or package in the package explorer. You can then configure the output (default settings can be defined in the preferences), and the plugin will scan the package and add a class diagram of this package. The diagram is saved to some OmniGraffle file. For ecore/xcore files, just select "Create Graffle from EMF".

Although the target format is OmniGraffle, you can open these diagrams with arbitrary tools:

The exported diagram is not really layouted, but you can easily do this with your diagramming tool.

Context Menu
Context Menu
Configuration Dialog
Configuration Dialog
Created Diagram
Sample Diagram

The plugin can create class diagrams for selected types, packages, and sub packages. Besides, the context of selected classes, that is types on which the selected types depend on, can be visualized as well. Attributes are drawn as associations if possible, e.g., parameterized collection types are recognized and replaced by 0..* associations. You can configure the output with some switches. Besides filtering members based on their scope, some additional filters are implemented:

The newly created shapes are initially drawn using OmniGraffle's hierarchical layout algorithm.

Tip: In order to manually change the diagram, you may want to have a look at my stencil "UML Collection" at

  1. Graffletopia
  2. Stenciltown, directly accessible from within OmniGraffle


This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Version History

Jul. 2016, 0.4.0
Unified version numbers, added maven build, fixed some bugs. Renamed to "j2og".
Jul. 2016, 0.3.2 + 0.1.2 EMF
Improved handling of context (render context gray, short package names)
Jul. 2016, 0.3.1 + 0.1.0 EMF
Added ecore/Xcore export functionality
Oct. 2015, 0.3.0
Create graffle files instead of using AppleScript
Sep. 2012, 0.2.x
Used AppleScript (cf. Peter Friese's blog post) to create drawing, required installed OmniGraffle application. Did not work with newer OS X and OmniGraffle versions, this is why is has been rewritten.