Querying model elements
Model and metamodel elements can be queried from their respective editors.
You can query these elements in different manners:
- based on a textual query, using the Search dialog
- based on the selected model element, using the contextual menu, to ask for declarations or references.
Textual Query
The Search dialog enables to find elements using a textual query.
To open the Search dialog, you may:
- use the Search button in the editor header
- use the keybindings CTRL+H or CTRL+F
The text can contain the following special characters:
*
: any string
?
: any single character
The search options are:
- Case sensitive: Find text having the given pattern of uppercase and lowercase letters.
- Whole word: Find occurrences of the text as whole words.
- Search in attribute values: Find text in values of each attribute of model elements.
- Search in reference names: Find text in the name of each reference of model elements.
Declarations and references
When a model or metamodel element is selected in the editor,
the contextual menu offers the capability to query this element:
- Declarations: iterate on the model or metamodel to look for elements having the exact same name.
- References: iterate on the model or metamodel to look for other elements that have references to this selected element.
Search results
Search results (model and metamodel elements) are displayed in standard Eclipse Search view.
Browsing a model
Browsing a metamodel