Insert rule labels
Labels help identify categorization and extraction rules when looking at the structure of a rules file in the Structure tool window or when examining analysis results in the Categorization and in the Extraction tool windows.
Labels can be added by hand in square brackets ([]
). As an alternative, a command exist to assign semi-random, auto-generated labels to all the rules defined in a file.
To add auto-generated labels for the current file:
-
Right-click anywhere in the text of the rule file and select Insert Rule Labels.
-
In the dialog, select the scope. You can select:
- The file in the editor.
Or:
- All your rule files.
-
Select a labeling strategy in Strategy:
-
Select Overwrite all rule labels to overwrite your previously created labels.
Or, vice versa:
-
Select Preserve existing rule labels.
-
-
Select the labeling pattern from the Template drop-down menu. You can select:
- Project + Random chars + Counter: project name plus random alphanumeric characters plus a rule counter.
- Module + Random chars + Counter: module name plus random alphanumeric characters plus a rule counter.
- File + Random chars + Counter: file name plus random alphanumeric characters plus a rule counter.
- Custom Prefix + Random chars + Counter: custom label plus random alphanumeric characters plus a rule counter.
-
If you choose Custom Prefix + Random chars + Counter, type a label in Custom prefix.
- Select OK or press
Enter
.
Each element of the rule label is separated by underscores (_
). They also replace blank spaces in case your custom prefix is made of separated words.
The format of the labels can also be customized through the Studio configuration properties.
Tip
The Insert Rule Labels command is like other editing commands, so its effects can be reverted using the undo command.
You are free to change auto-generated labels at will.