Notes on ObjectAid
ObjectAid™ is a partially free
reverse-engineering UML diagram generator for Java. There is a substantial
free-use subset of its functionality. It's installed as an Eclipse plug-in.
In Eclipse, do
Help → Install New Software → Add...,
then insert the following and click Next:
Name: ObjectAid UML Explorer
Class diagrams can contain the following entities which are termed classifiers in ObjectAid speak. These classifiers must already exist when brought into a diagram:
The Eclipse-embedded documentation is pretty good: Help -> Help Contents -> ObjectAid Class Diagram -> User's Guide and, really, it's all there is. What's at the website is only a subset thereof.
The documentation is pretty good and there's no reason to duplicate much of it here at all. Following is only a quick-start so you don't have to look at it. This tool works pretty much the way you'd think it should.
In Eclipse's Project Explorer, right-click the parent subdirectory where you would like to create the diagram. You can create the diagram anywhere you wish in the project, it doesn't have to be under src. Choose New → Other then scroll down as shown below.
Then, with it open, just drag .java classes from the Eclipse Project/Package Explorer views and drop them into it. Rearrange, shrink, etc. as desired.
I like to lose most of the ObjectAid baggage. Rather than use the context menu by right-clicking each rectangle in the diagram, I do the tailoring for how I want them to appear in the first place.
Window → Preferences → ObjectAid → ...
Please note that there are two ways to affect the appearance in the diagram of a classifier. First, for a new diagram, you can select or deselect elements of what's displayed in the diagram by means of checkboxes. Second, you can configure preferences for ObjectAid™ using Window → Preferences → Class Diagram to determine the defaults you'll see when creating a new diagram. For example, unclicking
...in Preferences will cause the class above to be displayed more simply:
...which might be more appropriate or useful in some circumstances. You can also, via the context menu, right-click a classifier in the diagram and remove any of this stuff on the fly.
It's pretty easy to align the boxes, rework or straighten out arrows, etc., just click and drag. One great hint, however, is that if you click a box to select it, then hold down the Shift before then dragging it, it will drag (only) in a straight line!
Class hierarchies can be fleshed out by right-clicking on a classifier already in the diagram and choosing Add. You are presented with the following types of additions:
* Parent or super classes only. If you wish to add subclasses of a classifier, open Eclipse's Type Hierarchy view and drag them into the diagram from there. To reach this view for a given identifier, right-click on it and choose Open Type Hierarchy. That view will (usually) come up in the same workbench pane as the Project or Package Explorer. You can also open the Type Hierarchy from the diagram itself by right-clicking on the classifier.
You may wish to clean up a diagram, perhaps get rid of class variables, methods and arc labels. Some of this has already been covered on this page. This can be done thus:
For class and instance variables and also methods, right-click the classname and choose, here for which operations (methods) to show or not show, but it's the same list for attributes (class and instance variables), one of Package, Private, ... or even None. None turns them off leaving nothing more than a box with the classname in it:
Similarly, some arcs (arrows) will be labeled with names and version numbers. These are easily turned off by right-clicking the arc and toggling off the Show Labels and/or Show Multiplicity items:
Last, it's possible to clean up what's left over using the Options item of the context menu. Right-click on a classname, choose Options and toggle off:
As you can see in the last illustration, for the purpose of visualizing the simple, inter-class relationships, my diagram is a lot cleaner and more useful.
I've found that using the Add item in the context menu stops working very early on and, once you lose it (that is, the submenu contents listed here are greyed out), you can't get the ability to add even if you:
I also find ObjectAid™ begins failing to connect up classifiers using arrows. I'm unsure as to what I do that blocks this. It's similar to the problem of no longer adding associations, but it's reparable by #3 (removing the diagram you're working on, starting over and being more careful next time).
There are known issues and limitations listed in the documentation. I found none of them disappointing and, were it not for the two problems I've noted, I would rate ObjectAid™ as a fabulously wonderful tool.
If the hosting Eclipse project is lost, deleted, reimported, seriously modified (names of classes changed, functionality refactoreed), etc., ObjectAid's .ucls file is seriously compromised. Either it will be missing arcs, missing classifiers (boxes) or might even just contain nothing and you'll have to recreate it from scratch. It's not hard to imagine why this would be in most cases.