-
Notifications
You must be signed in to change notification settings - Fork 3
SysML2.NET.CodeGenerator
The SysML2.NET.CodeGenerator
project contains convention-based HandleBars.NET code generators that use the SysML2 Ecore meta-model as input for code-generation. The Starion Group ecorenetto library is used to parse the SysML.ecore model.
NOTE: The code-generators are executed by running the associated test fixtures of the
SysML2.NET.CodeGenerator.Tests
project.
The following folders are present in the code generator project:
The SysML2 data model is maintained using UML and is converted to an Ecore model. The source models can be found here SysML.uml and here SysML.ecore, the Ecore model is manualy copied from the Systems-Modeling/SysML-v2-Pilot-Implementation
git repository to the data model
folder on each monthly release.
The Extensions
namespace (folder) contains static extension methods to support code generation specific to the SysML.Ecore metamodel. For instance, the QueryCSharpTypeName
and QueryGraphQLTypeName
provide (hard-coded) mappings of a Type in the Ecore model to its C# or GraphQL counterpart.
The Generators
namespace (folder) contains all the code generators.
The HandleBarHelpers
namespace (folder) contains the custom Block Helpers that are used by the codegenerators. Block helpers make it possible to define functionality that can invoke the passed block with a new context.
The ModelInspector class is used to perform a variability analysis of the SysML.Ecore model to investigate and report on all the variations in data-types, multiplicity, inheritance etc. that are presented in the datamodel
The generator templates are located in the Templates
folder. The following applies to the templates:
- The templates extension shall be
.hbs
- The build action property of the file shall be set to None
- The Copy to Output Directory property of the file shall be set to Copy Always.
copyright @ Starion Group S.A.