MarcoEidinger / SwiftPlantUML

A command-line tool and Swift Package for generating class diagrams powered by PlantUML

Home Page:https://marcoeidinger.github.io/SwiftPlantUML/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can this be used to create a call graph?

Shasoosh opened this issue · comments

Hello,

I'm seeking a method to visualize all the classes in my project but also identify dependencies \ relationship. (basically which class calls another.)

Is it possible to achieve this with the tool?
For example, scanning Car.swift will produce something similar to

+-------------------+        +-------------------+       +----------------------+
|   Music           |  <--   |   Car             | -->   |   Engine             |
+-------------------+        +-------------------+       +----------------------+
| + startMusic()    |        | + startCar()      |       | + startEngine()      |
+-------------------+        +-------------------+       +----------------------+
class Car {
    static func startCar() {
        print("Car started")
        Engine.startEngine()
        Music.startMusic()
    }
}
class Music {
    static func startMusic() {
        print("Music started")
    }
}
class Engine {
    static func startEngine() {
        print("Engine started")
    }
}