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.
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
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.