You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7b6a3bd
Browse filesBrowse the repository at this point in the historyBrowse files
Keep the stepper and View error when a state error cannot be marked, and put State Machine next to Verification (#161)
## Description
Based on main after #159. It also carries the tab order from #162, which
was merged into the #159 branch after #159 had been merged into main, so
it never reached main.
**Tab order.** The tabs are now **Verification · State Machine ·
Context**, since Verification and State Machine link to each other
through **Show in state machine** and **View error**. The walkthrough
steps and the README follow the same order. Screenshots and tests are in
#162.
**Errors without marks:**
When the verifier cannot tell which states allow a call, the diagram has
no marks and the error summary was not shown. With it went the `‹ 1 of 3
›` stepper and **View error**: the tab showed a badge but no way to step
through the errors or go back to them.
This happens in two cases:
- the allowed states depend on the call's arguments, so the verifier
reports no accepted states;
- the verifier finds no state machine for the call. In the C-stars
exercise `E_OSS_A1_09_PlayfieldWindow`, `setUndecorated` is a
`java.awt.Frame` method, but the `@StateSet` is declared on
`java.awt.Window`, so the error has no state context.
The summary row is now shown for every shown state error. Without marks,
it says `counter.open() is rejected here` when the verifier names the
call, or `The call at line 49 is rejected` otherwise. The legend and the
Show all toggle stay hidden, since nothing is marked or dimmed.
## Screenshots
`E_OSS_A1_09_PlayfieldWindow` from the C-stars proposal in
building-examples-liquidjava.
**Before** (#159): the badge says 1 state error, but nothing in the tab
shows it.
<img width="560" alt="State Machine tab without an error summary"
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/state-error-without-context/before.png"
/>
**After:** the summary and View error are shown.
<img width="560" alt="State Machine tab with The call at line 49 is
rejected and View error"
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/state-error-without-context/after.png"
/>
**View error** goes back to the error in the Verification tab.
<img width="560" alt="Verification tab with the error outlined"
src="https://raw.githubusercontent.com/liquid-java/vscode-liquidjava/pr-screenshots/state-error-without-context/view-error.png"
/>
## Tests
Run on this branch, rebased on main (verifier 0.0.36, liquidjava-fsm
0.2.0):
- `npm run lint` and `npm run test:typecheck`: clean.
- `npm run test:unit`: 94 passed. New tests:
- `fsm.spec.ts`: stepper, View error and text without accepted states,
without an error context, and without a position;
- `script.spec.ts`: stepping through errors without an error context and
going back to one, and the tab order.
- `npm test` (VS Code): 9 + 1 passing, including the walkthrough test
with the new step order.
- Server `mvn test`: 27 passing. Local smoke test: passed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: client/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ A repository with LiquidJava examples is available at [liquidjava-examples](http
40
40
41
41
### Getting started in VS Code
42
42
43
-
The **Get Started with LiquidJava** walkthrough introduces LiquidJava and its interactive tutorial, includes copyable Maven/Gradle annotation dependencies, then explains verification and its status indicator, diagnostics, context, state machines, the Command Palette, and logs. It also links to the [interactive tutorial](https://liquid-java.github.io/liquidjava-interactive-tutorial/). It opens once on installation, following VS Code’s walkthrough preferences. You can dismiss it at any time and reopen it with **LiquidJava: Show Walkthrough** from the Command Palette or **LiquidJava: Show Commands**. VS Code saves its progress across workspaces.
43
+
The **Get Started with LiquidJava** walkthrough introduces LiquidJava and its interactive tutorial, includes copyable Maven/Gradle annotation dependencies, then explains verification and its status indicator, diagnostics, state machines, context, the Command Palette, and logs. It also links to the [interactive tutorial](https://liquid-java.github.io/liquidjava-interactive-tutorial/). It opens once on installation, following VS Code’s walkthrough preferences. You can dismiss it at any time and reopen it with **LiquidJava: Show Walkthrough** from the Command Palette or **LiquidJava: Show Commands**. VS Code saves its progress across workspaces.
Copy file name to clipboardExpand all lines: client/package.json
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -227,22 +227,22 @@
227
227
]
228
228
},
229
229
{
230
-
"id": "context",
231
-
"title": "Inspect context",
232
-
"description": "The **Context** tab shows **Variables**, **Aliases**, and **Ghosts** after verification. Expand or collapse each section.\nLocal variables are filtered by the cursor: only declarations before it and in enclosing scopes appear. Select a range to inspect declarations that overlap it; global variables are also included.\nClick a variable to reveal its source. Variables relevant to a nearby error are highlighted alongside the failing refinement.\n[Open LiquidJava view](command:liquidjava.showView)",
230
+
"id": "stateMachine",
231
+
"title": "Explore state machines",
232
+
"description": "The **State Machine** tab shows object states and method transitions declared with ``@StateSet`` and ``@StateRefinement``.\nPan the diagram; use **Zoom In**, **Zoom Out**, **Reset Zoom**, and **Toggle Orientation** to inspect it.\nUse **Expand Conditions** or **Collapse Conditions** to show or hide preconditions and postconditions. **Copy Mermaid Source** copies the diagram definition.\nFrom a state error, choose **Show in state machine** to see the related states and call. The tab opens on the first state error of the file, keeps the one you choose, and follows the error at the cursor; step through several with the arrows, and use **View error** to go back to it.\n[Open LiquidJava view](command:liquidjava.showView)",
233
233
"media": {
234
-
"markdown": "media/walkthrough/context.md"
234
+
"markdown": "media/walkthrough/state-machine.md"
235
235
},
236
236
"completionEvents": [
237
237
"onStepSelected"
238
238
]
239
239
},
240
240
{
241
-
"id": "stateMachine",
242
-
"title": "Explore state machines",
243
-
"description": "The **State Machine** tab shows object states and method transitions declared with ``@StateSet`` and ``@StateRefinement``.\nPan the diagram; use **Zoom In**, **Zoom Out**, **Reset Zoom**, and **Toggle Orientation** to inspect it.\nUse **Expand Conditions** or **Collapse Conditions** to show or hide preconditions and postconditions. **Copy Mermaid Source** copies the diagram definition.\nFrom a state error, choose **Show in state machine** to see the related states and call. The tab opens on the first state error of the file, keeps the one you choose, and follows the error at the cursor; step through several with the arrows, and use **View error** to go back to it.\n[Open LiquidJava view](command:liquidjava.showView)",
241
+
"id": "context",
242
+
"title": "Inspect context",
243
+
"description": "The **Context** tab shows **Variables**, **Aliases**, and **Ghosts** after verification. Expand or collapse each section.\nLocal variables are filtered by the cursor: only declarations before it and in enclosing scopes appear. Select a range to inspect declarations that overlap it; global variables are also included.\nClick a variable to reveal its source. Variables relevant to a nearby error are highlighted alongside the failing refinement.\n[Open LiquidJava view](command:liquidjava.showView)",
0 commit comments