Skip to content

ST6RI-780: Nested inherited features are not correctly rendered (PlantUML) #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

himi
Copy link
Member

@himi himi commented Jun 20, 2024

When the visualizer renders a connector, it also renders inherited features referred by the connector. However, it may fail to render nested features. In the example below:

package TestInheritedPart2 {
    part def Vehicle {
        part powerTrain {
            part shaft {
                port rotation;
            }
        }
    }

    part vehicle : Vehicle {
        part :>> powerTrain {
            part motor {
                part shaft {
                    port rotation;
                }
            }
            bind motor.shaft.rotation = shaft.rotation;
        }
    }
}

rendering just part vehicle gives:
image
which lacks vehicle.powerTrain.shaft.rotation even though it is referred to by the binding connector.

This PR also fixes VSSRMember.isRedefining() by using FeatureUtil.

himi added 2 commits June 20, 2024 19:27
  for the current feature, we must fall back to the case that tgt
  inherits ref instead of returning null.
  FeatureUtil.getAllRedefinedFeaturesOf() to correctly get
  redefined features.
@himi
Copy link
Member Author

himi commented Jun 20, 2024

After this fix, the example above is correctly rendered as:
image

@himi himi requested a review from seidewitz June 20, 2024 23:37
@seidewitz seidewitz changed the base branch from ST6RI-778 to master June 21, 2024 04:31
@seidewitz seidewitz merged commit 9d1a77e into master Jun 21, 2024
2 checks passed
@seidewitz seidewitz added this to the 2024-06 milestone Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants