Skip to content

ST6RI-916 org.omg.sysml.model module#750

Open
AxelRICHARD wants to merge 5 commits intomasterfrom
STR6I-916
Open

ST6RI-916 org.omg.sysml.model module#750
AxelRICHARD wants to merge 5 commits intomasterfrom
STR6I-916

Conversation

@AxelRICHARD
Copy link
Copy Markdown

@AxelRICHARD AxelRICHARD commented Apr 27, 2026

Motivation

This change decouples the generated SysML EMF metamodel from the org.omg.sysml Eclipse plug-in.

The generated model is now produced and published as a plain Java/Maven artifact, while Eclipse/Tycho consumers continue to access it through a dedicated OSGi wrapper bundle. This makes the model easier to reuse outside Eclipse, clarifies module ownership, and removes some unnecessary runtime dependencies from the generated code.

What Changed

  • Added org.omg.sysml.model as a new plain Java module containing:
    • the generated SysML EMF Java classes
    • SysML.ecore
    • SysML.genmodel
  • Added org.omg.sysml.model.bundle as a new Eclipse plug-in that:
    • wraps the org.omg.sysml.model JAR
    • packages the model resources for OSGi/Tycho consumption
    • exports the generated SysML EMF packages
  • Updated the root Maven reactor to build both new modules.
  • Removed generated model sources from org.omg.sysml/syntax-gen; org.omg.sysml no longer owns compilation of the generated EMF model.
  • Rewired dependent plug-ins to consume org.omg.sysml.model.bundle, including:
    • org.omg.sysml
    • org.omg.sysml.edit
    • org.omg.sysml.execution
    • org.omg.sysml.xtext
    • org.omg.kerml.xtext
  • Added org.omg.sysml.model.bundle to the Eclipse feature so it is shipped with the existing tooling.

Model Generation Changes

  • Updated the custom UML-to-Ecore importer to generate into:
    • plugin ID: org.omg.sysml.model
    • source directory: /org.omg.sysml.model/src/main/java
  • Updated the SysML namespace URI used by generation and QVTO references from:
    • https://www.omg.org/spec/SysML/20230201
    • to https://www.omg.org/spec/SysML/20250201
  • Added deterministic sorting of imported Ecore contents:
    • EClassifiers
    • EStructuralFeatures
    • EOperations

This reduces noisy regeneration diffs and stabilizes generated artifacts.

Primitive Type Simplification

  • Normalized imported UML primitive types to built-in Ecore datatypes during import.
  • Removed types.ecore.
  • Removed the generated org.omg.sysml.lang.types package and related generated classes.

This simplifies the metamodel structure and removes an extra generated dependency layer.

Runtime Dependency Cleanup

The generated model previously depended on UML2 helper-list implementations from org.eclipse.uml2.common.

This commit copies the required helper classes into the SysML model module and updates generation so the generated implementation classes import the local versions instead:

  • DerivedEObjectEList
  • DerivedUnionEObjectEList
  • UnionEObjectEList

The org.omg.sysml.uml.ecore.importer has been updated to rewrite those imports automatically after generation.

Impact

  • The SysML metamodel is now reusable as a regular Java library outside Eclipse.
  • Eclipse/Tycho-based modules remain compatible through org.omg.sysml.model.bundle.
  • Ownership of generated EMF code is now explicit and isolated in org.omg.sysml.model.
  • Generated sources are cleaner and less coupled to UML2 runtime internals.
  • Most of the file churn in this commit is due to regeneration and relocation of generated EMF sources, not hand-written functional logic changes.

AxelRICHARD and others added 2 commits April 13, 2026 15:39
- new org.omg.sysml.model plain java module (not an Eclipse plug-in)
 - the generated Java model code
 - org.omg.sysml.model/src/main/resources/model/SysML.ecore
 - org.omg.sysml.model/src/main/resources/model/SysML.genmodel
- new org.omg.sysml.model.bundle module (Eclipse plug-in)
 - bridge that plain Java model into the Eclipse/OSGi world
 - wrap the plain org.omg.sysml.model jar and the model resources as an
Eclipse bundle so PDE/Tycho plug-ins can access exported packages like
org.omg.sysml.lang.sysml and resolve EMF generated-package registration
through Eclipse
- org.omg.sysml.model.gencode
 - order alphabetically ecore EClasses and eStructuralFeatures
 - removal of unwanted UML runtime dependencies from generated sources
- updated build
- Also updated SysML_.genmodel for use with Xtext (without change to
Xtext builds).
- And deleted types.ecore.
- copy org.eclipse.uml2.common into org.omg.sysml.model. It is allowed
to do that as both modules are under EPL-2.0 license. Update
org.omg.sysml.uml.ecore.importer to handle that change.

Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
@AxelRICHARD AxelRICHARD changed the title Str6 i 916 STR6I-916 Apr 27, 2026
@AxelRICHARD AxelRICHARD added this to the 2026-04 milestone Apr 27, 2026
@AxelRICHARD AxelRICHARD added the enhancement New feature or request label Apr 27, 2026
@AxelRICHARD AxelRICHARD requested a review from seidewitz April 27, 2026 06:43
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
@seidewitz seidewitz changed the title STR6I-916 STR6I-916 org.omg.sysml.model module Apr 27, 2026
@seidewitz seidewitz requested review from himi and hpdekoning April 27, 2026 21:11
@seidewitz seidewitz self-assigned this Apr 27, 2026
@AxelRICHARD AxelRICHARD changed the title STR6I-916 org.omg.sysml.model module New org.omg.sysml.model module Apr 28, 2026
@AxelRICHARD AxelRICHARD changed the title New org.omg.sysml.model module ST6RI-916 org.omg.sysml.model module Apr 28, 2026
AxelRICHARD and others added 2 commits April 29, 2026 17:42
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
Prior to this change, opening a model file in the Xtext IDE caused
an error (unable to load EObject).
@seidewitz
Copy link
Copy Markdown
Member

As originally proposed, this refactoring worked in Jupyter and the Xpect tests, but model files failed to open in the Xtext IDE, ultimately due to the inability to load the EObject class. I have now pushed a commit that resolves this problem by adding dependencies on the org.eclipse.emf.common and org.eclipse.emf.ecore plugins.

@AxelRICHARD
Copy link
Copy Markdown
Author

AxelRICHARD commented Apr 30, 2026

@seidewitz great thank you!
For those who have compiling issues inside Eclipse, you have to do a Maven Update (inside eclipse with M2E) on /org.omg.sysml.model.bundle and then refresh plugins the workspace.

@himi
Copy link
Copy Markdown
Member

himi commented Apr 30, 2026

This PR radically changed the project structure and dependencies.

  • M2E is now mandatory to resolve dependencies.
  • org.eclipse.emf.ant is a new dependent of org.omg.sysml.model.bundle. Can you check whether or not the dependency of org.eclipse.emf.ant is really needed? It is used to generate code from EMF model. I tried to remove the dependency and it seems to work without it.
  • mvn install is critical to update org.omg.sysml.model bundle
  • I needed to reset the target environment to resolve org.apache.commons.logging (I have no idea why it's needed)

I could make it work in my environment by fixing the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants