ST6RI-916 org.omg.sysml.model module#750
Conversation
- 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>
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
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).
|
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 |
|
@seidewitz great thank you! |
|
This PR radically changed the project structure and dependencies.
I could make it work in my environment by fixing the issues. |
The dependency on |
|
Thank you for the comment. So may I remove it? |
Sure, if you like. I wasn't sure from you message of 2 days ago if there still any changes you would like @AxelRICHARD to make. What is the status of updating the version number updates (other than plugin version)? |
himi
left a comment
There was a problem hiding this comment.
I removed org.eclipse.emf.ant dependency in org.omg.sysml.model.bundle and it worked correctly.
|
|
@seidewitz @himi I still have to update the pom.xml to handle the version number updates (other than plugin version). |
Update the root set-version antrun step to keep org.omg.sysml.model.bundle metadata in sync by rewriting the embedded model JAR path in MANIFEST.MF, build.properties, and .classpath, and normalize internal org.omg bundle Require-Bundle version pins to the reactor version. Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
|
@seidewitz @himi The update is ok. |
|
@seidewitz @himi It is ok, you can do a last review, thank you. |
|
@AxelRICHARD
However, the first time I do step 4 (Maven install), the build fails because the Can you reproduce this behavior? Can you fix it? Or do I need to do something different? |
Motivation
This change decouples the generated SysML EMF metamodel from the
org.omg.sysmlEclipse 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
org.omg.sysml.modelas a new plain Java module containing:SysML.ecoreSysML.genmodelorg.omg.sysml.model.bundleas a new Eclipse plug-in that:org.omg.sysml.modelJARorg.omg.sysml/syntax-gen;org.omg.sysmlno longer owns compilation of the generated EMF model.org.omg.sysml.model.bundle, including:org.omg.sysmlorg.omg.sysml.editorg.omg.sysml.executionorg.omg.sysml.xtextorg.omg.kerml.xtextorg.omg.sysml.model.bundleto the Eclipse feature so it is shipped with the existing tooling.Model Generation Changes
org.omg.sysml.model/org.omg.sysml.model/src/main/javahttps://www.omg.org/spec/SysML/20230201https://www.omg.org/spec/SysML/20250201EClassifiersEStructuralFeaturesEOperationsThis reduces noisy regeneration diffs and stabilizes generated artifacts.
Primitive Type Simplification
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:
The org.omg.sysml.uml.ecore.importer has been updated to rewrite those imports automatically after generation.
Impact