Skip to content

KStateMachine/kstatemachine-intellij-platform-plugin

Repository files navigation

KStateMachine Visual

IntelliJ plugin for KStateMachine — visualize and navigate state machines straight from your source.


Build Version Downloads IntelliJ Platform Slack

💾 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 PNG / SVG.

Note

Early development — feedback on real-world DSL usage especially welcome.


✨ Features

  • Recursive parsing of nested DSL — any depth, including states inside if / when branches
  • Tree view with per-kind icons (initial, final, choice, history, data, mutable data, parallel, …)
  • Bidirectional editor ↔ tree navigation
  • Rendered PlantUML state diagram in-panel (Smetana 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 PNG or SVG

💾 Install

From Marketplace (once published)SettingsPluginsMarketplace → search "KStateMachine Visual".

Manual — download the .zip from Releases and use SettingsPlugins⚙️Install plugin from disk….

Compatibility: IntelliJ Platform 2026.1+ (Community or Ultimate), bundled Kotlin + Java plugins required.


🗺️ Roadmap

Planned

  • Project-wide tab listing every machine across the project
  • Rename refactoring of state names via the tree
  • "Find Usages" for states
  • Inspection: unreachable states and missing initial states
  • Open generated PlantUML in browser (kroki.io / plantuml.com)
  • In-editor preview balloon anchored to the machine

🏗️ Build

./gradlew buildPlugin     # marketplace-ready ZIP in build/distributions/
./gradlew runIde          # launch sandbox IDE with the plugin loaded
./gradlew verifyPlugin    # check against IntelliJ guidelines

🤝 Contributing & support

PRs 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

Maintainer checklist (template setup todos)

About

The IntelliJ Platform plugin for the KStateMachine Kotlin library. Visualize and navigate state machines straight from your source — no runtime needed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages