Question & Answer
Question
How do you create custom Predefined Keywords in IBM Rational Rhapsody?
Cause
IBM Rational Rhapsody has a list of predefined keywords. These are limited in both number and scope. Using a combination of the Java API and Conditional Properties you can now create an unlimited number of custom keywords, holding any value you wish and use them with any property in your project.
Answer
This profile uses the Java API to add new properties to your project with the addProperty() method. You can retrieve any information from the project model - or your system in general - using the API to populate the values of these properties. The properties can then be used as "keywords" in any other project property using the conditional syntax:
?<IsConditionalProperty>$<Subject::Metaclass::Property>
for example:
?<IsConditionalProperty>//$<Model::Metadata::ComponentName>
To install:
- Unzip the attached file to your \Share\Profiles folder. For example: C:\Rhapsody8.1.2.1\Share\Profiles\NotEnoughProperties\bin
- Open your project and add the profile.
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. |
---|
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21973545