Notes on ObjectAid

Russell Bateman
July 2014
last update:


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

How it works

Class diagrams can contain the following entities which are termed classifiers in ObjectAid speak. These classifiers must already exist when brought into a diagram:

  1. Classes
  2. Interfaces
  3. Enumerations
  4. Annotations
  5. Packages
  6. Package roots (as JARs and source folders)

Getting Help

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.


Creating an object (UML) diagram

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.

Initial preferences (nearly all are unchecked)

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

  • Show Attribute Default
  • Show Operation Signature
  • Automatic Resize ✓
  • Show Visibility
  • Show Icons ✓
  • Show Stereotype
  • Show Package Name ✓
  • Add Generalizations ✓
  • Add Realizations ✓
  • Add Associations ✓
  • Add Nesting ✓
  • Add Dependencies
  • Always Add Relationships
  • Show Association Multiplicity ✓
  • Show Association Labels
  • Show Public
  • Show Private
  • Show Static
  • Show Package
  • Show Protected
  • Show Public ✓
  • Show Private
  • Show Static
  • Show Package
  • Show Protected

Displaying classifiers in diagrams

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

Clicking and dragging classifiers in diagrams

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!

Using ObjectAid™ to flesh out diagrams

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:

  1. All relationships
  2. Associated (based on attributes in classifiers)
  3. Dependencies (stuff from method arguments and variables)
  4. Generalized (inheritance*)
  5. Nested relationships
  6. Realized (Java interface implementation)

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

Cleaning up diagrams

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:

  1. Operation Signature —arguments lists on methods
  2. Package Name —across the bottom of the box
  3. Sterotype —usually <<Java Class>> across the top of the box

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:

  1. Try harder
  2. Remove the classifer and re-adding it
  3. Remove the entire diagram (its file) and starting over
  4. Restart Eclipse

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.

Effect of Eclipse project modification

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.