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
5 changes: 5 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ Other versions, such as intermediate releases, are intended solely for testing p
A default implementation is given with _org.eclipse.syson.sysml.helper.ImplicitSpecializationSwitch_.
This new object offers a way to register immutable `LibraryPackage`.
Any `Namespace` stored in those libraries are now cached for quick access.
- https://github.com/eclipse-syson/syson/issues/1355[#1355] [tests] Add coding rules tests on all modules.
As a consequence, some coding rules violations have been fixed.
The `org.eclipse.syson.services.grammars` package in `syson-direct-edit-grammar` has been renamed into `org.eclipse.syson.direct.edit.grammars`.
`AbtractItemUsageBorderNodeDescriptionProvider` has been renamed to `AbstractItemUsageBorderNodeDescriptionProvider`.

=== Dependency update

Expand Down Expand Up @@ -77,6 +81,7 @@ Consumers may override this by providing an implementation of `org.eclipse.syson
- https://github.com/eclipse-syson/syson/issues/1497[#1497] [database] Update the PostgreSQL version used in the docker image (used for tests purposes) to 15.
- https://github.com/eclipse-syson/syson/issues/1502[#1502] [libraries] Update standard libraries to SysMLv2 2025-07 specification.
- https://github.com/eclipse-syson/syson/issues/1432[#1432] [metamodel] Add implicit `Subclassification` or `Subsetting` when using semantic `MetadataUsage`.
- https://github.com/eclipse-syson/syson/issues/1355[#1355] [tests] Add coding rules tests on all modules.

=== New features

Expand Down
7 changes: 7 additions & 0 deletions backend/application/syson-application-configuration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<artifactId>syson-siriusweb-customnodes-metamodel-edit</artifactId>
<version>2025.8.5</version>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand All @@ -101,6 +102,12 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.syson</groupId>
<artifactId>syson-tests</artifactId>
<version>2025.8.5</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2025 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
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.syson.application.configuration;

import com.tngtech.archunit.core.domain.JavaClasses;
import com.tngtech.archunit.core.importer.ClassFileImporter;
import com.tngtech.archunit.core.importer.ImportOption;

/**
* Constants shared across multiple tests.
*
* @author arichard
*/
public final class ArchitectureConstants {
public static final String SYSON_APPLICATION_CONFIGURATION_ROOT_PACKAGE = "org.eclipse.syson.application.configuration..";

public static final JavaClasses CLASSES = new ClassFileImporter()
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_JARS)
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_TESTS)
.importPackages(SYSON_APPLICATION_CONFIGURATION_ROOT_PACKAGE);

private ArchitectureConstants() {
// Prevent instantiation
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2025 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
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.syson.application.configuration;

import com.tngtech.archunit.core.domain.JavaClasses;

import org.eclipse.syson.tests.architecture.AbstractCodingRulesTests;

/**
* Coding rules tests.
*
* @author arichard
*/
public class CodingRulesTests extends AbstractCodingRulesTests {

@Override
protected String getProjectRootPackage() {
return ArchitectureConstants.SYSON_APPLICATION_CONFIGURATION_ROOT_PACKAGE;
}

@Override
protected JavaClasses getClasses() {
return ArchitectureConstants.CLASSES;
}
}
7 changes: 7 additions & 0 deletions backend/application/syson-sysml-export/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
<artifactId>syson-sysml-metamodel</artifactId>
<version>2025.8.5</version>
</dependency>
<!-- Tests -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand All @@ -81,6 +82,12 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.syson</groupId>
<artifactId>syson-tests</artifactId>
<version>2025.8.5</version>
<scope>test</scope>
</dependency>
<!-- Import test jar to access org.eclipse.syson.sysml.util -->
<dependency>
<groupId>org.eclipse.syson</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2025 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
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.syson.sysml.export;

import com.tngtech.archunit.core.domain.JavaClasses;
import com.tngtech.archunit.core.importer.ClassFileImporter;
import com.tngtech.archunit.core.importer.ImportOption;

/**
* Constants shared across multiple tests.
*
* @author arichard
*/
public final class ArchitectureConstants {
public static final String SYSON_SYSML_EXPORT_ROOT_PACKAGE = "org.eclipse.syson.sysml.export..";

public static final JavaClasses CLASSES = new ClassFileImporter()
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_JARS)
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_TESTS)
.importPackages(SYSON_SYSML_EXPORT_ROOT_PACKAGE);

private ArchitectureConstants() {
// Prevent instantiation
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2025 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
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.syson.sysml.export;

import com.tngtech.archunit.core.domain.JavaClasses;

import org.eclipse.syson.tests.architecture.AbstractCodingRulesTests;

/**
* Coding rules tests.
*
* @author arichard
*/
public class CodingRulesTests extends AbstractCodingRulesTests {

@Override
protected String getProjectRootPackage() {
return ArchitectureConstants.SYSON_SYSML_EXPORT_ROOT_PACKAGE;
}

@Override
protected JavaClasses getClasses() {
return ArchitectureConstants.CLASSES;
}
}
7 changes: 7 additions & 0 deletions backend/application/syson-sysml-import/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<artifactId>syson-services</artifactId>
<version>2025.8.5</version>
</dependency>
<!-- Tests -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand All @@ -82,6 +83,12 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.syson</groupId>
<artifactId>syson-tests</artifactId>
<version>2025.8.5</version>
<scope>test</scope>
</dependency>
<!--Required to be able to load standard libraries for proxy resolution toward element from the libraries in tests-->
<dependency>
<groupId>org.eclipse.syson</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2025 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
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.syson.sysml;

import com.tngtech.archunit.core.domain.JavaClasses;
import com.tngtech.archunit.core.importer.ClassFileImporter;
import com.tngtech.archunit.core.importer.ImportOption;

/**
* Constants shared across multiple tests.
*
* @author arichard
*/
public final class ArchitectureConstants {
public static final String SYSON_SYSML_IMPORT_ROOT_PACKAGE = "org.eclipse.syson.sysml.import..";

public static final JavaClasses CLASSES = new ClassFileImporter()
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_JARS)
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_TESTS)
.importPackages(SYSON_SYSML_IMPORT_ROOT_PACKAGE);

private ArchitectureConstants() {
// Prevent instantiation
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2025 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
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.syson.sysml;

import com.tngtech.archunit.core.domain.JavaClasses;

import org.eclipse.syson.tests.architecture.AbstractCodingRulesTests;

/**
* Coding rules tests.
*
* @author arichard
*/
public class CodingRulesTests extends AbstractCodingRulesTests {

@Override
protected String getProjectRootPackage() {
return ArchitectureConstants.SYSON_SYSML_IMPORT_ROOT_PACKAGE;
}

@Override
protected JavaClasses getClasses() {
return ArchitectureConstants.CLASSES;
}
}
7 changes: 7 additions & 0 deletions backend/application/syson-sysml-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
<artifactId>syson-services</artifactId>
<version>2025.8.5</version>
</dependency>
<!-- Tests -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand All @@ -91,6 +92,12 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.syson</groupId>
<artifactId>syson-tests</artifactId>
<version>2025.8.5</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2025 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
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.syson.sysml.validation;

import com.tngtech.archunit.core.domain.JavaClasses;
import com.tngtech.archunit.core.importer.ClassFileImporter;
import com.tngtech.archunit.core.importer.ImportOption;

/**
* Constants shared across multiple tests.
*
* @author arichard
*/
public final class ArchitectureConstants {
public static final String SYSON_SYSML_VALIDATION_ROOT_PACKAGE = "org.eclipse.syson.sysml.validation..";

public static final JavaClasses CLASSES = new ClassFileImporter()
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_JARS)
.withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_TESTS)
.importPackages(SYSON_SYSML_VALIDATION_ROOT_PACKAGE);

private ArchitectureConstants() {
// Prevent instantiation
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*******************************************************************************
* Copyright (c) 2025 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
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.syson.sysml.validation;

import com.tngtech.archunit.core.domain.JavaClasses;

import org.eclipse.syson.tests.architecture.AbstractCodingRulesTests;
import org.junit.jupiter.api.Test;

/**
* Coding rules tests.
*
* @author arichard
*/
public class CodingRulesTests extends AbstractCodingRulesTests {

@Override
protected String getProjectRootPackage() {
return ArchitectureConstants.SYSON_SYSML_VALIDATION_ROOT_PACKAGE;
}

@Override
protected JavaClasses getClasses() {
return ArchitectureConstants.CLASSES;
}

@Test
@Override
public void noMethodsShouldBeStatic() {
// SysMLv2ValidationRules contains static methods
}
}
Loading
Loading