Skip to content

Feature: PlantUML Generator

Madeline Kahn edited this page Apr 14, 2024 · 1 revision
  • Name: "plantUMLGenerator"
  • Default: Disabled

Configuration

Name Type Description
.pumlOutputPath String Specifies the path for the output .puml file. Defaults to pumlGen.puml (in the root of the directory)
.svgOutputPath String Specifies the path for the output .svg file. Defaults to svgGen.puml (in the root of the directory)

Description

Outputs 2 files, the .puml for plantUML code and the .svg exported from that. Creates 1 message, either an info message saying that the files were outputted, or an error message, if there was an error. First, the algorithm creates a package structure to organize all the classes into packages, so you do not have to go back and insert a class into a package already existing in the PlantUML Code. Then it iterates through all packages and their classes, putting the corresponding plantuml code into a StringBuilder. For each class, it iterates through its fields and methods, appending the corresponding PlantUML code. After that is when the code creates all the arrows, which are just done by checking the weights for every edge on the graph. There are a few things not supported and a few bugs with it:

  • Exceptions, Inner classes, and Generic/Parameterized classes are not supported.
  • All (I think) Abstract methods do not have Parameter names, only types.
  • Some Enum Methods also have this.
  • There are some Type Parameters missing, I'm not really sure why or what the pattern is.
  • Some Method return values were entirely missing, but this may have been fixed.
  • All 3 test directories did not have either of these issues, they only appeared in a couple places when I ran the code on the project bytecode itself.

GeneratedUMLDiagram.puml Contains the plantUML code generated for this project (or a version of it, I'm not sure if it will be the latest version by the time this is turned in).