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
2 changes: 2 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ The property `SysONTestsProperties#ELASTICSEARCH` has been removed, tests that r
- https://github.com/eclipse-syson/syson/issues/1860[#1860] [diagrams] Add a precondition for compartment item node descriptions in order to filter out unwanted types.
For example `ViewUsage` elements are no longer rendered in _parts_ compartments.
- https://github.com/eclipse-syson/syson/issues/1981[#1981] [export] Fix an error during textual export where `Expose` elements with apostrophes in their name were not properly escaped.
- https://github.com/eclipse-syson/syson/issues/1983[#1983] [metamodel] `reqId` and `declaredShortName` properties of `RequirementDefinition` and `RequirementUsage` are now synchronized, as required by the SysMLv2 specification.

=== Improvements

Expand Down Expand Up @@ -65,6 +66,7 @@ Also add a _New Satisfy Requirement_ graphical edge tool between `Feature` grap
As a result, the application won't start if a service call is constructed with an invalid number of arguments.
- https://github.com/eclipse-syson/syson/issues/1988[#1988] [syson] Extract Elasticsearch container initialization in a dedicated abstract test class.
Integration tests that require Elasticsearch now need to extend `AbstractIntegrationTestsWithElasticsearch`.
- https://github.com/eclipse-syson/syson/issues/1983[#1983] [details] `reqId` property of `RequirementDefinition` is now visible in the _Core_ tab of the _Details_ view.

=== New features

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2025 Obeo.
* Copyright (c) 2023, 2026 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -37,6 +37,7 @@
import org.eclipse.syson.sysml.Redefinition;
import org.eclipse.syson.sysml.ReferenceSubsetting;
import org.eclipse.syson.sysml.RequirementConstraintMembership;
import org.eclipse.syson.sysml.RequirementDefinition;
import org.eclipse.syson.sysml.RequirementUsage;
import org.eclipse.syson.sysml.Specialization;
import org.eclipse.syson.sysml.StateDefinition;
Expand Down Expand Up @@ -231,6 +232,14 @@ public List<EStructuralFeature> caseRequirementConstraintMembership(RequirementC
return features;
}

@Override
public List<EStructuralFeature> caseRequirementDefinition(RequirementDefinition object) {
var features = new ArrayList<EStructuralFeature>();
features.addAll(this.caseElement(object));
features.add(SysmlPackage.eINSTANCE.getRequirementDefinition_ReqId());
return features;
}

@Override
public List<EStructuralFeature> caseRequirementUsage(RequirementUsage object) {
var features = new ArrayList<EStructuralFeature>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024, 2025 Obeo.
* Copyright (c) 2024, 2026 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -78,6 +78,15 @@ public void getCoreFeaturesOfMembership() {
SysmlPackage.eINSTANCE.getMembership_MemberElement());
}

@Test
public void getCoreFeaturesOfRequirementDefinition() {
List<EStructuralFeature> coreStructuralFeatures = this.detailsViewService.getCoreFeatures(SysmlFactory.eINSTANCE.createRequirementDefinition());
assertThat(coreStructuralFeatures).containsOnly(SysmlPackage.eINSTANCE.getElement_DeclaredName(),
SysmlPackage.eINSTANCE.getElement_QualifiedName(),
SysmlPackage.eINSTANCE.getElement_DeclaredShortName(),
SysmlPackage.eINSTANCE.getRequirementDefinition_ReqId());
}

@Test
public void getCoreFeaturesOfRequirementUsage() {
List<EStructuralFeature> coreStructuralFeatures = this.detailsViewService.getCoreFeatures(SysmlFactory.eINSTANCE.createRequirementUsage());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2025 Obeo.
* Copyright (c) 2023, 2026 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -349,4 +349,23 @@ public String toString() {
return result.toString();
}

/**
* <!-- begin-user-doc --> Redefines getter <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public String getDeclaredShortName() {
return this.getReqId();
}

/**
* <!-- begin-user-doc --> Redefines setter <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public void setDeclaredShortName(String newDeclaredShortName) {
this.setReqId(newDeclaredShortName);
}
} // RequirementDefinitionImpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2023, 2025 Obeo.
* Copyright (c) 2023, 2026 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -401,4 +401,23 @@ public Predicate getConstraintDefinition() {
return this.getRequirementDefinition();
}

/**
* <!-- begin-user-doc --> Redefines getter <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public String getDeclaredShortName() {
return this.getReqId();
}

/**
* <!-- begin-user-doc --> Redefines setter <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public void setDeclaredShortName(String newDeclaredShortName) {
this.setReqId(newDeclaredShortName);
}
} // RequirementUsageImpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2025 Obeo.
* Copyright (c) 2025, 2026 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand All @@ -12,6 +12,8 @@
*******************************************************************************/
package org.eclipse.syson.sysml.impl;

import static org.junit.jupiter.api.Assertions.assertEquals;

import java.util.List;
import java.util.stream.Stream;

Expand Down Expand Up @@ -70,4 +72,14 @@ public void testGetStakeholderParameter() {
Assertions.assertNotNull(stakeholderParameterValue);
Assertions.assertIterableEquals(STAKEHOLDER_PART_USAGES, stakeholderParameterValue);
}

@Test
public void testReqId() {
REQUIREMENT_DEFINITION.setReqId("REQID");
assertEquals("REQID", REQUIREMENT_DEFINITION.getReqId());
assertEquals("REQID", REQUIREMENT_DEFINITION.getDeclaredShortName());
REQUIREMENT_DEFINITION.setDeclaredShortName("DECLARED_SHORT_NAME");
assertEquals("DECLARED_SHORT_NAME", REQUIREMENT_DEFINITION.getReqId());
assertEquals("DECLARED_SHORT_NAME", REQUIREMENT_DEFINITION.getDeclaredShortName());
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2025 Obeo.
* Copyright (c) 2025, 2026 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand All @@ -12,6 +12,10 @@
*******************************************************************************/
package org.eclipse.syson.sysml.impl;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertIterableEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import java.util.List;
import java.util.stream.Stream;

Expand All @@ -21,7 +25,6 @@
import org.eclipse.syson.sysml.StakeholderMembership;
import org.eclipse.syson.sysml.SysmlFactory;
import org.eclipse.syson.sysml.SysmlPackage;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -60,14 +63,24 @@ public static void setUpRequirementUsage() {
@Test
public void testGetActorParameter() {
final List<PartUsage> actorParameterValue = REQUIREMENT_USAGE.getActorParameter();
Assertions.assertNotNull(actorParameterValue);
Assertions.assertIterableEquals(ACTOR_PART_USAGES, actorParameterValue);
assertNotNull(actorParameterValue);
assertIterableEquals(ACTOR_PART_USAGES, actorParameterValue);
}

@Test
public void testGetStakeholderParameter() {
final List<PartUsage> stakeholderParameterValue = REQUIREMENT_USAGE.getStakeholderParameter();
Assertions.assertNotNull(stakeholderParameterValue);
Assertions.assertIterableEquals(STAKEHOLDER_PART_USAGES, stakeholderParameterValue);
assertNotNull(stakeholderParameterValue);
assertIterableEquals(STAKEHOLDER_PART_USAGES, stakeholderParameterValue);
}

@Test
public void testReqId() {
REQUIREMENT_USAGE.setReqId("REQID");
assertEquals("REQID", REQUIREMENT_USAGE.getReqId());
assertEquals("REQID", REQUIREMENT_USAGE.getDeclaredShortName());
REQUIREMENT_USAGE.setDeclaredShortName("DECLARED_SHORT_NAME");
assertEquals("DECLARED_SHORT_NAME", REQUIREMENT_USAGE.getReqId());
assertEquals("DECLARED_SHORT_NAME", REQUIREMENT_USAGE.getDeclaredShortName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ part system {
}
```

* In _Details_ view:

** `Req Id` and `Declared Short Name` properties of `RequirementDefinition` and `RequirementUsage` are now synchronized, as required by the SysMLv2 specification.

== Improvements

* In diagrams:
Expand Down Expand Up @@ -100,7 +104,13 @@ package root {
```
** Implement the textual export for `AllocationUsage` and `AllocationDefinition`.

* Add support for publishing representations with libraries.
* In _Details_ view:

** `Req Id` property of `RequirementDefinition` is now visible in the _Core_ tab of the _Details_ view.

* Miscellaneous:

** Add support for publishing representations with libraries.
Publishing a project that contains representations now produces libraries that also contain the representations.
Users can navigate to `/libraries/<library identifier>` to open a library and see its representations.

Expand Down
Loading