Monday, 7 October 2019

Rational Rhapsody Tip #66 - What are .hep files used for? (Intermediate)

.hep files are IBM Rational Rhapsody helper files. They are used to extend Rhapsody's menus and usually associated with profiles. Many of Rhapsody's standard profiles use .hep files to add additional menus when the profile is present. This video illustrates a couple that are part of Rhapsody's factory SysML profile.

















Hep files can invoke a Java plugin that runs in process, or alternatively they can invoke an external Java application. This extract from the SysML.hep shows an example of how a helper file can load a Java plugin


The plugin is associated with a name and the name is then associated with new context menu commands. For example, a Create Swimlanes From Parts command is added to the right-click menu for Activity Diagrams.












Here's an example of the results. In this instance the Java extension is running as a plugin. This means that it's running in the JRE loaded into the Rhapsody process.

It's also possible to get a helper file to invoke a Java application that is a separate from Rhapsody. In this instance you may need to provide additional arguments to tell it what libraries and classpaths to use.

The Elaborate Connector Via Ports... command added by the SysML.hep is an example of invoking an external application. In this instance a separate Java application is launched, with a separate GUI, to provide the extended functionality.

By convention, if a profile has a hep file with the same name, then the helper file will be loaded when the profile is loaded. For example, the SysML.sbs has a SysML.hep file in the same folder. Another way to get a helper file to load is using the General::Model::HelpersFile property.


That said, associating a .hep file with a profile is often the best way because you can bring in other extensions at the same time, such as stereotypes, tags, and Rhapsody properties or property files.












This Create Use Case package structure command is an example from a profile that I wrote called the ExecutableMBSEProfile (which is one of the optional profiles in my open source SysMLHelper project). It adds menus to accelerate an MBSE method based on use case analysis to define system requirements



As well as creating the model structure, it also creates to triggers in Rhapsody. For example, automatically moving requirements created in the use case diagrams package into a separate requirements package.









Finally, there are other properties that can be used to associated .hep files with models or profiles. If you have more than one .hep file that you want your profile to load then you could use the General::Model::AdditionalHelperFiles property.



No comments:

Post a Comment