Skip to content

Comments

ST6RI-871 Source of a conditional succession not set properly#678

Merged
seidewitz merged 1 commit intomasterfrom
ST6RI-871
Jul 24, 2025
Merged

ST6RI-871 Source of a conditional succession not set properly#678
seidewitz merged 1 commit intomasterfrom
ST6RI-871

Conversation

@seidewitz
Copy link
Member

This PR fixes a bug that caused spurious validation error markings on conditional successions in the Xtext SysML editor in Eclipse.

For example, in the following model, the source of the conditional succession s is implicitly the preceding action a:

action def A {
  action a;
  if true than b;
  action b;
}

Previously, this would initially parse correctly in the Xtext editor without validation errors. But, if it was part of a larger model, then, when a change was made elsewhere in the model, after incremental re-parsing, the source on the conditional succession was not set correctly, resulting in the validation error “Must have at least two related elements”.

A so-called "conditional succession" is actually parsed as a TransitionUsage, and an implied source such as above is computed in the TransitionUsage::computeSource method. This PR updates the computeSource method to handle the case when transformations are re-run on a conditional succession in the abstract syntax tree, when it has not actually been re-parsed.

@seidewitz seidewitz self-assigned this Jul 24, 2025
@seidewitz seidewitz added this to the 2025-07 milestone Jul 24, 2025
@seidewitz seidewitz merged commit 1385fb6 into master Jul 24, 2025
3 checks passed
@seidewitz seidewitz added the bug Something isn't working label Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant