Sonargraph User Manual

Version 9.10.0


Table of Contents
1. Sonargraph's Next Generation - Sonargraph 9
2. Licensing
2.1. Getting an Activation Code or a License
2.2. Activation Code Based Licensing
2.3. Proxy Settings
2.4. License Server Settings
3. Getting Started
3.1. Installation and Updates
3.2. Help
3.3. Editor Preferences
3.4. License Server Preferences
3.5. Proxy Preferences
3.6. Update Site Preferences
3.7. C/C++ Compiler Definitions
3.7.1. Failed Generated Compiler Definitions
3.8. C# Configuration
3.8.1. C# Build Executor Configuration
3.9. Search Path Configuration
3.10. Python Configuration
4. Getting Familiar with the Sonargraph System Model
4.1. Physical File Structure
4.2. Language Independent Model
4.3. Language Specific Models
4.3.1. Java Model
4.3.2. C++ Model
4.3.3. C# Model
4.3.4. Python Model
4.4. Logical Models
4.4.1. System-Based Logical Model
4.4.2. Module-Based Logical Model
5. Creating a System
5.1. Quality Model
5.1.1. Importing a Quality Model
5.1.2. Exporting a Quality Model
6. Adding Content to a System
6.1. Creating or Importing a Java Module
6.1.1. Importing Java Modules Using an Eclipse Workspace
6.1.2. Importing Java Modules from IntelliJ
6.1.3. Importing Java Modules from Maven POM File
6.1.4. Creating a Java Module Manually
6.2. Creating or Importing a C++ Module
6.2.1. Importing C++ Modules from Visual Studio 2010 Files
6.2.2. Importing C++ Modules Using Make Command Capturing Files
6.2.3. Creating a C++ Module Manually
6.3. Creating or Importing a C# Module
6.3.1. Importing C# Modules Using a Visual Studio Project File
6.3.2. Importing C# Modules Using a Visual Studio Solution File
6.3.3. Creating a C# Module Manually
6.3.4. C# Module Configuration
7. Interacting with a System
7.1. User Interface Components
7.1.1. Menu Bar
7.1.2. Tool Bar
7.1.3. Notifications Bar
7.2. Common Interaction Patterns
7.2.1. Special Graphic Elements Decorations
7.3. Sonargraph Workbench
7.4. Navigating through the System Components
7.5. Exploring the System Namespaces
7.6. Managing the System Files
7.7. Managing the Workspace
7.7.1. Definition of Filters, Modules and Root Directories
7.7.2. Managing Module Dependencies
7.7.3. Creating Workspace Profiles for Build Environments
7.8. Analyzer Execution Level
7.9. Analyzing Cycles
7.9.1. Revising Cycle Groups
7.9.2. Inspecting Cyclic Elements
7.9.3. Breaking Up Cycles
7.10. Exploring the System
7.10.1. Concepts for System Exploration
7.10.2. Tree Based System Exploration
7.10.3. Graph Based System Exploration
7.10.4. Tabular System Exploration
7.11. Searching Elements
7.11.1. Searching Elements in Views
7.12. Detecting Duplicate Code
7.12.1. Configuration of Duplicate Code Blocks Computation
7.13. Examining the Source Code
7.13.1. Interaction with Auxiliary Views
7.14. Examining Metrics Results
7.15. Analyzing C++ Include Dependencies
7.16. Creating a Report
8. Handling Detected Issues
8.1. Using Virtual Models for Resolutions
8.2. Examining Issues
8.3. Ignoring Issues
8.4. Defining Fix And TODO Tasks
8.5. Editing Resolutions
9. Simulating Refactorings
9.1. Creating Delete Refactorings
9.2. Creating Move/Rename Refactorings
9.3. Managing Refactorings
9.4. Best Practices
10. Defining an Architecture
10.1. Models, Components and Artifacts
10.1.1. Using other criteria to assign components to artifacts
10.1.2. List of predefined attribute retrievers
10.2. Interfaces and Connectors
10.3. Creating Architectural Aspects
10.4. Extending Aspect Based Artifacts
10.5. Extending Interfaces or Connectors
10.6. Adding Transitive Connections
10.7. Restricting Dependency Types
10.8. Connecting Complex Artifacts
10.9. Introducing Connection Schemes
10.10. Artifact Classes
10.11. How to Organize your Code
10.12. Designing Generic Architectures Using Templates
10.12.1. Using unrestricted generated artifacts
10.12.2. Using connection schemes to regulate accessibility
10.13. Best Practices
10.14. Architecture DSL Language Specification
11. Interactive Restructuring and Code Organization
11.1. Architectural View
12. Extending the Static Analysis
12.1. Interaction with Auxiliary Views
12.2. Groovy Scripts From Quality Model
12.3. Creating a new Groovy Script
12.3.1. Default Parameters in a Script
12.3.2. Adding Parameters
12.3.3. Creating Run Configurations
12.4. Editing a Groovy Script
12.4.1. Auto Completion
12.4.2. Compiling a Groovy Script
12.5. Producing Results with Groovy Scripts
12.6. Running a Groovy Script Automatically
12.7. Managing Groovy Scripts
12.8. Groovy Script Best Practices
12.8.1. Only Visit What is Needed
12.8.2. Find Text in Code
13. Reporting Changes
14. Using Additional Plugins
14.1. Swagger Plugin
15. Build Server Integration
16. IDE Integration
16.1. Eclipse Plugin
16.1.1. Assigning a System
16.1.2. Displaying Issues and Tasks
16.1.3. Suspending / Resuming Quality Monitoring
16.1.4. Setting Analyzer Execution Level
16.1.5. Getting Back In Sync with Manual Refresh
16.1.6. Execute Refactorings in Eclipse
16.2. IntelliJ Plugin
16.2.1. Assigning a System
16.2.2. Displaying Issues and Tasks
16.2.3. Toolbar
16.2.4. Getting Back In Sync with Manual Refresh
16.2.5. Execute Refactorings in IntelliJ
17. Metric Definitions
17.1. Language Independent Metrics
17.2. Java Metrics
17.3. C# Metrics
17.4. C/C++ Metrics
17.5. Python Metrics
18. How to Resolve Issues
18.1. Language Independent Issues
18.2. Java Specific Issues
18.3. C# Specific Issues
18.4. C/C++ Specific Issues
19. FAQ
19.1. Out Of Memory Exceptions
19.2. Groovy Template
19.3. MSBuild Error (MSB4019) during Analysis of Visual Studio C# Project
20. References
21. Trademark Attributions, Library License Texts, and Source Code
22. Legal Notice
Glossary
1. Walk Through Tutorial (Java)
1.1. Workspace Definition
1.2. Basic Analysis
1.3. Advanced Analysis
1.4. Architecture: Artifacts, Templates and Standard Connections
1.5. Architecture: Explicit Interfaces and Connectors
1.6. Architecture: Advanced Connections
1.7. Architecture: Advanced Templating
1.8. Architecture: Referencing external Artifacts in Templates
1.9. Headless Check with Sonargraph Build
1.10. Check at Development Time with Sonargraph Eclipse Integration
2. Tutorial - Java
2.1. Setup the Software System
2.1.1. Create a new Software System
2.1.2. Define the Workspace
2.1.3. Define Module Dependencies
2.1.4. Parse the Workspace
2.2. Initial Analysis
2.2.1. Detect Problems Using Standard Metrics
2.2.2. Adjust Metric Thresholds
2.3. Problem Analysis
2.3.1. Examine Cycles
2.3.2. Examine Duplicate Code
2.3.3. Handle Issues
2.4. Detailed Dependency Analysis
2.4.1. Explore Dependencies
2.4.2. Check how Elements are Connected via Graph View
2.4.3. Check how Elements are Connected via the Dependencies View
2.4.4. Search for Elements
2.5. Advanced Analysis With Scripts
2.5.1. Create a New Script
2.5.2. Execute Existing Script
2.6. Share Results
2.6.1. Work with Snapshots
2.6.2. Define Quality Standards using Quality Models
2.6.3. Export to Excel
3. Tutorial - C#
3.1. Setup the Software System
3.2. Further Steps
4. Tutorial - C++
4.1. Setup the Software System - Compiler Definitions
4.2. Setup the Software System - Makefile Capturing
4.3. Setup the Software System - Visual Studio Import
4.4. Further Steps
5. Sonargraph Script API Documentation
Index
List of Figures
1.1. Sonargraph Products
3.1. Editor Preferences
3.2. License Server Preferences
3.3. Proxy Preferences
3.4. Update Site Preferences
3.5. C++ Compiler Definition
3.6. C# Profiles Configuration
3.7. C# Build Executor
3.8. Search Path Configuration
4.1. Physical File Structure
4.2. System Domain Model
4.3. Java Domain Model
4.4. C++ Domain Model
4.5. C# Domain Model
4.6. Physical Namespaces
4.7. Logical Namespaces
4.8. System-Based Logical Model
4.9. Module-based Logical Model
5.1. Marking root directories from JSON file
5.2. Naming modules for root directories from JSON file
5.3. New System with Quality Model
5.4. Import Quality Model
5.5. Export Quality Model
6.1. Importing Java Modules Using an Eclipse workspace
6.2. Importing Java Modules from IntelliJ
6.3. Importing Java Maven Modules
6.4. Manage Root Directory Path
6.5. Create C/C++ System Based on Solution File Import
6.6. Choosing C++ Modules to Import from Capturing Files
6.7. Renaming and Configuring C++ Modules to Import from Capturing Files
6.8. C++ Manual Module Configuration
6.9. Missing C# Assemblies
6.10. C# Module Configuration
6.11. Locate Missing C# Assemblies
7.1. Tool Bar
7.2. Notifications Bar
7.3. Sonargraph Workbench
7.4. Navigation View
7.5. Namespaces View
7.6. Logical Model Selection
7.7. Files View
7.8. Workspace View
7.9. Defining a Manual Workspace Dependency
7.10. Defining a Manual Workspace Dependency
7.11. Creating Workspace Profile
7.12. Analyzers View
7.13. Cycle Groups View
7.14. Cycle View
7.15. Cycle Break Up View
7.16. Quick View Creation
7.17. Quick View Creation
7.18. Focus Toolbar
7.19. Focus Dropdown Menu
7.20. Advanced Focus Dialog
7.21. Semantics of Colors
7.22. Architecture Independent Dependencies
7.23. Exploration View
7.24. Before and After Drilldown
7.25. Sample Exploration view
7.26. Extend Focus Menu
7.27. Extend Focus Result
7.28. Sample Exploration view
7.29. Extend Focus Menu
7.30. Underlying Parser Dependencies for Arc
7.31. Incoming and Outgoing Parser Dependencies
7.32. View option synchronization
7.33. Expand Dependency to Component Level
7.34. Context Menu Interactions
7.35. View Options
7.36. Graph View
7.37. Levels in Graph View
7.38. On Demand Cycle Groups
7.39. On Demand Cycle Groups
7.40. Underlying Parser Dependencies for Edge
7.41. Incoming and Outgoing Parser Dependencies
7.42. View option synchronization
7.43. Context Menu Interactions
7.44. Show Type-based Graph view
7.45. Type-based Graph
7.46. View Options
7.47. Dependencies View
7.48. Drilling Down Dependencies
7.49. Interaction with Auxiliary Views
7.50. Context Menu Interactions
7.51. Standard Search Dialog
7.52. Search Dialog to Locate Members
7.53. Text Search in Views
7.54. Duplicate Blocks View
7.55. Duplicates Source View
7.56. Source View
7.57. Hyperlinking and Find Text Features in Source View
7.58. Show Only Violations
7.59. Metrics View
7.60. Metrics Histogram
7.61. Element Metrics View
7.62. Metric Thresholds Configuration
7.63. C++ Include Dependency View
7.64. Table Filter Options in HTML Report
8.1. Virtual Models
8.2. Issues View
8.3. Filter Issues
8.4. Ignore View
8.5. Resolution Dialog
9.1. Refactorings View
10.1. Architecture View
10.2. Architecture of the order management micro service
10.3. Layering of a subsystem
11.1. Architectural view
11.2. Architectural view without selection
11.3. Architectural view with selection
12.1. Script View
12.2. Quality Model
12.3. New Script
12.4. Parameter Definition
12.5. Parameter Usage in Script
12.6. Create Run Configuration
12.7. Auto Completion
12.8. Script View Marker
12.9. Script View Marker Tooltip
12.10. Script View Elements Tab
12.11. Script View Tree Tab
12.12. Script View Issues Preview
12.13. Script View Metrics Preview
12.14. Script Runner
14.1. Plugin Manager Preference Page
14.2. Sonargraph Plugin Repository
14.3. Swagger Plugin Webservices
14.4. Swagger Plugin Issues
14.5. Swagger Plugin External
16.1. Open Sonargraph System
16.2. Show Issues in Problems View
16.3. Problems View Configuration for Sonargraph Issues
16.4. Context Menu To Open Sonargraph Cycle Groups View
16.5. Open Sonargraph System
16.6. Sonargraph Tool Window
2.1. New Manual System Wizard
2.2. Root Directories Dialog
2.3. Workspace View
2.4. Workspace View After Parsing
2.5. Metrics View
2.6. Metrics View Highlighting Thresholds Violations
2.7. Filter Issues
2.8. Cycle Groups View
2.9. Cycle View
2.10. Duplicate Code Blocks View
2.11. Duplicate Source View
2.12. Add TODO Issue
2.13. Resolutions View
2.14. Open in Exploration View
2.15. Exploration View Drilldown
2.16. Exploration View Interactions
2.17. Graph View
2.18. Graph View Interactions
2.19. Dependencies View
2.20. Create a New Script
2.21. Execute a Script
2.22. Export Metrics to Excel Context Menu
3.1. System based on C# Visual Studio Solution File
3.2. Select C# Solution File, Configuration and Platform
3.3. Select C# Solution File, Configuration and Platform
4.1. Select C++ Modules to Import from Capturing Files
4.2. Renaming and Configuring C++ Modules to Import from Capturing Files
4.3. Specify Visual Studio Solution File
4.4. MSBuild Exception
4.5. Parse Error (Missing Header File)