"Metrics" Menu
The Metrics menu offers commands for working with metrics reports and metrics templates. This menu contains LRU (Last Recently Used) lists of metrics reports and templates.
The form in which the Metrics menu is displayed changes depending on whether a metrics report has or has not been opened in the project, and on whether this report is or is not in an open window.
If there is no active metrics report, the Metrics menu looks as on the following figure:
![]()
If a metrics report is open, additional commands become available.
The real form in which this menu is displayed depends on the type of active metrics report, on its current state, and on the state of the active metrics template.
A detailed description of the commands of the metrics has been provided in the sections to follow.
New Template
Closes an active template and opens a new (empty template or template loaded from "(ProjectFilePath)\ProjectName.met" or "C:\Users\...\RistanCASE\Development Assistant for C\SM Templates\DA-C.met" ). The template is named when it is saved by means of the Metrics > Save Template and Metrics > Save Template As commands.
Open Template...
Opens the standard Windows dialog box for selecting a template file.
Save Template
Saves changes in an active, previously saved template. If the active template was created by the New Template command and still does not have a name, the Save Template command then follows the same procedure as the Save Template As command.
Save Template As...
Opens a standard Windows dialog box for entering name and saving template to file.
Last Recently Used Template List
It is displayed between the commands Save Template As and Add Report, and contains a list of up to four templates most recently used in the active project. Selecting a template from the list closes the currently active template and opens the selected template.
Add Report
Adds a new metrics report to the currently active template.
Remove Report
Removes the currently selected Metrics Report window from the currently active template.
Current Template Reports
A list of reports belonging to the currently active metrics template. This list is displayed between the commands Remove Report and Apply. Active reports (reports displayed in their respective windows) are displayed with a check mark beside their name. Placing a check mark beside the name of a report on the list opens a new window, which displays the aforementioned report, while removing the check mark closes the window of the report.
Apply
It is used for determining the object of observation of metrics reports.
This command updates all existing metrics reports within the active metrics template. On carrying out this command, newly selected objects of observation (functions and modules) appear in the metrics reports. The command can be carried out when any one of the DA-C windows is open. New objects of observation to be shown in metrics reports will be set depending on the context (on the selection or insertion point position in the open window).
The command can be carried out after creating a Metrics database for the project.
The Apply command has the same meaning as Metrics from the shortcut menu after right-clicking an object in DA-C (within Project, Editor, Browser, Graph, or Metrics windows).
If no report has been defined in the active template, once the Apply command has been carried out, a window with a new metrics report will be created. If there are any defined, but inactive, metrics reports in the active template, DA-C displays a message that the Apply command has been carried out successfully, but that no Metrics window is visible.
Construction Mode
Turns the Metrics window Construction mode on or off. The context of the metrics report is defined in Construction Mode. The metrics context consists of the level of observation (single functions, single modules, or a group - values common to the whole object viewed), the report type, a group of one or more parameters, and the type of presentation. When Construction Mode is switched on, the left pane of the Metrics window contains options for defining the context of the metrics report. For more detailed information on setting the context of the metrics report, please refer to section "Metrics Context".
Fit to Window
Switches between the two possible presentation modes of a metrics report: when the graph is displayed in its entirety, and when the graph is displayed with adjusted element size (the size of particular elements of the graph can be set in Options > Metrics. See "Source Code Metrics Options"). This command is active when the metrics report is in focus.
The Fit to Window command can be enabled only when the metrics report cannot be displayed in the Metrics Report window in its entirety.
Legend On/Off
Opens/closes the Legend window, in which explanations of individual series are displayed. This command is active when the metrics report is in focus.
Toggle Legend Place
Changes the position of the Legend window; this window can be positioned in the upper or in the lower portion of the screen. This command is active when the metrics report is in focus.
Sort
Displays Bar chart or Column chart in sorted form. A report can be sorted according to the values it displays or according to function, that is, module names displayed in the report. If a function/module name is selected when choosing the Metrics > Sort command, the report will be sorted according to name, but if a value (any of the rectangles in the graph) is selected, the report will be sorted according to displayed parameter values.
The sorting sequence can be changed from rising to falling and vice versa by activating this command consecutively.
Copyright © 1993-2022, RistanCASE PR