Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ When creating a new `Perform Action` referencing an existing `Action`, all compa
- https://github.com/eclipse-syson/syson/issues/1324[#1324] [details] Fix an issue that prevents ending up with a `null` reference in the reference widget.
- https://github.com/eclipse-syson/syson/issues/1090[#1090] [import] Fix the textual import of `MultiplicityRange` with lower and upper bounds.
The import now correctly creates a `MultiplicityRange` containing `LiteralInteger` elements for integer bounds, and `FeatureReferenceExpression` elements for feature bounds.
- https://github.com/eclipse-syson/syson/issues/1318[#1318] [details] Fix an issue that prevents adding a new value to a multi-valued reference in the reference widget.

=== Improvements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ public boolean setNewValue(Element element, EStructuralFeature eStructuralFeatur
}
if (eStructuralFeature.getEType() instanceof EEnum && eStructuralFeature.isUnsettable() && !(valueToSet instanceof Enumerator)) {
element.eUnset(eStructuralFeature);
} else if (eStructuralFeature.isMany() && newValue instanceof List<?> newListValue) {
((List<Object>) element.eGet(eStructuralFeature)).addAll(newListValue);
} else {
if (eStructuralFeature.getEType() instanceof EDataType eDataType && newValue instanceof String stringValue) {
valueToSet = EcoreUtil.createFromString(eDataType, stringValue);
Expand Down Expand Up @@ -185,9 +187,9 @@ public boolean isReadOnly(Element element) {
* and isReadOnly(EStructuralFeature).
*
* @param element
* The {@link Element} to check
* The {@link Element} to check
* @param eStructuralFeature
* The {@link EStructuralFeature} to check
* The {@link EStructuralFeature} to check
* @return
*/
public boolean isReadOnly(Element element, EStructuralFeature eStructuralFeature) {
Expand Down Expand Up @@ -227,11 +229,7 @@ public boolean isReadOnlyStringAttribute(Element element, EStructuralFeature eSt

public boolean isMultilineStringAttribute(Element element, EStructuralFeature eStructuralFeature) {
boolean isMultiline = false;
if (this.isBodyField(eStructuralFeature)) {
isMultiline = true;
} else {
isMultiline = false;
}
isMultiline = this.isBodyField(eStructuralFeature);
return isMultiline;
}

Expand Down Expand Up @@ -343,9 +341,9 @@ public Element handleReferenceWidgetNewValue(Element element, String eStructural
* feature.
*
* @param feature
* the current {@link Feature}.
* the current {@link Feature}.
* @param newValue
* the newValue to set.
* the newValue to set.
* @return the real element (i.e. a FeatureTyping) that holds the property to set.
*/
public Element handleFeatureTypingNewValue(Feature feature, Object newValue) {
Expand All @@ -369,7 +367,7 @@ public Element handleFeatureTypingNewValue(Feature feature, Object newValue) {
* Get the real owner of the reference widget for the extra property "Typed by".
*
* @param element
* the current {@link Element}.
* the current {@link Element}.
* @return the real element that holds the property.
*/
public Element getFeatureTypingOwnerExpression(Element element) {
Expand Down Expand Up @@ -437,7 +435,6 @@ public boolean setTransitionSourceParameter(TransitionUsage transitionUsage, Ele
// Update transition source
transitionUsage.getOwnedMembership().stream()
.filter(Objects::nonNull)
.map(Membership.class::cast)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

.findFirst()
.ifPresent(mem -> mem.setMemberElement(au));
// Update succession source
Expand Down Expand Up @@ -583,7 +580,7 @@ public Element setNewDocumentationValue(Element self, String newValue) {
* Returns the element that owns the visibility feature of the given element.
*
* @param self
* An element for which the visibility owner is being searched.
* An element for which the visibility owner is being searched.
* @return the element that owns the visibility feature of the given element
*/
public Element getVisibilityPropertyOwner(Element self) {
Expand All @@ -597,7 +594,7 @@ public Element getVisibilityPropertyOwner(Element self) {
* Returns the enumeration literals for the visibility feature of the given element.
*
* @param self
* An element for which the list of visibility literals are being searched.
* An element for which the list of visibility literals are being searched.
* @return the enumeration literals for the visibility feature of the given element.
*/
public List<EEnumLiteral> getVisibilityEnumLiterals(Element self) {
Expand All @@ -612,7 +609,7 @@ public List<EEnumLiteral> getVisibilityEnumLiterals(Element self) {
* Returns the visibility value of the given element.
*
* @param self
* An element for which the list of visibility literals are being searched.
* An element for which the list of visibility literals are being searched.
* @return the current value of the visibility feature of the given element.
*/
public EEnumLiteral getVisibilityValue(Element self) {
Expand All @@ -627,11 +624,11 @@ public EEnumLiteral getVisibilityValue(Element self) {
* Sets the visibility value of the given element.
*
* @param self
* An element for which the list of visibility literals are being searched.
* An element for which the list of visibility literals are being searched.
* @param newValue
* the value to set.
* the value to set.
* @return <code>true</code> if the visibility feature of the given element has been properly set and
* <code>false</code> otherwise.
* <code>false</code> otherwise.
*/
public boolean setVisibilityValue(Element self, Object newValue) {
boolean result = false;
Expand Down Expand Up @@ -668,7 +665,7 @@ private void handleImplied(Element element, EStructuralFeature eStructuralFeatur
* guarantee that it is well formed after its call.
*
* @param aau
* an {@link AcceptActionUsage}
* an {@link AcceptActionUsage}
*/
private void checkAndRepairAcceptActionUsageStructure(AcceptActionUsage aau) {
this.checkAndRepairAcceptActionUsagePayload(aau);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ image::view-usage-nodes.png[ViewUsage nodes, width=65%,height=65%]

image::view-usage-graphical-contents.png[ViewUsage graphical contents, width=65%,height=65%]

- In the _Details_ view, fix an issue that prevents adding a new value to a multi-valued reference on a reference widget.

== Improvements

Expand Down
Loading