Skip to content

Commit 15e64d3

Browse files
committed
[1532] Add new Requirements table View
Bug: #1532 Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
1 parent 2ec97f0 commit 15e64d3

78 files changed

Lines changed: 4231 additions & 75 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ Any `Namespace` stored in those libraries are now cached for quick access.
5353
As a consequence, some coding rules violations have been fixed.
5454
The `org.eclipse.syson.services.grammars` package in `syson-direct-edit-grammar` has been renamed into `org.eclipse.syson.direct.edit.grammars`.
5555
`AbtractItemUsageBorderNodeDescriptionProvider` has been renamed to `AbstractItemUsageBorderNodeDescriptionProvider`.
56+
- https://github.com/eclipse-syson/syson/issues/1532[#1532] [tables] Add new Requirements table View.
57+
As a consequence, the `syson-table-requirements-view` and `syson-common-view` modules has been created.
58+
`IViewDescriptionProvider.java` and `SysONViewDescriptionProvider.java` have been moved from `syson-diagram-common-view` to `syson-common-view`.
5659

5760
=== Dependency update
5861

@@ -98,6 +101,7 @@ This contribution allows to switch from one _ViewDefinition_ to another one in a
98101
* `SysMLPackageNodeAppearanceHandler implements INodeAppearanceHandler` handles how the node is updated from the `appearanceChanges`.
99102
* A GraphQL mutation is also added through `editSysMLPackageNodeAppearance`.
100103
* Same mechanism is applied to `ImportedPackage`, `Note` and `ViewFrame` nodes.
104+
- https://github.com/eclipse-syson/syson/issues/1532[#1532] [tables] Add new Requirements table View.
101105

102106
== v2025.8.0
103107

backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/migration/DiagramOnViewUsageMigrationHook.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
import org.eclipse.sirius.web.domain.boundedcontexts.representationdata.RepresentationMetadata;
3131
import org.eclipse.sirius.web.domain.boundedcontexts.representationdata.repositories.IRepresentationContentRepository;
3232
import org.eclipse.sirius.web.domain.boundedcontexts.representationdata.services.api.IRepresentationMetadataUpdateService;
33-
import org.eclipse.syson.application.services.GetIntermediateContainerCreationSwitch;
3433
import org.eclipse.syson.sysml.Element;
3534
import org.eclipse.syson.sysml.Relationship;
3635
import org.eclipse.syson.sysml.SysmlFactory;
3736
import org.eclipse.syson.sysml.ViewDefinition;
3837
import org.eclipse.syson.sysml.ViewUsage;
3938
import org.eclipse.syson.sysml.util.ElementUtil;
39+
import org.eclipse.syson.util.GetIntermediateContainerCreationSwitch;
4040
import org.eclipse.syson.util.SysONRepresentationDescriptionIdentifiers;
4141
import org.springframework.stereotype.Service;
4242
import org.springframework.transaction.annotation.Transactional;

backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/services/SysMLv2EditService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import org.eclipse.syson.sysml.SysmlPackage;
5353
import org.eclipse.syson.sysml.ViewUsage;
5454
import org.eclipse.syson.sysml.util.ElementUtil;
55+
import org.eclipse.syson.util.GetIntermediateContainerCreationSwitch;
5556
import org.eclipse.syson.util.SysMLMetamodelHelper;
5657
import org.eclipse.syson.util.SysONRepresentationDescriptionIdentifiers;
5758
import org.springframework.stereotype.Service;

backend/application/syson-application/pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@
114114
<artifactId>syson-standard-diagrams-view</artifactId>
115115
<version>2025.8.5</version>
116116
</dependency>
117+
<dependency>
118+
<groupId>org.eclipse.syson</groupId>
119+
<artifactId>syson-table-requirements-view</artifactId>
120+
<version>2025.8.5</version>
121+
</dependency>
117122
<dependency>
118123
<groupId>org.eclipse.syson</groupId>
119124
<artifactId>syson-tree-explorer-view</artifactId>
@@ -148,6 +153,12 @@
148153
<version>${sirius.web.version}</version>
149154
<scope>test</scope>
150155
</dependency>
156+
<dependency>
157+
<groupId>org.eclipse.sirius</groupId>
158+
<artifactId>sirius-components-tables-tests</artifactId>
159+
<version>${sirius.web.version}</version>
160+
<scope>test</scope>
161+
</dependency>
151162
<dependency>
152163
<groupId>org.eclipse.sirius</groupId>
153164
<artifactId>sirius-components-trees-tests</artifactId>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2025 Obeo.
3+
* This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v2.0
5+
* which accompanies this distribution, and is available at
6+
* https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* Obeo - initial API and implementation
12+
*******************************************************************************/
13+
package org.eclipse.syson.application.controllers.diagrams.graphql;
14+
15+
import java.util.Objects;
16+
17+
import org.eclipse.sirius.components.graphql.tests.api.IGraphQLRequestor;
18+
import org.eclipse.sirius.components.graphql.tests.api.IMutationRunner;
19+
import org.eclipse.syson.table.requirements.view.dto.CreateRequirementInput;
20+
import org.springframework.stereotype.Service;
21+
22+
/**
23+
* Used to invoke a create requirement table action with the GraphQL API.
24+
*
25+
* @author arichard
26+
*/
27+
@Service
28+
public class CreateRequirementMutationRunner implements IMutationRunner<CreateRequirementInput> {
29+
30+
private static final String CREATE_REQUIREMENT_MUTATION = """
31+
mutation createRequirement($input: CreateRequirementInput!) {
32+
createRequirement(input: $input) {
33+
__typename
34+
... on ErrorPayload {
35+
messages {
36+
body
37+
level
38+
}
39+
}
40+
... on SuccessPayload {
41+
messages {
42+
body
43+
level
44+
}
45+
}
46+
}
47+
}
48+
""";
49+
50+
private final IGraphQLRequestor graphQLRequestor;
51+
52+
public CreateRequirementMutationRunner(IGraphQLRequestor graphQLRequestor) {
53+
this.graphQLRequestor = Objects.requireNonNull(graphQLRequestor);
54+
}
55+
56+
@Override
57+
public String run(CreateRequirementInput input) {
58+
return this.graphQLRequestor.execute(CREATE_REQUIREMENT_MUTATION, input);
59+
}
60+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2025 Obeo.
3+
* This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v2.0
5+
* which accompanies this distribution, and is available at
6+
* https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* Obeo - initial API and implementation
12+
*******************************************************************************/
13+
package org.eclipse.syson.application.controllers.diagrams.graphql;
14+
15+
import java.util.Objects;
16+
17+
import org.eclipse.sirius.components.graphql.tests.api.IGraphQLRequestor;
18+
import org.eclipse.sirius.components.graphql.tests.api.IMutationRunner;
19+
import org.eclipse.syson.table.requirements.view.dto.ExposeRequirementsInput;
20+
import org.springframework.stereotype.Service;
21+
22+
/**
23+
* Used to invoke a expose requirements table action with the GraphQL API.
24+
*
25+
* @author arichard
26+
*/
27+
@Service
28+
public class ExposeRequirementsMutationRunner implements IMutationRunner<ExposeRequirementsInput> {
29+
30+
private static final String EXPOSE_REQUIREMENTS_MUTATION = """
31+
mutation exposeRequirements($input: ExposeRequirementsInput!) {
32+
exposeRequirements(input: $input) {
33+
__typename
34+
... on ErrorPayload {
35+
messages {
36+
body
37+
level
38+
}
39+
}
40+
... on SuccessPayload {
41+
messages {
42+
body
43+
level
44+
}
45+
}
46+
}
47+
}
48+
""";
49+
50+
private final IGraphQLRequestor graphQLRequestor;
51+
52+
public ExposeRequirementsMutationRunner(IGraphQLRequestor graphQLRequestor) {
53+
this.graphQLRequestor = Objects.requireNonNull(graphQLRequestor);
54+
}
55+
56+
@Override
57+
public String run(ExposeRequirementsInput input) {
58+
return this.graphQLRequestor.execute(EXPOSE_REQUIREMENTS_MUTATION, input);
59+
}
60+
}

0 commit comments

Comments
 (0)