Manage Tags
In a project, declare tags using the Rules language.
There is no special place for tag declaration, you can put them in any rule file (with extension .cr
) and you can distribute them across multiple files as long as all those files are then imported in a main file with the IMPORT
statement.
For example the config.cr
is suggested, because it's the place where Studio also puts the declaration of sample templates and fields when you create a project from scratch and, by default, the main.cr
file contains an IMPORT
statement that includes it at compile time.
You can obviously delete or modify the tag declarations depending on your needs.
Classes tool window, Tags tab
Navigate tabs
- To go up and down, use the scroll-bar and keys.
- To locate tags of interest:
- Enter the search criteria in the search bar, then select Find Next .
- Review the results in the Find Results window.
- Double-click the result you are interested in to select.
- Select Reset to clear the search criteria.
- To list a subset of items:
- In the Shortlist column, check the items you want to include.
- In the toolbar, select Toggle Checked List .
- Select Uncheck All Nodes in the toolbar to restore the original view.
- To open the
config.cr
select Open Config File . - To refresh the rules and annotations counters, select Refresh counters in the toolbar.
Export tags
To export tags in a .csv
format with their number of rules, right-click in the Tags tab and select Tags Report.
In the notification in the lower right corner, select Open file to view the formatted file.
The file will be in the tags sub-folder of the reports folder in the Project tool window.
Create a rule based on the selected tag
To create a rule based on a selected tag, right-click it and select Create rule. A tag-based rule structure will appear in the editor.