Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search


< MDT‎ | Papyrus

In this documentation, we will use two different UML models to illustrate the search features.

Model 1:


Model 2 :


Search elements

The search feature of Papyrus helps the user to find elements in the models using a string pattern. It is able to search in string attributes of model elements.

The search dialog is illustrated in the following image:


  • The user can specify the string pattern he/she is looking for in the A area.
    • Check the "Case sensitive" if case must be considered.
    • The user may also want to use regular expression to express the query. Then check "Regular expression" button. The regular expression must respect Java Regex
  • The user can filter the types of elements to search the string pattern in by selecting the metaclasses in area B whose instances will be analyzed.
  • By default, the search feature will only search in the name attribute of instances of UML::NamedElement. By checking the button in area C, all string attributes will be analyzed
  • If button in area D is check, string attributes of stereotypes applied to model elements will be analyzed too.

For instance, the following search:


will provide the following results:


Note that the comment is not returned because we were note looking for all string attributes.

However, this search:


will return :


Replace String

Should the user want to replace the matches of your search with another string, he/she may click on the "Replace" button in the search dialog. A new dialog will popup:


As mentioned on the dialog, the replace action is mostly undoable. Matches that are found in a resource that is not opened in an editor will be replaced and will be save so that the user cannot undo the modification.


The user can filter the results of the search by selecting the types of the elements he/she wants to show.

For instance, on the following search:


the user may filter the results by clicking on the icon identified in a red rectangle in the following picture:


this will open a new dialog where the user can select the metaclasses he/she want to show:


then, the result page will show only the matches of the selected type:


If the user wants to remove this filtering, he/she may click on the Filters button as illustrated in previous picture. This will open the following dialog:


This work is developed by CEA LIST and sponsored by Ericsson in the context of Polarsys [1]

Back to the top