Extracting all classes in the package

About this task

In this task, you add a node to the template for a generic element that is not from All Metaclasses. If you want only elements from a specific part of the model, such as the Package, rather than all elements in the model. In this task, you build a series of iterations that creates a path to the generic element.

To extract all classes in the package:

Procedure

  1. In the model view, collapse All Metaclasses and expand Project.
  2. Locate and expand the containedPackages node so that you can see the generic elements for it.
  3. Drag containedPackages to the template view, under the nodes you added for diagrams. An iteration node and subnode are created in the template view.
  4. Find classes under the containedPackages node. Drag classes onto the iteration subnode created in step3 A third iteration and subnode are created, which are subnodes of the iteration created in step3

Results

The nodes you just added instruct IBM® Rational® Rhapsody® ReporterPLUS to iterate through the model to find the project, then iterate through the containedPackages and extract all the classes. The labels that are added to the template view identify what the nodes do and what part of the model they are from.


Feedback