Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "MDT/Papyrus/UserGuide/Search"

< MDT‎ | Papyrus
(add category)
 
Line 1: Line 1:
 
In this documentation, we will use two different UML models to illustrate the search features.  
 
In this documentation, we will use two different UML models to illustrate the search features.  
  
Model 1:
+
Model 1:  
  
[[image:search-model1.png]]
+
[[Image:Search-model1.png]]  
  
Model 2 :
+
Model 2&nbsp;:  
  
[[image:search-model2.png]]
+
[[Image:Search-model2.png]]  
 +
 
 +
= Search elements =
  
=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 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 search dialog is illustrated in the following image:  
  
[[image:papyrus-search.png]]  
+
[[Image:Papyrus-search.png]]  
  
* The user can specify the string pattern he/she is looking for in the A area.  
+
*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.  
+
**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 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.  
+
*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
+
*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.  
+
*If button in area D is check, string attributes of stereotypes applied to model elements will be analyzed too.
  
 
For instance, the following search:  
 
For instance, the following search:  
  
[[image:C-search.png]]
+
[[Image:C-search.png]]  
  
 
will provide the following results:  
 
will provide the following results:  
  
[[image:C-result.png]]
+
[[Image:C-result.png]]  
  
 
Note that the comment is not returned because we were note looking for all string attributes.  
 
Note that the comment is not returned because we were note looking for all string attributes.  
  
However, this search:
+
However, this search:  
  
[[image:comment-search.png]]
+
[[Image:Comment-search.png]]  
  
will return :  
+
will return&nbsp;:  
  
[[image:comment-result.png]]
+
[[Image:Comment-result.png]]  
  
 +
<br>
  
=Replace String=
+
= 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:
+
  
[[Image:replace.png]]
+
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:
 +
 
 +
[[Image:Replace.png]]  
  
 
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.  
 
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.  
  
=Filter=
+
= Filter =
The user can filter the results of the search by selecting the types of the elements he/she wants to show.
+
 
 +
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:  
 
For instance, on the following search:  
  
[[image:my-search.png]]
+
[[Image:My-search.png]]  
  
 
the user may filter the results by clicking on the icon identified in a red rectangle in the following picture:  
 
the user may filter the results by clicking on the icon identified in a red rectangle in the following picture:  
  
[[image:My-results.png]]
+
[[Image:My-results.png]]  
  
 
this will open a new dialog where the user can select the metaclasses he/she want to show:  
 
this will open a new dialog where the user can select the metaclasses he/she want to show:  
  
[[image:filter.png]]
+
[[Image:Filter.png]]  
  
 
then, the result page will show only the matches of the selected type:  
 
then, the result page will show only the matches of the selected type:  
  
[[image:my-filtered.png]]
+
[[Image:My-filtered.png]]  
  
 
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:  
 
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:  
  
[[image:select-filters.png]]
+
[[Image:Select-filters.png]]  
  
 
----
 
----
This work is developed by [http://www-list.cea.fr CEA LIST] and sponsored by [http://www.ericsson.com Ericsson] in the context of Polarsys [http://wiki.eclipse.org/Polarsys]
+
 
 +
This work is developed by [http://www-list.cea.fr CEA LIST] and sponsored by [http://www.ericsson.com Ericsson] in the context of Polarsys [http://wiki.eclipse.org/Polarsys]
 +
 
 +
[[Category:Papyrus]]

Latest revision as of 13:33, 26 February 2013

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

Model 1:

Search-model1.png

Model 2 :

Search-model2.png

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:

Papyrus-search.png

  • 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:

C-search.png

will provide the following results:

C-result.png

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

However, this search:

Comment-search.png

will return :

Comment-result.png


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:

Replace.png

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.

Filter

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:

My-search.png

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

My-results.png

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

Filter.png

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

My-filtered.png

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:

Select-filters.png


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

Back to the top