A few weeks ago I ended up on the following thread on the EMF Forum asking for Ecore meta-model formal documentation?. Ed pointed at some documentation which includes diagrams done with great care but done with tools from another era.
As the maintainer of EcoreTools I had to do something about it, and so I did:
The following diagrams have been created thanks to EcoreTools which is part of the Eclipse Modeling Package. All the hard work has been done earlier by Ed when he had to decide what to display and how, all I did is reproduce those using EcoreTools and exporting those at a fairly high resolution (click on the images to get the full resolution).
The corresponding patchset for EMF is here.
But beside this anecdotic action there is something interesting and more general in how these diagrams are presenting the Ecore.ecore model.
Ed starts by diagramming the type hierarchy, without any other information (attributes or references). And at least in the case of Ecore but in am sure it is true in the general sense, this gives a very good introduction to a domain model: only starting with the types it defines.
To construct such a diagram using EcoreTools import all the EClasses in it and then enable the following filters:
You can also enable the Constraints layer which gives a bit more information about what makes those types valid.
Here is a general diagram highlighting the references and attributes. It might look a bit crowded at first but it is filled with information. You can get and understand how all of the primary aspects of Ecore are working just using this diagram.
for this kind of diagrams you really want to know a few keyboard shortcuts, among others:
|Remove Bendpoints||+ +||->doc|
You’ll find all the keyboard shortcuts in Mélanie’s excellent blog post.
The next diagram focuses on how Generics are modeled in Ecore and does a fairly good job in describing it by hidding all the other aspects.
More important: this was not displayed at all in the previous diagram and that is a good thing as one don’t need to understand this specific point to leverage Ecore.
Java Language Types
The last diagrams are enumerating datatypes.
For these kind of diagrams with many un-connected shapes your best friends are the Make same size, Distribute and Align actions.
So now, who wants a nice poster in the office ?