Additional Class Diagram Editor Tools

Context Menus

In this section, we will discuss some of the other tools available with the Class Diagram Editor. These tools are not necessarily Tigerstripe specific. The Class Diagram Editor has been built on the Eclipse framework called the Graphical Modeling Framework (GMF). Use of this framework means that the Class Diagram Editor has many additional tools available that are provided by the GMF.

The following figure, shows one of the Context Menus provided as a part of the Class Diagram Editor. You can access this particular menu by right-clicking anywhere on the Class Diagram Editor. To be more specific, anyplace on the diagram where there are no Artifacts or Relationships.

Diagram displaying Context Menu

In the diagram Context Menu, you can see that there are a number of tools available. In this particular figure, the Add menu is displayed. This Add menu allows you to add a number of different types of Shapes to your diagram. Once created, you can format these Shapes by right-clicking, and displaying the Context Menu appropriate for that Shape. Items in the Shapes Context Menu allow you to change the background and foreground colors, change the Font used for labels, and even change the order of the shape within the diagram.

Most drawing tools available provides similar items available in the Context Menu. The drawing options include tools that allow you to Zoom in or Zoom out on the current diagram, and a Filters entry to apply filters to the objects in the diagram (or the diagram itself) to control what is visible. In the current implementation, for example, the Diagram Context Menu has an entry to toggle the visibility of the Connector Labels in the diagram, in effect turning the labels on the Relationships between the Artifacts in the diagram ON or OFF. Under File in the Context Menu, there is a tool that allows you to save your current diagram as an image file, providing you with the ability to include the diagram in external system documentation. The Context menu for Tigerstripe Artifacts allows you to control the visibility of the compartments in the Artifact, providing you the ability to hide as much detail as you like when you are preparing your documentation for distribution, without changing the underlying diagram model. The Context Menus for Shapes, Artifacts, Relationships, and Features in the Class Diagram Editor are all extensible.

Referenced Objects

There is an option in any Tigerstripe project that allows you to Publish the contents of a project as a Module. In Tigerstripe, a module is represented by a Java ARchive, or JAR file that contains the model defined in that project. Once your create this JAR file, it can be added to other Tigerstripe Projects as a Dependency. This allows for re-use of models.

When a published Tigerstripe module from one project is added as a Dependency in another project the Artifacts and Relationships from the first project's module become available to the Dependent Project however, these relationships are read-only. Artifacts and relationships cannot be changed from the second project's perspective. This carries over into the Class Diagram Editor. When artifacts and relationships from the first project (which is a JAR file that is visible in the Tigerstripe Explorer for the second project) are copied into the Class Diagram Editor from the module in the Tigerstripe Explorer, they will be read-only and will prevent many actions that would be possible on those objects if they were artifacts in the second project. In this instance, you will not be able to rename Artifacts, nor will you be able to add or remove Features from them in the second project. If the Artifacts in question are related to other artifacts, you will not be able to change those Relationships. You will also not be able to use Artifacts from the module as a Source for any Relationships in the second project. Some dependencies and relationships are allowed from artifacts in the second project to artifacts in the first project (for example, an artifact in the second project can extend an artifact of the same type on the first project, for example). However, many relationships that would be possible if both artifacts were defined in the second project will not be possible when one of the artifacts is defined as a part of a module in the first project.

When you are working with a Tigerstripe Project that has dependencies on another project, just remember that there are going to be some differences in how tools like the Class Diagram Editor (or the multi-page editors) will behave with some objects in the Dependent Project.

Related Topics

The Class Diagram Editor
Using the Class Diagram Editor
A Class Diagram Editor Overview
Working with Tigerstripe Artifacts
Adding Relationships

© copyright 2005, 2006, 2007 Cisco Systems, Inc. - All rights reserved