Flex Code Metrics Explorer
The Enterprise IDE Plugin provides code metrics for a Flex project. The metrics are displayed in the
Flex Code Metrics Explorer window and are calculated by project, by package,
by class and by function. They include the following:
- For project:
- Total number of packages
- Total number of interfaces
- Total number of classes
- Total number of FlexUnit test classes
- Total number of functions
- Average number of functions
- Average McCabe cyclomatic complexity (CCN)
- Total non commented source statements (NCSS)
- Average non commented source statements (NCSS)
- Total number of Actionscript files
- Total number of Actionscript lines of code (LOC)
- Average number of Actionscript lines of code(LOC)
- Total number of MXML files
- Total number of MXML lines of code (LOC)
- Average number of MXML lines of code (LOC)
- Configurable threshold for CCN alert highlight
- For each class in project:
- Number of functions
- Average McCabe cyclomatic complexity (CCN)
- Number of non commented source statements (NCSS)
- Average of non commented source statements (NCSS)
- Number of lines of code (LOC)
- Average lines of code(LOC)
- Configurable threshold for CCN alert highlight
- For each function in class:
- McCabe cyclomatic complexity (CCN)
- Number of non commented source statements (NCSS)
- Number of lines of code (LOC)
- Configurable threshold for CCN alert highlight
Usage
Select Enterprise IDE > Display Flex Code Metrics Explorer in the top menu or right click on a project
node in the Package Explorer View tree and choose Display Flex Code Metrics Explorer in the context menu.
If a flex project is not active a Flex project selection dialog will be displayed. Then the Flex Code Metrics Explorer window will
appear. The metrics explorer contains tabs for project metrics overview and details. The detailed
metrics tab displays a metrics tree table with a flat representation of all the project packages
(expandable to classes and functions) with fully qualified names.
Use tabs to select project metrics overview or details. Right click on a class row on details table for menu to go to class
source. If a function exceeds the CCN threshold defined in the Enterprise Flex preference page the
function, containing class and containing packages are highlighted in red as an alert.

- Code metrics overview tab

- Code metrics details tab
