StackSaga for Visual Studio Code
Official Visual Studio Code extension for the StackSaga distributed saga orchestration framework.
Built with a zero-dependency TypeScript Java AST engine (java-parser) with live unsaved-buffer sync — works instantaneously without requiring a running JDK, Maven/Gradle build, or Language Server warmup.
Key Features
1. Interactive Dual-Lane Saga Flow Diagram
- Unified Forward & Compensating Rollback (LIFO) View: Visualize the entire saga orchestration flow and its LIFO rollback path in an interactive Webview panel.
- View Modes & Live Theme Sync: Switch between Unified, Forward Only, and Revert Only views, with automatic Light/Dark theme synchronization.
- Conditional Branching & Failure Triggers: Renders
if / else, nested conditions, ternary (? :), switch decision diamonds, throw NonRetryableExecutorException rollback transitions, and @StartPreExecutor / @StartPostExecutor hook trees.
- Interactive Failure Simulator (
⚡ Fail): Simulate step failures directly on the diagram to trace the exact active forward and rollback paths.
- Click-to-Navigate & Export: Click any node, edge, or condition to jump to the exact Java source line, or export the diagram to SVG or HTML.
2. StackSaga Explorer (Activity Bar)
- Discovers all
@SagaDomainEntity classes across the workspace (including unsaved editor changes).
- Displays Open Flow Diagram, Validation Issues, SagaTemplate Usages, Executors (
CMD, QRY, PRE, POST, Blocking & Reactive), and Listeners.
3. Real-Time Diagnostics & Quick Fixes
- Reports StackSaga contract and flow-safety issues directly in the VS Code Problems pane:
- Missing
@SagaDomainEntity / @SagaExecutor, duplicate/invalid names, missing no-arg constructor, SS_0038 (UnknownPropertyArchive), SS_0017 / SS_0018
return null or missing transitions in doProcess() / doRevert(), forbidden NonRetryableExecutorException in doRevert(), DomainEntity immutability violations, and multiple listeners
- Provides Quick Fixes (
Ctrl+.) to auto-generate annotations, constructors, and UnknownPropertyArchive extensions.
4. CodeLens, Go to Definition (F12), Gutter Icons & File Badges
- CodeLens: Navigate directly between Domain Entities, Executors, Hooks, and Callers (with clean single-line call snippets).
- Go to Definition (
F12 / Ctrl+Click): Jump to target executors on .toNextExecutor(...), .startWith(...), @StartPreExecutor(...), and @StartPostExecutor(...).
- Gutter Icons & File Explorer Badges: Displays custom StackSaga SVG icons in the editor gutter and color-coded badges (
DE, CE, QE, PR, PO, TL) in the File Explorer and Editor Tabs.
Extension Settings
| Setting |
Default |
Description |
stacksaga.enableCodeLens |
true |
Show StackSaga navigation CodeLens above classes and transition calls. |
stacksaga.enableGutterIcons |
true |
Show StackSaga component icons in the editor gutter. |
stacksaga.enableFileBadges |
true |
Show StackSaga component badges (DE, CE, QE, PR, PO, TL) in File Explorer and Editor Tabs. |
Support
| |