IntelliJ plugin for KStateMachine — visualize and navigate state machines straight from your source.
💾 Install · ✨ Features · 🗺️ Roadmap · 🏗️ Build · 💬 Discussions
KStateMachine Visual is the IDE plugin for the KStateMachine Kotlin library.
It statically analyzes your Kotlin source — including if / when branches that the runtime PlantUML export cannot
see — and shows every state machine in the current file as both a navigable tree and a rendered UML state diagram.
Click any tree node to jump to its declaration; move the editor caret and the tree selection follows. Gutter icons mark
every createStateMachine / state / transition call. The diagram updates live as you type, and the PlantUML source
can be copied or exported as SVG.
Note
Early development — feedback on real-world DSL usage especially welcome.
- Recursive parsing of nested DSL — any depth, including states inside
if/whenbranches - Tree view with per-kind icons (initial, final, choice, history, data, mutable data, parallel, …)
- Bidirectional editor ↔ tree navigation
- Rendered PlantUML & Mermaid state diagram in-panel (JS layout — no Graphviz needed)
- Editable Playground tab for ad-hoc PlantUML (e.g. runtime exports)
- Editor gutter icons next to every KStateMachine DSL call
- Live, debounced refresh while typing
- Copy PlantUML source / Export diagram as SVG
From Marketplace — Settings → Plugins → Marketplace → search "KStateMachine Visual", or open the plugin page and click * Install*.
Manual — download the .zip
from Releases and use
Settings → Plugins → ⚙️ → Install plugin from disk….
Compatibility: IntelliJ Platform 2026.1+ (Community or Ultimate), bundled Kotlin + Java plugins required.
Planned
- Project-wide tab listing every machine across the project
- Rename refactoring of state names via the tree
- Inspection: unreachable states and missing initial states
- Open generated PlantUML in browser (kroki.io / plantuml.com)
- In-editor preview balloon anchored to the machine
./gradlew buildPlugin # marketplace-ready ZIP in build/distributions/
./gradlew runIde # launch sandbox IDE with the plugin loaded
./gradlew verifyPlugin # check against IntelliJ guidelinesPRs and issues welcome. Reports with a minimal reproducible DSL snippet are the most actionable.
| Channel | Best for |
|---|---|
Slack #kstatemachine |
Quick questions |
| GitHub Issues | Bug reports, features |
| GitHub Discussions | Longer-form questions |
| KStateMachine library | Questions about the library |
Licensed under the MIT License