Question & Answer
Question
How do you name a package with spaces / slashes or dashes in IBM Rational Rhapsody?
Cause
You have a requirement to include space or dash in the package name of your model in Rational Rhapsody.
Answer
The General::Model::NamesRegExp property specifies the regular expression describing the format of a legal name of an element. You may manipulate this property to allow spaces or slashes in the name of an element.
To do this, you need to add a space after the underscore in the default value, as follows:
^(([a-zA-Z_][a-zA-Z0-9_ ]*)|(operator.+))$
Note: This change applies to all types of named elements. If you are going to generate code for the element, spaces in some element names are not allowed (for example, class names). Therefore, you would most likely use this property for elements that never participate in code generation, such as an analysis (not design) package.
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21641772