To understand the types of information that must be included for plug-ins in .hep files, it is best to start with the issue of what types of elements can be described in .hep files.
.hep files are used to describe the following items:
While these items differ from one another, they use the same .hep file entries to provide Rational Rhapsody with the required information.
Helpers are also used to extend the capabilities in the product, but they use a different mechanism than plug-ins. Helpers are stand-alone applications. Plug-ins use the callback mechanism to respond to events.
Plug-in commands describe menu items that Rational Rhapsody adds to allow you to open a certain plug-in.
For plug-ins, the .hep file must contain the following information:
The best way to describe the required syntax for the .hep file is to look at an example.
[Helpers]
Category for the entries that follow
numberOfElements=2
Number of plug-ins/helpers described in the file
name1=Diagram Formatter
The name that is displayed on the Tools menu (if isVisible is set to 1)
JavaMainClass1=JavaPlugin.PluginMainClass
The Java class containing the plug-in code
JavaClassPath1=$OMROOT\..\Samples\JavaAPI Samples\Plug-in
Path for locating the Java classes required by the plug-in. Keep in mind that if .jar files are used, the classpath must include the names of the .jar files.
isPlugin1=1
Indicates the item is a plug-in (as opposed to a helper, which is the default, or a "plug-in command")
isVisible1=1
Indicates that the name must be displayed in the Tools menu.
The entries below describe a "plug-in command"
name2=Format Diagram
The text that is displayed in the context menu
isPluginCommand2=1
Indicates a plug-in command (as opposed to a helper or plug-in)
command2=Diagram Formatter
The name of the plug-in opened by this context menu item
applicableTo2=ObjectModelDiagram
Indicates the context to which the menu is added. In this case, when you right-click an OMD in the browser, you see the option "Format Diagram."
isVisible2=1
Indicates that the menu item must be displayed
If you would like to see another sample
.hep file, look at the .hep file for the plug-in sample included with <Rational
Rhapsody installation path>\Samples\ExtensibilitySamples\
Simple Plug-in\SimplePluginProfile.hep).