[2485] Fix the New Derived Requirement edge tool - #2490
Conversation
| return connectionUsage; | ||
| } | ||
|
|
||
| private void addDerivedConnectionEnd(ConnectionUsage connectionUsage, RequirementUsage end, Element endContainer, Namespace newConnectionContainer) { |
There was a problem hiding this comment.
It's the same content as addConnectorEnd specific to the derivation of RequirementUsage
There was a problem hiding this comment.
With the current version of addConnectorEnd signature I was not able to make the fix.
Thus, instead of adding more complexity to addConnectorEnd, I chose to duplicate addConnectorEnd and tailor it specifically for requirement derivation.
| FeatureChainComputer cmp = new FeatureChainComputer(); | ||
| List<Feature> sourceFeaturePath = cmp.computeShortestPath(newConnectionContainer, end, endContainer).orElse(List.of()); | ||
|
|
||
| var featureMembership = SysmlFactory.eINSTANCE.createFeatureMembership(); |
There was a problem hiding this comment.
Create a FeatureMembership instead of a EndFeatureMembership
|
|
||
| var featureMembership = SysmlFactory.eINSTANCE.createFeatureMembership(); | ||
| connectionUsage.getOwnedRelationship().add(featureMembership); | ||
| var usage = SysmlFactory.eINSTANCE.createUsage(); |
There was a problem hiding this comment.
Create a Usage instead of the element specific to the connector.
In the case of a requirement derivation, the connector is a ConnectionUsage
| return connectionUsage; | ||
| } | ||
|
|
||
| private void addDerivedConnectionEnd(ConnectionUsage connectionUsage, RequirementUsage end, Element endContainer, Namespace newConnectionContainer) { |
There was a problem hiding this comment.
please add meaningful javadoc
97f4240 to
2e821da
Compare
Bug: #2485 Signed-off-by: Guillaume Coutable <guillaume.coutable@obeo.fr>
Signed-off-by: Guillaume Coutable <guillaume.coutable@obeo.fr>
2e821da to
a85ce79
Compare
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