Making UML Class Diagrams with Rational XDE

Up Java Resources C++ Resources Comp410

The following discussion assumes that the following non-default environment options have been set in Visual Studio .NET:

  •  "Options/RationalXDE/Appearance/Connectors/Line Style" = Rectilinear,
  •  "Options/RationalXDE/Appearance/UML Classifier/Show Operation Signatures" = checked.
  •  "Options/RationalXDE/Round-Trip Engineering/Synchronization Settings/Automatic Synchronization" = checked (all sub-items checked as well).

 

Creating a UML Class Diagram from an Existing Project

The following instructions assume that classes exist in the project, but that there is no UML diagram yet.

  1. Click the "Synchronize" button on the speed button panel above the Solution Explorer (or any of the Explorer pages).  
    1. Be sure it is the synchronize button that is visible, as the visible button reflects the last button used.   You may need to pull down the drop list to find the Synchronize button.
    2. Right-clicking the project and selecting "Synchronize" also works.
    3. The initial synchronization takes a long time, so be patient, watch the progress bar and don't do anything until everything is complete.
  2. The results of the initial synchronization should be:
    1. The creation of a [project name].mdx (model) file, which should be open, but blank.
    2. A new pane next to the Solution Explorer, called the Model Explorer -- this pane will probably be the one that is selected.
  3. To show your existing classes on the diagram (model)
    1. Open your .mdx file, which is probably blank at this point.
    2. Select the Model Explorer.
    3. Expand the item labelled with your project name.   You should see items called "Artifacts", "References", "Main" and "{ } project name" below it.
    4. Expand the item labelled "{ } project name".   You should see all your existing classes below it. 
    5. Drag the classes you'd like to display on the diagram onto the diagram.
  4. To show a class that is part of a referenced assembly, such as an existing class's superclass might be, browse through the referenced namespaces in the Model Explorer until you find the desired class.   Then drag it onto the diagram.     As some of these classes can have a large number of operations and attributes, so you may want to hide some of them--see the instructions below.

 

Hiding or displaying attributes or operations of a class on a diagram

To display or hide various attributes (fields) or operations (methods), of a class, right click the class on the UML diagram and select "Select Compartment Items...".    A dialog box will appear that will enable you to add or remove items from the diagram.