Creating & Editing Mappings (GUI)
The mapping editor lets you create, load, and modify mapping rules in a graphical interface. It is accessible from the Import window by clicking the Mapping Rules button.
Editor Layout
The mapping editor window ("Import Mapping Rules", 900×600) contains four areas:
- Header: "Configure Import Path Mapping Rules"
- Mapping File selection: Shows the currently loaded file name. Offers Browse, Create New, or Unload buttons depending on state.
- Tab control: Two tabs — Registry Mappings and File Mappings — each with a DataGrid and rule management buttons
- Footer: Save (with unsaved changes indicator) and Close buttons
Managing the Mapping File
When no mapping file is loaded, you have two options:
| Button | Action |
|---|---|
| Browse… | Opens a file dialog (filter: *.xml) to select an existing mapping file. Default directory: the Mappings folder. The file is validated against the XSD schema and its rules are loaded into the editor. |
| Create New… | Opens a save dialog to create a new, empty mapping file (default name: mappings.xml). The file is saved immediately with empty RegistryMappings and FileMappings sections. |
When a mapping file is loaded, the Browse and Create New buttons are hidden and replaced by:
| Button | Action |
|---|---|
| Unload | Removes the current mapping file from the session. The import will proceed without mappings until a new file is loaded. The file itself is not deleted. |
The file selection is session-only — it is not persisted between sessions. You must select the mapping file each time you open the Import window.
Editing Rules
Each tab (Registry Mappings and File Mappings) contains a DataGrid with three columns:
| Column | Description |
|---|---|
| Enabled | Checkbox to activate or deactivate the rule. A rule with an empty pattern cannot be enabled — the checkbox is grayed out. |
| Pattern (String or Regex) | The text to search for. Editable directly in the grid. Clearing the pattern automatically disables the rule. |
| Replacement (String) | The replacement text. May contain environment variables (%USERNAME%, etc.). |
The tab header shows the rule count: "Registry Mappings (3)" or "File Mappings (2)".
A description above each grid explains: "Define regex patterns to transform registry key paths / file and folder paths during import. Rules are applied sequentially from top to bottom."
Rule Management Buttons
Below each DataGrid, a toolbar provides these actions:
| Button | Action |
|---|---|
| Add Rule | Adds a new empty rule at the bottom of the list. The rule is disabled by default (empty pattern). |
| Remove | Deletes the currently selected rule. Only enabled when a rule is selected. |
| Move Up | Moves the selected rule one position up (higher priority). Rules are applied top-to-bottom, so earlier rules run first. |
| Move Down | Moves the selected rule one position down (lower priority). |
| Select All | Enables all rules in the current tab |
| Deselect All | Disables all rules in the current tab |
All rule management buttons are disabled when no mapping file is loaded, and in test mode the entire editor is read-only.
Saving
The Save button is enabled only when there are unsaved changes. When changes exist:
- The button text changes to indicate unsaved state (bold, highlighted background)
- All rules are validated before saving (e.g. regex pattern syntax)
- The file is written to disk and re-validated against the XSD schema
- The mapping state is updated in the runtime service
Any of these actions mark the editor as having unsaved changes: adding, removing, reordering, or editing a rule's pattern, replacement, type, or enabled state.
Test Mode
In test mode, the mapping editor is read-only. You can view existing rules but cannot add, remove, edit, or save changes. The Create New button is also disabled.
See Also
- Mapping — Overview and XML format
- How Mapping Rules Work — Rule application logic and normalization
- Mapping Rule Examples — Ready-to-use rules for common scenarios
- Running a Simulation — Test your rules before importing