Thursday, April 14, 2011

Hidden features in IBM Rational Software Architect (RSA)


Being a very large tool, there's also an enormous amount of "hidden features" in RSA. Here I'm going to list a few of my favorites. Starting out with:


Controlling the order of model elements in Project Explorer (PE)

By default, model elements are listed alphabetically in PE. Often good, but sometimes you just want to be able to control the order they are listed in - but how?

Well, as with some many other things, bring up the Preferences dialog (Window > Preferences) and browse to Modeling > Views > Project Explorer.
There you'll find a section on "Project Explorer settings" in which you can modify the "Sort by" settings. Setting it to "Storage Order" gives you full control over the order of elements in PE.

Next, you very likely will want to to reorder the elements. With "Storage Order" you'll notice that they appear in the order that they were added to the model.

Reording is done by one of the more hidden features. Here's some examples:

Reordering contents of a UML Package:
  1. Right click on the package in PE and select "Properties"
  2. Switch from "General" to "Advanced"
  3. Click in the value part of the entry for "PackagedElement" and a button marked "..." appears
  4. Click this button
  5. A new Property dialog is opened - use this to move the elements up/down to suit your needs
  6. Close all dialogs and enjoy
If you need to rearrange attributes in a class, perform the same steps, but instead of locating "PackagedElement" locate "OwnedAttribute" and perform your reordining there.

As this is dependent on having the "Sort by" preference set, other users will need to set the same "Sort by" as you to enjoy your model order. You may want to consider sharing of preferences to address this issue.