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:
- Unzip the contents of the attachment to a preferred location
- Modify the 'Test.hep' file and update the JavaClassPath accordingly
- Open Rational Rhapsody and load your project
- Modify the property General::Model::HelpersFile to point to the Test.hep file
- Save and re-open your project
- You should find a DropDownMenuDemoHelper entry in the Tools menu. This can be used to invoke the GUI.
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21472423