「VisualStudioCode/PlantUML」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→PlantUMLのプラグイン) |
(→PlantUMLのプラグイン) |
||
| 行14: | 行14: | ||
- void Attack() | - void Attack() | ||
} | } | ||
| + | @enduml | ||
| + | </pre> | ||
| + | |||
| + | 関連系 | ||
| + | <pre> | ||
| + | @startuml | ||
| + | Cat --|> Animal : 継承 | ||
| + | Wheel "4" --* "1" Car : コンポジション | ||
| + | Employee "many" --o "1" Company : 集約 | ||
| + | Car -- VehicleInspection : 関連 | ||
| + | UseCase ..|> IUseCase: 実現 | ||
| + | Runner ..> Marathon : 依存 | ||
| + | |||
| + | interface IUseCase | ||
| + | abstract class Human | ||
@enduml | @enduml | ||
</pre> | </pre> | ||
参考:https://gist.github.com/yoggy/bd68b3f1f55dbd742bea71424ca66564 | 参考:https://gist.github.com/yoggy/bd68b3f1f55dbd742bea71424ca66564 | ||
2023年12月6日 (水) 13:13時点における版
PlantUMLのプラグイン
- DL(https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml)
- Installボタンを押す
- codeエディタでクラス図を記述
- code上プレビューするoption+d
クラス図
@startuml
class Enemy {
+ string type
~ string name
# void SayHello()
- void Attack()
}
@enduml
関連系
@startuml Cat --|> Animal : 継承 Wheel "4" --* "1" Car : コンポジション Employee "many" --o "1" Company : 集約 Car -- VehicleInspection : 関連 UseCase ..|> IUseCase: 実現 Runner ..> Marathon : 依存 interface IUseCase abstract class Human @enduml
参考:https://gist.github.com/yoggy/bd68b3f1f55dbd742bea71424ca66564
