This is a demo implementation of a CodeSparks plugin for the IntelliJ IDEA that can be used as a template for further plugins. It makes use of the PMD Java API to calculate the cyclomatic complexity of Java classes and methods in the current project. Using the CodeSparks framework, the source code is augmented with interactive glyph-based visualizations that display the values of the cyclomatic complexity and an interpretation of them.
Prerequisites:
- Apache Ant (>=1.10)
- JDK 11
- IntelliJ IDEA Community Edition 2022.2.4 (or comparable)
- Specify the path to the IntelliJ IDEA installation directory in the
idea.properties
file.
To create the actual CodeSparks plugin run ant
(default target=zip
) in the terminal.
Download the the pre-built demo plugin (ZIP file from the releases section).
Or build it yourself from the sources: Download the sources and type ant
in the terminal which will run the default target zip
(see build.xml).
The ZIP file can then be installed in IntelliJ IDEA:
- File → Settings → Plugins
- Install Plugin from Disk...
- Choose Plugin File, i.e. the ZIP file created with ant or downloaded from the release section.
- OK → Apply → OK
Note, the actions of this CodeSparks plugin are added to the toolbar which might be hidden dependening on your preferences. To show the toolbar:
- View → Appearance → Toolbar
Operating systems:
- Windows 10 22H2 64-bit, Build 19045.2364
- Linux Mint 21 Vanessa 64-bit, Kernel 5.15.0-56-generic x86_64
IntelliJ IDEA versions:
- 2022.2.4 Community Edition (Build #IC-222.4459.24, built on November 22, 2022)
The CodeSparks Demo Plugin is Open Source software released under the Apache 2.0 license. Note, some parts of this software, such as the compile and runtime dependencies, may have different licenses (see NOTICE.txt).