From 1ad1d8f59585d3c1255ad8427c0b7f7841cbf213 Mon Sep 17 00:00:00 2001 From: Axel RICHARD Date: Thu, 13 Aug 2026 15:07:27 +0200 Subject: [PATCH 1/2] [2393] Fix Actor edges from Concern graphical nodes Bug: https://github.com/eclipse-syson/syson/issues/2393 Signed-off-by: Axel RICHARD --- CHANGELOG.adoc | 1 + .../view/GVSubNodeRequirementCreationTests.java | 14 ++++++++++++++ .../GVCompartmentItemInheritanceTests.java | 14 +++++--------- .../view/SDVDiagramDescriptionProvider.java | 4 ++++ .../user-manual/pages/release-notes/2026.9.0.adoc | 1 + 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index a5688fa539..8b904de28d 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -35,6 +35,7 @@ In any case, it is strongly recommended to back up your data before proceeding w === Bug fixes +- https://github.com/eclipse-syson/syson/issues/2393[#2393] [diagrams] Fix the missing graphical edge between `ConcernUsage` or `ConcernDefinition` graphical nodes and the Actors created from them. - https://github.com/eclipse-syson/syson/issues/2344[#2344] [diagrams] Fix dropping a nested `AttributeUsage` from the _Explorer_ onto a _General View_ diagram so it is visible on the first drop. - https://github.com/eclipse-syson/syson/issues/2359[#2359] [diagrams] Fix `Comment` graphical nodes so changing their background color no longer changes their border color. - https://github.com/eclipse-syson/syson/issues/2358[#2358] [details] Fix expression creation and editing on `SuccessionAsUsage` elements. diff --git a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeRequirementCreationTests.java b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeRequirementCreationTests.java index 9bb86bf267..e72db04412 100644 --- a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeRequirementCreationTests.java +++ b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/GVSubNodeRequirementCreationTests.java @@ -1421,6 +1421,20 @@ public void createNewActorWithoutSpecializationInRequirementUsage() { this.createNewActorWithoutSpecializationIn(SysmlPackage.eINSTANCE.getRequirementUsage(), GeneralViewWithTopNodesTestProjectData.SemanticIds.REQUIREMENT_USAGE_ID, "requirement"); } + @DisplayName("GIVEN a Concern, WHEN creating a new Actor without selection, THEN the Actor without specialization is created in the Concern") + @GivenSysONServer({ GeneralViewWithTopNodesTestProjectData.SCRIPT_PATH }) + @Test + public void createNewActorWithoutSpecializationInConcernUsage() { + this.createNewActorWithoutSpecializationIn(SysmlPackage.eINSTANCE.getConcernUsage(), GeneralViewWithTopNodesTestProjectData.SemanticIds.CONCERN_USAGE_ID, "concern"); + } + + @DisplayName("GIVEN a ConcernDefinition, WHEN creating a new Actor without selection, THEN the Actor without specialization is created in the ConcernDefinition") + @GivenSysONServer({ GeneralViewWithTopNodesTestProjectData.SCRIPT_PATH }) + @Test + public void createNewActorWithoutSpecializationInConcernDefinition() { + this.createNewActorWithoutSpecializationIn(SysmlPackage.eINSTANCE.getConcernDefinition(), GeneralViewWithTopNodesTestProjectData.SemanticIds.CONCERN_DEFINITION_ID, "ConcernDefinition"); + } + @DisplayName("GIVEN a RequirementDefinition, WHEN creating a new Actor selecting a Part, THEN the Actor subsetted by the Part is created in the RequirementDefinition") @GivenSysONServer({ GeneralViewWithTopNodesTestProjectData.SCRIPT_PATH }) @Test diff --git a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/inheritance/GVCompartmentItemInheritanceTests.java b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/inheritance/GVCompartmentItemInheritanceTests.java index 12afc78d98..5e01733038 100644 --- a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/inheritance/GVCompartmentItemInheritanceTests.java +++ b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/general/view/inheritance/GVCompartmentItemInheritanceTests.java @@ -321,7 +321,6 @@ private static Stream objectiveCompartmentItemInheritanceArguments() private static Stream actorsCompartmentItemInheritanceArguments() { NestedElementTestArgument nestedActor = new NestedElementTestArgument("New Actor", "actors", "actor1"); - NestedElementTestArgument nestedActorWithoutEdge = new NestedElementTestArgument("New Actor", "actors", "actor1", "", 0, 1, 0); return Stream.of( Arguments.of(REQUIREMENT_DEFINITION_ARGUMENT, nestedActor, REQUIREMENT_DEFINITION_ARGUMENT, SUBCLASSIFICATION_ARGUMENT.withExtraEdges(1)), Arguments.of(REQUIREMENT_DEFINITION_ARGUMENT, nestedActor, REQUIREMENT_USAGE_ARGUMENT, FEATURE_TYPING_ARGUMENT.withExtraEdges(1)), @@ -336,14 +335,11 @@ private static Stream actorsCompartmentItemInheritanceArguments() { Arguments.of(SATISFY_REQUIREMENT_USAGE_ARGUMENT, nestedActor, SATISFY_REQUIREMENT_USAGE_ARGUMENT, REDEFINITION_ARGUMENT.withExtraEdges(1)), Arguments.of(SATISFY_REQUIREMENT_USAGE_ARGUMENT, nestedActor, SATISFY_REQUIREMENT_USAGE_ARGUMENT, SUBSETTING_ARGUMENT.withExtraEdges(1)), Arguments.of(SATISFY_REQUIREMENT_USAGE_ARGUMENT, nestedActor, SATISFY_REQUIREMENT_USAGE_ARGUMENT, REFERENCE_SUBSETTING_ARGUMENT.withExtraEdges(1)), - /* FIXME When https://github.com/eclipse-syson/syson/issues/2393 will be fixed, - following ConcernXXX specializations used must have an extra edge and - nestedActorWithoutEdge must be replaced by nestedActor */ - Arguments.of(CONCERN_DEFINITION_ARGUMENT, nestedActorWithoutEdge, CONCERN_DEFINITION_ARGUMENT, SUBCLASSIFICATION_ARGUMENT), - Arguments.of(CONCERN_DEFINITION_ARGUMENT, nestedActorWithoutEdge, CONCERN_USAGE_ARGUMENT, FEATURE_TYPING_ARGUMENT), - Arguments.of(CONCERN_USAGE_ARGUMENT, nestedActorWithoutEdge, CONCERN_USAGE_ARGUMENT, REDEFINITION_ARGUMENT), - Arguments.of(CONCERN_USAGE_ARGUMENT, nestedActorWithoutEdge, CONCERN_USAGE_ARGUMENT, SUBSETTING_ARGUMENT), - Arguments.of(CONCERN_USAGE_ARGUMENT, nestedActorWithoutEdge, CONCERN_USAGE_ARGUMENT, REFERENCE_SUBSETTING_ARGUMENT) + Arguments.of(CONCERN_DEFINITION_ARGUMENT, nestedActor, CONCERN_DEFINITION_ARGUMENT, SUBCLASSIFICATION_ARGUMENT.withExtraEdges(1)), + Arguments.of(CONCERN_DEFINITION_ARGUMENT, nestedActor, CONCERN_USAGE_ARGUMENT, FEATURE_TYPING_ARGUMENT.withExtraEdges(1)), + Arguments.of(CONCERN_USAGE_ARGUMENT, nestedActor, CONCERN_USAGE_ARGUMENT, REDEFINITION_ARGUMENT.withExtraEdges(1)), + Arguments.of(CONCERN_USAGE_ARGUMENT, nestedActor, CONCERN_USAGE_ARGUMENT, SUBSETTING_ARGUMENT.withExtraEdges(1)), + Arguments.of(CONCERN_USAGE_ARGUMENT, nestedActor, CONCERN_USAGE_ARGUMENT, REFERENCE_SUBSETTING_ARGUMENT.withExtraEdges(1)) ); } diff --git a/backend/views/syson-standard-diagrams-view/src/main/java/org/eclipse/syson/standard/diagrams/view/SDVDiagramDescriptionProvider.java b/backend/views/syson-standard-diagrams-view/src/main/java/org/eclipse/syson/standard/diagrams/view/SDVDiagramDescriptionProvider.java index a4ad215c16..7784556bb2 100644 --- a/backend/views/syson-standard-diagrams-view/src/main/java/org/eclipse/syson/standard/diagrams/view/SDVDiagramDescriptionProvider.java +++ b/backend/views/syson-standard-diagrams-view/src/main/java/org/eclipse/syson/standard/diagrams/view/SDVDiagramDescriptionProvider.java @@ -1125,8 +1125,12 @@ private List> createAllUsageRequirementCom usageCompositeEdgeDescriptionProviders.add(new NestedActorEdgeDescriptionProvider(SysmlPackage.eINSTANCE.getRequirementDefinition(), SysmlPackage.eINSTANCE.getRequirementDefinition_ActorParameter(), colorProvider, this.getDescriptionNameGenerator())); + usageCompositeEdgeDescriptionProviders.add(new NestedActorEdgeDescriptionProvider(SysmlPackage.eINSTANCE.getConcernDefinition(), SysmlPackage.eINSTANCE.getRequirementDefinition_ActorParameter(), + colorProvider, this.getDescriptionNameGenerator())); usageCompositeEdgeDescriptionProviders.add(new NestedActorEdgeDescriptionProvider(SysmlPackage.eINSTANCE.getRequirementUsage(), SysmlPackage.eINSTANCE.getRequirementUsage_ActorParameter(), colorProvider, this.getDescriptionNameGenerator())); + usageCompositeEdgeDescriptionProviders.add(new NestedActorEdgeDescriptionProvider(SysmlPackage.eINSTANCE.getConcernUsage(), SysmlPackage.eINSTANCE.getRequirementUsage_ActorParameter(), + colorProvider, this.getDescriptionNameGenerator())); usageCompositeEdgeDescriptionProviders.add(new NestedActorEdgeDescriptionProvider(SysmlPackage.eINSTANCE.getSatisfyRequirementUsage(), SysmlPackage.eINSTANCE.getRequirementUsage_ActorParameter(), colorProvider, this.getDescriptionNameGenerator())); diff --git a/doc/content/modules/user-manual/pages/release-notes/2026.9.0.adoc b/doc/content/modules/user-manual/pages/release-notes/2026.9.0.adoc index 6d97343453..e8d0ecc6fc 100644 --- a/doc/content/modules/user-manual/pages/release-notes/2026.9.0.adoc +++ b/doc/content/modules/user-manual/pages/release-notes/2026.9.0.adoc @@ -77,6 +77,7 @@ The direction of the edge is given by the `#original` and `#derive` metadata of * In diagrams: +** Fix the missing graphical edge between `ConcernUsage` or `ConcernDefinition` graphical nodes and the Actors created from them. ** Fix dropping a nested `AttributeUsage` from the _Explorer_ onto a _General View_ diagram so it is visible on the first drop. ** Fix `Comment` graphical nodes so changing their background color no longer changes their border color. ** Fix the nested composition edge tool label on `ConcernUsage` graphical nodes in _General View_ diagrams. From 43a571978e0c55304bb734e3fdc8db8fb8644fe7 Mon Sep 17 00:00:00 2001 From: Axel RICHARD Date: Thu, 13 Aug 2026 15:08:08 +0200 Subject: [PATCH 2/2] [releng] Fix check-ts to handle imports from @eclipse-syson namespaces Signed-off-by: Axel RICHARD --- scripts/check-ts.js | 59 +++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/scripts/check-ts.js b/scripts/check-ts.js index 54d82b46bc..2e22b10c67 100644 --- a/scripts/check-ts.js +++ b/scripts/check-ts.js @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023 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 @@ -10,7 +10,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -const childProcess = require('child_process'); +const childProcess = require("child_process"); const event = process.env.GITHUB_EVENT; @@ -20,11 +20,11 @@ const headSHA = body.pull_request.head.sha; const gitLogFilesCommand = `git diff --name-only --diff-filter=d ${baseSHA}...${headSHA}`; const gitLogFilesResult = childProcess.execSync(gitLogFilesCommand, { - encoding: 'utf8', + encoding: "utf8", }); const filePaths = gitLogFilesResult.split(/\r?\n/); -console.log('The following files will be reviewed:'); +console.log("The following files will be reviewed:"); const linesWithReferencesToDeprecatedCSS = []; const linesWithMissingTypes = []; @@ -36,41 +36,42 @@ for (let index = 0; index < filePaths.length; index++) { const filePath = filePaths[index]; console.log(filePath); - if (filePath.endsWith('.ts') || filePath.endsWith('.tsx')) { + if (filePath.endsWith(".ts") || filePath.endsWith(".tsx")) { const gitLogCommand = `git diff ${baseSHA}...${headSHA} -- ${filePath}`; - const result = childProcess.execSync(gitLogCommand, { encoding: 'utf8' }); - const lines = result.split(/\r?\n/).filter((line) => line.startsWith('+')); + const result = childProcess.execSync(gitLogCommand, { encoding: "utf8" }); + const lines = result.split(/\r?\n/).filter((line) => line.startsWith("+")); for (let index = 0; index < lines.length; index++) { const line = lines[index]; - if (line.includes('var(--')) { + if (line.includes("var(--")) { linesWithReferencesToDeprecatedCSS.push( - `${filePath}#${index}: ${line}` + `${filePath}#${index}: ${line}`, ); } else if ( - line.includes('useState(') || - line.includes('useQuery(') || - line.includes('useMutation(') || - line.includes('useSubscription(') || - line.includes('useContext(') || - line.includes('useRef(') || - line.includes('useMachine(') || - line.includes('useReactFlow(') || - line.includes('useNodes(') || - line.includes('useEdges(') + line.includes("useState(") || + line.includes("useQuery(") || + line.includes("useMutation(") || + line.includes("useSubscription(") || + line.includes("useContext(") || + line.includes("useRef(") || + line.includes("useMachine(") || + line.includes("useReactFlow(") || + line.includes("useNodes(") || + line.includes("useEdges(") ) { linesWithMissingTypes.push(`${filePath}#${index}: ${line}`); - } else if (line.includes(': Array<')) { + } else if (line.includes(": Array<")) { linesWithArrayType.push(`${filePath}#${index}: ${line}`); - } else if (line.includes('!.')) { + } else if (line.includes("!.")) { linesWithPotentialNullOrUndefined.push(`${filePath}#${index}: ${line}`); } else if ( - line.includes('@eclipse-sirius/sirius-components') && - line.includes('/dist') + (line.includes("@eclipse-syson/") || + line.includes("@eclipse-sirius/")) && + line.includes("/dist") ) { lineWithSiriusComponentsImportWithDist.push( - `${filePath}#${index}: ${line}` + `${filePath}#${index}: ${line}`, ); } } @@ -79,29 +80,29 @@ for (let index = 0; index < filePaths.length; index++) { if (linesWithReferencesToDeprecatedCSS.length > 0) { console.log( - 'The following lines should not reference deprecated CSS and instead use the theme' + "The following lines should not reference deprecated CSS and instead use the theme", ); console.log(linesWithReferencesToDeprecatedCSS); process.exit(1); } else if (linesWithMissingTypes.length > 0) { - console.log('The following lines should be properly typed'); + console.log("The following lines should be properly typed"); console.log(linesWithMissingTypes); process.exit(1); } else if (linesWithArrayType.length > 0) { console.log( - 'The following lines should be typed with Xxx[] instead of Array' + "The following lines should be typed with Xxx[] instead of Array", ); console.log(linesWithArrayType); process.exit(1); } else if (linesWithPotentialNullOrUndefined.length > 0) { console.log( - 'The following lines should instead check that the value is not null or undefined' + "The following lines should instead check that the value is not null or undefined", ); console.log(linesWithPotentialNullOrUndefined); process.exit(1); } else if (lineWithSiriusComponentsImportWithDist.length > 0) { console.log( - "The following imports are referencing element in sirius-components 'dist' folder" + "The following imports are referencing element in sirius-components 'dist' folder", ); console.log(lineWithSiriusComponentsImportWithDist); process.exit(1);