IBM Support

How to create Graphical User Interface(GUI) for a Plug-in using Rational Rhapsody API

Question & Answer


Question

How do you create Graphical User Interface(GUI) for a Plug-in using IBM Rational Rhapsody API?

Cause

You would like to use Application Programming Interfaces [API] code to automate the manual task to be performed with in Rational Rhapsody.

Answer

Currently, Rational Rhapsody APIs do not provide any specific API calls to create GUI elements. However, you can use the native Java API calls to fulfill the above requirement.

Attached is a sample 'DropDownMenuDemo' application [DropDownMenuDemo.zip]. The attached zip contains the code files [main.java and DropDownMenuDemo.java], the class files [main.class and DropDownMenuDemo.class] and a helper file [Test.hep] to initialize the plug-in Rational Rhapsody.

Apply the steps below in order to create the GUI:

  1. Unzip the contents of the attachment to a preferred location

  2. Modify the 'Test.hep' file and update the JavaClassPath accordingly

  3. Open Rational Rhapsody and load your project

  4. Modify the property General::Model::HelpersFile to point to the Test.hep file

  5. Save and re-open your project

  6. You should find a DropDownMenuDemoHelper entry in the Tools menu. This can be used to invoke the GUI.

Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.


DropDownMenuDemo.zipDropDownMenuDemo.zip
Drop Down Memu Demo (zip)

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5;7.5.0.1;7.5.1;7.5.1.1;7.5.2;7.5.2.1;7.5.3;7.5.3.1;7.5.3.2;7.6;7.6.0.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21472423