Skip to content

DelvalletQuentin/CodeToPic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeToPic

School project. Code smells visualizer.

Visualization example

This is the generated code smell visualization for this projet.

Visualization example

This is a png, you can click on the picture to access the svg file.

How does it work?

Given a project path, our code in hierarchyView.visitors takes advantage of Javaparser to analyse java code. We search for some code smells and compile the metrics into objects representing classes and methods.

From that, we use the Apache Batik library to create svg elements for each classes and methods. Then, we put them in place so it represents the project.

You can run it with the jar file, the command is: java -jar CodeToPic.jar sourceFile destinationFolder

Circles, colors, what does it means?

The generated circles are simple.

  • White-filled circles with black stroke are the package in your project.
  • Colored circles within packages are classes.
  • Colored circles within classes are constructors and methods.

About the color, green means good, red is bad smell.

For methods, the fill color represents the Cyclomatic Complexity and the stroke color the parameter list. For classes, it's an average of methods' data.

The size for everything represents the number of line of code, the bigger the circle, the bigger the package/class/method.

About

Easy to use code smell visualization tool

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages