show internal events in side panel:

This commit is contained in:
Joeri Exelmans 2025-10-21 14:37:55 +02:00
parent 29808a683c
commit 97d42c1cef
7 changed files with 47 additions and 24 deletions

View file

@ -286,25 +286,6 @@ export function parseStatechart(state: VisualEditorState, conns: Connections): [
errors.push({shapeUid: text.uid, message: "triggerless transitions only allowed on pseudo-states"});
}
}
// raise-actions
for (const action of parsed.actions) {
if (action.kind === "raise") {
const {event} = action;
if (event.startsWith("_")) {
// internalEvents.add(event);
}
else {
outputEvents.add(event);
}
}
}
// collect variables
variables = variables.union(findVariables(parsed.guard));
for (const action of parsed.actions) {
variables = variables.union(findVariablesAction(action));
}
}
}
else {
@ -334,6 +315,26 @@ export function parseStatechart(state: VisualEditorState, conns: Connections): [
belongsToState.comments.push([text.uid, parsed.text]);
}
}
if (parsed.kind === "transitionLabel") {
// collect output events
for (const action of parsed.actions) {
if (action.kind === "raise") {
const {event} = action;
if (event.startsWith("_")) {
// internalEvents.add({event: event});
}
else {
outputEvents.add(event);
}
}
}
// collect variables
variables = variables.union(findVariables(parsed.guard));
for (const action of parsed.actions) {
variables = variables.union(findVariablesAction(action));
}
}
}
for (const transition of uid2Transition.values()) {