Une image contenant texte, signe

Description générée automatiquement

Element Information Boxes

 

Overview

Element Information Boxes allow the tags (and description) of a model element to be displayed on a diagram, even if the diagram itself does not support tags.

 

Applicable To

Element Information Box

Menu Entry

Power Pack Update Element Information Box

Applicable To

Project, Package

Menu Entry

Power Pack Update All Element Information Boxes

Demonstration

Watch the Video

Operation

Create the Element Information Box

First create an Element Information Box in the model browser (tip: use the Add New Model Element helper)

 

Define the Information Source

Next define the source of the information to be synchronized by connecting the Element Information Box to a model element using either an Anchor or a plain Dependency (from the Box to the element).

If Dependencies are used, then the Box must only have one. If Anchors are used, then the Box may only have one (unless Dependencies are also used – see below).

Source Priority

Dependencies are checked first so the Box may have a single Dependency to connect it to the source of information and then multiple Anchors if desired (this allows the source of the information to be different than the anchored elements and allows the Box to be graphically attached to elements on diagrams that are not the source of the information). For example, you could use a Dependency to attach the Box to an Operation and then use an Anchor to show it attached to a Call Operation on an Activity Diagram.

 

Invoke the Helper

When the helper is invoked:

·       All tags from the source element are synchronized to the Information Box.

·       The description of the source element is synchronized to the Information Box.

Element Information boxes may be dragged onto diagrams (even diagrams like Activity Diagrams which do not allow tags to be displayed). Element Information Boxes display the description and tags by default (empty compartments are automatically hidden so of there is no description only the tags will be visible)

A screenshot of a computer

AI-generated content may be incorrect.

All Information Boxes may be updated by invoking the helper on a Package (for all Information Boxes anywhere in that package) or on the Project.

 

Automatically Updating

In addition, this is a Triggered Helper. Setting the project-level property below to true will automatically update all Information Boxes on Save.

RhapsodyPowerPack.ElementInformation.UpdateOnProjectSave

Individual Information Boxes may be excluded from this auto-update by setting the following property directly on the Information Box:

Model.ElementInformationBox.UpdateOnSave

Extending the Information Box

Element Information Boxes have the following property that allows a post process plugin to be automatically invoked during the update process:

Model.ElementInformationBox.PostProcessPluginName

The property should contain the name of the plugin entry from the HEP file (not any menu name entry). The plugin should implement the RhpPluginInvokeItem(String args) function (which may need to be manually added to the plugin). The Power Pack will invoke this plugin function with two arguments as a comma separated list:

 

1.     The GUID of the Element Information Box.

2.     The GUID of the connected source model element.

 

This helper is free to then create/update additional tags on the Element Information Box from any source of information. A sample eclipse project is provided in the samples folder (Samples/ElementInformationBoxExtension).