Replacing text in models

In UML models, you can replace all occurrences of an existing word or group of letters with different text.

For example, if you add additional information about a model element using notes or documentation, you can globally replace specific parts of the text throughout all of your models.
Note: If you do not select the Match whole word only check box below, the Find/Replace feature does not necessarily replace a complete word. For example, if you search for "on" and specify "Rational" as the replacement text, the feature replaces "portion" with "portiRational."

You must have a model open in the Modeling perspective.

To replace text in a model:

  1. Click Edit > Find/Replace.
  2. In the Find window, click Replace.
  3. In the Replace window, in the Find what field, type the text that you want to find.
  4. In the Replace with field, type the replacement text.
  5. In the Find in field, specify the model or model element in which to search.
  6. Optional: To specify replacement conditions, complete the following steps:
    • To replace only complete words, select the Match whole word only check box.
    • To search only for a model element in the model (that is, to exclude diagram elements or relationships that appear in the diagram editor), select the Do not search on diagrams check box.
    • To perform a case-sensitive search, select the Match case check box.
    • To confirm which instances you want to replace, select the Confirm replacement check box.
  7. Optional: To specify a more detailed search location, click Advanced and complete the following steps:
    • To search in only model element and diagram element names, under Fields, select the Name check box.
    • To search in only the documentation of model elements and diagram elements, under Fields, select the Documentation check box.
    • To search in specific types of model elements, under Types, select the check boxes for the appropriate model elements.
    • To search for a specific Object Constraint Language (OCL) expression, in the Additional OCL Filter field, type an OCL string.
  8. Click OK.
Related concepts
Models
Search conditions
Related tasks
Finding text in models
Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.