[2419] Export the metadata of the ends of a connector declared inline - #2420
Merged
AxelRICHARD merged 1 commit intoAug 14, 2026
Merged
Conversation
Member
|
@kkkk1258999 thank you for this PR, I will look at it. Please do not remove the PR template. Instead you must fill the appropriate checkboxes. Regards, |
AxelRICHARD
approved these changes
Aug 14, 2026
The prefix metadata carried by the ends of a connector were dropped by the export when those ends are owned through an EndFeatureMembership, which is the shape produced by every connector created from a diagram. appendConnectorEnd wrote the multiplicity, the declared name and the reference subsetting of an end, but not its prefix metadata, although appendExtensionKeyword is already used for that purpose elsewhere, on the connector itself for instance. Calling it on the end as well restores them. This went unnoticed because a connector whose ends are owned through a plain FeatureMembership, which is what the textual import produces, does not go through appendConnectorEnd at all: appendConnectorPart finds no EndFeatureMembership, the ends are left out of childrenMembershipToSkip, and they end up serialized as regular children, metadata included. Only the inline form lost them. Concretely, a requirement derivation created from a diagram exported as losing the #original and #derive of its ends, so which requirement is the original one and which one is derived was no longer stated in the exported text. Bug: eclipse-syson#2419 Signed-off-by: kkkk1258999 <fishing_kaba@yahoo.co.jp>
AxelRICHARD
force-pushed
the
kab/fix/connector-end-metadata-export
branch
from
August 14, 2026 13:29
1be3def to
464a676
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PLEASE READ ALL ITEMS AND CHECK ONLY RELEVANT CHECKBOXES BELOW
Auto review
Project management
priority:andpr:labels been added to the pull request? (In case of doubt, start with the labelspriority: lowandpr: to review later)area:,type:)Changelog and release notes
CHANGELOG.adoc+doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adocbeen updated to reference the relevant issues?CHANGELOG.adoc?CHANGELOG.adoc?doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?Key highlightssection indoc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?Documentation
Tests
Sorry about the removed template, it is restored above.
The unchecked boxes of the Project management section are the ones I have no
permission for: the milestone and the labels, on this pull request and on the
issue. Could someone from the team set them? The remaining unchecked boxes do
not apply here: there is no API break, no dependency change, and no visual
impact since this only changes the exported text.
Fixes #2419
Problem
The prefix metadata carried by the ends of a connector are dropped by the
export when those ends are owned through an
EndFeatureMembership, which isthe shape produced by every connector created from a diagram.
appendConnectorEndwrites the multiplicity, the declared name and thereference subsetting of an end, but not its prefix metadata, although
appendExtensionKeywordis already used for that purpose elsewhere, on theconnector itself for instance.
This went unnoticed because a connector whose ends are owned through a plain
FeatureMembership, which is what the textual import produces, does not gothrough
appendConnectorEndat all:appendConnectorPartfinds noEndFeatureMembership, the ends are left out ofchildrenMembershipToSkip,and they end up serialized as regular children, metadata included. Only the
inline form loses them.
Concretely, a requirement derivation created from a diagram exported as
losing the
#originaland#deriveof its ends, so which requirement is theoriginal one and which one is derived was no longer stated in the exported
text. Importing that text back gives a derivation whose direction can only be
guessed from the declaration order of its ends.
Fix
Call the existing
appendExtensionKeywordon the end at the beginning ofappendConnectorEnd. The same derivation now exports asTests
SysMLElementSerializerTest.connectionUsageWithMetadataOnItsEndsserializes aconnection whose two ends are owned through an
EndFeatureMembershipand carrya prefix metadata each, and checks that both are exported:
The 123 existing tests of
SysMLElementSerializerTestand the 47 tests ofImportExportTestsstill pass, so the round trip of the connections whose endscome from the textual import is unaffected.
Notes
I found this while preparing the edge tool creating a requirement derivation
from the General View, requested in #2413: a derivation created from the
diagram would have exported without its direction. The problem is not specific
to derivations though, it affects the metadata of any inline connector end,
which is why it is fixed separately, before that tool.
There are no changed or removed lines, only additions.