Reverse engineering of D source code into PlantUML classes
To use this package, run the following command in your project's root directory:
Put the following dependency into your project's dependences section:
D to UML
UML diagrams can be helpful for code maintenance. But, drawing these diagrams with mouse and keyboard is a tedious task. And popular UML tools don't support reverse engineering for the D programming language.
This tool uses libdparse to parse the given D source code
and it extracts class outlines in the PlantUML language.
Not only a
class, but also a
struct, and even a
module is turned into a class outline.
A good arrangement of the classes is essential for creating effective UML diagrams. The means for tweaking the arrangement is to explicitly specify the direction of arrows: Changing arrows direction. Such an artistic design, however, is beyond the capabilities of this pragmatic tool. So, this tool does not even try to extract relations between classes.
Use dub to build the tool:
dub build --build=release
Use the tool to extract the class outlines from D source code.
./d2uml src/*.d > model/classes.plantuml
Create another file and explicitly specify the relations between the classes.
!include directive to include the generated file.
For example: model/diagram.plantuml
@startuml hide empty attributes hide empty methods !include classes.plantuml main .> Outliner ASTVisitor <|-- Outliner Outliner -> "*" Classifier Classifier --> "*" Field Classifier --> "*" Method Outliner ..> outliner @enduml
Use plantuml.jar to generate the image of the diagram:
java -jar path/to/plantuml.jar model/diagram.plantuml
Finally, have a look at the resulting image:
- Registered by Mario Kröplin
- 0.2.1 released 5 years ago
0.2.2 2018-Nov-30 0.2.1 2018-Sep-17 0.2.0 2018-Sep-04 0.1.2 2018-Aug-29 0.1.1 2018-Jun-25
- Download Stats:
0 downloads today
0 downloads this week
0 downloads this month
10 downloads total
- Short URL: